pub struct StreamingHandlerWithState<F, S, T, Fut, R>where
F: Fn(State<Arc<S>>, T, StreamSender) -> Fut + Send + Sync,
S: Send + Sync + 'static,
T: DeserializeOwned + Send,
Fut: Future<Output = R> + Send,
R: IntoHandlerResult,{ /* private fields */ }Expand description
Streaming handler that receives injected state and typed args.
Soft-deprecated (v0.1.27): Prefer ErasedStreamHandler via
erase_streaming_handler_with_state! instead.
Implementations§
Source§impl<F, S, T, Fut, R> StreamingHandlerWithState<F, S, T, Fut, R>where
F: Fn(State<Arc<S>>, T, StreamSender) -> Fut + Send + Sync,
S: Send + Sync + 'static,
T: DeserializeOwned + Send,
Fut: Future<Output = R> + Send,
R: IntoHandlerResult,
impl<F, S, T, Fut, R> StreamingHandlerWithState<F, S, T, Fut, R>where
F: Fn(State<Arc<S>>, T, StreamSender) -> Fut + Send + Sync,
S: Send + Sync + 'static,
T: DeserializeOwned + Send,
Fut: Future<Output = R> + Send,
R: IntoHandlerResult,
Trait Implementations§
Source§impl<F, S, T, Fut, R> StreamHandler for StreamingHandlerWithState<F, S, T, Fut, R>where
F: Fn(State<Arc<S>>, T, StreamSender) -> Fut + Send + Sync + 'static,
S: Send + Sync + 'static,
T: DeserializeOwned + Send + 'static,
Fut: Future<Output = R> + Send + 'static,
R: IntoHandlerResult + 'static,
impl<F, S, T, Fut, R> StreamHandler for StreamingHandlerWithState<F, S, T, Fut, R>where
F: Fn(State<Arc<S>>, T, StreamSender) -> Fut + Send + Sync + 'static,
S: Send + Sync + 'static,
T: DeserializeOwned + Send + 'static,
Fut: Future<Output = R> + Send + 'static,
R: IntoHandlerResult + 'static,
Auto Trait Implementations§
impl<F, S, T, Fut, R> Forget for StreamingHandlerWithState<F, S, T, Fut, R>
impl<F, S, T, Fut, R> Freeze for StreamingHandlerWithState<F, S, T, Fut, R>
impl<F, S, T, Fut, R> Move for StreamingHandlerWithState<F, S, T, Fut, R>
impl<F, S, T, Fut, R> RefUnwindSafe for StreamingHandlerWithState<F, S, T, Fut, R>
impl<F, S, T, Fut, R> Send for StreamingHandlerWithState<F, S, T, Fut, R>
impl<F, S, T, Fut, R> Sync for StreamingHandlerWithState<F, S, T, Fut, R>
impl<F, S, T, Fut, R> Unpin for StreamingHandlerWithState<F, S, T, Fut, R>
impl<F, S, T, Fut, R> UnsafeUnpin for StreamingHandlerWithState<F, S, T, Fut, R>
impl<F, S, T, Fut, R> UnwindSafe for StreamingHandlerWithState<F, S, T, Fut, R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more