nautilus_model::ffi::data::deltas

Function orderbook_deltas_new

Source
#[no_mangle]
pub extern "C" fn orderbook_deltas_new(
    instrument_id: InstrumentId,
    deltas: &CVec,
) -> OrderBookDeltas_API
Expand description

Creates a new OrderBookDeltas instance from a CVec of OrderBookDelta.

ยงSafety

  • The deltas must be a valid pointer to a CVec containing OrderBookDelta objects
  • This function clones the data pointed to by deltas into Rust-managed memory, then forgets the original Vec to prevent Rust from auto-deallocating it
  • The caller is responsible for managing the memory of deltas (including its deallocation) to avoid memory leaks