pub enum TradeSide {
Buy,
Sell,
Other(String),
}Expand description
Side of a trade.
Deserialisation is tolerant in two ways. A value the API adds later lands in
TradeSide::Other instead of failing the whole response, and the casing is
folded: /trades/recent sends "buy"/"sell" while the trades embedded in
/tokens/{network}/{token_address} send "BUY"/"SELL", and both map to
TradeSide::Buy and TradeSide::Sell.
Variants§
Buy
Bought the token (BNB in, tokens out).
Sell
Sold the token (tokens in, BNB out).
Other(String)
A side this SDK version does not know about, kept verbatim.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TradeSide
impl<'de> Deserialize<'de> for TradeSide
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
impl Eq for TradeSide
impl StructuralPartialEq for TradeSide
Auto Trait Implementations§
impl Freeze for TradeSide
impl RefUnwindSafe for TradeSide
impl Send for TradeSide
impl Sync for TradeSide
impl Unpin for TradeSide
impl UnsafeUnpin for TradeSide
impl UnwindSafe for TradeSide
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
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.