pub struct Settings { /* private fields */ }Expand description
Global runtime settings
Implementations§
Source§impl Settings
impl Settings
Sourcepub fn initialize() -> Self
pub fn initialize() -> Self
Sourcepub fn root_path(&self) -> RootPath
pub fn root_path(&self) -> RootPath
Getter for root_path
§Returns
A cloned reference to internal root_path. If this reference is not dropped (ie: stored
as a field in a struct), then Settings::set_root() will panic.
Sourcepub fn set_root<P>(&mut self, path: P)
pub fn set_root<P>(&mut self, path: P)
Setter for root_path.
This method can only be called before initialization
§Parameters
path: New path of top-level directory. Coerces values intoString.
§Panics
Panics is thrown if any objects are already using this path. This would
happen if not called before initialization of crate::storage::Group’s or
crate::storage::Log’s.
Trait Implementations§
impl StructuralPartialEq for Settings
Auto Trait Implementations§
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnwindSafe for Settings
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