[][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 Unpin for AsciiGraphicEncoding

impl Sync for AsciiGraphicEncoding

impl Send for AsciiGraphicEncoding

impl UnwindSafe for AsciiGraphicEncoding

impl RefUnwindSafe for AsciiGraphicEncoding

Blanket Implementations

impl<T> From<T> for T[src]

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

type Owned = T

The resulting type after obtaining ownership.

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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