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