[][src]Struct stringsext::codec::ascii::AsciiGraphicEncoding

pub struct AsciiGraphicEncoding;

This custom encoding is derived from encoding::ASCIIEncoding. The only difference is that it represents only graphic characters. All control characters except tab and space are regarded as invalid.

Trait Implementations

impl Clone for AsciiGraphicEncoding[src]

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

Performs copy-assignment from source. Read more

impl Copy for AsciiGraphicEncoding[src]

impl Encoding for AsciiGraphicEncoding[src]

fn encode(
    &self,
    input: &str,
    trap: EncoderTrap
) -> Result<Vec<u8>, Cow<'static, str>>

An easy-to-use interface to RawEncoder. On the encoder error trap is called, which may return a replacement sequence to continue processing, or a failure to return the error. Read more

fn encode_to(
    &self,
    input: &str,
    trap: EncoderTrap,
    ret: &mut dyn ByteWriter
) -> Result<(), Cow<'static, str>>

Encode into a ByteWriter.

fn decode(
    &self,
    input: &[u8],
    trap: DecoderTrap
) -> Result<String, Cow<'static, str>>

An easy-to-use interface to RawDecoder. On the decoder error trap is called, which may return a replacement string to continue processing, or a failure to return the error. Read more

fn decode_to(
    &self,
    input: &[u8],
    trap: DecoderTrap,
    ret: &mut dyn StringWriter
) -> Result<(), Cow<'static, str>>

Decode into a StringWriter. Read more

Auto Trait Implementations

impl Send for AsciiGraphicEncoding

impl Sync for AsciiGraphicEncoding

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]