Struct deadpool_sync::SyncWrapper[][src]

pub struct SyncWrapper<T> where
    T: Send + 'static, 
{ /* fields omitted */ }
Expand description

Wrapper for objects which only provides blocking functions that need to be called on a separate thread.

Access to the wrapped object is provided via the SyncWrapper::interact() method.

Implementations

Creates a new wrapped object.

Interacts with the underlying object.

Expects a closure that takes the object as its parameter. The closure is executed in a separate thread so that the async runtime is not blocked.

Indicates whether the underlying Mutex has been poisoned.

This happens when a panic occurs while interacting with the object.

Lock the underlying mutex and return a guard for the inner object.

Try to lock the underlying mutex and return a guard for the inner object.

Trait Implementations

Formats the value using the given formatter. Read more

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

Performs the conversion.

Performs the conversion.

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.