pub struct Config { /* private fields */ }Expand description
Validated configuration for tokenless components.
The name field must be non-empty.
Implementations§
Source§impl Config
impl Config
Sourcepub fn new(name: impl Into<String>) -> Result<Self>
pub fn new(name: impl Into<String>) -> Result<Self>
Create a new Config with a non-empty name.
§Errors
Returns crate::CoreError::App if name is empty or whitespace-only.
Sourcepub fn with_description(self, desc: impl Into<String>) -> Self
pub fn with_description(self, desc: impl Into<String>) -> Self
Set an optional description.
Sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
Return the optional description.
Trait Implementations§
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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