pub struct StrategyReportPanel { /* private fields */ }Expand description
Standalone summary, equity/drawdown charts, trade list and run properties.
Call Self::set_report once when the host supplies or replaces a run. Metrics and display
ordering are cached there. Mount Self::show in the host’s panel below the chart; without a
report it draws no controls and takes no space. Give each instance its own egui id scope.
Implementations§
Source§impl StrategyReportPanel
impl StrategyReportPanel
Sourcepub fn set_report(&mut self, report: Option<StrategyReport>, bars: &[Bar])
pub fn set_report(&mut self, report: Option<StrategyReport>, bars: &[Bar])
Replace or clear the report in one call, resetting its tab and selection. bars must be the
complete source bars for this run’s symbol and interval; pass an empty slice if unavailable.
Sourcepub fn report(&self) -> Option<&StrategyReport>
pub fn report(&self) -> Option<&StrategyReport>
The currently supplied report, or None when cleared.
Sourcepub fn show(&mut self, ui: &mut Ui) -> StrategyReportAction
pub fn show(&mut self, ui: &mut Ui) -> StrategyReportAction
Draw the report and return this frame’s host intent. No report draws nothing.
Trait Implementations§
Source§impl Default for StrategyReportPanel
impl Default for StrategyReportPanel
Source§fn default() -> StrategyReportPanel
fn default() -> StrategyReportPanel
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StrategyReportPanel
impl RefUnwindSafe for StrategyReportPanel
impl Send for StrategyReportPanel
impl Sync for StrategyReportPanel
impl Unpin for StrategyReportPanel
impl UnsafeUnpin for StrategyReportPanel
impl UnwindSafe for StrategyReportPanel
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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