pub enum Abstraction {
Default,
Disabled,
UnifiedAccount,
PortfolioMargin,
DexAbstraction,
Unknown(String),
}Expand description
How an account’s balances are kept, as userAbstraction answers.
Variants§
Default
What a new account answers, never set. Standard: perp and spot apart.
Disabled
Standard, set: each perp dex and spot keep their own.
UnifiedAccount
One balance per asset, in spot.
PortfolioMargin
Unified, and an order may borrow against HYPE and BTC.
DexAbstraction
Discontinued: USDC sits with the main dex’s perps, and every USDC dex draws on it; everything else as standard.
Unknown(String)
A mode this build does not know, kept as spelled. Treated as standard.
Implementations§
Source§impl Abstraction
impl Abstraction
pub fn parse(text: &str) -> Abstraction
pub fn wire(&self) -> &str
Sourcepub const fn is_pooled(&self) -> bool
pub const fn is_pooled(&self) -> bool
One balance, in spot: a unified or portfolio-margin account, which also
refuses spotSend.
Sourcepub const fn is_standard(&self) -> bool
pub const fn is_standard(&self) -> bool
Separate ledgers: each perp dex and spot keep their own.
Trait Implementations§
Source§impl Clone for Abstraction
impl Clone for Abstraction
Source§impl Debug for Abstraction
impl Debug for Abstraction
Source§impl<'de> Deserialize<'de> for Abstraction
From the bare JSON string the venue answers.
impl<'de> Deserialize<'de> for Abstraction
From the bare JSON string the venue answers.
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for Abstraction
impl Display for Abstraction
impl Eq for Abstraction
Source§impl Hash for Abstraction
impl Hash for Abstraction
Source§impl PartialEq for Abstraction
impl PartialEq for Abstraction
impl StructuralPartialEq for Abstraction
Auto Trait Implementations§
impl Freeze for Abstraction
impl RefUnwindSafe for Abstraction
impl Send for Abstraction
impl Sync for Abstraction
impl Unpin for Abstraction
impl UnsafeUnpin for Abstraction
impl UnwindSafe for Abstraction
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.