pub struct SubaccountTransfer {
pub amount: f64,
pub currency: String,
pub destination: i64,
pub id: i64,
pub source: i64,
pub state: TransferState,
pub timestamp: i64,
pub transfer_type: String,
}Expand description
Subaccount transfer information
Fields§
§amount: f64Transfer amount
currency: StringCurrency being transferred
destination: i64Destination subaccount ID
id: i64Transfer ID
source: i64Source subaccount ID
state: TransferStateTransfer state
timestamp: i64Transfer timestamp (milliseconds since Unix epoch)
transfer_type: StringType of transfer
Implementations§
Source§impl SubaccountTransfer
impl SubaccountTransfer
Sourcepub fn new(
id: i64,
amount: f64,
currency: String,
source: i64,
destination: i64,
timestamp: i64,
) -> Self
pub fn new( id: i64, amount: f64, currency: String, source: i64, destination: i64, timestamp: i64, ) -> Self
Create a new subaccount transfer
Sourcepub fn with_state(self, state: TransferState) -> Self
pub fn with_state(self, state: TransferState) -> Self
Set transfer state
Sourcepub fn is_main_subaccount_transfer(&self) -> bool
pub fn is_main_subaccount_transfer(&self) -> bool
Check if transfer is between main account and subaccount
Sourcepub fn is_subaccount_to_subaccount(&self) -> bool
pub fn is_subaccount_to_subaccount(&self) -> bool
Check if transfer is between subaccounts
Trait Implementations§
Source§impl Clone for SubaccountTransfer
impl Clone for SubaccountTransfer
Source§fn clone(&self) -> SubaccountTransfer
fn clone(&self) -> SubaccountTransfer
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 SubaccountTransfer
impl Debug for SubaccountTransfer
Source§impl<'de> Deserialize<'de> for SubaccountTransfer
impl<'de> Deserialize<'de> for SubaccountTransfer
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 SubaccountTransfer
impl Display for SubaccountTransfer
Source§impl PartialEq for SubaccountTransfer
impl PartialEq for SubaccountTransfer
Source§impl Serialize for SubaccountTransfer
impl Serialize for SubaccountTransfer
impl StructuralPartialEq for SubaccountTransfer
Auto Trait Implementations§
impl Freeze for SubaccountTransfer
impl RefUnwindSafe for SubaccountTransfer
impl Send for SubaccountTransfer
impl Sync for SubaccountTransfer
impl Unpin for SubaccountTransfer
impl UnwindSafe for SubaccountTransfer
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