[][src]Struct spirit_tokio::handlers::HandleSocket

pub struct HandleSocket<F>(pub F);

A Transformation to handle the whole socket.

This is a newtype that turns a closure taking a socket and the Fragment describing it and returns a future of something that can be done with it.

This is appropriate for UDP-like sockets and if you want to accept the connections on a TCP-like socket manually.

If you want to handle separate connections from a TCP listening socket but don't want to care about accepting them (and want to leave some other bookkeeping, like the limits of connections, to this crate), then you want the HandleListener instead.

Trait Implementations

impl<F: Clone> Clone for HandleSocket<F>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<F: Debug> Debug for HandleSocket<F>[src]

impl<Socket, InputInstaller, SubFragment, F, R> Transformation<Socket, InputInstaller, SubFragment> for HandleSocket<F> where
    F: FnMut(Socket, &SubFragment) -> Result<R, Error>,
    R: 'static,
    SubFragment: Debug,
    R: IntoFuture<Item = (), Error = ()>, 
[src]

type OutputResource = R

The type of resource after the transformation.

type OutputInstaller = FutureInstaller<R>

The type of installer after the transformation. Read more

Auto Trait Implementations

impl<F> Send for HandleSocket<F> where
    F: Send

impl<F> Sync for HandleSocket<F> where
    F: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> IntoResult for T[src]

impl<T> Erased for T