pub struct RevisionId(/* private fields */);Expand description
A content-addressed revision identity: lowercase hex SHA-256 over the
revision’s canonical content (derive_revision_id). Transparent
newtype so the type system — not convention — keeps revision ids
distinct from candidate ids, memory addresses, and other digest
strings (the CandidateId precedent).
Implementations§
Trait Implementations§
Source§impl Clone for RevisionId
impl Clone for RevisionId
Source§impl Debug for RevisionId
impl Debug for RevisionId
Source§impl<'de> Deserialize<'de> for RevisionId
impl<'de> Deserialize<'de> for RevisionId
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 RevisionId
impl Display for RevisionId
impl Eq for RevisionId
Source§impl From<String> for RevisionId
impl From<String> for RevisionId
Source§fn from(digest: String) -> Self
fn from(digest: String) -> Self
Wrap a digest the caller already trusts — rehydration from storage,
a rollback’s to. Minting ids from content is
derive_revision_id’s job alone; nothing here re-verifies.
Source§impl Hash for RevisionId
impl Hash for RevisionId
Source§impl Ord for RevisionId
impl Ord for RevisionId
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 RevisionId
impl PartialEq for RevisionId
Source§impl PartialOrd for RevisionId
impl PartialOrd for RevisionId
Source§impl Serialize for RevisionId
impl Serialize for RevisionId
impl StructuralPartialEq for RevisionId
Auto Trait Implementations§
impl Freeze for RevisionId
impl RefUnwindSafe for RevisionId
impl Send for RevisionId
impl Sync for RevisionId
impl Unpin for RevisionId
impl UnsafeUnpin for RevisionId
impl UnwindSafe for RevisionId
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