pub struct AddressBookEntry {
pub address: String,
pub currency: String,
pub label: String,
pub address_type: AddressType,
pub requires_confirmation: bool,
pub creation_timestamp: i64,
pub personal: Option<bool>,
pub beneficiary_first_name: Option<String>,
pub beneficiary_last_name: Option<String>,
pub beneficiary_address: Option<String>,
pub beneficiary_vasp_did: Option<String>,
pub beneficiary_vasp_name: Option<String>,
}Expand description
Address book entry
Fields§
§address: StringCryptocurrency address
currency: StringCurrency for this address
label: StringUser-defined label for the address
address_type: AddressTypeType of address
requires_confirmation: boolWhether this address requires email confirmation for withdrawals
creation_timestamp: i64Creation timestamp (milliseconds since Unix epoch)
personal: Option<bool>Whether this is a personal address
beneficiary_first_name: Option<String>Beneficiary information for compliance
beneficiary_last_name: Option<String>Beneficiary last name
beneficiary_address: Option<String>Beneficiary address for compliance
beneficiary_vasp_did: Option<String>Beneficiary VASP DID
beneficiary_vasp_name: Option<String>Beneficiary VASP name
Implementations§
Source§impl AddressBookEntry
impl AddressBookEntry
Sourcepub fn new(
address: String,
currency: String,
label: String,
address_type: AddressType,
creation_timestamp: i64,
) -> Self
pub fn new( address: String, currency: String, label: String, address_type: AddressType, creation_timestamp: i64, ) -> Self
Create a new address book entry
Sourcepub fn with_confirmation(self, requires: bool) -> Self
pub fn with_confirmation(self, requires: bool) -> Self
Set confirmation requirement
Sourcepub fn with_personal(self, personal: bool) -> Self
pub fn with_personal(self, personal: bool) -> Self
Set personal flag
Sourcepub fn with_beneficiary(
self,
first_name: String,
last_name: String,
address: String,
) -> Self
pub fn with_beneficiary( self, first_name: String, last_name: String, address: String, ) -> Self
Set beneficiary information
Sourcepub fn is_withdrawal(&self) -> bool
pub fn is_withdrawal(&self) -> bool
Check if this is a withdrawal address
Sourcepub fn is_deposit(&self) -> bool
pub fn is_deposit(&self) -> bool
Check if this is a deposit address
Sourcepub fn is_transfer(&self) -> bool
pub fn is_transfer(&self) -> bool
Check if this is a transfer address
Trait Implementations§
Source§impl Clone for AddressBookEntry
impl Clone for AddressBookEntry
Source§fn clone(&self) -> AddressBookEntry
fn clone(&self) -> AddressBookEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AddressBookEntry
impl Debug for AddressBookEntry
Source§impl<'de> Deserialize<'de> for AddressBookEntry
impl<'de> Deserialize<'de> for AddressBookEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 Display for AddressBookEntry
impl Display for AddressBookEntry
Source§impl PartialEq for AddressBookEntry
impl PartialEq for AddressBookEntry
Source§impl Serialize for AddressBookEntry
impl Serialize for AddressBookEntry
impl StructuralPartialEq for AddressBookEntry
Auto Trait Implementations§
impl Freeze for AddressBookEntry
impl RefUnwindSafe for AddressBookEntry
impl Send for AddressBookEntry
impl Sync for AddressBookEntry
impl Unpin for AddressBookEntry
impl UnwindSafe for AddressBookEntry
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