#[non_exhaustive]pub enum CustomUnitAttribute {
None,
AllowLongPrefix,
AllowShortPrefix,
IsLongPrefix,
Alias,
}
Expand description
These attributes make is possible to change the behaviour of custom units
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.
None
Don’t allow using prefixes with this custom unit
AllowLongPrefix
Support long prefixes (e.g. milli-
, giga-
) with this unit
AllowShortPrefix
Support short prefixes (e.g. k
for kilo
) with this unit
IsLongPrefix
Allow using this unit as a long prefix with another unit
Alias
This unit definition is an alias and will always be replaced with its definition.
Auto Trait Implementations§
impl Freeze for CustomUnitAttribute
impl RefUnwindSafe for CustomUnitAttribute
impl Send for CustomUnitAttribute
impl Sync for CustomUnitAttribute
impl Unpin for CustomUnitAttribute
impl UnwindSafe for CustomUnitAttribute
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