pub struct SubAccountTransfer { /* private fields */ }Expand description
subAccountTransfer: perp USDC between the master and a subaccount,
usd in millionths.
Implementations§
Source§impl SubAccountTransfer
impl SubAccountTransfer
Sourcepub fn deposit(
sub_account: Address,
usdc: Dec,
) -> Result<SubAccountTransfer, BadUnits>
pub fn deposit( sub_account: Address, usdc: Dec, ) -> Result<SubAccountTransfer, BadUnits>
Into the subaccount, at most six places: refused rather than rounded when finer.
Sourcepub fn withdraw(
sub_account: Address,
usdc: Dec,
) -> Result<SubAccountTransfer, BadUnits>
pub fn withdraw( sub_account: Address, usdc: Dec, ) -> Result<SubAccountTransfer, BadUnits>
Back to the master.
Sourcepub const fn from_micros(
sub_account: Address,
is_deposit: bool,
usd: u64,
) -> SubAccountTransfer
pub const fn from_micros( sub_account: Address, is_deposit: bool, usd: u64, ) -> SubAccountTransfer
From a count of millionths already made.
Trait Implementations§
Source§impl Clone for SubAccountTransfer
impl Clone for SubAccountTransfer
impl Copy for SubAccountTransfer
Source§impl Debug for SubAccountTransfer
impl Debug for SubAccountTransfer
impl Eq for SubAccountTransfer
Source§impl L1Action for SubAccountTransfer
impl L1Action for SubAccountTransfer
Source§fn action(&self) -> Map
fn action(&self) -> Map
The action’s keys and values in wire order, which is the hashed order.
fn msgpack(&self) -> Vec<u8> ⓘ
fn connection_id(&self, nonce: u64, vault: Option<Address>) -> [u8; 32]
fn typed( &self, nonce: u64, vault: Option<Address>, network: Network, ) -> TypedStruct<'static>
fn digest( &self, nonce: u64, vault: Option<Address>, network: Network, ) -> [u8; 32]
Source§fn wallet_json(
&self,
nonce: u64,
vault: Option<Address>,
network: Network,
) -> String
fn wallet_json( &self, nonce: u64, vault: Option<Address>, network: Network, ) -> String
For a master wallet signing in the browser. It needs chain 1337.
fn body( &self, nonce: u64, signature: &Signature, vault: Option<Address>, ) -> String
Source§impl PartialEq for SubAccountTransfer
impl PartialEq 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 UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.