pub struct HotlistsPanel { /* private fields */ }Expand description
Hotlists fed by the host’s Datafeed::hotlist, one at a time.
The host names the lists, such as top gainers, top losers and most active; the user picks
one, each pick asks the feed, and only the answer to the latest request is shown. Call
poll each frame, then show while the panel is open.
Implementations§
Source§impl HotlistsPanel
impl HotlistsPanel
Sourcepub fn new(lists: Vec<String>) -> Self
pub fn new(lists: Vec<String>) -> Self
A panel of the hotlists named lists, 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 the lists from now on, starting at once.
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) -> HotlistsAction
pub fn show(&mut self, ui: &mut Ui) -> HotlistsAction
Render the chosen list after poll.
Auto Trait Implementations§
impl !RefUnwindSafe for HotlistsPanel
impl !UnwindSafe for HotlistsPanel
impl Freeze for HotlistsPanel
impl Send for HotlistsPanel
impl Sync for HotlistsPanel
impl Unpin for HotlistsPanel
impl UnsafeUnpin for HotlistsPanel
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