Type Alias SpendingTransactionId

Source
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

Source

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.

Source

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

Source§

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>

The type of Strategy used to generate values of type Self.
Source§

fn arbitrary_with( _top: <Hash as Arbitrary>::Parameters, ) -> <Hash as Arbitrary>::Strategy

Generates a Strategy for producing arbitrary values of type the implementing type (Self). The strategy is passed the arguments given in args. Read more
§

fn arbitrary() -> Self::Strategy

Generates a Strategy for producing arbitrary values of type the implementing type (Self). Read more
Source§

impl Clone for Hash

Source§

fn clone(&self) -> Hash

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Hash

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for Hash

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<&Transaction> for Hash

Source§

fn from(transaction: &Transaction) -> Hash

Converts to this type from the input type.
Source§

impl From<[u8; 32]> for Hash

Source§

fn from(bytes: [u8; 32]) -> Hash

Converts to this type from the input type.
Source§

impl From<Arc<Transaction>> for Hash

Source§

fn from(transaction: Arc<Transaction>) -> Hash

Converts to this type from the input type.
Source§

impl From<SaplingScannedResult> for Hash

Source§

fn from(scanned_result: SaplingScannedResult) -> Self

Converts to this type from the input type.
Source§

impl From<Transaction> for Hash

Source§

fn from(transaction: Transaction) -> Hash

Converts to this type from the input type.
Source§

impl FromDisk for Hash

Source§

fn from_bytes(disk_bytes: impl AsRef<[u8]>) -> Self

Converts raw disk bytes back into the deserialized type. Read more
Source§

impl FromHex for Hash

Source§

type Error = <[u8; 32] as FromHex>::Error

Source§

fn from_hex<T>(hex: T) -> Result<Hash, <Hash as FromHex>::Error>
where T: AsRef<[u8]>,

Creates an instance of type Self from the given hex string, or fails with a custom error type. Read more
Source§

impl FromStr for Hash

Source§

type Err = SerializationError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Hash, <Hash as FromStr>::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for Hash

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl IntoDisk for Hash

Source§

type Bytes = [u8; 32]

The type used to write bytes to disk, and compare a value as a key to on-disk keys.
Source§

fn as_bytes(&self) -> Self::Bytes

Converts the current type into serialized raw bytes. Read more
Source§

impl Ord for Hash

Source§

fn cmp(&self, other: &Hash) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Hash

Source§

fn eq(&self, other: &Hash) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Hash

Source§

fn partial_cmp(&self, other: &Hash) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl ToHex for Hash

Source§

fn encode_hex<T>(&self) -> T
where 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) -> T
where 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

Source§

fn zcash_deserialize<R>(reader: R) -> Result<Hash, SerializationError>
where R: Read,

Try to read self from the given reader. Read more
Source§

impl ZcashSerialize for Hash

Source§

fn zcash_serialize<W>(&self, writer: W) -> Result<(), Error>
where W: Write,

Write self to the given writer using the canonical format. Read more
Source§

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

Get the size of self by using a fake writer.
Source§

impl Copy for Hash

Source§

impl Eq for Hash

Source§

impl StructuralPartialEq for Hash