pub struct TraitValue { /* private fields */ }Expand description
A descriptive trait value.
Implementations§
Source§impl TraitValue
impl TraitValue
Sourcepub fn new(
name: TraitName,
value: impl AsRef<str>,
) -> Result<Self, TraitNameError>
pub fn new( name: TraitName, value: impl AsRef<str>, ) -> Result<Self, TraitNameError>
Creates a trait value from a trait name and non-empty descriptive value.
§Errors
Returns TraitNameError::Empty when the trimmed value is empty.
Trait Implementations§
Source§impl Clone for TraitValue
impl Clone for TraitValue
Source§fn clone(&self) -> TraitValue
fn clone(&self) -> TraitValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TraitValue
impl Debug for TraitValue
Source§impl Display for TraitValue
impl Display for TraitValue
Source§impl Hash for TraitValue
impl Hash for TraitValue
Source§impl Ord for TraitValue
impl Ord for TraitValue
Source§fn cmp(&self, other: &TraitValue) -> Ordering
fn cmp(&self, other: &TraitValue) -> Ordering
1.21.0 (const: unstable) · 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 TraitValue
impl PartialEq for TraitValue
Source§fn eq(&self, other: &TraitValue) -> bool
fn eq(&self, other: &TraitValue) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for TraitValue
impl PartialOrd for TraitValue
impl Eq for TraitValue
impl StructuralPartialEq for TraitValue
Auto Trait Implementations§
impl Freeze for TraitValue
impl RefUnwindSafe for TraitValue
impl Send for TraitValue
impl Sync for TraitValue
impl Unpin for TraitValue
impl UnsafeUnpin for TraitValue
impl UnwindSafe for TraitValue
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