Struct tendril::fmt::Latin1 [] [src]

pub struct Latin1;

Marker type for the single-byte encoding of the first 256 Unicode codepoints.

This is IANA's "ISO-8859-1". It's ISO's "ISO 8859-1" with the addition of the C0 and C1 control characters from ECMA-48 / ISO 6429.

Not to be confused with WHATWG's "latin1" or "iso8859-1" labels (or the many other aliases), which actually stand for Windows-1252.

Trait Implementations

impl Debug for Latin1
[src]

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

Formats the value using the given formatter.

impl Default for Latin1
[src]

fn default() -> Latin1

Returns the "default value" for a type. Read more

impl Clone for Latin1
[src]

fn clone(&self) -> Latin1

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 Latin1
[src]

impl Format for Latin1
[src]

fn validate(_: &[u8]) -> bool

Check whether the buffer is valid for this format.

fn validate_prefix(_: &[u8]) -> bool

Check whether the buffer is valid for this format. Read more

fn validate_suffix(_: &[u8]) -> bool

Check whether the buffer is valid for this format. Read more

fn validate_subseq(_: &[u8]) -> bool

Check whether the buffer is valid for this format. Read more

unsafe fn fixup(_lhs: &[u8], _rhs: &[u8]) -> Fixup

Compute any fixup needed when concatenating buffers. Read more

impl<'a> CharFormat<'a> for Latin1
[src]

type Iter = SingleByteCharIndices<'a>

Iterator for characters and their byte indices.

unsafe fn char_indices(buf: &'a [u8]) -> SingleByteCharIndices<'a>

Iterate over the characters of the string and their byte indices. Read more

fn encode_char<F>(ch: char, cont: F) -> Result<()()> where F: FnOnce(&[u8])

Encode the character as bytes and pass them to a continuation. Read more