pub struct ParsedLevel2Snapshot {
pub product_id: String,
pub bids: SmallVec<[(Decimal, Decimal); 32]>,
pub asks: SmallVec<[(Decimal, Decimal); 32]>,
}Expand description
Parsed Level2 snapshot for efficient processing
Fields§
§product_id: StringTrading pair identifier
bids: SmallVec<[(Decimal, Decimal); 32]>Bid levels as (price, size) tuples
asks: SmallVec<[(Decimal, Decimal); 32]>Ask levels as (price, size) tuples
Implementations§
Source§impl ParsedLevel2Snapshot
impl ParsedLevel2Snapshot
Sourcepub fn from_snapshot(snapshot: Level2Snapshot) -> Self
pub fn from_snapshot(snapshot: Level2Snapshot) -> Self
Convert a Level2Snapshot to a ParsedLevel2Snapshot with typed decimals
Trait Implementations§
Source§impl Clone for ParsedLevel2Snapshot
impl Clone for ParsedLevel2Snapshot
Source§fn clone(&self) -> ParsedLevel2Snapshot
fn clone(&self) -> ParsedLevel2Snapshot
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 ParsedLevel2Snapshot
impl RefUnwindSafe for ParsedLevel2Snapshot
impl Send for ParsedLevel2Snapshot
impl Sync for ParsedLevel2Snapshot
impl Unpin for ParsedLevel2Snapshot
impl UnwindSafe for ParsedLevel2Snapshot
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