pub struct ProjectId(/* private fields */);Expand description
A stable project identifier.
Implementations§
Source§impl ProjectId
impl ProjectId
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<'de> Deserialize<'de> for ProjectId
impl<'de> Deserialize<'de> for ProjectId
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
impl Eq for ProjectId
Source§impl Ord for ProjectId
impl Ord for ProjectId
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 PartialOrd for ProjectId
impl PartialOrd for ProjectId
impl StructuralPartialEq for ProjectId
Auto Trait Implementations§
impl Freeze for ProjectId
impl RefUnwindSafe for ProjectId
impl Send for ProjectId
impl Sync for ProjectId
impl Unpin for ProjectId
impl UnsafeUnpin for ProjectId
impl UnwindSafe for ProjectId
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