Struct mai::EventedFrameStream
[−]
[src]
pub struct EventedFrameStream<P: ?Sized> where
P: Protocol, { pub stream: P::ByteStream, pub state: StreamState, pub codec: P::Codec, pub read_buffer: Option<RcRecycled<Buffer>>, pub write_buffer: Option<RcRecycled<Buffer>>, pub outbox: Option<RcRecycled<Outbox<P::Frame>>>, }
Fields
stream: P::ByteStream
state: StreamState
codec: P::Codec
read_buffer: Option<RcRecycled<Buffer>>
write_buffer: Option<RcRecycled<Buffer>>
outbox: Option<RcRecycled<Outbox<P::Frame>>>
Methods
impl<P: ?Sized> EventedFrameStream<P> where
P: Protocol,
[src]
P: Protocol,
fn new(ebs: P::ByteStream) -> EventedFrameStream<P>
fn release_empty_buffers(&mut self)
fn has_bytes_to_write(&self) -> bool
fn reading_toolset(
&mut self,
buffer_pool: &mut Pool<Buffer>
) -> (&mut P::Codec, &mut P::ByteStream, &mut Buffer)
&mut self,
buffer_pool: &mut Pool<Buffer>
) -> (&mut P::Codec, &mut P::ByteStream, &mut Buffer)
fn writing_toolset(
&mut self,
buffer_pool: &mut Pool<Buffer>,
outbox_pool: &mut Pool<Outbox<P::Frame>>
) -> (&mut P::Codec, &mut P::ByteStream, &mut Buffer, &mut Outbox<P::Frame>)
&mut self,
buffer_pool: &mut Pool<Buffer>,
outbox_pool: &mut Pool<Outbox<P::Frame>>
) -> (&mut P::Codec, &mut P::ByteStream, &mut Buffer, &mut Outbox<P::Frame>)
fn read_buffer(&mut self, buffer_pool: &mut Pool<Buffer>) -> &mut Buffer
fn write_buffer(&mut self, buffer_pool: &mut Pool<Buffer>) -> &mut Buffer
fn outbox(
&mut self,
outbox_pool: &mut Pool<Outbox<P::Frame>>
) -> &mut Outbox<P::Frame>
&mut self,
outbox_pool: &mut Pool<Outbox<P::Frame>>
) -> &mut Outbox<P::Frame>
fn register_interest_in_writing(
&self,
event_loop: &mut EventLoop<ProtocolEngine<P>>,
token: Token
) -> Result<()>
&self,
event_loop: &mut EventLoop<ProtocolEngine<P>>,
token: Token
) -> Result<()>
fn deregister_interest_in_writing(
&self,
event_loop: &mut EventLoop<ProtocolEngine<P>>,
token: Token
) -> Result<()>
&self,
event_loop: &mut EventLoop<ProtocolEngine<P>>,
token: Token
) -> Result<()>
fn on_error(
&mut self,
event_loop: &mut EventLoop<ProtocolEngine<P>>,
token: Token,
session: &mut P::Session,
outbox_pool: &mut Pool<Outbox<P::Frame>>,
command_sender: &mut MioSender<Command<P>>,
handler: &mut P::Handler,
error: &Error
)
&mut self,
event_loop: &mut EventLoop<ProtocolEngine<P>>,
token: Token,
session: &mut P::Session,
outbox_pool: &mut Pool<Outbox<P::Frame>>,
command_sender: &mut MioSender<Command<P>>,
handler: &mut P::Handler,
error: &Error
)
fn send(
&mut self,
event_loop: &mut EventLoop<ProtocolEngine<P>>,
token: Token,
outbox_pool: &mut Pool<Outbox<P::Frame>>,
frame: P::Frame
) -> Result<()>
&mut self,
event_loop: &mut EventLoop<ProtocolEngine<P>>,
token: Token,
outbox_pool: &mut Pool<Outbox<P::Frame>>,
frame: P::Frame
) -> Result<()>
Trait Implementations
impl<P: Debug + ?Sized> Debug for EventedFrameStream<P> where
P: Protocol,
P::ByteStream: Debug,
P::Codec: Debug,
P::Frame: Debug,
[src]
P: Protocol,
P::ByteStream: Debug,
P::Codec: Debug,
P::Frame: Debug,