pub struct QrCodeOptions {
pub size: u32,
pub error_correction: QrErrorCorrection,
pub quiet_zone: u32,
pub foreground: [u8; 4],
pub background: [u8; 4],
}Expand description
Options for QR code generation.
Fields§
§size: u32Size of the QR code in pixels (width = height)
error_correction: QrErrorCorrectionError correction level
quiet_zone: u32Quiet zone (border) in modules
foreground: [u8; 4]Foreground color (RGBA)
background: [u8; 4]Background color (RGBA)
Implementations§
Source§impl QrCodeOptions
impl QrCodeOptions
Sourcepub fn error_correction(self, level: QrErrorCorrection) -> Self
pub fn error_correction(self, level: QrErrorCorrection) -> Self
Set the error correction level.
Sourcepub fn quiet_zone(self, modules: u32) -> Self
pub fn quiet_zone(self, modules: u32) -> Self
Set the quiet zone (border) in modules.
Trait Implementations§
Source§impl Clone for QrCodeOptions
impl Clone for QrCodeOptions
Source§fn clone(&self) -> QrCodeOptions
fn clone(&self) -> QrCodeOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QrCodeOptions
impl Debug for QrCodeOptions
Auto Trait Implementations§
impl Freeze for QrCodeOptions
impl RefUnwindSafe for QrCodeOptions
impl Send for QrCodeOptions
impl Sync for QrCodeOptions
impl Unpin for QrCodeOptions
impl UnsafeUnpin for QrCodeOptions
impl UnwindSafe for QrCodeOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().