pub struct AccountRef {
pub owner: Address,
pub sub: Option<Address>,
}Expand description
Whose account an action or a read is about: the master’s own, or one of its subaccounts.
Fields§
§owner: AddressThe account whose key, or whose agent, signs.
sub: Option<Address>The subaccount acted for, if any.
Implementations§
Source§impl AccountRef
impl AccountRef
pub const fn own(owner: Address) -> AccountRef
pub const fn sub(owner: Address, sub: Address) -> AccountRef
pub const fn is_sub(&self) -> bool
Sourcepub fn read_at(&self) -> Address
pub fn read_at(&self) -> Address
Where its states, mode, fees and limits are read: the subaccount’s own address for one.
Sourcepub const fn vault_address(&self) -> Option<Address>
pub const fn vault_address(&self) -> Option<Address>
The vaultAddress an L1 action names: the subaccount it acts for.
Sourcepub fn refuses(
&self,
kind: ActionKind,
market: Option<AssetKind>,
) -> Option<SubRefusal>
pub fn refuses( &self, kind: ActionKind, market: Option<AssetKind>, ) -> Option<SubRefusal>
Why this account does not do kind, or None when it may. An
order-like action (order, modify, batchModify, twapOrder) names
its market. The master’s own account refuses nothing here.
Trait Implementations§
Source§impl Clone for AccountRef
impl Clone for AccountRef
impl Copy for AccountRef
Source§impl Debug for AccountRef
impl Debug for AccountRef
Source§impl Display for AccountRef
impl Display for AccountRef
impl Eq for AccountRef
Source§impl Hash for AccountRef
impl Hash for AccountRef
Source§impl PartialEq for AccountRef
impl PartialEq for AccountRef
impl StructuralPartialEq for AccountRef
Auto Trait Implementations§
impl Freeze for AccountRef
impl RefUnwindSafe for AccountRef
impl Send for AccountRef
impl Sync for AccountRef
impl Unpin for AccountRef
impl UnsafeUnpin for AccountRef
impl UnwindSafe for AccountRef
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.