pub enum Version {
Show 40 variants V01, V02, V03, V04, V05, V06, V07, V08, V09, V10, V11, V12, V13, V14, V15, V16, V17, V18, V19, V20, V21, V22, V23, V24, V25, V26, V27, V28, V29, V30, V31, V32, V33, V34, V35, V36, V37, V38, V39, V40,
}
Expand description

Enum containing all possible QRCode versions

Variants

V01

Version n°01

V02

Version n°02

V03

Version n°03

V04

Version n°04

V05

Version n°05

V06

Version n°06

V07

Version n°07

V08

Version n°08

V09

Version n°09

V10

Version n°10

V11

Version n°11

V12

Version n°12

V13

Version n°13

V14

Version n°14

V15

Version n°15

V16

Version n°16

V17

Version n°17

V18

Version n°18

V19

Version n°19

V20

Version n°20

V21

Version n°21

V22

Version n°22

V23

Version n°23

V24

Version n°24

V25

Version n°25

V26

Version n°26

V27

Version n°27

V28

Version n°28

V29

Version n°29

V30

Version n°30

V31

Version n°31

V32

Version n°32

V33

Version n°33

V34

Version n°34

V35

Version n°35

V36

Version n°36

V37

Version n°37

V38

Version n°38

V39

Version n°39

V40

Version n°40

Implementations

Computes the best version according to mode, ecl and `len``

Example
let input = b"Hello, world!";
let ecl = ecl::ECL::H;
let mode = encode::best_encoding(input);
let version = match version::Version::get(mode, ecl, input.len()) {
    Some(version) => version,
    None => return (),
};

Returns QRCode’s missing padding bits count at the very end

Returns the max bytes that can contain a QRCode for a specified version

Returns the version information we need to put for QRCodes larger or equal to version 7

Returns alignments positions

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.