Struct rotor_stream::Stream [] [src]

pub struct Stream<P: Protocol> { /* fields omitted */ }

A main stream state machine abstaction

You may use the Stream directly. But it's recommented to either use Persistent for client connections or Accept for server-side connection processing.

Methods

impl<P: Protocol> Stream<P>
[src]

Get a Transport object for the stream

This method is only useful if you want to manipulate buffers externally (like pushing to the buffer from another thread). Just be sure to wake up state machine after manipulating buffers.

Trait Implementations

impl<P: Protocol> Accepted for Stream<P> where
    <P as Protocol>::Seed: Clone
[src]

The constructor of the state machine from the accepted connection

impl<P: Protocol> Machine for Stream<P>
[src]

Context type for the state machine Read more

Seed is piece of data that is needed to initialize the machine Read more

Create a machine from some data Read more

Socket readiness notification

Called after spawn event Read more

Timeout happened

Message received Read more

Called instead of spawned, if there is no slab space Read more

impl<P: Debug + Protocol> Debug for Stream<P> where
    P::Socket: Debug
[src]

Formats the value using the given formatter.