pub struct TradeIntent {
pub schema_version: u32,
pub intent_id: TradeIntentId,
pub instrument: ResolvedInstrumentRef,
pub created_at: DateTimeUtc,
pub effective_at: DateTimeUtc,
pub expires_at: Option<DateTimeUtc>,
pub expected_state: ExpectedStateRevision,
pub provenance: IntentProvenance,
pub action: IntentAction,
pub constraints: IntentConstraints,
}Fields§
§schema_version: u32§intent_id: TradeIntentId§instrument: ResolvedInstrumentRef§created_at: DateTimeUtc§effective_at: DateTimeUtc§expires_at: Option<DateTimeUtc>§expected_state: ExpectedStateRevision§provenance: IntentProvenance§action: IntentAction§constraints: IntentConstraintsImplementations§
Source§impl TradeIntent
impl TradeIntent
pub fn new( intent_id: TradeIntentId, instrument: ResolvedInstrumentRef, created_at: DateTimeUtc, effective_at: DateTimeUtc, expires_at: Option<DateTimeUtc>, expected_state: ExpectedStateRevision, provenance: IntentProvenance, action: IntentAction, constraints: IntentConstraints, ) -> Result<Self, IntentValidationError>
pub fn with_deterministic_id( namespace: &IntentIdentityNamespace, action_ordinal: u32, instrument: ResolvedInstrumentRef, created_at: DateTimeUtc, effective_at: DateTimeUtc, expires_at: Option<DateTimeUtc>, expected_state: ExpectedStateRevision, provenance: IntentProvenance, action: IntentAction, constraints: IntentConstraints, ) -> Result<Self, IntentValidationError>
pub fn validate(&self) -> Result<(), IntentValidationError>
Trait Implementations§
Source§impl Clone for TradeIntent
impl Clone for TradeIntent
Source§fn clone(&self) -> TradeIntent
fn clone(&self) -> TradeIntent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TradeIntent
impl Debug for TradeIntent
Source§impl<'de> Deserialize<'de> for TradeIntent
impl<'de> Deserialize<'de> for TradeIntent
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 Eq for TradeIntent
Source§impl PartialEq for TradeIntent
impl PartialEq for TradeIntent
Source§impl Serialize for TradeIntent
impl Serialize for TradeIntent
impl StructuralPartialEq for TradeIntent
Auto Trait Implementations§
impl Freeze for TradeIntent
impl RefUnwindSafe for TradeIntent
impl Send for TradeIntent
impl Sync for TradeIntent
impl Unpin for TradeIntent
impl UnsafeUnpin for TradeIntent
impl UnwindSafe for TradeIntent
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> 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.