pub struct FeatureName(/* private fields */);Expand description
A non-empty feature name.
Implementations§
Source§impl FeatureName
impl FeatureName
Sourcepub fn new(value: impl AsRef<str>) -> Result<FeatureName, FeatureValueError>
pub fn new(value: impl AsRef<str>) -> Result<FeatureName, FeatureValueError>
Creates a feature name from non-empty text.
§Errors
Returns FeatureValueError::Empty when the trimmed name is empty.
Trait Implementations§
Source§impl Clone for FeatureName
impl Clone for FeatureName
Source§fn clone(&self) -> FeatureName
fn clone(&self) -> FeatureName
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 moreSource§impl Debug for FeatureName
impl Debug for FeatureName
Source§impl Display for FeatureName
impl Display for FeatureName
Source§impl FromStr for FeatureName
impl FromStr for FeatureName
Source§type Err = FeatureValueError
type Err = FeatureValueError
The associated error which can be returned from parsing.
Source§fn from_str(value: &str) -> Result<FeatureName, <FeatureName as FromStr>::Err>
fn from_str(value: &str) -> Result<FeatureName, <FeatureName as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for FeatureName
impl Hash for FeatureName
Source§impl Ord for FeatureName
impl Ord for FeatureName
Source§fn cmp(&self, other: &FeatureName) -> Ordering
fn cmp(&self, other: &FeatureName) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for FeatureName
impl PartialEq for FeatureName
Source§impl PartialOrd for FeatureName
impl PartialOrd for FeatureName
impl Eq for FeatureName
impl StructuralPartialEq for FeatureName
Auto Trait Implementations§
impl Freeze for FeatureName
impl RefUnwindSafe for FeatureName
impl Send for FeatureName
impl Sync for FeatureName
impl Unpin for FeatureName
impl UnsafeUnpin for FeatureName
impl UnwindSafe for FeatureName
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