pub enum Bar4State {
Tracker,
Descender,
Ascender,
Full,
}Expand description
A single bar in a 4-state postal code.
Variants§
Tracker
Short bar centered vertically (codeword digit 0).
Descender
Bar that extends from the centerline down to the baseline (digit 1).
Ascender
Bar that extends from the top down to the centerline (digit 2).
Full
Full-height bar (digit 3).
Implementations§
Source§impl Bar4State
impl Bar4State
Sourcepub fn from_digit(d: u8) -> Option<Self>
pub fn from_digit(d: u8) -> Option<Self>
Construct from a 0..=3 codeword (returns None for other values).
Sourcepub fn has_ascender(self) -> bool
pub fn has_ascender(self) -> bool
Whether the bar reaches the top of the symbol (Ascender or Full).
Sourcepub fn has_descender(self) -> bool
pub fn has_descender(self) -> bool
Whether the bar reaches the bottom (Descender or Full).
Trait Implementations§
impl Copy for Bar4State
impl Eq for Bar4State
impl StructuralPartialEq for Bar4State
Auto Trait Implementations§
impl Freeze for Bar4State
impl RefUnwindSafe for Bar4State
impl Send for Bar4State
impl Sync for Bar4State
impl Unpin for Bar4State
impl UnsafeUnpin for Bar4State
impl UnwindSafe for Bar4State
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