pub struct Module(pub u8);
Expand description
Module is a single pixel in the QR code. Module uses u8 to store value and type.
Tuple Fields§
§0: u8
Implementations§
source§impl Module
impl Module
sourcepub const fn new(value: bool, module_type: ModuleType) -> Self
pub const fn new(value: bool, module_type: ModuleType) -> Self
Creates a new module with the given type and value.
sourcepub const fn data(value: bool) -> Self
pub const fn data(value: bool) -> Self
Creates a new module with the given value with type data.
sourcepub const fn finder_pattern(value: bool) -> Self
pub const fn finder_pattern(value: bool) -> Self
Creates a new module with the given value with type finder pattern.
sourcepub const fn alignment(value: bool) -> Self
pub const fn alignment(value: bool) -> Self
Creates a new module with the given value with type alignment.
sourcepub const fn timing(value: bool) -> Self
pub const fn timing(value: bool) -> Self
Creates a new module with the given value with type timing.
sourcepub const fn format(value: bool) -> Self
pub const fn format(value: bool) -> Self
Creates a new module with the given value with type format.
sourcepub const fn version(value: bool) -> Self
pub const fn version(value: bool) -> Self
Creates a new module with the given value with type version.
sourcepub const fn dark(value: bool) -> Self
pub const fn dark(value: bool) -> Self
Creates a new module with the given value with type dark module.
sourcepub const fn empty(value: bool) -> Self
pub const fn empty(value: bool) -> Self
Creates a new module with the given value with type empty.
sourcepub fn module_type(self) -> ModuleType
pub fn module_type(self) -> ModuleType
Returns the type of the module.
Trait Implementations§
source§impl PartialEq<bool> for Module
impl PartialEq<bool> for Module
source§impl PartialEq for Module
impl PartialEq for Module
impl Copy for Module
impl Eq for Module
Auto Trait Implementations§
impl Freeze for Module
impl RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnwindSafe for Module
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