[][src]Enum rqr::mode::Mode

pub enum Mode {
    Numeric,
    Alphanumeric,
    Byte,
}

Encoding modes.

Variants

Numeric

Numeric mode can encode numbers, 0 to 9.

Alphanumeric

Alphanumeric mode can encode numbers, A-Z (only uppercase), the characters $%*+-./: and space.

Byte

Byte mode supports the ISO-8859-1 character set. It is possible to use this mode to encode unicode, but it depends heavily on the reader if it's supported or not.

Methods

impl Mode[src]

pub fn from_str(s: &str) -> Mode[src]

Create Mode from string, decide from content.

pub fn matches(&self, s: &str) -> bool[src]

Is this a valid mode for a string?

pub fn to_bitvec(&self) -> BitVec[src]

BitVec representation.

pub fn in_numeric(s: &str) -> bool[src]

Returns true if contents can be represented by the numeric mode.

pub fn in_alphanumeric(s: &str) -> bool[src]

Returns true if contents can be represented by the alphanumeric mode.

pub fn in_byte(_s: &str) -> bool[src]

Returns true if contents can be represented by the byte mode.

Trait Implementations

impl Eq for Mode[src]

impl Copy for Mode[src]

impl PartialEq<Mode> for Mode[src]

#[must_use]
default fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Clone for Mode[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Mode[src]

Auto Trait Implementations

impl Send for Mode

impl Sync for Mode

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.