pub struct BindRef<System, T>(_);
Expand description
A reference to a binding. Doubles as a binder.
Created by Bind::as_ref
.
It doesn’t provide access to the contents by itself because it could be
used before the binding is initialized. Index BindTable
by this type to
borrow the contents as &'static T
.
Trait Implementations
sourceimpl<T, System> Binder for BindRef<System, T>where
T: 'static,
System: KernelBase + KernelStatic<System>,
impl<T, System> Binder for BindRef<System, T>where
T: 'static,
System: KernelBase + KernelStatic<System>,
Materializes BindRef<System, T>
as &'static T
. Can only be consumed by
executables and not by bindings.
sourceconst fn register_dependency(&self, ctx: &mut CfgBindCtx<'_>)
const fn register_dependency(&self, ctx: &mut CfgBindCtx<'_>)
Define a binding dependency in
CfgBindCtx::bind_registry
. Read moresourceconst fn into_runtime_binder(self) -> <BindRef<System, T> as Binder>::Runtime
const fn into_runtime_binder(self) -> <BindRef<System, T> as Binder>::Runtime
sourceimpl<System, T> Index<BindRef<System, T>> for BindTable<System>where
System: KernelBase + KernelStatic<System>,
T: 'static,
impl<System, T> Index<BindRef<System, T>> for BindTable<System>where
System: KernelBase + KernelStatic<System>,
T: 'static,
sourceimpl<T, System> RuntimeBinder for BindRef<System, T>where
T: 'static,
System: KernelBase + KernelStatic<System>,
impl<T, System> RuntimeBinder for BindRef<System, T>where
T: 'static,
System: KernelBase + KernelStatic<System>,
sourceunsafe fn materialize<'call>(
self
) -> <BindRef<System, T> as RuntimeBinder>::Target<'call>
unsafe fn materialize<'call>(
self
) -> <BindRef<System, T> as RuntimeBinder>::Target<'call>
Construct a target object at runtime, using the intermediate product
constructed by
Binder::into_runtime_binder
. Read moreimpl<System, T> Copy for BindRef<System, T>
Auto Trait Implementations
impl<System, T> !RefUnwindSafe for BindRef<System, T>
impl<System, T> Send for BindRef<System, T>
impl<System, T> Sync for BindRef<System, T>
impl<System, T> Unpin for BindRef<System, T>where
System: Unpin,
impl<System, T> !UnwindSafe for BindRef<System, T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more