pub struct OperationId(/* private fields */);Expand description
OperationId
Stable operation identifier shared by replay-protected commands. Owned by the replay model and serialized into stable replay receipts.
Implementations§
Source§impl OperationId
impl OperationId
Sourcepub const fn from_bytes(bytes: [u8; 32]) -> Self
pub const fn from_bytes(bytes: [u8; 32]) -> Self
Build an operation id from its canonical 32-byte representation.
Sourcepub const fn as_bytes(&self) -> &[u8; 32]
pub const fn as_bytes(&self) -> &[u8; 32]
Return the canonical 32-byte operation id representation.
Sourcepub const fn into_bytes(self) -> [u8; 32]
pub const fn into_bytes(self) -> [u8; 32]
Consume the operation id and return its canonical bytes.
Trait Implementations§
Source§impl Clone for OperationId
impl Clone for OperationId
Source§fn clone(&self) -> OperationId
fn clone(&self) -> OperationId
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for OperationId
Source§impl Debug for OperationId
impl Debug for OperationId
Source§impl<'de> Deserialize<'de> for OperationId
impl<'de> Deserialize<'de> for OperationId
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 OperationId
impl Display for OperationId
impl Eq for OperationId
Source§impl From<OperationId> for [u8; 32]
impl From<OperationId> for [u8; 32]
Source§fn from(value: OperationId) -> Self
fn from(value: OperationId) -> Self
Converts to this type from the input type.
Source§impl FromStr for OperationId
impl FromStr for OperationId
Source§impl Hash for OperationId
impl Hash for OperationId
Source§impl Ord for OperationId
impl Ord for OperationId
Source§fn cmp(&self, other: &OperationId) -> Ordering
fn cmp(&self, other: &OperationId) -> Ordering
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
Source§impl PartialEq for OperationId
impl PartialEq for OperationId
Source§impl PartialOrd for OperationId
impl PartialOrd for OperationId
Source§impl Serialize for OperationId
impl Serialize for OperationId
Source§impl Storable for OperationId
impl Storable for OperationId
Source§fn to_bytes(&self) -> Cow<'_, [u8]>
fn to_bytes(&self) -> Cow<'_, [u8]>
Converts the element into a possibly borrowed byte slice. Read more
Source§fn from_bytes(bytes: Cow<'_, [u8]>) -> Self
fn from_bytes(bytes: Cow<'_, [u8]>) -> Self
Converts bytes into an element.
Source§fn to_bytes_checked(&self) -> Cow<'_, [u8]>
fn to_bytes_checked(&self) -> Cow<'_, [u8]>
Like
to_bytes, but checks that bytes conform to declared bounds.Source§fn into_bytes_checked(self) -> Vec<u8> ⓘwhere
Self: Sized,
fn into_bytes_checked(self) -> Vec<u8> ⓘwhere
Self: Sized,
Like
into_bytes, but checks that bytes conform to declared bounds.Source§fn check_bounds(bytes: &[u8])
fn check_bounds(bytes: &[u8])
Validates that a byte slice fits within this type’s declared bounds.
impl StructuralPartialEq for OperationId
Auto Trait Implementations§
impl Freeze for OperationId
impl RefUnwindSafe for OperationId
impl Send for OperationId
impl Sync for OperationId
impl Unpin for OperationId
impl UnsafeUnpin for OperationId
impl UnwindSafe for OperationId
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