pub struct CalendarPanel { /* private fields */ }Expand description
Calendars fed by the host’s Datafeed::calendar, one at a time.
The user picks the calendar, the days, and for economic events the least importance; with
set_countries also the countries. Every change asks the feed again,
which applies the filters, and only the answer to the latest request is shown. Call
poll each frame, then show while the panel is open.
Implementations§
Source§impl CalendarPanel
impl CalendarPanel
Sourcepub fn set_feed(&mut self, feed: Arc<dyn Datafeed>)
pub fn set_feed(&mut self, feed: Arc<dyn Datafeed>)
Ask feed for events from now on, starting at once.
Sourcepub fn set_countries(&mut self, countries: impl IntoIterator<Item = String>)
pub fn set_countries(&mut self, countries: impl IntoIterator<Item = String>)
Offer countries, in the codes the feed uses, as a filter. None is selected at first,
which lists every country.
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) -> CalendarAction
pub fn show(&mut self, ui: &mut Ui) -> CalendarAction
Render the filters and the events by day after poll.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CalendarPanel
impl !UnwindSafe for CalendarPanel
impl Freeze for CalendarPanel
impl Send for CalendarPanel
impl Sync for CalendarPanel
impl Unpin for CalendarPanel
impl UnsafeUnpin for CalendarPanel
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