Struct ConfigSection
pub struct ConfigSection(/* private fields */);Expand description
A validated configuration section name.
Implementations§
§impl ConfigSection
impl ConfigSection
pub fn new(input: impl AsRef<str>) -> Result<ConfigSection, ConfigKeyError>
pub fn new(input: impl AsRef<str>) -> Result<ConfigSection, ConfigKeyError>
Creates a configuration section from one non-empty segment.
§Errors
Returns ConfigKeyError when the input is empty after trimming or contains a dot.
pub fn into_string(self) -> String
pub fn into_string(self) -> String
Returns the owned section string.
Trait Implementations§
§impl Clone for ConfigSection
impl Clone for ConfigSection
§fn clone(&self) -> ConfigSection
fn clone(&self) -> ConfigSection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for ConfigSection
impl Debug for ConfigSection
§impl Display for ConfigSection
impl Display for ConfigSection
§impl FromStr for ConfigSection
impl FromStr for ConfigSection
§type Err = ConfigKeyError
type Err = ConfigKeyError
The associated error which can be returned from parsing.
§fn from_str(
input: &str,
) -> Result<ConfigSection, <ConfigSection as FromStr>::Err>
fn from_str( input: &str, ) -> Result<ConfigSection, <ConfigSection as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for ConfigSection
impl Hash for ConfigSection
§impl Ord for ConfigSection
impl Ord for ConfigSection
§impl PartialEq for ConfigSection
impl PartialEq for ConfigSection
§impl PartialOrd for ConfigSection
impl PartialOrd for ConfigSection
impl Eq for ConfigSection
impl StructuralPartialEq for ConfigSection
Auto Trait Implementations§
impl Freeze for ConfigSection
impl RefUnwindSafe for ConfigSection
impl Send for ConfigSection
impl Sync for ConfigSection
impl Unpin for ConfigSection
impl UnsafeUnpin for ConfigSection
impl UnwindSafe for ConfigSection
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