pub enum SettlementAddress {
Caip10(String),
PayTo(PayToUri),
}Expand description
A settlement address that can be either a blockchain address (CAIP-10) or a traditional payment system identifier (PayTo URI).
Variants§
Caip10(String)
A blockchain address in CAIP-10 format.
PayTo(PayToUri)
A traditional payment system identifier as a PayTo URI.
Implementations§
Source§impl SettlementAddress
impl SettlementAddress
Sourcepub fn from_string(s: String) -> Result<Self, SettlementAddressError>
pub fn from_string(s: String) -> Result<Self, SettlementAddressError>
Create a settlement address from a string, auto-detecting the format.
Sourcepub fn is_blockchain(&self) -> bool
pub fn is_blockchain(&self) -> bool
Check if this is a blockchain address.
Sourcepub fn is_traditional(&self) -> bool
pub fn is_traditional(&self) -> bool
Check if this is a traditional payment address.
Trait Implementations§
Source§impl Clone for SettlementAddress
impl Clone for SettlementAddress
Source§fn clone(&self) -> SettlementAddress
fn clone(&self) -> SettlementAddress
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 SettlementAddress
impl Debug for SettlementAddress
Source§impl<'de> Deserialize<'de> for SettlementAddress
impl<'de> Deserialize<'de> for SettlementAddress
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 SettlementAddress
impl Display for SettlementAddress
Source§impl PartialEq for SettlementAddress
impl PartialEq for SettlementAddress
Source§impl Serialize for SettlementAddress
impl Serialize for SettlementAddress
impl Eq for SettlementAddress
impl StructuralPartialEq for SettlementAddress
Auto Trait Implementations§
impl Freeze for SettlementAddress
impl RefUnwindSafe for SettlementAddress
impl Send for SettlementAddress
impl Sync for SettlementAddress
impl Unpin for SettlementAddress
impl UnsafeUnpin for SettlementAddress
impl UnwindSafe for SettlementAddress
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