pub struct Postal4Pattern {
pub bars: Vec<Bar4State>,
pub text: Option<String>,
}Expand description
A 4-state postal symbol: an ordered sequence of bars with optional human-readable text.
Fields§
§bars: Vec<Bar4State>Each element is one bar; bars are separated by single-module gaps in the rendered output.
text: Option<String>Human-readable text rendered beneath the symbol when
crate::Options::include_text is true.
Implementations§
Source§impl Postal4Pattern
impl Postal4Pattern
Sourcepub fn from_digits(digits: &[u8], text: Option<String>) -> Option<Self>
pub fn from_digits(digits: &[u8], text: Option<String>) -> Option<Self>
Build a Postal4Pattern from a slice of 0..=3 codeword digits.
Returns None if any digit is out of range.
Trait Implementations§
Source§impl Clone for Postal4Pattern
impl Clone for Postal4Pattern
Source§fn clone(&self) -> Postal4Pattern
fn clone(&self) -> Postal4Pattern
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Postal4Pattern
impl RefUnwindSafe for Postal4Pattern
impl Send for Postal4Pattern
impl Sync for Postal4Pattern
impl Unpin for Postal4Pattern
impl UnsafeUnpin for Postal4Pattern
impl UnwindSafe for Postal4Pattern
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