pub struct PlaybookLogger { /* private fields */ }Implementations§
Source§impl PlaybookLogger
impl PlaybookLogger
pub fn new(log_dir: PathBuf, symbol: &str) -> Self
Sourcepub fn log_tick(
&self,
tick: &TickResult,
current_price: Option<f64>,
entry_price: Option<f64>,
)
pub fn log_tick( &self, tick: &TickResult, current_price: Option<f64>, entry_price: Option<f64>, )
Log a tick result as one JSONL line.
Sourcepub fn should_notify(tick: &TickResult) -> bool
pub fn should_notify(tick: &TickResult) -> bool
Check if a tick result should trigger a notification.
Sourcepub fn format_notification(tick: &TickResult, symbol: &str) -> Option<String>
pub fn format_notification(tick: &TickResult, symbol: &str) -> Option<String>
Format a notification message for Discord.
Auto Trait Implementations§
impl Freeze for PlaybookLogger
impl RefUnwindSafe for PlaybookLogger
impl Send for PlaybookLogger
impl Sync for PlaybookLogger
impl Unpin for PlaybookLogger
impl UnsafeUnpin for PlaybookLogger
impl UnwindSafe for PlaybookLogger
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