Struct agnostic_orderbook::state::EventQueue [−][src]
pub struct EventQueue<'a> { /* fields omitted */ }
Expand description
The event queue account contains a serialized header and a circular buffer of serialized events.
This struct is used at runtime but doesn’t represent a serialized event queue
Implementations
Initialize a new EventQueue object.
Within a CPI context, the account parameter can be supplied through
use std::rc::Rc; let a: AccountInfo; let event_queue_header = EventQueueHeader::deserialize(&mut &a.data.borrow()[..EVENT_QUEUE_HEADER_LEN]).unwrap() let event_queue = EventQueue::new(event_queue_header, Rc::clone(&a.data), callback_info_len);
Retrieves the event at position index in the queue.
pub fn read_register<T: BorshSerialize + BorshDeserialize>(
&self
) -> Result<Register<T>, IoError>
[src]
pub fn read_register<T: BorshSerialize + BorshDeserialize>(
&self
) -> Result<Register<T>, IoError>
[src]This method is used to deserialize the event queue’s register
The nature of the serialized object should be deductible from caller context