[−][src]Struct spirit_tokio::handlers::HandleSocket
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(&self) -> 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]
F: FnMut(Socket, &SubFragment) -> Result<R, Error>,
R: 'static,
SubFragment: Debug,
R: IntoFuture<Item = (), Error = ()>,
type OutputResource = R
The type of resource after the transformation.
type OutputInstaller = FutureInstaller<R>
The type of installer after the transformation. Read more
fn installer(&mut self, _: InputInstaller, name: &str) -> Self::OutputInstaller
[src]
fn transform(
&mut self,
sock: Socket,
cfg: &SubFragment,
name: &str
) -> Result<R, Error>
[src]
&mut self,
sock: Socket,
cfg: &SubFragment,
name: &str
) -> Result<R, Error>
Auto Trait Implementations
impl<F> Send for HandleSocket<F> where
F: Send,
F: Send,
impl<F> Sync for HandleSocket<F> where
F: Sync,
F: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,