pub(crate) type SpendingTransactionId = Hash;
Expand description
Spending transaction id type when the indexer
feature is selected.
Aliased Type§
struct SpendingTransactionId(pub [u8; 32]);
Fields§
§0: [u8; 32]
Implementations
Source§impl Hash
impl Hash
Sourcepub fn bytes_in_display_order(&self) -> [u8; 32]
pub fn bytes_in_display_order(&self) -> [u8; 32]
Return the hash bytes in big-endian byte-order suitable for printing out byte by byte.
Zebra displays transaction and block hashes in big-endian byte-order, following the u256 convention set by Bitcoin and zcashd.
Sourcepub fn from_bytes_in_display_order(bytes_in_display_order: &[u8; 32]) -> Hash
pub fn from_bytes_in_display_order(bytes_in_display_order: &[u8; 32]) -> Hash
Convert bytes in big-endian byte-order into a transaction::Hash
.
Zebra displays transaction and block hashes in big-endian byte-order, following the u256 convention set by Bitcoin and zcashd.
Trait Implementations
Source§impl Arbitrary for Hash
impl Arbitrary for Hash
Source§type Parameters = <[u8; 32] as Arbitrary>::Parameters
type Parameters = <[u8; 32] as Arbitrary>::Parameters
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.Source§type Strategy = Map<<[u8; 32] as Arbitrary>::Strategy, fn(_: [u8; 32]) -> Hash>
type Strategy = Map<<[u8; 32] as Arbitrary>::Strategy, fn(_: [u8; 32]) -> Hash>
The type of
Strategy
used to generate values of type Self
.Source§fn arbitrary_with(
_top: <Hash as Arbitrary>::Parameters,
) -> <Hash as Arbitrary>::Strategy
fn arbitrary_with( _top: <Hash as Arbitrary>::Parameters, ) -> <Hash as Arbitrary>::Strategy
Source§impl From<&Transaction> for Hash
impl From<&Transaction> for Hash
Source§fn from(transaction: &Transaction) -> Hash
fn from(transaction: &Transaction) -> Hash
Converts to this type from the input type.
Source§impl From<SaplingScannedResult> for Hash
impl From<SaplingScannedResult> for Hash
Source§fn from(scanned_result: SaplingScannedResult) -> Self
fn from(scanned_result: SaplingScannedResult) -> Self
Converts to this type from the input type.
Source§impl From<Transaction> for Hash
impl From<Transaction> for Hash
Source§fn from(transaction: Transaction) -> Hash
fn from(transaction: Transaction) -> Hash
Converts to this type from the input type.
Source§impl Ord for Hash
impl Ord for Hash
Source§impl PartialOrd for Hash
impl PartialOrd for Hash
Source§impl ToHex for Hash
impl ToHex for Hash
Source§fn encode_hex<T>(&self) -> Twhere
T: FromIterator<char>,
fn encode_hex<T>(&self) -> Twhere
T: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)Source§fn encode_hex_upper<T>(&self) -> Twhere
T: FromIterator<char>,
fn encode_hex_upper<T>(&self) -> Twhere
T: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)Source§impl ZcashDeserialize for Hash
impl ZcashDeserialize for Hash
Source§fn zcash_deserialize<R>(reader: R) -> Result<Hash, SerializationError>where
R: Read,
fn zcash_deserialize<R>(reader: R) -> Result<Hash, SerializationError>where
R: Read,
Source§impl ZcashSerialize for Hash
impl ZcashSerialize for Hash
Source§fn zcash_serialize_to_vec(&self) -> Result<Vec<u8>, Error>
fn zcash_serialize_to_vec(&self) -> Result<Vec<u8>, Error>
Helper function to construct a vec to serialize the current struct into
Source§fn zcash_serialized_size(&self) -> usize
fn zcash_serialized_size(&self) -> usize
Get the size of
self
by using a fake writer.