pub struct OrderFlowPanel { /* private fields */ }Expand description
A panel connected to OrderFlowDetectors, available with ui and detectors.
Call poll every frame even while hidden. The host feeds the service, applies
show’s visibility changes to its chart, renders the shared toasts and plays
the sounds requested by poll.
Implementations§
Source§impl OrderFlowPanel
impl OrderFlowPanel
Sourcepub fn new(service: Arc<OrderFlowDetectors>) -> Self
pub fn new(service: Arc<OrderFlowDetectors>) -> Self
Connect to the same detector service used as the chart’s signal source.
Sourcepub fn set_service(&mut self, service: Arc<OrderFlowDetectors>)
pub fn set_service(&mut self, service: Arc<OrderFlowDetectors>)
Follow a different chart’s service while retaining the panel’s visibility choices.
Sourcepub fn poll(&mut self, ctx: &Context, toasts: &mut Toasts) -> Vec<DetectionKind>
pub fn poll(&mut self, ctx: &Context, toasts: &mut Toasts) -> Vec<DetectionKind>
Drain live alerts once, append one toast per alert and keep at most five on screen. Returns each kind whose alert requested a sound, in delivery order; the host plays it.
Sourcepub fn show(
&mut self,
ui: &mut Ui,
symbol: &str,
now: DateTime<Utc>,
) -> Vec<(DetectionKind, bool)>
pub fn show( &mut self, ui: &mut Ui, symbol: &str, now: DateTime<Utc>, ) -> Vec<(DetectionKind, bool)>
Draw settings and counts for the current symbol at now, its current feed time.
Changes take effect through set_settings on the next events. Return category visibility
changes for the host to apply with Chart::set_signal_category_visible.
Auto Trait Implementations§
impl Freeze for OrderFlowPanel
impl RefUnwindSafe for OrderFlowPanel
impl Send for OrderFlowPanel
impl Sync for OrderFlowPanel
impl Unpin for OrderFlowPanel
impl UnsafeUnpin for OrderFlowPanel
impl UnwindSafe for OrderFlowPanel
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
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> ⓘ
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> ⓘ
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