Struct rotor_capnp::Capnp
[−]
[src]
pub struct Capnp<E: Endpoint> { /* fields omitted */ }
Adaptor for receiving and sending Cap'n Proto messages over a stream connection.
Trait Implementations
impl<E: Endpoint> Protocol for Capnp<E>
[src]
type Context = E::Context
type Socket = E::Socket
type Seed = E::Seed
fn create(
seed: Self::Seed,
sock: &mut Self::Socket,
scope: &mut Scope<Self::Context>
) -> Intent<Self>
seed: Self::Seed,
sock: &mut Self::Socket,
scope: &mut Scope<Self::Context>
) -> Intent<Self>
Starting the protocol (e.g. accepted a socket)
fn bytes_read(
self,
transport: &mut Transport<Self::Socket>,
_end: usize,
scope: &mut Scope<Self::Context>
) -> Intent<Self>
self,
transport: &mut Transport<Self::Socket>,
_end: usize,
scope: &mut Scope<Self::Context>
) -> Intent<Self>
The action WaitBytes or WaitDelimiter is complete Read more
fn bytes_flushed(
self,
transport: &mut Transport<Self::Socket>,
scope: &mut Scope<Self::Context>
) -> Intent<Self>
self,
transport: &mut Transport<Self::Socket>,
scope: &mut Scope<Self::Context>
) -> Intent<Self>
The action Flush is complete
fn timeout(
self,
transport: &mut Transport<Self::Socket>,
scope: &mut Scope<Self::Context>
) -> Intent<Self>
self,
transport: &mut Transport<Self::Socket>,
scope: &mut Scope<Self::Context>
) -> Intent<Self>
Timeout happened, which means either deadline reached in Bytes, Delimiter, Flush. Or Sleep has passed. Read more
fn wakeup(
self,
_transport: &mut Transport<Self::Socket>,
scope: &mut Scope<Self::Context>
) -> Intent<Self>
self,
_transport: &mut Transport<Self::Socket>,
scope: &mut Scope<Self::Context>
) -> Intent<Self>
Message received (from the main loop)
fn exception(
self,
_transport: &mut Transport<Self::Socket>,
reason: Exception,
scope: &mut Scope<Self::Context>
) -> Intent<Self>
self,
_transport: &mut Transport<Self::Socket>,
reason: Exception,
scope: &mut Scope<Self::Context>
) -> Intent<Self>
The method is called when too much bytes are read but no delimiter is found within the number of bytes specified. Or end of stream reached Read more