Struct desync::desync::Desync

source ·
pub struct Desync<T: Send> { /* private fields */ }
Expand description

A data storage structure used to govern synchronous and asynchronous access to an underlying object.

Implementations

Creates a new Desync object

👎Deprecated since 0.3.0: please use desync instead

Performs an operation asynchronously on this item. This function will return immediately and the job will happen on a separate thread at some time in the future (generally fairly soon).

Jobs are always performed in the order that they are queued and are always performed synchronously with respect to this object.

Performs an operation asynchronously on this item. This function will return immediately and the job will happen on a separate thread at some time in the future (generally fairly soon).

Jobs are always performed in the order that they are queued and are always performed synchronously with respect to this object.

Performs an operation synchronously on this item. This will be queued with any other jobs that this item may be performing, and this function will not return until the job is complete and the result is available.

Performs an operation asynchronously on the contents of this item, returning the result via a future.

After the pending operations for this item are performed, waits for the supplied future to complete and then calls the specified function

Trait Implementations

Executes the destructor for this type. 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.