Struct std::cell::CellStable [-]  [+] [src]

pub struct Cell<T> {
    // some fields omitted
}

A mutable memory location that admits only Copy data.

Methods

impl<T> Cell<T>

fn new(value: T) -> Cell<T>

Creates a new Cell containing the given value.

fn get(&self) -> T

Returns a copy of the contained value.

fn set(&self, value: T)

Sets the contained value.

unsafe fn as_unsafe_cell(&'a self) -> &'a UnsafeCell<T>

Get a reference to the underlying UnsafeCell.

This can be used to circumvent Cell's safety checks.

This function is unsafe because UnsafeCell's field is public.

Trait Implementations

impl<T> Send for Cell<T>

impl<T> Clone for Cell<T>

fn clone(&self) -> Cell<T>

fn clone_from(&mut self, &Cell<T>)

impl<T: Default> Default for Cell<T>

fn default() -> Cell<T>

impl<T: PartialEq<T>> PartialEq<Cell<T>> for Cell<T>

fn eq(&self, other: &Cell<T>) -> bool

fn ne(&self, &Cell<T>) -> bool

impl<T: Show> Show for Cell<T>

fn fmt(&self, f: &mut Formatter) -> Result<(), Error>