[][src]Trait jomini::Encoding

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>

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]

Loading content...