Struct OutgoingResponse
pub struct OutgoingResponse { /* private fields */ }Available on crate features
icap and std only.Expand description
Owned streaming response returned by an ICAP request service.
Implementations§
§impl OutgoingResponse
impl OutgoingResponse
pub fn from_http_request<B>(
line: ResponseLine<'_>,
headers: &[Header<'_>],
request: Request<B>,
) -> Result<OutgoingResponse, Error>
pub fn from_http_request<B>( line: ResponseLine<'_>, headers: &[Header<'_>], request: Request<B>, ) -> Result<OutgoingResponse, Error>
Build a REQMOD response carrying an adapted HTTP request.
pub fn from_http_response<B>(
method: MethodKind,
line: ResponseLine<'_>,
headers: &[Header<'_>],
response: Response<B>,
) -> Result<OutgoingResponse, Error>
pub fn from_http_response<B>( method: MethodKind, line: ResponseLine<'_>, headers: &[Header<'_>], response: Response<B>, ) -> Result<OutgoingResponse, Error>
Build a REQMOD or RESPMOD response carrying an HTTP response.
§impl OutgoingResponse
impl OutgoingResponse
pub fn new(
response: Response,
body: impl Into<OutgoingBody>,
) -> OutgoingResponse
pub fn new( response: Response, body: impl Into<OutgoingBody>, ) -> OutgoingResponse
Construct a response with its streaming entity body.
pub fn without_body(response: Response) -> OutgoingResponse
pub fn without_body(response: Response) -> OutgoingResponse
Construct a response without entity-body data.
pub fn with_use_original_body(self, offset: u64) -> OutgoingResponse
pub fn with_use_original_body(self, offset: u64) -> OutgoingResponse
Finish a 206 response by resuming the original body at offset.
pub fn set_use_original_body(&mut self, offset: u64) -> &mut OutgoingResponse
pub fn set_use_original_body(&mut self, offset: u64) -> &mut OutgoingResponse
Finish a 206 response by resuming the original body at offset.
pub const fn response(&self) -> &Response
pub const fn response(&self) -> &Response
Return the ICAP response metadata and encapsulated HTTP heads.
pub const fn body(&self) -> &OutgoingBody
pub const fn body(&self) -> &OutgoingBody
Return the streaming adapted response body.
pub const fn body_mut(&mut self) -> &mut OutgoingBody
pub const fn body_mut(&mut self) -> &mut OutgoingBody
Return the mutable streaming adapted response body.
pub const fn body_end(&self) -> OutgoingBodyEnd
pub const fn body_end(&self) -> OutgoingBodyEnd
Return the configured response-body terminal behavior.
pub fn into_parts(self) -> (OutgoingResponseParts, OutgoingBody)
pub fn into_parts(self) -> (OutgoingResponseParts, OutgoingBody)
Split the response into named metadata and its body.
Trait Implementations§
§impl Debug for OutgoingResponse
impl Debug for OutgoingResponse
§impl ExtensionsRef for OutgoingResponse
impl ExtensionsRef for OutgoingResponse
§fn extensions(&self) -> &Extensions
fn extensions(&self) -> &Extensions
Get reference to the underlying
Extensions store§impl From<Response> for OutgoingResponse
impl From<Response> for OutgoingResponse
§fn from(value: Response) -> OutgoingResponse
fn from(value: Response) -> OutgoingResponse
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for OutgoingResponse
impl !RefUnwindSafe for OutgoingResponse
impl !Sync for OutgoingResponse
impl !UnwindSafe for OutgoingResponse
impl Send for OutgoingResponse
impl Unpin for OutgoingResponse
impl UnsafeUnpin for OutgoingResponse
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Create a new
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more