pub struct Uivk(/* private fields */);Expand description
A Unified Incoming Viewing Key.
§Examples
use zcash_address::unified::{self, Container, Encoding};
let example_uivk: &str = uivk_from_user();
let (network, uivk) = unified::Uivk::decode(example_uivk)?;
// We can obtain the pool-specific Incoming Viewing Keys for the UIVK in
// preference order (the order in which wallets should prefer to use their
// corresponding address receivers):
let ivks: Vec<unified::Ivk> = uivk.items();
// And we can create the UIVK from a list of IVKs:
let new_uivk = unified::Uivk::try_from_items(ivks)?;
assert_eq!(new_uivk, uivk);Trait Implementations§
Source§impl Container for Uivk
impl Container for Uivk
Source§fn items_as_parsed(&self) -> &[Ivk]
fn items_as_parsed(&self) -> &[Ivk]
Returns the IVKs contained within this UIVK, in the order they were parsed from the string encoding.
This API is for advanced usage; in most cases you should use Uivk::items.
Source§impl Encoding for Uivk
impl Encoding for Uivk
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 Uivk
impl StructuralPartialEq for Uivk
Auto Trait Implementations§
impl Freeze for Uivk
impl RefUnwindSafe for Uivk
impl Send for Uivk
impl Sync for Uivk
impl Unpin for Uivk
impl UnwindSafe for Uivk
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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