pub struct Config<'a> { /* private fields */ }Implementations§
Source§impl<'a> Config<'a>
impl<'a> Config<'a>
pub fn load(contents: Vec<&'a str>) -> Config<'_>
pub fn get_config(&self) -> String
pub fn list_contexts(&self) -> Result<String, Box<dyn Error>>
pub fn check_context(&self, context: &str) -> Result<bool, &'static str>
pub fn get_current_context(&self) -> Result<&str, &'static str>
pub fn set_current_context( &'a self, new_context: &'a str, ) -> Result<(), &'static str>
pub fn unset_current_context(&'a self) -> Result<(), &'static str>
Trait Implementations§
Auto Trait Implementations§
impl<'a> !Freeze for Config<'a>
impl<'a> !RefUnwindSafe for Config<'a>
impl<'a> Send for Config<'a>
impl<'a> !Sync for Config<'a>
impl<'a> Unpin for Config<'a>
impl<'a> UnwindSafe for Config<'a>
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