pub struct SyncWrapper<T, E> where
    T: Send + 'static,
    E: Send + 'static, 
{ /* private fields */ }
👎 Deprecated since 0.9.1:

This module has been deprecated in favor of the dedicated deadpool-sync utility crate.

Available on crate feature managed only.
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

👎 Deprecated since 0.9.1:

This module has been deprecated in favor of the dedicated deadpool-sync utility crate.

Creates a new wrapped object.

👎 Deprecated since 0.9.1:

This module has been deprecated in favor of the dedicated deadpool-sync utility crate.

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.

👎 Deprecated since 0.9.1:

This module has been deprecated in favor of the dedicated deadpool-sync utility crate.

Indicates whether the underlying Mutex has been poisoned.

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

👎 Deprecated since 0.9.1:

This module has been deprecated in favor of the dedicated deadpool-sync utility crate.

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

👎 Deprecated since 0.9.1:

This module has been deprecated in favor of the dedicated deadpool-sync utility crate.

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

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.