Struct jet_fixed_term::orderbook::state::EventQueue
source · [−]pub struct EventQueue<'a> { /* private fields */ }
Expand description
todo: algebraic type parameter could provide compile time checks on use as market or user adapter
Implementations
sourceimpl<'a> EventQueue<'a>
impl<'a> EventQueue<'a>
pub fn deserialize_market(info: AccountInfo<'a>) -> Result<Self>
pub fn deserialize_user_adapter(info: AccountInfo<'a>) -> Result<Self>
sourcepub fn push_event<E: Event>(
&mut self,
event: E,
maker_callback_info: Option<&CallbackInfo>,
taker_callback_info: Option<&CallbackInfo>
) -> Result<(), Error>
pub fn push_event<E: Event>(
&mut self,
event: E,
maker_callback_info: Option<&CallbackInfo>,
taker_callback_info: Option<&CallbackInfo>
) -> Result<(), Error>
Pushes the given event to the back of the queue
sourcepub fn pop_events(&mut self, num_events: u32) -> Result<()>
pub fn pop_events(&mut self, num_events: u32) -> Result<()>
Attempts to remove the number of events from the top of the queue
pub fn iter(&self) -> QueueIterator<'a>ⓘNotable traits for QueueIterator<'a>impl<'a> Iterator for QueueIterator<'a> type Item = OrderbookEvent;
Trait Implementations
sourceimpl<'a> Clone for EventQueue<'a>
impl<'a> Clone for EventQueue<'a>
sourcefn clone(&self) -> EventQueue<'a>
fn clone(&self) -> EventQueue<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<'a> Drop for EventQueue<'a>
impl<'a> Drop for EventQueue<'a>
sourceimpl<'a> Key for EventQueue<'a>
impl<'a> Key for EventQueue<'a>
Auto Trait Implementations
impl<'a> !RefUnwindSafe for EventQueue<'a>
impl<'a> !Send for EventQueue<'a>
impl<'a> !Sync for EventQueue<'a>
impl<'a> Unpin for EventQueue<'a>
impl<'a> !UnwindSafe for EventQueue<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more