Skip to main content

orderbook_deltas_new

Function orderbook_deltas_new 

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

Creates a new OrderBookDeltas instance from a CVec of OrderBookDeltaFfi.

The data is cloned into Rust-managed memory and remains owned by the caller.

Returns an owning pointer to the heap-allocated OrderBookDeltas which the caller must eventually pass to orderbook_deltas_drop.

ยงSafety

deltas must describe initialized OrderBookDeltaFfi values that remain valid and immutable for the duration of this call. The caller remains responsible for deallocating its buffer.