[−][src]Struct rmonitor::codec::RMonitorDecoder
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
fn decode(
&mut self,
src: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
[src]
&mut self,
src: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
fn decode_eof(
&mut self,
buf: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
[src]
&mut self,
buf: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
fn framed<T>(self, io: T) -> Framed<T, Self> where
T: AsyncRead + AsyncWrite,
[src]
T: AsyncRead + AsyncWrite,
impl Default for RMonitorDecoder
[src]
fn default() -> RMonitorDecoder
[src]
Auto Trait Implementations
impl RefUnwindSafe for RMonitorDecoder
impl Send for RMonitorDecoder
impl Sync for RMonitorDecoder
impl Unpin for RMonitorDecoder
impl UnwindSafe for RMonitorDecoder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,