#[non_exhaustive]pub enum Unit {
Minutes,
Days,
}Expand description
What a Track’s integers count.
Track::fraction never needed this – the arithmetic is the same whatever
the numbers mean – which is exactly how the ruler came to assume minutes
and print 00:00 over a month. A renderer drawing an axis has to write a
label, and it cannot derive the unit from the numbers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Minutes
Minutes from the start of a day. A day view.
Days
Whole days. A month strip, a sprint, a stretch of leave.
A day-granularity axis is a strip, not a calendar: one line with spans laid along it. What it deliberately does not do is wrap into weeks, which is the shape that makes weekday periodicity visible and the one job of a month grid that a strip cannot take over. See the crate header.
Trait Implementations§
impl Copy for Unit
impl Eq for Unit
impl StructuralPartialEq for Unit
Auto Trait Implementations§
impl Freeze for Unit
impl RefUnwindSafe for Unit
impl Send for Unit
impl Sync for Unit
impl Unpin for Unit
impl UnsafeUnpin for Unit
impl UnwindSafe for Unit
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