[−][src]Struct qrcode53bytes::builder::QrBuilder
Builder for a QR code.
Fields
version: Version
Version to use. If not set a minimal version will be calculated.
mask: Option<Mask>
Mask to use. If not set the optimal mask will be chosen per the QR specification.
ecl: ECLevel
Error correction level to use. If not set ECLevel::Q, which recovers 25% of data, will be used.
mode: Mode
Encoding mode to use. If not set will be inferred from input data.
matrix: Matrix
Resulting matrix.
Note that even though the matrix is not an Option it might still be invalid. This to simplify the implementation.
Implementations
impl QrBuilder
[src]
pub fn new() -> QrBuilder
[src]
Create a new builder.
pub fn version(self, v: Version) -> Self
[src]
Set version. If not set the smallest applicable version will be used.
pub fn mask(self, mask: Mask) -> Self
[src]
Set mask to use. If not set the best mask will be chosen according to the QR spec.
pub fn ecl(self, ecl: ECLevel) -> Self
[src]
Set error correction. Will default to ECLevel::Q.
pub fn mode(self, mode: Mode) -> Self
[src]
Set the mode to use, will otherwise be calculated from input.
pub fn into(self, s: &str) -> Result<Qr, Error>
[src]
Build all elements and generate a QR code.
pub fn into_qr(self) -> Result<Qr, Error>
[src]
Convert the builder into a QR code.
pub fn add_all(&mut self, s: &str) -> Result<(), Error>
[src]
Add all elements of a QR code.
pub fn add_fun_patterns(&mut self)
[src]
Add function patterns.
pub fn add_data(&mut self, s: &str) -> Result<(), Error>
[src]
Add data.
pub fn add_raw_data(&mut self, v: &BitVec<Lsb0, u8>)
[src]
Add raw data.
pub fn mask_data(&mut self)
[src]
Mask data.
pub fn mask_best(&mut self)
[src]
Mask by evaluating available masks and choose the best one.
pub fn mask_with(&mut self, mask: Mask)
[src]
Mask using a specific mask.
pub fn add_info(&mut self)
[src]
Add info.
pub fn add_format_info(&mut self)
[src]
Add format info.
fn complete(&self) -> bool
[src]
Return true if the build is complete.
fn ensure_settings(&mut self) -> Result<(), Error>
[src]
fn add_finders(&mut self)
[src]
fn add_finder(&mut self, x: usize, y: usize)
[src]
fn add_separator(&mut self, x0: usize, y0: usize, x1: usize, y1: usize)
[src]
fn add_alignments(&mut self)
[src]
fn try_add_alignment(&mut self, cx: usize, cy: usize)
[src]
fn add_timing_patterns(&mut self)
[src]
fn set_timing(&mut self, x: usize, y: usize, v: bool)
[src]
fn add_dark_module(&mut self)
[src]
fn add_reserved_areas(&mut self)
[src]
fn reserve_rect(&mut self, x0: usize, y0: usize, x1: usize, y1: usize)
[src]
fn add_format(&mut self, bv: &BitVec<Lsb0, u8>)
[src]
pub fn to_dbg_string(&self) -> String
[src]
Convert to debug string.
Auto Trait Implementations
impl RefUnwindSafe for QrBuilder
impl Send for QrBuilder
impl Sync for QrBuilder
impl Unpin for QrBuilder
impl UnwindSafe for QrBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,