Struct QRConfig

Source
pub struct QRConfig {
    pub version: usize,
    pub data: Vec<u8>,
    pub codewords: Vec<u8>,
    pub codeword_properties: CodeWord,
    pub mask: usize,
    pub encoding: u8,
    pub encoding_mode: EncodingMode,
    pub debug_mode: bool,
    pub requires_alignment: bool,
    pub finder_points: [(usize, usize); 3],
    pub size: usize,
    pub err_correction_level: ECLevel,
}

Fields§

§version: usize§data: Vec<u8>§codewords: Vec<u8>§codeword_properties: CodeWord§mask: usize§encoding: u8§encoding_mode: EncodingMode§debug_mode: bool§requires_alignment: bool§finder_points: [(usize, usize); 3]§size: usize§err_correction_level: ECLevel

Implementations§

Source§

impl QRConfig

Source

pub fn gen_qr_code(&mut self) -> (QR, CellTrack)

Source

pub fn get_ecc_length(&self) -> usize

Source

pub fn get_remainder_bit_length(&self) -> isize

Source

pub fn get_mask_pattern(&self, n: usize) -> Box<dyn Fn(usize, usize) -> bool>

Source

pub fn apply_version_information(&self, body: &mut Vec<Cell>)

Source

pub fn encode_format_areas(&self, body: &mut Vec<Cell>, pattern: u8)

Source

pub fn apply_mask_pattern(&self, body: &mut Vec<Cell>, n: usize)

Source

pub fn eval_penalty_scores(&self, body: &Vec<Cell>) -> usize

Source

pub fn penalty_score_eval_two(&self, body: &Vec<Cell>) -> usize

Source

pub fn penalty_score_eval_three(&self, body: &Vec<Cell>) -> usize

Source

pub fn penalty_score_eval_one(&self, body: &Vec<Cell>) -> usize

Source

pub fn penalty_score_eval_four(&self, body: &Vec<Cell>) -> usize

Source

pub fn verify_version(&mut self)

Source

pub fn debug_data(&self)

Source

pub fn encode_error_correction_codewords(&mut self)

Source

pub fn translate_data(&mut self)

Source

pub fn create_body(&self) -> Vec<Cell>

Source

pub fn get_content_length(&self) -> usize

Source

pub fn apply_version_information_areas(&self, body: &mut Vec<Cell>)

Source

pub fn apply_reserve_format_areas(&self, body: &mut Vec<Cell>)

Source

pub fn apply_dark_module(&self, body: &mut Vec<Cell>)

Source

pub fn apply_alignment_patterns( &self, body: &mut Vec<Cell>, points: &Vec<PlotPoint>, )

Source

pub fn apply_separators( &self, body: &mut Vec<Cell>, alignment_point: (usize, usize), )

Source

pub fn apply_finder_patterns( &self, body: &mut Vec<Cell>, alignment_point: Point<usize>, )

Source

pub fn apply_timer_patterns(&self, body: &mut Vec<Cell>)

Source

pub fn get_alignment_points(&self, body: &Vec<Cell>) -> Vec<PlotPoint>

Source

pub fn get_point_combinations(&self, numbers: Vec<usize>) -> Vec<Point<usize>>

Source

pub fn plot_spiral( &self, origin_pt: &Point<usize>, size: usize, diff: usize, ) -> Vec<PlotPoint>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.