Enum agnostic_orderbook::state::Event[][src]

pub enum Event {
    Fill {
        taker_side: Side,
        maker_order_id: u128,
        quote_size: u64,
        base_size: u64,
        maker_callback_info: Vec<u8>,
        taker_callback_info: Vec<u8>,
    },
    Out {
        side: Side,
        order_id: u128,
        base_size: u64,
        delete: bool,
        callback_info: Vec<u8>,
    },
}
Expand description

Events are the primary output of the asset agnostic orderbook

Variants

Fill

A fill event describes a match between a taker order and a provider order

Show fields

Fields of Fill

taker_side: Sidemaker_order_id: u128

The order id of the maker order

quote_size: u64

The total quote size of the transaction

base_size: u64

The total base size of the transaction

maker_callback_info: Vec<u8>

The callback information for the maker

taker_callback_info: Vec<u8>

The callback information for the taker

Out

An out event describes an order which has been taken out of the orderbook

Show fields

Fields of Out

side: Sideorder_id: u128base_size: u64delete: boolcallback_info: Vec<u8>

Implementations

Used to serialize an event object into a generic byte writer.

Used to deserialize an event object from bytes.

An event queue is divided into slots. The size of these slots depend on the particular market’s callback_info_len constant.

Trait Implementations

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes. Read more

Deserialize this instance from a slice of bytes.

Serialize this instance into a vector of bytes.

Formats the value using the given formatter. Read more

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.