pub struct AccountBalance {
pub currency: CurrencyId,
pub free: u64,
pub reserved: u64,
}Expand description
One currency slot of an account’s balance snapshot.
Copy so the fixed-size [AccountBalance; 16] array used in position
queries stays trivially clonable; the struct replaces an earlier
(CurrencyId, u64, u64) tuple so call sites read with named fields
instead of opaque positional access.
Fields§
§currency: CurrencyId§free: u64Spendable balance (not reserved by any open order).
reserved: u64Balance reserved by open orders. free + reserved is the total holding.
Implementations§
Trait Implementations§
Source§impl Clone for AccountBalance
impl Clone for AccountBalance
Source§fn clone(&self) -> AccountBalance
fn clone(&self) -> AccountBalance
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AccountBalance
Source§impl Debug for AccountBalance
impl Debug for AccountBalance
impl Eq for AccountBalance
Source§impl PartialEq for AccountBalance
impl PartialEq for AccountBalance
impl StructuralPartialEq for AccountBalance
Auto Trait Implementations§
impl Freeze for AccountBalance
impl RefUnwindSafe for AccountBalance
impl Send for AccountBalance
impl Sync for AccountBalance
impl Unpin for AccountBalance
impl UnsafeUnpin for AccountBalance
impl UnwindSafe for AccountBalance
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