Struct jsonrpc_server_utils::codecs::StreamCodec
[−]
[src]
pub struct StreamCodec { /* fields omitted */ }
Stream codec for streaming protocols (ipc, tcp)
Methods
impl StreamCodec
[src]
fn stream_incoming() -> Self
Default codec with streaming input data. Input can be both enveloped and not.
fn new(incoming_separator: Separator, outgoing_separator: Separator) -> Self
New custom stream codec
Trait Implementations
impl Default for StreamCodec
[src]
fn default() -> StreamCodec
Returns the "default value" for a type. Read more
impl Decoder for StreamCodec
[src]
type Item = String
The type of decoded frames.
type Error = Error
The type of unrecoverable frame decoding errors. Read more
fn decode(&mut self, buf: &mut BytesMut) -> Result<Option<Self::Item>>
Attempts to decode a frame from the provided buffer of bytes. Read more
fn decode_eof(
&mut self,
buf: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
&mut self,
buf: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
A default method available to be called when there are no more bytes available to be read from the underlying I/O. Read more