pub struct SourceId(/* private fields */);Expand description
Caller-selected identity for one imported source.
Implementations§
Source§impl SourceId
impl SourceId
Sourcepub fn new(value: impl Into<String>) -> Result<Self, ModelError>
pub fn new(value: impl Into<String>) -> Result<Self, ModelError>
Creates a non-empty source identity.
§Errors
Returns ModelError::EmptyValue for an empty identity and
ModelError::ContainsNul for text containing a NUL byte.
Trait Implementations§
impl Eq for SourceId
Source§impl Ord for SourceId
impl Ord for SourceId
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 PartialOrd for SourceId
impl PartialOrd for SourceId
impl StructuralPartialEq for SourceId
Auto Trait Implementations§
impl Freeze for SourceId
impl RefUnwindSafe for SourceId
impl Send for SourceId
impl Sync for SourceId
impl Unpin for SourceId
impl UnsafeUnpin for SourceId
impl UnwindSafe for SourceId
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