Type Alias GetAddressBalanceRequest

Source
pub type GetAddressBalanceRequest = AddressStrings;
Expand description

A request to get the transparent balance of a set of addresses.

Aliased Type§

struct GetAddressBalanceRequest {
    addresses: Vec<String>,
}

Fields§

§addresses: Vec<String>

A list of transparent address strings.

Implementations

Source§

impl AddressStrings

Source

pub fn new(addresses: Vec<String>) -> AddressStrings

Creates a new AddressStrings given a vector.

Source

pub fn new_valid(addresses: Vec<String>) -> Result<AddressStrings>

👎Deprecated: Use AddressStrings::new instead. Validity will be checked by the server.

Creates a new AddressStrings from a given vector, returns an error if any addresses are incorrect.

Source

pub fn valid_addresses(self) -> Result<HashSet<Address>>

Given a list of addresses as strings:

  • check if provided list have all valid transparent addresses.
  • return valid addresses as a set of Address.
Source

pub fn valid_address_strings(self) -> Result<Vec<String>>

Given a list of addresses as strings:

  • check if provided list have all valid transparent addresses.
  • return valid addresses as a vec of strings.

Trait Implementations

Source§

impl Clone for AddressStrings

Source§

fn clone(&self) -> AddressStrings

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 AddressStrings

Source§

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

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

impl<'de> Deserialize<'de> for AddressStrings

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<DAddressStrings> for AddressStrings

Source§

fn from(address_strings: DAddressStrings) -> Self

Converts to this type from the input type.
Source§

impl Hash for AddressStrings

Source§

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

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 PartialEq for AddressStrings

Source§

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

Source§

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

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

impl Eq for AddressStrings

Source§

impl StructuralPartialEq for AddressStrings