Struct r3_core::bind::BindDefiner

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

The definer (static builder) for Bind.

Implementations§

source§

impl<System> BindDefiner<System, BinderUnspecified, FuncUnspecified>

Specifying the initializer function

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

source

pub const fn init<Func>(self, func: Func) -> BindDefiner<System, (), Func>

Use the function to initialize the binding contents.

source

pub const fn init_with_bind<Binder, Func>( self, binder: Binder, func: Func ) -> BindDefiner<System, Binder, Func>

Use the function with dependency to initialize the binding contents.

source

pub const fn zeroed<T: Zeroable>( self ) -> BindDefiner<System, (), FnBindNever<T>>

Zero-initialize the binding contents.

source

pub const unsafe fn zeroed_unchecked<T>( self ) -> BindDefiner<System, (), FnBindNever<T>>

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.

source

pub const unsafe fn uninit_unchecked<T>( self ) -> BindDefiner<System, (), FnBindNever<T>>

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.

source§

impl<System, Binder, Func> BindDefiner<System, Binder, Func>

source

pub const fn unpure(self) -> Self

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.

source§

impl<System, Binder, Func> BindDefiner<System, Binder, Func>

Finalization

The following method defines a binding using the provided parameter.

source

pub const fn finish<'pool, C>( self, cfg: &mut Cfg<'pool, C> ) -> Bind<'pool, System, <Func as FnBind<Binder>>::Output>where C: CfgBase<System = System>, System: KernelBase + KernelStatic, Func: FnBind<Binder>,

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

Auto Trait Implementations§

§

impl<System, Binder, Func> RefUnwindSafe for BindDefiner<System, Binder, Func>where Binder: RefUnwindSafe, Func: RefUnwindSafe,

§

impl<System, Binder, Func> Send for BindDefiner<System, Binder, Func>where Binder: Send, Func: Send,

§

impl<System, Binder, Func> Sync for BindDefiner<System, Binder, Func>where Binder: Sync, Func: Sync,

§

impl<System, Binder, Func> Unpin for BindDefiner<System, Binder, Func>where Binder: Unpin, Func: Unpin,

§

impl<System, Binder, Func> UnwindSafe for BindDefiner<System, Binder, Func>where Binder: UnwindSafe, Func: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.