Type Alias SubtreeRpcData

Source
pub type SubtreeRpcData = NoteCommitmentSubtreeData<String>;
Expand description

A subtree data type that can hold Sapling or Orchard subtree roots.

Aliased Type§

struct SubtreeRpcData {
    pub root: String,
    pub end_height: Height,
}

Fields§

§root: String

Merkle root of the 2^16-leaf subtree.

§end_height: Height

Height of the block containing the note that completed this subtree.

Implementations

Source§

impl<SubtreeRoot> NoteCommitmentSubtreeData<SubtreeRoot>

Source

pub fn new( end_height: Height, root: SubtreeRoot, ) -> NoteCommitmentSubtreeData<SubtreeRoot>

Source

pub fn with_index( self, index: impl Into<NoteCommitmentSubtreeIndex>, ) -> NoteCommitmentSubtree<SubtreeRoot>

Creates new NoteCommitmentSubtree from a NoteCommitmentSubtreeData and index

Trait Implementations

Source§

impl<SubtreeRoot> Arbitrary for NoteCommitmentSubtreeData<SubtreeRoot>
where SubtreeRoot: Arbitrary,

Source§

type Parameters = (<SubtreeRoot as Arbitrary>::Parameters, <Height 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<(<SubtreeRoot as Arbitrary>::Strategy, <Height as Arbitrary>::Strategy), fn(_: (SubtreeRoot, Height)) -> NoteCommitmentSubtreeData<SubtreeRoot>>

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

fn arbitrary_with( _top: <NoteCommitmentSubtreeData<SubtreeRoot> as Arbitrary>::Parameters, ) -> <NoteCommitmentSubtreeData<SubtreeRoot> 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<SubtreeRoot> Clone for NoteCommitmentSubtreeData<SubtreeRoot>
where SubtreeRoot: Clone,

Source§

fn clone(&self) -> NoteCommitmentSubtreeData<SubtreeRoot>

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<SubtreeRoot> Debug for NoteCommitmentSubtreeData<SubtreeRoot>
where SubtreeRoot: Debug,

Source§

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

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

impl<Node> FromDisk for NoteCommitmentSubtreeData<Node>
where Node: FromDisk,

Source§

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

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

impl<Root> IntoDisk for NoteCommitmentSubtreeData<Root>
where Root: IntoDisk<Bytes = Vec<u8>>,

Source§

type Bytes = Vec<u8>

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

fn as_bytes(&self) -> <NoteCommitmentSubtreeData<Root> as IntoDisk>::Bytes

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

impl<SubtreeRoot> PartialEq for NoteCommitmentSubtreeData<SubtreeRoot>
where SubtreeRoot: PartialEq,

Source§

fn eq(&self, other: &NoteCommitmentSubtreeData<SubtreeRoot>) -> 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<SubtreeRoot> Serialize for NoteCommitmentSubtreeData<SubtreeRoot>
where SubtreeRoot: Serialize,

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<SubtreeRoot> Copy for NoteCommitmentSubtreeData<SubtreeRoot>
where SubtreeRoot: Copy,

Source§

impl<SubtreeRoot> Eq for NoteCommitmentSubtreeData<SubtreeRoot>
where SubtreeRoot: Eq,

Source§

impl<SubtreeRoot> StructuralPartialEq for NoteCommitmentSubtreeData<SubtreeRoot>