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.

This method is used to deserialize the event queue’s register

The nature of the serialized object should be deductible from caller context

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.