[][src]Struct qrcode53bytes::renderstring::StringRenderer

pub struct StringRenderer {
    light: char,
    dark: char,
    module_w: usize,
    module_h: usize,
    qz: bool,
}

A string renderer for converting a QR code into a representation suitable for text output.

Fields

light: chardark: charmodule_w: usizemodule_h: usizeqz: bool

Implementations

impl StringRenderer[src]

pub fn new() -> Self[src]

Create a new renderer.

pub fn light_module(self, v: char) -> Self[src]

Set the light module character.

pub fn dark_module(self, v: char) -> Self[src]

Set the dark module character.

pub fn quiet_zone(self, v: bool) -> Self[src]

Set if quiet zone should be produced.

pub fn module_dimensions(self, w: usize, h: usize) -> Self[src]

Set the module dimensions, in character count per module.

pub fn render(&self, qr: &Qr) -> String[src]

Render QR to string.

pub fn render_matrix(&self, matrix: &Matrix) -> String[src]

Render matrix to string.

fn qz_lines(&self, s: &mut String)[src]

fn qz_chars(&self, s: &mut String)[src]

Auto Trait Implementations

impl RefUnwindSafe for StringRenderer

impl Send for StringRenderer

impl Sync for StringRenderer

impl Unpin for StringRenderer

impl UnwindSafe for StringRenderer

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.