pub struct ExternalIdentifier { /* private fields */ }Expand description
An identifier assigned by an external standard, vendor, or application.
This value does not replace a PostProject object ID. It is opaque to core
unless a caller explicitly applies a scheme-specific validator.
Implementations§
Source§impl ExternalIdentifier
impl ExternalIdentifier
Sourcepub fn new(
scheme: IdentifierScheme,
value: impl Into<String>,
qualifier: Option<String>,
) -> Result<Self>
pub fn new( scheme: IdentifierScheme, value: impl Into<String>, qualifier: Option<String>, ) -> Result<Self>
Creates an external identifier without normalizing its value.
§Errors
Returns ErrorKind::InvalidArgument when the value or qualifier is
empty when present, or exceeds its documented byte limit.
Sourcepub const fn scheme(&self) -> &IdentifierScheme
pub const fn scheme(&self) -> &IdentifierScheme
Returns the identifier scheme.
Trait Implementations§
Source§impl Clone for ExternalIdentifier
impl Clone for ExternalIdentifier
Source§fn clone(&self) -> ExternalIdentifier
fn clone(&self) -> ExternalIdentifier
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 ExternalIdentifier
impl Debug for ExternalIdentifier
impl Eq for ExternalIdentifier
Source§impl Hash for ExternalIdentifier
impl Hash for ExternalIdentifier
Source§impl PartialEq for ExternalIdentifier
impl PartialEq for ExternalIdentifier
Source§fn eq(&self, other: &ExternalIdentifier) -> bool
fn eq(&self, other: &ExternalIdentifier) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ExternalIdentifier
Auto Trait Implementations§
impl Freeze for ExternalIdentifier
impl RefUnwindSafe for ExternalIdentifier
impl Send for ExternalIdentifier
impl Sync for ExternalIdentifier
impl Unpin for ExternalIdentifier
impl UnsafeUnpin for ExternalIdentifier
impl UnwindSafe for ExternalIdentifier
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