Struct qrcode::optimize::Segment [] [src]

pub struct Segment {
    pub mode: Mode,
    pub begin: usize,
    pub end: usize,
}

A segment of data committed to an encoding mode.

Fields

mode: Mode

The encoding mode of the segment of data.

begin: usize

The start index of the segment.

end: usize

The end index (exclusive) of the segment.

Methods

impl Segment
[src]

fn encoded_len(&self, version: Version) -> usize

Compute the number of bits (including the size of the mode indicator and length bits) when this segment is encoded.

Trait Implementations

Derived Implementations

impl Clone for Segment
[src]

fn clone(&self) -> Segment

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Copy for Segment
[src]

impl Debug for Segment
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Eq for Segment
[src]

impl PartialEq for Segment
[src]

fn eq(&self, __arg_0: &Segment) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Segment) -> bool

This method tests for !=.