Struct OwnedClientResponse
pub struct OwnedClientResponse<IO> { /* private fields */ }http and icap only.Expand description
An owned, typed streaming response to an HTTP adaptation request.
Unlike ClientResponse, this value owns its ICAP connection. It is
suitable for request-level services and can turn its remaining stream into
a Rama Body without spawning a task or copying payload bytes.
Implementations§
§impl<IO> OwnedClientResponse<IO>
impl<IO> OwnedClientResponse<IO>
pub const fn encapsulated(&self) -> Option<&Encapsulated>
pub const fn encapsulated(&self) -> Option<&Encapsulated>
Return the typed encapsulated HTTP metadata, when present.
pub fn original_request(&self) -> Option<&Request<()>>
pub fn original_request(&self) -> Option<&Request<()>>
Return the original HTTP request head for a REQMOD transaction.
pub fn original_response(&self) -> Option<&Response<()>>
pub fn original_response(&self) -> Option<&Response<()>>
Return the original HTTP response head for a RESPMOD transaction.
pub fn request(&self) -> Option<&Request<()>>
pub fn request(&self) -> Option<&Request<()>>
Return the resulting HTTP request head for a REQMOD transaction.
This applies the same body-only fallback and proxy-field restoration
as ClientResponse::request.
pub fn response(&self) -> Option<&Response<()>>
pub fn response(&self) -> Option<&Response<()>>
Return the resulting HTTP response head for a RESPMOD transaction.
This applies the same body-only fallback and proxy-field restoration
as ClientResponse::response.
pub async fn next_frame(&mut self) -> Result<Option<Frame<Bytes>>, Error>
pub async fn next_frame(&mut self) -> Result<Option<Frame<Bytes>>, Error>
Read the next zero-copy data or trailer frame.
pub async fn next_data(&mut self) -> Result<Option<Bytes>, Error>
pub async fn next_data(&mut self) -> Result<Option<Bytes>, Error>
Read the next zero-copy data segment.
pub const fn body_end(&self) -> Option<BodyEnd>
pub const fn body_end(&self) -> Option<BodyEnd>
Return the terminal ICAP body state after the stream completes.
pub const fn trailers(&self) -> Option<&HeaderMap>
pub const fn trailers(&self) -> Option<&HeaderMap>
Return trailers after the resulting HTTP stream completes.
pub fn icap_trailers(&self) -> Option<&TrailerBlock>
pub fn icap_trailers(&self) -> Option<&TrailerBlock>
Return negotiated outer ICAP trailers after the ICAP body completes.
These fields remain outside the resulting HTTP body stream.
pub const fn original_body_offset_is_verified(&self) -> Option<bool>
pub const fn original_body_offset_is_verified(&self) -> Option<bool>
Return whether a 206 original-body offset was locally verified.
pub const fn original_body_bytes_sent(&self) -> u64
pub const fn original_body_bytes_sent(&self) -> u64
Return original entity-body bytes sent in complete ICAP chunks.
pub const fn original_body_len(&self) -> Option<u64>
pub const fn original_body_len(&self) -> Option<u64>
Return the exact original entity-body length, when known.
pub fn into_request(self) -> Result<Request, Error>
pub fn into_request(self) -> Result<Request, Error>
Turn a successful REQMOD result into a streaming HTTP request.
pub fn into_response(self) -> Result<Response, Error>
pub fn into_response(self) -> Result<Response, Error>
Turn a successful RESPMOD result into a streaming HTTP response.
Trait Implementations§
§impl<IO> Debug for OwnedClientResponse<IO>
impl<IO> Debug for OwnedClientResponse<IO>
§impl<IO> ExtensionsRef for OwnedClientResponse<IO>
impl<IO> ExtensionsRef for OwnedClientResponse<IO>
§fn extensions(&self) -> &Extensions
fn extensions(&self) -> &Extensions
Extensions storeAuto Trait Implementations§
impl<IO> !Freeze for OwnedClientResponse<IO>
impl<IO> !RefUnwindSafe for OwnedClientResponse<IO>
impl<IO> !UnwindSafe for OwnedClientResponse<IO>
impl<IO> Send for OwnedClientResponse<IO>
impl<IO> Sync for OwnedClientResponse<IO>
impl<IO> Unpin for OwnedClientResponse<IO>
impl<IO> UnsafeUnpin for OwnedClientResponse<IO>
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
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> ⓘ
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> ⓘ
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>
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>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more