[][src]Struct rmonitor::codec::RMonitorDecoder

pub struct RMonitorDecoder { /* fields omitted */ }

A decoder for RMonitor records, which wraps an underlying LinesCodec to provide framing logic.

Implementations

impl RMonitorDecoder[src]

pub fn new() -> Self[src]

Returns an RMonitorDecoder for decoding RMonitor records from a TCP stream.

Note

The returned RMonitorDecoder will have an underlying LinesCodec with no upper bound on the length of a buffered line. Consider using new_with_max_length instead.

pub fn new_with_max_length(max_length: usize) -> Self[src]

Returns an RMonitorDecoder where the underlying LinesCodec has a maximum line length limit.

It is recommended to set such a limit where the input to be supplied to the decoder is untrusted, as an attacker could send an unbounded amount of input with no newline characters.

Trait Implementations

impl Debug for RMonitorDecoder[src]

impl Decoder for RMonitorDecoder[src]

type Item = Record

The type of decoded frames.

type Error = RMonitorCodecError

The type of unrecoverable frame decoding errors. Read more

impl Default for RMonitorDecoder[src]

Auto Trait Implementations

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.