Struct zero_copy_pads::IgnoreExcess [−][src]
pub struct IgnoreExcess;
Ignore excess, write value
to formatter
without padding.
When value.width()
is not greater than total_width
,
add pads as usual:
use zero_copy_pads::{PaddedValue, AlignRight, IgnoreExcess}; let padded_value = PaddedValue { handle_excess: IgnoreExcess, value: "abcdef", pad_block: '-', total_width: 9, pad: AlignRight, }; assert_eq!(padded_value.to_string(), "---abcdef");
When value.width()
is greater than total_width
,
display value
as is:
use zero_copy_pads::{PaddedValue, AlignRight, IgnoreExcess}; let padded_value = PaddedValue { handle_excess: IgnoreExcess, value: "abcdefghijkl", pad_block: '-', total_width: 9, pad: AlignRight, }; assert_eq!(padded_value.to_string(), "abcdefghijkl");
Trait Implementations
impl Clone for IgnoreExcess
[src]
impl Clone for IgnoreExcess
[src]fn clone(&self) -> IgnoreExcess
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for IgnoreExcess
[src]
impl Copy for IgnoreExcess
[src]impl Default for IgnoreExcess
[src]
impl Default for IgnoreExcess
[src]fn default() -> IgnoreExcess
[src]
impl Eq for IgnoreExcess
[src]
impl Eq for IgnoreExcess
[src]impl<Value, PadBlock> ExcessHandler<Value, PadBlock> for IgnoreExcess where
Value: Width,
PadBlock: Display,
[src]
impl<Value, PadBlock> ExcessHandler<Value, PadBlock> for IgnoreExcess where
Value: Width,
PadBlock: Display,
[src]impl<Value, PadBlock> From<IgnoreExcess> for ExcessHandlingFunction<Value, PadBlock> where
Value: Width,
PadBlock: Display,
[src]
impl<Value, PadBlock> From<IgnoreExcess> for ExcessHandlingFunction<Value, PadBlock> where
Value: Width,
PadBlock: Display,
[src]fn from(_: IgnoreExcess) -> Self
[src]
impl PartialEq<IgnoreExcess> for IgnoreExcess
[src]
impl PartialEq<IgnoreExcess> for IgnoreExcess
[src]impl StructuralEq for IgnoreExcess
[src]
impl StructuralEq for IgnoreExcess
[src]impl StructuralPartialEq for IgnoreExcess
[src]
impl StructuralPartialEq for IgnoreExcess
[src]impl Unit for IgnoreExcess
[src]
impl Unit for IgnoreExcess
[src]impl<Value: Width, PadBlock: Display> UnitExcessHandler<Value, PadBlock> for IgnoreExcess
[src]
impl<Value: Width, PadBlock: Display> UnitExcessHandler<Value, PadBlock> for IgnoreExcess
[src]Auto Trait Implementations
impl RefUnwindSafe for IgnoreExcess
impl RefUnwindSafe for IgnoreExcess
impl Send for IgnoreExcess
impl Send for IgnoreExcess
impl Sync for IgnoreExcess
impl Sync for IgnoreExcess
impl Unpin for IgnoreExcess
impl Unpin for IgnoreExcess
impl UnwindSafe for IgnoreExcess
impl UnwindSafe for IgnoreExcess