pub struct SendUniqueCell<T: SendUnique> { /* private fields */ }
Expand description

Allows sending reference counted objects that don’t implement Send to other threads as long as only a single reference to the object exists.

Implementations

Create a new SendUniqueCell out of obj

Fails if obj is not unique at this time

Borrow the contained object or panic if borrowing is not possible at this time

Try borrowing the contained object

Borrowing is possible as long as only a single reference to the object exists, or it is borrowed from the same thread currently

Extract the contained object or panic if it is not possible at this time

Try extracting the contained object

Borrowing is possible as long as only a single reference to the object exists, or it is borrowed from the same thread currently

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.