Struct apollo_router::services::subgraph::Response
source ยท #[non_exhaustive]pub struct Response {
pub response: Response<Response>,
pub context: Context,
}Fields (Non-exhaustive)ยง
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.response: Response<Response>ยงcontext: ContextImplementationsยง
sourceยงimpl Response
impl Response
sourcepub fn builder() -> NewResponseBuilder
pub fn builder() -> NewResponseBuilder
This is the constructor (or builder) to use when constructing a real Response.
The parameters are not optional, because in a live situation all of these properties must be set and be correct to create a Response.
sourceยงimpl Response
impl Response
sourcepub fn fake_builder() -> FakeNewResponseBuilder
pub fn fake_builder() -> FakeNewResponseBuilder
This is the constructor (or builder) to use when constructing a โfakeโ Response.
This does not enforce the provision of the data that is required for a fully functional Response. Itโs usually enough for testing, when a fully constructed Response is difficult to construct and not required for the purposes of the test.
sourceยงimpl Response
impl Response
sourcepub fn fake2_builder() -> Fake2NewResponseBuilder
pub fn fake2_builder() -> Fake2NewResponseBuilder
This is the constructor (or builder) to use when constructing a โfakeโ Response. It differs from the existing fake_new because it allows easier passing of headers. However we canโt change the original without breaking the public APIs.
This does not enforce the provision of the data that is required for a fully functional Response. Itโs usually enough for testing, when a fully constructed Response is difficult to construct and not required for the purposes of the test.
sourceยงimpl Response
impl Response
sourcepub fn error_builder() -> ErrorNewResponseBuilder
pub fn error_builder() -> ErrorNewResponseBuilder
This is the constructor (or builder) to use when constructing a Response that represents a global error. It has no path and no response data. This is useful for things such as authentication errors.
Trait Implementationsยง
Auto Trait Implementationsยง
impl !RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl !UnwindSafe for Response
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
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>
T in a tonic::Request