pub struct Opid(/* private fields */);
Expand description
Unique operation (genesis, extensions & state transition) identifier equivalent to the commitment hash
Implementations§
Source§impl Opid
impl Opid
Sourcepub fn copy_from_slice(slice: impl AsRef<[u8]>) -> Result<Opid, FromSliceError>
pub fn copy_from_slice(slice: impl AsRef<[u8]>) -> Result<Opid, FromSliceError>
Create operation id by trying to copy bytes from slice.
Errors if the number of bytes in the slice is not 32.
Methods from Deref<Target = Array<u8, 32>>§
Trait Implementations§
Source§impl CommitmentId for Opid
impl CommitmentId for Opid
Source§impl<'de> Deserialize<'de> for Opid
impl<'de> Deserialize<'de> for Opid
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Opid, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Opid, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl DisplayBaid64 for Opid
impl DisplayBaid64 for Opid
const HRI: &'static str = "usop"
const CHUNKING: bool = false
const PREFIX: bool = false
const EMBED_CHECKSUM: bool = false
const MNEMONIC: bool = false
fn to_baid64_payload(&self) -> [u8; 32]
const CHUNK_FIRST: usize = 8usize
const CHUNK_LEN: usize = 7usize
fn to_baid64_string(&self) -> String
fn to_baid64_mnemonic(&self) -> String
fn display_baid64(&self) -> Baid64Display<LEN>
fn fmt_baid64(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Source§impl FromBaid64Str for Opid
impl FromBaid64Str for Opid
fn from_baid64_str(s: &str) -> Result<Self, Baid64ParseError>
Source§impl Ord for Opid
impl Ord for Opid
Source§impl PartialOrd for Opid
impl PartialOrd for Opid
Source§impl Serialize for Opid
impl Serialize for Opid
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl StrictDecode for Opid
impl StrictDecode for Opid
fn strict_decode(reader: &mut impl TypedRead) -> Result<Opid, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictDumb for Opid
impl StrictDumb for Opid
fn strict_dumb() -> Opid
Source§impl StrictEncode for Opid
impl StrictEncode for Opid
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl StrictTuple for Opid
impl StrictTuple for Opid
const FIELD_COUNT: u8 = 1u8
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for Opid
impl StrictType for Opid
const STRICT_LIB_NAME: &'static str = LIB_NAME_ULTRASONIC
fn strict_name() -> Option<TypeName>
Source§impl Wrapper for Opid
impl Wrapper for Opid
Source§fn from_inner(inner: <Opid as Wrapper>::Inner) -> Opid
fn from_inner(inner: <Opid as Wrapper>::Inner) -> Opid
Instantiates wrapper type with the inner data
Source§fn as_inner(&self) -> &<Opid as Wrapper>::Inner
fn as_inner(&self) -> &<Opid as Wrapper>::Inner
Returns reference to the inner representation for the wrapper type
impl Copy for Opid
impl Eq for Opid
impl StrictProduct for Opid
impl StructuralPartialEq for Opid
Auto Trait Implementations§
impl Freeze for Opid
impl RefUnwindSafe for Opid
impl Send for Opid
impl Sync for Opid
impl Unpin for Opid
impl UnwindSafe for Opid
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
Source§impl<Id, const LEN: usize, const REVERSE_STR: bool> ByteArray<LEN> for Id
impl<Id, const LEN: usize, const REVERSE_STR: bool> ByteArray<LEN> for Id
Source§fn from_byte_array(val: impl Into<[u8; LEN]>) -> Id
fn from_byte_array(val: impl Into<[u8; LEN]>) -> Id
Constructs a wrapper type around a byte array.
Source§fn from_slice(slice: impl AsRef<[u8]>) -> Result<Id, FromSliceError>
fn from_slice(slice: impl AsRef<[u8]>) -> Result<Id, FromSliceError>
Constructs a byte array from the slice. Errors if the slice length
doesn’t match
LEN
constant generic.Source§fn to_byte_array(&self) -> [u8; LEN]
fn to_byte_array(&self) -> [u8; LEN]
Returns a byte array representation stored in the wrapped type.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.