pub struct ScreenerPanel { /* private fields */ }Expand description
A screener fed by the host’s Datafeed::screen.
The host gives the column sets; the user picks one, adds filters on its columns and sorts by
a column by clicking its heading. With set_universes the user also
picks the market to screen, and with set_text_query describes the
screen in words, which the feed interprets in Datafeed::screen_text and explains above the
rows. set_storage lets the user save, rename, load and delete named
screens. Each change asks the feed again, which filters, sorts and limits, and only the answer
to the latest request is shown. A full answer offers the next page of the same screen. The
chosen criteria stay through loading, failures, paging and export. Call poll
each frame, then show while the panel is open.
Implementations§
Source§impl ScreenerPanel
impl ScreenerPanel
Sourcepub fn new(sets: Vec<ScreenerColumnSet>) -> Self
pub fn new(sets: Vec<ScreenerColumnSet>) -> Self
A screener of sets, showing the first, without a feed.
Sourcepub fn set_feed(&mut self, feed: Arc<dyn Datafeed>)
pub fn set_feed(&mut self, feed: Arc<dyn Datafeed>)
Ask feed for rows from now on, starting at once.
Sourcepub fn set_universes(&mut self, universes: Vec<ScreenerUniverse>)
pub fn set_universes(&mut self, universes: Vec<ScreenerUniverse>)
Offer universes as the markets to screen, the first at first. The chosen one stays chosen
while it is still offered.
Sourcepub fn set_text_query(&mut self, enabled: bool)
pub fn set_text_query(&mut self, enabled: bool)
Offer a field to describe the screen in words, which the feed interprets in
Datafeed::screen_text.
Sourcepub fn set_storage(&mut self, storage: Arc<dyn Storage>)
pub fn set_storage(&mut self, storage: Arc<dyn Storage>)
Keep named screens in storage, in StoreKind::Screens. Poll every frame, as the panel
is.
Sourcepub fn poll(&mut self, ctx: &Context)
pub fn poll(&mut self, ctx: &Context)
Receive the feed’s answer and wake the UI when the next one arrives.
Sourcepub fn show(&mut self, ui: &mut Ui) -> ScreenerAction
pub fn show(&mut self, ui: &mut Ui) -> ScreenerAction
Render the filters and the table after poll.
Auto Trait Implementations§
impl !RefUnwindSafe for ScreenerPanel
impl !UnwindSafe for ScreenerPanel
impl Freeze for ScreenerPanel
impl Send for ScreenerPanel
impl Sync for ScreenerPanel
impl Unpin for ScreenerPanel
impl UnsafeUnpin for ScreenerPanel
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