pub struct ServerRequest<'a, M: 'static> { /* private fields */ }Expand description
Streaming server request.
This object is passed to server handlers.
Implementations§
Source§impl<'a, M: Send + 'static> ServerRequest<'a, M>
impl<'a, M: Send + 'static> ServerRequest<'a, M>
Sourcepub fn register_stream_handler<F, H, R>(self, handler: F) -> R
pub fn register_stream_handler<F, H, R>(self, handler: F) -> R
Register server stream handler.
This is low level operation, hard to use. Most users use
into_stream operation.
Sourcepub fn register_stream_handler_basic<H>(self, handler: H)
pub fn register_stream_handler_basic<H>(self, handler: H)
Register basic stream handler (without manual control flow).
This is low level operation, hard to use. Most users use
into_stream operation.
Sourcepub fn register_unary_handler<H>(self, handler: H)where
H: ServerRequestUnaryHandler<M>,
pub fn register_unary_handler<H>(self, handler: H)where
H: ServerRequestUnaryHandler<M>,
Register unary request handler.
Few people need this operation.
Sourcepub fn into_stream(self) -> ServerRequestStream<M>
pub fn into_stream(self) -> ServerRequestStream<M>
Convert request into easy to use ServerRequestStream object.
Auto Trait Implementations§
impl<'a, M> Freeze for ServerRequest<'a, M>
impl<'a, M> !RefUnwindSafe for ServerRequest<'a, M>
impl<'a, M> Send for ServerRequest<'a, M>
impl<'a, M> !Sync for ServerRequest<'a, M>
impl<'a, M> Unpin for ServerRequest<'a, M>
impl<'a, M> !UnwindSafe for ServerRequest<'a, M>
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