Trait tsukuyomi::input::upgrade::OnUpgrade [−][src]
pub trait OnUpgrade: Send + 'static { fn on_upgrade(
self,
io: Upgraded,
cx: UpgradeContext
) -> Box<Future<Item = (), Error = ()> + Send + 'static>; }
A trait representing a function called at performing the protocol upgrade.
Required Methods
ⓘImportant traits for Box<R>
fn on_upgrade(
self,
io: Upgraded,
cx: UpgradeContext
) -> Box<Future<Item = (), Error = ()> + Send + 'static>
self,
io: Upgraded,
cx: UpgradeContext
) -> Box<Future<Item = (), Error = ()> + Send + 'static>
Creates a task for processing the upgraded protocol from the specified context.
Implementors
impl<F, R> OnUpgrade for F where
F: FnOnce(Upgraded, UpgradeContext) -> R + Send + 'static,
R: IntoFuture<Item = (), Error = ()>,
R::Future: Send + 'static,