pub struct ContainerId(/* private fields */);
Expand description
Unique data container identifier
Trait Implementations§
Source§impl AsMut<<ContainerId as Wrapper>::Inner> for ContainerId
impl AsMut<<ContainerId as Wrapper>::Inner> for ContainerId
Source§impl AsRef<<ContainerId as Wrapper>::Inner> for ContainerId
impl AsRef<<ContainerId as Wrapper>::Inner> for ContainerId
Source§impl Borrow<<ContainerId as Wrapper>::Inner> for ContainerId
impl Borrow<<ContainerId as Wrapper>::Inner> for ContainerId
Source§impl Borrow<[u8]> for ContainerId
impl Borrow<[u8]> for ContainerId
Source§impl BorrowMut<<ContainerId as Wrapper>::Inner> for ContainerId
impl BorrowMut<<ContainerId as Wrapper>::Inner> for ContainerId
Source§impl Clone for ContainerId
impl Clone for ContainerId
Source§fn clone(&self) -> ContainerId
fn clone(&self) -> ContainerId
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<Msg> CommitVerify<Msg, PrehashedProtocol> for ContainerId
impl<Msg> CommitVerify<Msg, PrehashedProtocol> for ContainerId
Source§impl Debug for ContainerId
impl Debug for ContainerId
Source§impl Default for ContainerId
impl Default for ContainerId
Source§fn default() -> ContainerId
fn default() -> ContainerId
Returns the “default value” for a type. Read more
Source§impl Deref for ContainerId
impl Deref for ContainerId
Source§impl DerefMut for ContainerId
impl DerefMut for ContainerId
Source§impl Display for ContainerId
impl Display for ContainerId
Source§impl From<ContainerId> for Hash<ContainerIdTag>
impl From<ContainerId> for Hash<ContainerIdTag>
Source§fn from(wrapped: ContainerId) -> Self
fn from(wrapped: ContainerId) -> Self
Converts to this type from the input type.
Source§impl From<Hash<ContainerIdTag>> for ContainerId
impl From<Hash<ContainerIdTag>> for ContainerId
Source§impl FromStr for ContainerId
impl FromStr for ContainerId
Source§impl Hash for ContainerId
impl Hash for ContainerId
Source§impl Ord for ContainerId
impl Ord for ContainerId
Source§fn cmp(&self, other: &ContainerId) -> Ordering
fn cmp(&self, other: &ContainerId) -> Ordering
1.21.0 · 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 ContainerId
impl PartialEq for ContainerId
Source§impl PartialOrd for ContainerId
impl PartialOrd for ContainerId
Source§impl Strategy for ContainerId
impl Strategy for ContainerId
Source§type Strategy = UsingStrict
type Strategy = UsingStrict
Specific strategy. List of supported strategies: Read more
Source§impl Strategy for ContainerId
impl Strategy for ContainerId
Source§impl StrictDecode for ContainerId
impl StrictDecode for ContainerId
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 ContainerId
impl StrictEncode for ContainerId
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 ContainerId
impl Wrapper for ContainerId
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 ContainerId
impl Eq for ContainerId
impl StructuralPartialEq for ContainerId
Auto Trait Implementations§
impl Freeze for ContainerId
impl RefUnwindSafe for ContainerId
impl Send for ContainerId
impl Sync for ContainerId
impl Unpin for ContainerId
impl UnwindSafe for ContainerId
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> CommitEncode for T
impl<T> CommitEncode for T
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<T> FromBech32Str for T
impl<T> FromBech32Str for T
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 typeSource§impl<T> ToBech32String for T
impl<T> ToBech32String for T
Source§fn to_bech32_string(&self) -> String
fn to_bech32_string(&self) -> String
Creates Bech32 string with appropriate type data representation