Struct solana_jsonrpc_server_utils::codecs::StreamCodec [−][src]
pub struct StreamCodec { /* fields omitted */ }Stream codec for streaming protocols (ipc, tcp)
Methods
impl StreamCodec[src]
impl StreamCodecpub fn stream_incoming() -> Self[src]
pub fn stream_incoming() -> SelfDefault codec with streaming input data. Input can be both enveloped and not.
pub fn new(incoming_separator: Separator, outgoing_separator: Separator) -> Self[src]
pub fn new(incoming_separator: Separator, outgoing_separator: Separator) -> SelfNew custom stream codec
Trait Implementations
impl Debug for StreamCodec[src]
impl Debug for StreamCodecfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Default for StreamCodec[src]
impl Default for StreamCodecfn default() -> StreamCodec[src]
fn default() -> StreamCodecReturns the "default value" for a type. Read more
impl Decoder for StreamCodec[src]
impl Decoder for StreamCodectype 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>>[src]
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>[src]
fn decode_eof(
&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
fn framed<T>(self, io: T) -> Framed<T, Self> where
Self: Encoder,
T: AsyncRead + AsyncWrite, [src]
fn framed<T>(self, io: T) -> Framed<T, Self> where
Self: Encoder,
T: AsyncRead + AsyncWrite, Provides a Stream and Sink interface for reading and writing to this Io object, using Decode and Encode to read and write the raw data. Read more
impl Encoder for StreamCodec[src]
impl Encoder for StreamCodecAuto Trait Implementations
impl Send for StreamCodec
impl Send for StreamCodecimpl Sync for StreamCodec
impl Sync for StreamCodec