Struct apollo_router::services::router::Request
source · #[non_exhaustive]pub struct Request {
pub router_request: Request<Body>,
pub context: Context,
}Expand description
Represents the router processing step of the processing pipeline.
This consists of the parsed graphql Request, HTTP headers and contextual data for extensions.
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.router_request: Request<Body>Original request to the Router.
context: ContextContext for extension
Implementations§
source§impl Request
impl Request
sourcepub fn builder() -> NewRequestBuilder
pub fn builder() -> NewRequestBuilder
This is the constructor (or builder) to use when constructing a real Request.
Required parameters are required in non-testing code to create a Request.
source§impl Request
impl Request
sourcepub fn fake_builder() -> FakeNewRequestBuilder
pub fn fake_builder() -> FakeNewRequestBuilder
This is the constructor (or builder) to use when constructing a fake Request.
Required parameters are required in non-testing code to create a Request.
Trait Implementations§
source§impl Service<Request> for MockRouterService
impl Service<Request> for MockRouterService
§type Future = Pin<Box<dyn Future<Output = Result<<MockRouterService as Service<Request>>::Response, <MockRouterService as Service<Request>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<MockRouterService as Service<Request>>::Response, <MockRouterService as Service<Request>>::Error>> + Send>>
The future response value.
Auto Trait Implementations§
impl !RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl !UnwindSafe for Request
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request