Struct r3::sync::mutex::Definer

source ·
pub struct Definer<System, Source> { /* private fields */ }
Available on crate feature sync only.
Expand description

The definer (static builder) for StaticMutex.

Implementations

Specify the mutex’s protocol. Defaults to None when unspecified.

Initial Value

The following methods specify the initial value for the contained object (T).

If none of the following methods are called, T will be constructed by its Default implementation.

Use the specified function to provide the initial value.

The semantics of the method’s parameter is similar to that of BindDefiner::init.

Use the specified function with dependency to provide the initial value.

The semantics of the method’s parameters is similar to that of BindDefiner::init_with_bind.

Take the specified binding to use as this object’s contents.

Use the specified existing hunk as this object’s storage.

Safety

This object grants exclusive access (&mut T) to the UnsafeCell’s contents based on the assumption that no accesses are made through other means, and that T is initialized by the time the boot phase completes.

Finalization

The following method completes the definition of a mutex.

Complete the definition of a mutex, returning a reference to the mutex.

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.