pub struct Symbol { /* private fields */ }Expand description
A trading symbol representing a base/quote currency pair.
Implementations§
Source§impl Symbol
impl Symbol
Sourcepub fn is_crypto(&self) -> bool
pub fn is_crypto(&self) -> bool
Returns true if this is likely a crypto pair.
Heuristic: checks both quote AND base currencies.
- Crypto quotes (USDT, USDC, BTC, ETH, etc.) → crypto
- Known crypto bases with fiat quote (BTC/USD, ETH/USD) → crypto
- Everything else → not crypto
Aligned with Ticker::FromStr inference logic (#2693).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Symbol
impl<'de> Deserialize<'de> for Symbol
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Symbol
impl StructuralPartialEq for Symbol
Auto Trait Implementations§
impl Freeze for Symbol
impl RefUnwindSafe for Symbol
impl Send for Symbol
impl Sync for Symbol
impl Unpin for Symbol
impl UnsafeUnpin for Symbol
impl UnwindSafe for Symbol
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