[][src]Struct irc_proto::irc::IrcCodec

pub struct IrcCodec { /* fields omitted */ }

An IRC codec built around an inner codec.

Methods

impl IrcCodec[src]

pub fn new(label: &str) -> Result<IrcCodec>[src]

Creates a new instance of IrcCodec wrapping a LineCodec with the specific encoding.

pub fn sanitize(data: String) -> String[src]

Sanitizes the input string by cutting up to (and including) the first occurence of a line terminiating phrase (\r\n, \r, or \n). This is used in sending messages through the codec to prevent the injection of additional commands.

Trait Implementations

impl Decoder for IrcCodec[src]

type Item = Message

The type of decoded frames.

type Error = ProtocolError

The type of unrecoverable frame decoding errors. Read more

impl Encoder<Message> for IrcCodec[src]

type Error = ProtocolError

The type of encoding errors. Read more

Auto Trait Implementations

impl !RefUnwindSafe for IrcCodec

impl Send for IrcCodec

impl Sync for IrcCodec

impl Unpin for IrcCodec

impl !UnwindSafe for IrcCodec

Blanket Implementations

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

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

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

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

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.