Struct more_sync::Carrier[][src]

pub struct Carrier<T> { /* fields omitted */ }
Expand description

A Carrier that manages the lifetime of an instance of type T.

The carrier owns the instance (the target). References to the target can be obtained by calling the create_ref method. The references returned by the method will be valid as long as the reference is alive.

The carrier can be closed, after which no new references can be obtained. The carrier can also wait for all references it gave out to be dropped. The ownership of target will be returned to the caller after the wait is complete. The caller can then carry out clean-ups or any other type of work that requires an owned instance of type T.

Implementations

Create a carrier that carries and owns target.

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.