struct Designators {
singular: &'static [&'static str],
plural: &'static [&'static str],
}
Expand description
A type that represents the designator choice.
Basically, whether we want verbose, short or compact designators. This in
turn permits lookups based on Unit
, which makes writing generic code for
writing designators a bit nicer and still fast.
Fields§
§singular: &'static [&'static str]
§plural: &'static [&'static str]
Implementations§
Source§impl Designators
impl Designators
const VERBOSE_SINGULAR: &'static [&'static str]
const VERBOSE_PLURAL: &'static [&'static str]
const SHORT_SINGULAR: &'static [&'static str]
const SHORT_PLURAL: &'static [&'static str]
const COMPACT: &'static [&'static str]
const HUMAN_TIME_SINGULAR: &'static [&'static str]
const HUMAN_TIME_PLURAL: &'static [&'static str]
fn new(config: Designator) -> Designators
fn designator(&self, unit: impl Into<Unit>, plural: bool) -> &'static str
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Designators
impl RefUnwindSafe for Designators
impl Send for Designators
impl Sync for Designators
impl Unpin for Designators
impl UnwindSafe for Designators
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