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