pub struct TradePlan {
pub version: u32,
pub plan_id: String,
pub title: String,
pub account_hash: String,
pub account_label: Option<String>,
pub created_at: DateTime<Utc>,
pub author: Option<String>,
pub rationale: Option<String>,
pub assumptions: PlanAssumptions,
pub execution: PlanExecution,
pub steps: Vec<PlanStep>,
}Fields§
§version: u32§plan_id: String§title: String§account_hash: String§account_label: Option<String>§created_at: DateTime<Utc>§rationale: Option<String>§assumptions: PlanAssumptions§execution: PlanExecution§steps: Vec<PlanStep>Implementations§
Source§impl TradePlan
impl TradePlan
pub fn validate_structure(&self) -> Result<()>
pub fn step_order_json(&self, step: &PlanStep) -> Result<Value>
pub fn validate_against_safety( &self, safety: &SafetyContext, account_equity: Option<f64>, ) -> PlanValidationReport
pub async fn validate_with_api( &self, safety: &SafetyContext, api: &TraderApi, ) -> Result<PlanValidationReport>
pub fn step_wait_condition(&self, step: &PlanStep) -> WaitCondition
pub fn wait_options_for_step(&self, step: &PlanStep) -> WaitOptions
pub fn steps_filtered<'a>( &'a self, step_id: Option<&str>, from_step: Option<&str>, ) -> Result<Vec<&'a PlanStep>>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TradePlan
impl<'de> Deserialize<'de> for TradePlan
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
Auto Trait Implementations§
impl Freeze for TradePlan
impl RefUnwindSafe for TradePlan
impl Send for TradePlan
impl Sync for TradePlan
impl Unpin for TradePlan
impl UnsafeUnpin for TradePlan
impl UnwindSafe for TradePlan
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<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