pub struct IdentifierScheme(/* private fields */);Expand description
An extensible scheme name for an external identifier.
Schemes are deliberately strings rather than a closed enum. Core performs only bounded, transport-safe validation; standards-specific validation is a separate opt-in concern.
Implementations§
Source§impl IdentifierScheme
impl IdentifierScheme
Sourcepub fn new(value: impl Into<String>) -> Result<Self>
pub fn new(value: impl Into<String>) -> Result<Self>
Creates a scheme while preserving its exact spelling.
§Errors
Returns ErrorKind::InvalidArgument when value is empty, exceeds
MAX_IDENTIFIER_SCHEME_BYTES, or contains whitespace/control bytes.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the scheme and returns its owned string.
Trait Implementations§
Source§impl Clone for IdentifierScheme
impl Clone for IdentifierScheme
Source§fn clone(&self) -> IdentifierScheme
fn clone(&self) -> IdentifierScheme
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 IdentifierScheme
impl Debug for IdentifierScheme
impl Eq for IdentifierScheme
Source§impl Hash for IdentifierScheme
impl Hash for IdentifierScheme
Source§impl Ord for IdentifierScheme
impl Ord for IdentifierScheme
Source§fn cmp(&self, other: &IdentifierScheme) -> Ordering
fn cmp(&self, other: &IdentifierScheme) -> 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 IdentifierScheme
impl PartialEq for IdentifierScheme
Source§fn eq(&self, other: &IdentifierScheme) -> bool
fn eq(&self, other: &IdentifierScheme) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for IdentifierScheme
impl PartialOrd for IdentifierScheme
impl StructuralPartialEq for IdentifierScheme
Auto Trait Implementations§
impl Freeze for IdentifierScheme
impl RefUnwindSafe for IdentifierScheme
impl Send for IdentifierScheme
impl Sync for IdentifierScheme
impl Unpin for IdentifierScheme
impl UnsafeUnpin for IdentifierScheme
impl UnwindSafe for IdentifierScheme
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