pub struct InstrumentInfo {
pub symbol: SmartString,
pub category: BybitCategory,
pub status: SmartString,
pub base_coin: SmartString,
pub quote_coin: SmartString,
pub contract_type: Option<SmartString>,
pub cached_at: u64,
}Expand description
Instrument information cache entry
Fields§
§symbol: SmartStringSymbol identifier
category: BybitCategoryTrading category (spot, linear, inverse, option)
status: SmartStringTrading status (Trading, Settled, etc.)
base_coin: SmartStringBase currency or coin
quote_coin: SmartStringQuote currency or coin
contract_type: Option<SmartString>Contract type for derivatives (LinearPerpetual, etc.)
cached_at: u64Timestamp when cached (nanoseconds)
Implementations§
Source§impl InstrumentInfo
impl InstrumentInfo
Sourcepub fn new(
symbol: SmartString,
category: BybitCategory,
status: SmartString,
base_coin: SmartString,
quote_coin: SmartString,
contract_type: Option<SmartString>,
) -> Self
pub fn new( symbol: SmartString, category: BybitCategory, status: SmartString, base_coin: SmartString, quote_coin: SmartString, contract_type: Option<SmartString>, ) -> Self
Create new instrument info
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Check if cached entry is expired (older than 1 hour)
Trait Implementations§
Source§impl Clone for InstrumentInfo
impl Clone for InstrumentInfo
Source§fn clone(&self) -> InstrumentInfo
fn clone(&self) -> InstrumentInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for InstrumentInfo
impl RefUnwindSafe for InstrumentInfo
impl Send for InstrumentInfo
impl Sync for InstrumentInfo
impl Unpin for InstrumentInfo
impl UnwindSafe for InstrumentInfo
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