pub struct MonitorApp { /* private fields */ }Implementations§
Source§impl MonitorApp
impl MonitorApp
pub fn new(config: MonitorConfig) -> Self
pub fn control_addr(&self) -> &str
pub fn tick_rate(&self) -> Duration
pub fn should_quit(&self) -> bool
pub fn request_quit(&mut self)
pub fn on_status(&mut self, status: GetStatusResponse)
pub fn on_portfolio(&mut self, snapshot: PortfolioSnapshot)
pub fn on_orders(&mut self, orders: Vec<OrderSnapshot>)
pub fn on_stream_event(&mut self, event: Event)
pub fn log(&self) -> impl DoubleEndedIterator<Item = &LogEntry>
pub fn orders(&self) -> &[OrderSnapshot]
pub fn status(&self) -> Option<&GetStatusResponse>
pub fn portfolio(&self) -> Option<&PortfolioSnapshot>
pub fn sub_accounts(&self) -> Option<&[SubAccountSnapshot]>
pub fn balances(&self) -> Option<&[CashBalance]>
pub fn positions(&self) -> Option<&[Position]>
pub fn equity(&self) -> Option<Decimal>
pub fn realized_pnl(&self) -> Option<Decimal>
pub fn initial_equity(&self) -> Option<Decimal>
pub fn reporting_currency(&self) -> Option<&str>
pub fn last_error(&self) -> Option<&str>
pub fn set_error(&mut self, msg: impl Into<String>)
pub fn clear_error(&mut self)
pub fn last_snapshot_at(&self) -> Option<DateTime<Utc>>
pub fn last_event_at(&self) -> Option<DateTime<Utc>>
pub fn set_stream_connected(&mut self, connected: bool)
pub fn stream_connected(&self) -> bool
pub fn set_cancel_in_progress(&mut self, active: bool)
pub fn cancel_in_progress(&self) -> bool
pub fn overlay(&self) -> &CommandOverlay
pub fn overlay_error(&self) -> Option<&str>
pub fn overlay_visible(&self) -> bool
pub fn open_command_palette(&mut self)
pub fn close_overlay(&mut self)
pub fn begin_cancel_confirmation(&mut self)
pub fn append_confirmation_char(&mut self, ch: char)
pub fn backspace_confirmation(&mut self)
pub fn confirmation_buffer(&self) -> Option<&str>
pub fn confirmation_matches(&self) -> bool
pub fn set_overlay_error(&mut self, msg: impl Into<String>)
pub fn toggle_command_palette(&mut self)
pub fn record_info(&mut self, msg: impl Into<String>)
pub fn record_cancel_result(&mut self, response: CancelAllResponse)
Auto Trait Implementations§
impl Freeze for MonitorApp
impl RefUnwindSafe for MonitorApp
impl Send for MonitorApp
impl Sync for MonitorApp
impl Unpin for MonitorApp
impl UnwindSafe for MonitorApp
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> 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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request