pub struct Context { /* private fields */ }Implementations§
Source§impl Context
impl Context
Sourcepub fn new() -> Self
pub fn new() -> Self
attempts to build the settings from the configured sources, falling back to the default
Sourcepub const fn from_config(settings: Settings) -> Self
pub const fn from_config(settings: Settings) -> Self
initialize a new context from the given configuration
Sourcepub const fn settings(&self) -> &Settings
pub const fn settings(&self) -> &Settings
returns a reference to the Settings of the current context.
Sourcepub fn settings_mut(&mut self) -> &mut Settings
pub fn settings_mut(&mut self) -> &mut Settings
returns a mutable reference to the Settings of the current context.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Context
impl<'de> Deserialize<'de> for Context
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Context
impl Ord for Context
Source§impl PartialOrd for Context
impl PartialOrd for Context
impl Eq for Context
impl StructuralPartialEq for Context
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations§
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