pub struct DefinitionId(/* private fields */);Expand description
The identity of an InteractionDefinition
— and therefore its exact form digest. A response binds this, so a
definition that changed by one byte cannot be answered with an offer
minted against the old one.
Implementations§
Source§impl DefinitionId
impl DefinitionId
Sourcepub fn content_id(&self) -> &ContentId
pub fn content_id(&self) -> &ContentId
The underlying content id.
Sourcepub fn parse(text: &str) -> Result<Self, ProtocolError>
pub fn parse(text: &str) -> Result<Self, ProtocolError>
Parse an id from its canonical rendering.
§Errors
ProtocolError::NonCanonicalId when text parses but is not
byte-identical to the id’s own rendering — an alternate
spelling would let two strings name one record.
Trait Implementations§
Source§impl Clone for DefinitionId
impl Clone for DefinitionId
impl Copy for DefinitionId
Source§impl Debug for DefinitionId
impl Debug for DefinitionId
Source§impl<'de> Deserialize<'de> for DefinitionId
impl<'de> Deserialize<'de> for DefinitionId
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 DefinitionId
impl Display for DefinitionId
impl Eq for DefinitionId
Source§impl Hash for DefinitionId
impl Hash for DefinitionId
Source§impl Ord for DefinitionId
impl Ord for DefinitionId
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 DefinitionId
impl PartialEq for DefinitionId
Source§impl PartialOrd for DefinitionId
impl PartialOrd for DefinitionId
Source§impl Serialize for DefinitionId
impl Serialize for DefinitionId
impl StructuralPartialEq for DefinitionId
Auto Trait Implementations§
impl Freeze for DefinitionId
impl RefUnwindSafe for DefinitionId
impl Send for DefinitionId
impl Sync for DefinitionId
impl Unpin for DefinitionId
impl UnsafeUnpin for DefinitionId
impl UnwindSafe for DefinitionId
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