pub struct UtreexoProofMask(u8);Expand description
The UtreexoProofMask can be used to specify which parts of the proof data to request.
A UtreexoProof is composed of three parts:
- Proof Hashes: the hashes that compose the Merkle proof, used to recompute the Utreexo forest’s roots.
- Leaf Data: the data associated with the UTXOs being spent,
such as the [
bitcoin::Amount] being spent and the ScriptPubKey. - Targets: the position indexes in the Utreexo forest for the UTXOs being spent, used to recompute the forest roots.
The UtreexoProofMask’s bits can be set depending on what data you want to request.
Tuple Fields§
§0: u8Implementations§
Source§impl UtreexoProofMask
impl UtreexoProofMask
Sourceconst PROOF_HASHES: u8 = 2u8
const PROOF_HASHES: u8 = 2u8
Whether to include the proof hashes in the proof.
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new empty UtreexoProofMask, with no fields selected.
Use the include_* methods to select which fields to include, or
UtreexoProofMask::request_all to include all fields.
Sourcepub fn request_all() -> Self
pub fn request_all() -> Self
Creates a new UtreexoProofMask that requests all fields.
This is a special constructor for the common case where you want to request
all fields in the proof. If your goal is to request specific fields, use the
UtreexoProofMask::new constructor and the include_* methods to choose
what you need.
Sourcepub fn request_targets(self) -> Self
pub fn request_targets(self) -> Self
Whether to include the targets in the proof.
Sourcepub fn request_proof_hashes(self) -> Self
pub fn request_proof_hashes(self) -> Self
Whether to include the proof hashes in the proof.
Sourcepub fn request_leaf_data(self) -> Self
pub fn request_leaf_data(self) -> Self
Whether to include the leaf data in the proof.
Trait Implementations§
Source§impl Clone for UtreexoProofMask
impl Clone for UtreexoProofMask
Source§fn clone(&self) -> UtreexoProofMask
fn clone(&self) -> UtreexoProofMask
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UtreexoProofMask
impl Debug for UtreexoProofMask
Source§impl Default for UtreexoProofMask
impl Default for UtreexoProofMask
Source§fn default() -> UtreexoProofMask
fn default() -> UtreexoProofMask
Source§impl Encodable for UtreexoProofMask
impl Encodable for UtreexoProofMask
Source§impl Hash for UtreexoProofMask
impl Hash for UtreexoProofMask
Source§impl Ord for UtreexoProofMask
impl Ord for UtreexoProofMask
Source§fn cmp(&self, other: &UtreexoProofMask) -> Ordering
fn cmp(&self, other: &UtreexoProofMask) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for UtreexoProofMask
impl PartialEq for UtreexoProofMask
Source§impl PartialOrd for UtreexoProofMask
impl PartialOrd for UtreexoProofMask
impl Eq for UtreexoProofMask
impl StructuralPartialEq for UtreexoProofMask
Auto Trait Implementations§
impl Freeze for UtreexoProofMask
impl RefUnwindSafe for UtreexoProofMask
impl Send for UtreexoProofMask
impl Sync for UtreexoProofMask
impl Unpin for UtreexoProofMask
impl UnwindSafe for UtreexoProofMask
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.