pub struct VocabularyId(/* private fields */);Expand description
An extensible identifier for a metadata vocabulary or namespace.
Core preserves the caller’s exact identifier. A vocabulary registry may interpret it, but a registry is not required to store unknown metadata.
Implementations§
Source§impl VocabularyId
impl VocabularyId
Sourcepub fn new(value: impl Into<String>) -> Result<Self>
pub fn new(value: impl Into<String>) -> Result<Self>
Creates a bounded vocabulary identifier.
§Errors
Returns ErrorKind::InvalidArgument for empty, oversized, or
whitespace/control-containing input.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the identifier and returns its string.
Trait Implementations§
Source§impl Clone for VocabularyId
impl Clone for VocabularyId
Source§fn clone(&self) -> VocabularyId
fn clone(&self) -> VocabularyId
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 VocabularyId
impl Debug for VocabularyId
impl Eq for VocabularyId
Source§impl Hash for VocabularyId
impl Hash for VocabularyId
Source§impl Ord for VocabularyId
impl Ord for VocabularyId
Source§fn cmp(&self, other: &VocabularyId) -> Ordering
fn cmp(&self, other: &VocabularyId) -> 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 VocabularyId
impl PartialEq for VocabularyId
Source§fn eq(&self, other: &VocabularyId) -> bool
fn eq(&self, other: &VocabularyId) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for VocabularyId
impl PartialOrd for VocabularyId
impl StructuralPartialEq for VocabularyId
Auto Trait Implementations§
impl Freeze for VocabularyId
impl RefUnwindSafe for VocabularyId
impl Send for VocabularyId
impl Sync for VocabularyId
impl Unpin for VocabularyId
impl UnsafeUnpin for VocabularyId
impl UnwindSafe for VocabularyId
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