pub struct HostDeliveryId(/* private fields */);Expand description
Stable identity of one item’s delivery to one host destination.
Derived rather than generated, because the ledger’s deduplication is the identity: the same item offered to the same destination twice is one delivery, whoever enqueued it and however many times a projector replays the record that produced it.
Implementations§
Source§impl HostDeliveryId
impl HostDeliveryId
Sourcepub fn new(raw: impl Into<String>) -> Result<Self, DomainError>
pub fn new(raw: impl Into<String>) -> Result<Self, DomainError>
Validate an identifier read back from storage or a host payload.
Sourcepub fn derive(
ceremony_id: &CeremonyId,
item_kind: HostDeliveryItemKind,
item_id: &str,
target_key: &HostDeliveryTargetKey,
) -> Result<Self, DomainError>
pub fn derive( ceremony_id: &CeremonyId, item_kind: HostDeliveryItemKind, item_id: &str, target_key: &HostDeliveryTargetKey, ) -> Result<Self, DomainError>
The identity the ledger deduplicates on.
pub fn as_str(&self) -> &str
Trait Implementations§
Source§impl Clone for HostDeliveryId
impl Clone for HostDeliveryId
Source§impl Debug for HostDeliveryId
impl Debug for HostDeliveryId
Source§impl<'de> Deserialize<'de> for HostDeliveryId
impl<'de> Deserialize<'de> for HostDeliveryId
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 HostDeliveryId
impl Display for HostDeliveryId
impl Eq for HostDeliveryId
Source§impl Hash for HostDeliveryId
impl Hash for HostDeliveryId
Source§impl Ord for HostDeliveryId
impl Ord for HostDeliveryId
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 HostDeliveryId
impl PartialEq for HostDeliveryId
Source§impl PartialOrd for HostDeliveryId
impl PartialOrd for HostDeliveryId
Source§impl Serialize for HostDeliveryId
impl Serialize for HostDeliveryId
impl StructuralPartialEq for HostDeliveryId
Auto Trait Implementations§
impl Freeze for HostDeliveryId
impl RefUnwindSafe for HostDeliveryId
impl Send for HostDeliveryId
impl Sync for HostDeliveryId
impl Unpin for HostDeliveryId
impl UnsafeUnpin for HostDeliveryId
impl UnwindSafe for HostDeliveryId
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