pub struct Cfg<T>where
T: Configuration,{ /* private fields */ }Expand description
A typed handle to a value in a SharedCfg.
Implementations§
Source§impl<T> Cfg<T>where
T: Configuration,
impl<T> Cfg<T>where
T: Configuration,
Returns a handle to the complete shared configuration.
Returns another typed value from the same shared configuration.
A missing value falls back to a per-thread default, as described in
SharedCfg::get.
Trait Implementations§
Source§impl<T> Clone for Cfg<T>where
T: Configuration,
impl<T> Clone for Cfg<T>where
T: Configuration,
Source§impl<T> Default for Cfg<T>where
T: Configuration,
impl<T> Default for Cfg<T>where
T: Configuration,
Source§impl<T> Deref for Cfg<T>where
T: Configuration,
impl<T> Deref for Cfg<T>where
T: Configuration,
Source§fn from(cfg: SharedCfgBuilder) -> Cfg<T>
fn from(cfg: SharedCfgBuilder) -> Cfg<T>
Converts to this type from the input type.
Source§impl<T> From<T> for Cfg<T>where
T: Configuration,
Wraps a standalone value in a new shared configuration tagged --.
impl<T> From<T> for Cfg<T>where
T: Configuration,
Wraps a standalone value in a new shared configuration tagged --.
There is no conversion from &T: a borrowed value cannot be moved into a
configuration. Pass the value by value, clone an existing Cfg handle,
or look up the registered value with value.ctx().get::<T>().
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Cfg<T>
impl<T> !Send for Cfg<T>
impl<T> !Sync for Cfg<T>
impl<T> !UnwindSafe for Cfg<T>
impl<T> Freeze for Cfg<T>
impl<T> Unpin for Cfg<T>
impl<T> UnsafeUnpin for Cfg<T>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more