pub struct CompositionId(/* private fields */);Expand description
A stable composition-graph identifier.
Implementations§
Source§impl CompositionId
impl CompositionId
Sourcepub fn new(value: impl Into<String>) -> Result<Self, IdError>
pub fn new(value: impl Into<String>) -> Result<Self, IdError>
Creates an identifier from a non-empty, stable external value.
UUIDs and ULIDs are both suitable values. The engine does not generate IDs because identity belongs to the document author.
§Errors
Returns IdError::Empty when value is empty.
Trait Implementations§
Source§impl Clone for CompositionId
impl Clone for CompositionId
Source§impl Debug for CompositionId
impl Debug for CompositionId
Source§impl<'de> Deserialize<'de> for CompositionId
impl<'de> Deserialize<'de> for CompositionId
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for CompositionId
impl Display for CompositionId
impl Eq for CompositionId
Source§impl Hash for CompositionId
impl Hash for CompositionId
Source§impl Ord for CompositionId
impl Ord for CompositionId
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for CompositionId
impl PartialEq for CompositionId
Source§impl PartialOrd for CompositionId
impl PartialOrd for CompositionId
Source§impl Serialize for CompositionId
impl Serialize for CompositionId
impl StructuralPartialEq for CompositionId
Auto Trait Implementations§
impl Freeze for CompositionId
impl RefUnwindSafe for CompositionId
impl Send for CompositionId
impl Sync for CompositionId
impl Unpin for CompositionId
impl UnsafeUnpin for CompositionId
impl UnwindSafe for CompositionId
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