pub struct TXID(/* private fields */);Expand description
A marked Hash256Digest representing transaction IDs
Implementations§
Source§impl TXID
impl TXID
Sourcepub fn to_internal(self) -> DigestOutput<Hash256>
pub fn to_internal(self) -> DigestOutput<Hash256>
Unwrap the marked digest, returning the underlying GenericArray
Trait Implementations§
Source§impl AsMut<GenericArray<u8, <Hash256 as OutputSizeUser>::OutputSize>> for TXID
impl AsMut<GenericArray<u8, <Hash256 as OutputSizeUser>::OutputSize>> for TXID
Source§fn as_mut(&mut self) -> &mut DigestOutput<Hash256>
fn as_mut(&mut self) -> &mut DigestOutput<Hash256>
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl AsRef<GenericArray<u8, <Hash256 as OutputSizeUser>::OutputSize>> for TXID
impl AsRef<GenericArray<u8, <Hash256 as OutputSizeUser>::OutputSize>> for TXID
Source§fn as_ref(&self) -> &DigestOutput<Hash256>
fn as_ref(&self) -> &DigestOutput<Hash256>
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl ByteFormat for TXID
impl ByteFormat for TXID
Source§fn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
Returns the byte-length of the serialized data structure.
Source§fn read_from<R>(reader: &mut R) -> SerResult<Self>
fn read_from<R>(reader: &mut R) -> SerResult<Self>
Deserializes an instance of
Self from a std::io::Read.
The limit argument is used only when deserializing collections, and specifies a maximum
number of instances of the underlying type to read. Read moreSource§fn write_to<W>(&self, writer: &mut W) -> SerResult<usize>where
W: Write,
fn write_to<W>(&self, writer: &mut W) -> SerResult<usize>where
W: Write,
Serializes
self to a std::io::Write. Following Write trait conventions, its Ok
type must be a usize denoting the number of bytes written. Read moreSource§fn read_seq_from<R>(
reader: &mut R,
mode: ReadSeqMode,
) -> Result<Vec<Self>, Self::Error>
fn read_seq_from<R>( reader: &mut R, mode: ReadSeqMode, ) -> Result<Vec<Self>, Self::Error>
Read a sequence of exactly
limit objects from the reader.Source§fn write_seq_to<'a, W, E, Iter, Item>(
writer: &mut W,
iter: Iter,
) -> Result<usize, Self::Error>
fn write_seq_to<'a, W, E, Iter, Item>( writer: &mut W, iter: Iter, ) -> Result<usize, Self::Error>
Write a sequence of
ByteFormat objects to a writer. The iter
argument may be any object that implements
IntoIterator<Item = &Item>. This means we can seamlessly use vectors,
slices, etc. Read moreSource§fn deserialize_hex(s: &str) -> Result<Self, Self::Error>where
Self: Sized,
fn deserialize_hex(s: &str) -> Result<Self, Self::Error>where
Self: Sized,
Decodes a hex string to a
Vec<u8>, deserializes an instance of Self from that vector.Source§fn deserialize_base64(s: &str) -> Result<Self, Self::Error>where
Self: Sized,
fn deserialize_base64(s: &str) -> Result<Self, Self::Error>where
Self: Sized,
Serialize
self to a base64 string, using standard RFC4648 non-url safe charactersSource§fn serialize_hex(&self) -> String
fn serialize_hex(&self) -> String
Serializes
self to a vector, returns the hex-encoded vectorSource§fn serialize_base64(&self) -> String
fn serialize_base64(&self) -> String
Serialize
self to a base64 string, using standard RFC4648 non-url safe charactersSource§impl<'de> Deserialize<'de> for TXID
impl<'de> Deserialize<'de> for TXID
Source§fn deserialize<D>(deserializer: D) -> Result<TXID, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<TXID, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl MarkedDigest<TXID> for Hash256
impl MarkedDigest<TXID> for Hash256
Source§fn finalize_marked(self) -> TXID
fn finalize_marked(self) -> TXID
Produce a marked digest from the hasher
Source§fn digest_marked(data: &[u8]) -> TXID
fn digest_marked(data: &[u8]) -> TXID
Shortcut to produce a marked digest
Source§impl MarkedDigestOutput for TXID
impl MarkedDigestOutput for TXID
Source§fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
Use as a mutable slice
Source§impl Ord for TXID
impl Ord for TXID
Source§impl PartialOrd for TXID
impl PartialOrd for TXID
impl Copy for TXID
impl Eq for TXID
impl StructuralPartialEq for TXID
Auto Trait Implementations§
impl Freeze for TXID
impl RefUnwindSafe for TXID
impl Send for TXID
impl Sync for TXID
impl Unpin for TXID
impl UnwindSafe for TXID
Blanket Implementations§
Source§impl<T> Base32Len for T
impl<T> Base32Len for T
Source§fn base32_len(&self) -> usize
fn base32_len(&self) -> usize
Calculate the base32 serialized length
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<'f, T> CheckBase32<Vec<u5>> for T
impl<'f, T> CheckBase32<Vec<u5>> for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToBase32 for T
impl<T> ToBase32 for T
Source§fn write_base32<W>(&self, writer: &mut W) -> Result<(), <W as WriteBase32>::Err>where
W: WriteBase32,
fn write_base32<W>(&self, writer: &mut W) -> Result<(), <W as WriteBase32>::Err>where
W: WriteBase32,
Encode as base32 and write it to the supplied writer
Implementations shouldn’t allocate.
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)