pub struct Cache { /* private fields */ }Expand description
Default MessageProcessor implementation that maintains market and order caches.
It updates an internal StreamState to apply incremental updates to market and order books.
Trait Implementations§
Source§impl MessageProcessor for Cache
impl MessageProcessor for Cache
Source§type Output = CachedMessage
type Output = CachedMessage
The processed message type produced by
process_messageSource§fn process_message(&mut self, message: ResponseMessage) -> Option<Self::Output>
fn process_message(&mut self, message: ResponseMessage) -> Option<Self::Output>
Process an incoming
ResponseMessage. Read moreSource§fn on_message_received(&mut self, raw: Bytes, message: &ResponseMessage)
fn on_message_received(&mut self, raw: Bytes, message: &ResponseMessage)
Called with the raw JSON bytes and a reference to the parsed message
before
Self::process_message. Read moreAuto Trait Implementations§
impl Freeze for Cache
impl RefUnwindSafe for Cache
impl Send for Cache
impl Sync for Cache
impl Unpin for Cache
impl UnwindSafe for Cache
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