[−][src]Struct spirit_tokio::handlers::HandleListenerInit
A handler of incoming connections with per-listener initialization.
This is a more complex version of the HandleListener
. This one contains two closures. The
first one (I
) is called for each listening socket and produces an arbitrary context. The
second one (F
) is called for each connection accepted on that listening socket. The context
is provided to the closure.
This approach allows certain initialization to happen for each separate listening socket.
Trait Implementations
impl<I: Clone, F: Clone> Clone for HandleListenerInit<I, F>
[src]
fn clone(&self) -> HandleListenerInit<I, F>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<I: Debug, F: Debug> Debug for HandleListenerInit<I, F>
[src]
impl<Listener, InputInstaller, SubFragment, I, Ctx, F, Fut> Transformation<Listener, InputInstaller, SubFragment> for HandleListenerInit<I, F> where
Listener: IntoIncoming,
I: FnMut(&mut Listener, &SubFragment) -> Result<Ctx, Error>,
F: Fn(Listener::Connection, &mut Ctx) -> Fut + Clone + 'static,
Fut: IntoFuture<Item = ()>,
Fut::Error: Into<Error>,
SubFragment: Debug,
Ctx: 'static,
[src]
Listener: IntoIncoming,
I: FnMut(&mut Listener, &SubFragment) -> Result<Ctx, Error>,
F: Fn(Listener::Connection, &mut Ctx) -> Fut + Clone + 'static,
Fut: IntoFuture<Item = ()>,
Fut::Error: Into<Error>,
SubFragment: Debug,
Ctx: 'static,
type OutputResource = Acceptor<Listener::Incoming, Ctx, F>
The type of resource after the transformation.
type OutputInstaller = FutureInstaller<Self::OutputResource>
The type of installer after the transformation. Read more
fn installer(&mut self, _: InputInstaller, name: &str) -> Self::OutputInstaller
[src]
fn transform(
&mut self,
listener: Listener,
cfg: &SubFragment,
name: &'static str
) -> Result<Self::OutputResource, Error>
[src]
&mut self,
listener: Listener,
cfg: &SubFragment,
name: &'static str
) -> Result<Self::OutputResource, Error>
Auto Trait Implementations
impl<I, F> Send for HandleListenerInit<I, F> where
F: Send,
I: Send,
F: Send,
I: Send,
impl<I, F> Sync for HandleListenerInit<I, F> where
F: Sync,
I: Sync,
F: Sync,
I: 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,