#[non_exhaustive]pub enum PrecisionBehavior {
AutoTruncate,
Manual,
}Expand description
The behavior of a Displayable when a precision is set.
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.
AutoTruncate
Automatically truncate the formatted text to the number of characters specified as the precision.
This is the behavior specified in std::fmt for non-numeric types.
Manual
The precision will be manually handled (or ignored) by
CustomDisplay::fmt() and CustomDisplay::width_in_chars().
Trait Implementations§
Source§impl Clone for PrecisionBehavior
impl Clone for PrecisionBehavior
Source§fn clone(&self) -> PrecisionBehavior
fn clone(&self) -> PrecisionBehavior
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PrecisionBehavior
impl Debug for PrecisionBehavior
Source§impl Display for PrecisionBehavior
impl Display for PrecisionBehavior
Source§impl Hash for PrecisionBehavior
impl Hash for PrecisionBehavior
Source§impl PartialEq for PrecisionBehavior
impl PartialEq for PrecisionBehavior
impl Copy for PrecisionBehavior
impl Eq for PrecisionBehavior
impl StructuralPartialEq for PrecisionBehavior
Auto Trait Implementations§
impl Freeze for PrecisionBehavior
impl RefUnwindSafe for PrecisionBehavior
impl Send for PrecisionBehavior
impl Sync for PrecisionBehavior
impl Unpin for PrecisionBehavior
impl UnsafeUnpin for PrecisionBehavior
impl UnwindSafe for PrecisionBehavior
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