Trait lazy_reader::decoder::Decoder[][src]

pub trait Decoder {
    type Word: Default + Copy + Debug;

    const MAX_CODEPOINT_LEN: usize;

    fn decode(words: &[Self::Word]) -> Char<InvalidChar>;
}
Expand description

Trait for decoding UTF32 characters.

Associated Types

type Word: Default + Copy + Debug[src]

Expand description

The input of the decoder.

Loading content...

Associated Constants

const MAX_CODEPOINT_LEN: usize[src]

Expand description

The maximum amount of words needed to decode one symbol.

Loading content...

Required methods

fn decode(words: &[Self::Word]) -> Char<InvalidChar>[src]

Expand description

Decodes the first symbol from the slice and returns it with its length (in words).

This function can panic if words.len() < MAX_CODEPOINT_LEN.

Loading content...

Implementors

Loading content...