Struct movecell::MoveCell [] [src]

pub struct MoveCell<T>(_);

A container similar to std::cell::Cell, but that also supports not-implicitly-copyable types.

Methods

impl<T> MoveCell<T>
[src]

Create a new MoveCell containing the given value.

Consume the MoveCell and return the inner value.

Return the inner value after replacing it with the given value.

Returns a reference to the underlying UnsafeCell.

Unsafety

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

impl<T: Default> MoveCell<T>
[src]

Convenience methods for when there is a default value.

Return the inner value after replacing it with the default value.

Take the value, and return it in a Borrow guard that will return it when dropped. The cell’s contents are set to the default value until the guard is dropped.

Trait Implementations

impl<T: Default> Default for MoveCell<T>
[src]

Returns the "default value" for a type. Read more

impl<T: Default + Clone> Clone for MoveCell<T>
[src]

The cell’s contents are temporarily set to the default value during the clone.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Default + Debug> Debug for MoveCell<T>
[src]

The cell’s contents are temporarily set to the default value during the formatting.

Formats the value using the given formatter.

impl<T: Default + Eq> Eq for MoveCell<T>
[src]

The cell’s contents are temporarily set to the default value during the comparaison.

impl<T: Default + PartialEq> PartialEq for MoveCell<T>
[src]

The cell’s contents are temporarily set to the default value during the comparaison.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.