pub struct MesgId(/* private fields */);
Expand description
Unique messag identifier
Trait Implementations§
Source§impl<Msg> CommitVerify<Msg, PrehashedProtocol> for MesgId
impl<Msg> CommitVerify<Msg, PrehashedProtocol> for MesgId
Source§impl Ord for MesgId
impl Ord for MesgId
Source§impl PartialOrd for MesgId
impl PartialOrd for MesgId
Source§impl StrictDecode for MesgId
impl StrictDecode for MesgId
Source§fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
Decode with the given
std::io::Read
instance; must either
construct an instance or return implementation-specific error type.Source§fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
Tries to deserialize byte array into the current type using
StrictDecode::strict_decode
. If there are some data remains in the
buffer once deserialization is completed, fails with
Error::DataNotEntirelyConsumed
. Use io::Cursor
over the buffer and
StrictDecode::strict_decode
to avoid such failures.Source§fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
Reads data from file at
path
and reconstructs object from it. Fails
with Error::DataNotEntirelyConsumed
if file contains remaining
data after the object reconstruction.Source§impl StrictEncode for MesgId
impl StrictEncode for MesgId
Source§fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
Encode with the given
std::io::Write
instance; must return result
with either amount of bytes encoded – or implementation-specific
error type.Source§fn strict_serialize(&self) -> Result<Vec<u8>, Error>
fn strict_serialize(&self) -> Result<Vec<u8>, Error>
Serializes data as a byte array using
StrictEncode::strict_encode
functionSource§impl Wrapper for MesgId
impl Wrapper for MesgId
Source§fn from_inner(inner: Self::Inner) -> Self
fn from_inner(inner: Self::Inner) -> Self
Instantiates wrapper type with the inner data
Source§fn as_inner(&self) -> &Self::Inner
fn as_inner(&self) -> &Self::Inner
Returns reference to the inner representation for the wrapper type
Source§fn as_inner_mut(&mut self) -> &mut Self::Inner
fn as_inner_mut(&mut self) -> &mut Self::Inner
Returns a mutable reference to the inner representation for the wrapper
type
Source§fn into_inner(self) -> Self::Inner
fn into_inner(self) -> Self::Inner
Unwraps the wrapper returning the inner type
impl Copy for MesgId
impl Eq for MesgId
impl StructuralPartialEq for MesgId
Auto Trait Implementations§
impl Freeze for MesgId
impl RefUnwindSafe for MesgId
impl Send for MesgId
impl Sync for MesgId
impl Unpin for MesgId
impl UnwindSafe for MesgId
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, Tag> FromBech32IdStr<Tag> for Twhere
T: HashType<Tag>,
Tag: Tag,
impl<T, Tag> FromBech32IdStr<Tag> for Twhere
T: HashType<Tag>,
Tag: Tag,
Source§impl<H, Tag> TaggedHash<Tag> for H
impl<H, Tag> TaggedHash<Tag> for H
Source§fn from_hash(hash: impl Hash<Inner = [u8; 32]>) -> Self
fn from_hash(hash: impl Hash<Inner = [u8; 32]>) -> Self
Constructs tagged hash out of other hash type. Read more
Source§fn from_hex(hex: &str) -> Result<Self, Error>
fn from_hex(hex: &str) -> Result<Self, Error>
Constructs tagged hash from a given hexadecimal string
Source§fn from_bytes(slice: impl AsRef<[u8]>) -> Result<Self, Error>
fn from_bytes(slice: impl AsRef<[u8]>) -> Result<Self, Error>
Constructs tagged hash from byte slice. If slice length is not equal to
32 bytes, fails with
Error::InvalidLength
(this is just a
wrapper for sha256t::Hash::from_slice
).Source§fn from_array(array: [u8; 32]) -> Self
fn from_array(array: [u8; 32]) -> Self
Constructs tagged hash type from a fixed-size array of 32 bytes.
Source§fn from_engine(engine: HashEngine) -> Self
fn from_engine(engine: HashEngine) -> Self
Constructs tagged hash type from a hash engine.
Source§fn into_array(self) -> [u8; 32]
fn into_array(self) -> [u8; 32]
Converts to a 32-byte slice array representing internal hash data
Source§fn into_sha356t(self) -> Hash<Tag>
fn into_sha356t(self) -> Hash<Tag>
Converts current tagged hash type into a base
sha256t::Hash
typeSource§fn into_sha256(self) -> Hash
fn into_sha256(self) -> Hash
Converts tagged hash type into basic SHA256 hash
Source§impl<T, Tag> ToBech32IdString<Tag> for Twhere
T: HashType<Tag>,
Tag: Tag,
impl<T, Tag> ToBech32IdString<Tag> for Twhere
T: HashType<Tag>,
Tag: Tag,
Source§fn to_bech32_id_string(&self) -> String
fn to_bech32_id_string(&self) -> String
Returns Bech32-encoded string in form of
id1...
representing the type