pub struct CustomTimeFormatter { /* private fields */ }Expand description
Custom time formatter using a closure
Implementations§
Trait Implementations§
Source§impl Clone for CustomTimeFormatter
impl Clone for CustomTimeFormatter
Source§fn clone(&self) -> CustomTimeFormatter
fn clone(&self) -> CustomTimeFormatter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl TimeFormatter for CustomTimeFormatter
impl TimeFormatter for CustomTimeFormatter
Source§fn format(&self, time: DateTime<Utc>, mark_type: TickMarkType) -> String
fn format(&self, time: DateTime<Utc>, mark_type: TickMarkType) -> String
Format a ts into a display string Read more
Source§fn clone_box(&self) -> Box<dyn TimeFormatter>
fn clone_box(&self) -> Box<dyn TimeFormatter>
Clone this formatter into a Box
Source§fn format_tick(&self, context: TickMarkContext<'_>) -> Option<String>
fn format_tick(&self, context: TickMarkContext<'_>) -> Option<String>
Formats one axis tick with the active chart locale and display-time fields. Read more
Source§fn wall_time(&self, time: DateTime<Utc>) -> DateTime<Utc>
fn wall_time(&self, time: DateTime<Utc>) -> DateTime<Utc>
Clock-face time used to identify calendar boundaries. The returned UTC value
holds local fields, not another instant.
Source§fn utc_time(&self, wall_time: DateTime<Utc>) -> Option<DateTime<Utc>>
fn utc_time(&self, wall_time: DateTime<Utc>) -> Option<DateTime<Utc>>
Converts local calendar fields from
wall_time back to an instant.
Repeated times use the first instant; skipped times use the clock jump.Source§fn time_visible(&self) -> bool
fn time_visible(&self) -> bool
Whether intraday marks and hover labels include the clock.
Auto Trait Implementations§
impl !RefUnwindSafe for CustomTimeFormatter
impl !UnwindSafe for CustomTimeFormatter
impl Freeze for CustomTimeFormatter
impl Send for CustomTimeFormatter
impl Sync for CustomTimeFormatter
impl Unpin for CustomTimeFormatter
impl UnsafeUnpin for CustomTimeFormatter
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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