pub struct StackedPattern {
pub rows: Vec<LinearPattern>,
pub text: Option<String>,
}Expand description
A stacked / multi-row 1D barcode. Each row carries its own
LinearPattern; the renderer draws them top-to-bottom with a one-
module spacer between rows.
Fields§
§rows: Vec<LinearPattern>Rows, top to bottom. All rows must share the same total_width().
text: Option<String>Optional human-readable text rendered below the entire symbol.
Implementations§
Source§impl StackedPattern
impl StackedPattern
Sourcepub fn new(
rows: Vec<LinearPattern>,
text: Option<String>,
) -> Result<Self, (u32, u32)>
pub fn new( rows: Vec<LinearPattern>, text: Option<String>, ) -> Result<Self, (u32, u32)>
Build a StackedPattern from a non-empty vec of rows. Verifies that
every row has the same total width (returns the first mismatch as an
Err of (expected, got) for the caller to report).
Sourcepub fn height_rows(&self) -> usize
pub fn height_rows(&self) -> usize
Number of rows.
Trait Implementations§
Source§impl Clone for StackedPattern
impl Clone for StackedPattern
Source§fn clone(&self) -> StackedPattern
fn clone(&self) -> StackedPattern
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 StackedPattern
impl RefUnwindSafe for StackedPattern
impl Send for StackedPattern
impl Sync for StackedPattern
impl Unpin for StackedPattern
impl UnsafeUnpin for StackedPattern
impl UnwindSafe for StackedPattern
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