Struct std::cell::Cell[src]

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

A mutable memory location that admits only Copy data.

Methods

impl<T: Copy> Cell<T>

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

Creates a new Cell containing the given value.

fn get<T: Copy>(&self) -> T

Returns a copy of the contained value.

fn set<T: Copy>(&self, value: T)

Sets the contained value.

Trait Implementations

impl<T: Copy> Clone for Cell<T>

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

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

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

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

fn ne<T: Copy + PartialEq>(&self, &Cell<T>) -> bool

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

fn fmt<T: Copy + Show>(&self, f: &mut Formatter) -> Result<(), FormatError>