logo
pub struct BindDefiner<System, Binder, Func> { /* private fields */ }
Expand description

The definer (static builder) for Bind.

Implementations

Specifying the initializer function

One of the following methods should be used to specify the initializer for the binding being defined.

Use the function to initialize the binding contents.

Use the function with dependency to initialize the binding contents.

Zero-initialize the binding contents.

Zero-initialize the binding contents even if it might be unsafe.

Safety

If zero initialization is not a valid bit pattern for T, accessing the contents may result in an undefined behavior.

Skip the initialization of the binding contents even if it might be unsafe.

Safety

If the uninitialized state is not valid for T, accessing the contents may result in an undefined behavior.

Indicate that the evaluation of the initializer may cause a side-effect that the dependency solver must not remove implicitly.

Unimplemented: Pruning unused bindings is not implemented yet. Therefore, this method is no-op.

Finalization

The following method defines a binding using the provided parameter.

Complete the definition of a binding, returning a reference to it.

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.