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