pub struct Playbook {
pub rules: Vec<TaRule>,
pub entry_rules: Vec<TaRule>,
pub exit_rules: Vec<TaRule>,
pub system_prompt: String,
pub max_position_size: f64,
pub stop_loss_pct: Option<f64>,
pub take_profit_pct: Option<f64>,
pub timeout_secs: Option<u64>,
pub side: Option<String>,
}Fields§
§rules: Vec<TaRule>Legacy unified rules list (kept for backward compatibility).
entry_rules: Vec<TaRule>Entry-specific rules (new). When non-empty, takes precedence over rules.
exit_rules: Vec<TaRule>Exit-specific rules (new).
system_prompt: String§max_position_size: f64§stop_loss_pct: Option<f64>§take_profit_pct: Option<f64>§timeout_secs: Option<u64>Optional timeout in seconds for the playbook execution.
side: Option<String>Optional side hint (e.g. “long”, “short”).
Implementations§
Source§impl Playbook
impl Playbook
Sourcepub fn effective_entry_rules(&self) -> &[TaRule]
pub fn effective_entry_rules(&self) -> &[TaRule]
Returns entry rules: prefers entry_rules if non-empty, falls back to rules.
Sourcepub fn effective_exit_rules(&self) -> &[TaRule]
pub fn effective_exit_rules(&self) -> &[TaRule]
Returns exit rules.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Playbook
impl<'de> Deserialize<'de> for Playbook
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 Playbook
impl RefUnwindSafe for Playbook
impl Send for Playbook
impl Sync for Playbook
impl Unpin for Playbook
impl UnsafeUnpin for Playbook
impl UnwindSafe for Playbook
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