Struct knitting_parse::Pattern
source · [−]pub struct Pattern { /* private fields */ }
Expand description
The representation of a knitting pattern.
A pattern will be a rectangle in size.
Implementations
sourceimpl Pattern
impl Pattern
sourcepub fn new<R: Read>(reader: R) -> Result<Pattern, ParseError>
pub fn new<R: Read>(reader: R) -> Result<Pattern, ParseError>
Create a new Pattern from the given Reader.
This will pad the rows so they are all the same total width.
Arguments
reader
- Where to read the stitches from
sourcepub fn first_line_number(&self) -> usize
pub fn first_line_number(&self) -> usize
Returns the first line number for the pattern
sourcepub fn starting_side(&self) -> Side
pub fn starting_side(&self) -> Side
Return what side the pattern starts on
sourcepub fn pattern_width(&self) -> usize
pub fn pattern_width(&self) -> usize
Returns the pattern switch width
Auto Trait Implementations
impl RefUnwindSafe for Pattern
impl Send for Pattern
impl Sync for Pattern
impl Unpin for Pattern
impl UnwindSafe for Pattern
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more