pub struct Ufvk(/* private fields */);
Expand description
A Unified Full Viewing Key.
§Examples
use zcash_address::unified::{self, Container, Encoding};
let example_ufvk: &str = ufvk_from_user();
let (network, ufvk) = unified::Ufvk::decode(example_ufvk)?;
// We can obtain the pool-specific Full Viewing Keys for the UFVK in preference
// order (the order in which wallets should prefer to use their corresponding
// address receivers):
let fvks: Vec<unified::Fvk> = ufvk.items();
// And we can create the UFVK from a list of FVKs:
let new_ufvk = unified::Ufvk::try_from_items(fvks)?;
assert_eq!(new_ufvk, ufvk);
Trait Implementations§
Source§impl Container for Ufvk
impl Container for Ufvk
Source§fn items_as_parsed(&self) -> &[Fvk]
fn items_as_parsed(&self) -> &[Fvk]
Returns the FVKs contained within this UFVK, in the order they were parsed from the string encoding.
This API is for advanced usage; in most cases you should use Ufvk::receivers
.
Source§impl Encoding for Ufvk
impl Encoding for Ufvk
Source§fn try_from_items(items: Vec<Self::Item>) -> Result<Self, ParseError>
fn try_from_items(items: Vec<Self::Item>) -> Result<Self, ParseError>
Constructs a value of a unified container type from a vector
of container items, sorted according to typecode as specified
in ZIP 316. Read more
impl Eq for Ufvk
impl StructuralPartialEq for Ufvk
Auto Trait Implementations§
impl Freeze for Ufvk
impl RefUnwindSafe for Ufvk
impl Send for Ufvk
impl Sync for Ufvk
impl Unpin for Ufvk
impl UnwindSafe for Ufvk
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more