pub struct StateDelta {
pub commands: Vec<[u8; 32]>,
pub obligations: Vec<[u8; 32]>,
pub intents: Vec<[u8; 32]>,
pub accounts: Vec<AccountUpdate>,
pub option_positions: Vec<OptionPositionUpdate>,
pub perp_positions: Vec<PerpPositionUpdate>,
pub orders: Vec<OrderUpdate>,
pub instruments: Vec<InstrumentUpdate>,
pub oracles: Vec<OracleUpdate>,
pub mmp_configs: Vec<MmpConfigUpdate>,
pub risk: Vec<RiskUpdate>,
pub global: Option<GlobalLeaf>,
}Expand description
A batch of state changes to commit.
The integration layer constructs this from engine events and state reads. The pipeline doesn’t know or care where the data comes from — it just converts it to JMT leaf updates.
All monetary values are pre-scaled to 1e8 by the caller.
Fields§
§commands: Vec<[u8; 32]>§obligations: Vec<[u8; 32]>§intents: Vec<[u8; 32]>§accounts: Vec<AccountUpdate>§option_positions: Vec<OptionPositionUpdate>§perp_positions: Vec<PerpPositionUpdate>§orders: Vec<OrderUpdate>§instruments: Vec<InstrumentUpdate>§oracles: Vec<OracleUpdate>§mmp_configs: Vec<MmpConfigUpdate>§risk: Vec<RiskUpdate>§global: Option<GlobalLeaf>Trait Implementations§
Source§impl Clone for StateDelta
impl Clone for StateDelta
Source§fn clone(&self) -> StateDelta
fn clone(&self) -> StateDelta
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StateDelta
impl Debug for StateDelta
Source§impl Default for StateDelta
impl Default for StateDelta
Source§fn default() -> StateDelta
fn default() -> StateDelta
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StateDelta
impl RefUnwindSafe for StateDelta
impl Send for StateDelta
impl Sync for StateDelta
impl Unpin for StateDelta
impl UnsafeUnpin for StateDelta
impl UnwindSafe for StateDelta
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more