Trait jomini::Encoding[][src]

pub trait Encoding: Sized {
    fn decode<'a>(&self, data: &'a [u8]) -> Cow<'a, str>;
}

An encoding for interpretting byte data as text

Several transformations also should take place:

  • trailing whitespace is removed
  • escape sequences are unescaped

Required methods

fn decode<'a>(&self, data: &'a [u8]) -> Cow<'a, str>[src]

Decodes bytes into a utf-8 compatible string – allocating if necessary

Loading content...

Implementations on Foreign Types

impl<T: Encoding> Encoding for &T[src]

Loading content...

Implementors

impl Encoding for Ck3Flavor[src]

impl Encoding for Eu4Flavor[src]

impl Encoding for Utf8Encoding[src]

impl Encoding for Windows1252Encoding[src]

impl<'data, 'tokens, E> Encoding for ValueReader<'data, 'tokens, E> where
    E: Encoding
[src]

Loading content...