#[non_exhaustive]pub struct StreamRequest {
pub ctx: RequestContext,
}Expand description
A streaming RPC request as seen by an Interceptor.
Mirrors UnaryRequest minus the Payload — stream messages arrive
through the inbound PayloadStream passed to
Interceptor::intercept_streaming.
#[non_exhaustive] so future fields can be added without a breaking
change. Construct with StreamRequest::new; destructure with a
trailing ...
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.ctx: RequestContextThe dispatch context. Changes made through
headers_mut() or
extensions_mut() before
next.run propagate to the handler.
Implementations§
Source§impl StreamRequest
impl StreamRequest
Sourcepub fn new(ctx: RequestContext) -> Self
pub fn new(ctx: RequestContext) -> Self
Build a StreamRequest from a dispatch context. Used by the
dispatch path and by test fixtures.
Trait Implementations§
Source§impl Clone for StreamRequest
impl Clone for StreamRequest
Auto Trait Implementations§
impl !RefUnwindSafe for StreamRequest
impl !UnwindSafe for StreamRequest
impl Freeze for StreamRequest
impl Send for StreamRequest
impl Sync for StreamRequest
impl Unpin for StreamRequest
impl UnsafeUnpin for StreamRequest
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