Struct AnnotationKey
pub struct AnnotationKey(/* private fields */);Expand description
A non-empty annotation key.
Implementations§
§impl AnnotationKey
impl AnnotationKey
pub fn new(value: impl AsRef<str>) -> Result<AnnotationKey, AnnotationKeyError>
pub fn new(value: impl AsRef<str>) -> Result<AnnotationKey, AnnotationKeyError>
Creates an annotation key from non-empty text.
§Errors
Returns AnnotationKeyError::Empty when the trimmed key is empty.
pub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the key and returns the owned string.
Trait Implementations§
§impl AsRef<str> for AnnotationKey
impl AsRef<str> for AnnotationKey
§impl Clone for AnnotationKey
impl Clone for AnnotationKey
§fn clone(&self) -> AnnotationKey
fn clone(&self) -> AnnotationKey
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 AnnotationKey
impl Debug for AnnotationKey
§impl Display for AnnotationKey
impl Display for AnnotationKey
§impl FromStr for AnnotationKey
impl FromStr for AnnotationKey
§type Err = AnnotationKeyError
type Err = AnnotationKeyError
The associated error which can be returned from parsing.
§fn from_str(
value: &str,
) -> Result<AnnotationKey, <AnnotationKey as FromStr>::Err>
fn from_str( value: &str, ) -> Result<AnnotationKey, <AnnotationKey as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for AnnotationKey
impl Hash for AnnotationKey
§impl Ord for AnnotationKey
impl Ord for AnnotationKey
§impl PartialEq for AnnotationKey
impl PartialEq for AnnotationKey
§impl PartialOrd for AnnotationKey
impl PartialOrd for AnnotationKey
impl Eq for AnnotationKey
impl StructuralPartialEq for AnnotationKey
Auto Trait Implementations§
impl Freeze for AnnotationKey
impl RefUnwindSafe for AnnotationKey
impl Send for AnnotationKey
impl Sync for AnnotationKey
impl Unpin for AnnotationKey
impl UnsafeUnpin for AnnotationKey
impl UnwindSafe for AnnotationKey
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