pub struct ProcessAudit<Event, Output> {
pub event: Event,
pub outputs: NoneOneOrMany<Output>,
pub errors: NoneOneOrMany<UnrecoverableEngineError>,
}Expand description
Represents AuditTick types that are generated when an Engine processes an Event.
Fields§
§event: Event§outputs: NoneOneOrMany<Output>§errors: NoneOneOrMany<UnrecoverableEngineError>Implementations§
Source§impl<Event, Output> ProcessAudit<Event, Output>
impl<Event, Output> ProcessAudit<Event, Output>
pub const fn new( event: Event, outputs: NoneOneOrMany<Output>, errors: NoneOneOrMany<UnrecoverableEngineError>, ) -> ProcessAudit<Event, Output>
Source§impl<Event, Output> ProcessAudit<Event, Output>
impl<Event, Output> ProcessAudit<Event, Output>
pub fn with_event<E>(event: E) -> Selfwhere
E: Into<Event>,
pub fn with_output<E, O>(event: E, output: O) -> Self
Source§impl<Event, OnTradingDisabled, OnDisconnect> ProcessAudit<Event, EngineOutput<OnTradingDisabled, OnDisconnect>>
impl<Event, OnTradingDisabled, OnDisconnect> ProcessAudit<Event, EngineOutput<OnTradingDisabled, OnDisconnect>>
pub fn with_trading_state_update<E>(
event: E,
disabled: Option<OnTradingDisabled>,
) -> Selfwhere
E: Into<Event>,
pub fn with_account_update<E>(
event: E,
account: UpdateFromAccountOutput<OnDisconnect>,
) -> Selfwhere
E: Into<Event>,
pub fn with_market_update<E>(
event: E,
account: UpdateFromMarketOutput<OnDisconnect>,
) -> Selfwhere
E: Into<Event>,
Source§impl<Event, Output> ProcessAudit<Event, Output>
impl<Event, Output> ProcessAudit<Event, Output>
pub fn add_output<O>(self, output: O) -> Selfwhere
O: Into<Output>,
pub fn add_errors<ErrIter>(self, errs: ErrIter) -> Selfwhere
ErrIter: IntoIterator<Item = UnrecoverableEngineError>,
Trait Implementations§
Source§impl<'de, Event, Output> Deserialize<'de> for ProcessAudit<Event, Output>where
Event: Deserialize<'de>,
Output: Deserialize<'de>,
impl<'de, Event, Output> Deserialize<'de> for ProcessAudit<Event, Output>where
Event: Deserialize<'de>,
Output: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<Event: Eq, Output: Eq> Eq for ProcessAudit<Event, Output>
Source§impl<Event, Output> From<ProcessAudit<Event, Output>> for EngineAudit<Event, Output>
impl<Event, Output> From<ProcessAudit<Event, Output>> for EngineAudit<Event, Output>
Source§fn from(value: ProcessAudit<Event, Output>) -> Self
fn from(value: ProcessAudit<Event, Output>) -> Self
Converts to this type from the input type.
Source§impl<Event: Ord, Output: Ord> Ord for ProcessAudit<Event, Output>
impl<Event: Ord, Output: Ord> Ord for ProcessAudit<Event, Output>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<Event: PartialOrd, Output: PartialOrd> PartialOrd for ProcessAudit<Event, Output>
impl<Event: PartialOrd, Output: PartialOrd> PartialOrd for ProcessAudit<Event, Output>
Source§impl<Event, Output> Serialize for ProcessAudit<Event, Output>
impl<Event, Output> Serialize for ProcessAudit<Event, Output>
impl<Event: PartialEq, Output: PartialEq> StructuralPartialEq for ProcessAudit<Event, Output>
Source§impl<Event, Output> Terminal for ProcessAudit<Event, Output>where
Event: Terminal,
impl<Event, Output> Terminal for ProcessAudit<Event, Output>where
Event: Terminal,
fn is_terminal(&self) -> bool
Auto Trait Implementations§
impl<Event, Output> Freeze for ProcessAudit<Event, Output>
impl<Event, Output> RefUnwindSafe for ProcessAudit<Event, Output>
impl<Event, Output> Send for ProcessAudit<Event, Output>
impl<Event, Output> Sync for ProcessAudit<Event, Output>
impl<Event, Output> Unpin for ProcessAudit<Event, Output>
impl<Event, Output> UnsafeUnpin for ProcessAudit<Event, Output>
impl<Event, Output> UnwindSafe for ProcessAudit<Event, Output>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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