Struct ClientResponse
pub struct ClientResponse<'a, IO> { /* private fields */ }icap and std only.Expand description
A streaming final response received by an ICAP client.
Implementations§
§impl<'a, IO> ClientResponse<'a, IO>
impl<'a, IO> ClientResponse<'a, IO>
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 entity-body data segment.
A returned segment may be smaller than the peer’s wire chunk so the decoder never buffers a hostile, very large declared chunk.
pub const fn body_end(&self) -> Option<BodyEnd>
pub const fn body_end(&self) -> Option<BodyEnd>
Return the terminal body state after next_data returns None.
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 const fn original_body_offset_is_verified(&self) -> Option<bool>
pub const fn original_body_offset_is_verified(&self) -> Option<bool>
Return whether a received original-body offset was locally verified.
None means the response did not end with use-original-body.
Some(false) means the peer supplied a syntactically valid offset but
the client did not have enough original-body metadata to check it.
pub fn trailers(&self) -> Option<&TrailerBlock>
pub fn trailers(&self) -> Option<&TrailerBlock>
Return received HTTP trailers after the body completes.
pub fn icap_trailers(&self) -> Option<&TrailerBlock>
pub fn icap_trailers(&self) -> Option<&TrailerBlock>
Return negotiated outer ICAP trailers after the body completes.
These fields are distinct from the encapsulated HTTP trailers returned
by trailers.
pub fn into_response(self) -> Result<Response, Error>
pub fn into_response(self) -> Result<Response, Error>
Return the response once its body is complete.
Trait Implementations§
§impl<IO> ExtensionsRef for ClientResponse<'_, IO>
impl<IO> ExtensionsRef for ClientResponse<'_, IO>
§fn extensions(&self) -> &Extensions
fn extensions(&self) -> &Extensions
Extensions storeAuto Trait Implementations§
impl<'a, IO> !Freeze for ClientResponse<'a, IO>
impl<'a, IO> !UnwindSafe for ClientResponse<'a, IO>
impl<'a, IO> RefUnwindSafe for ClientResponse<'a, IO>where
&'a mut ClientConnection<IO>: RefUnwindSafe,
impl<'a, IO> Send for ClientResponse<'a, IO>where
&'a mut ClientConnection<IO>: Send,
impl<'a, IO> Sync for ClientResponse<'a, IO>where
&'a mut ClientConnection<IO>: Sync,
impl<'a, IO> Unpin for ClientResponse<'a, IO>where
&'a mut ClientConnection<IO>: Unpin,
impl<'a, IO> UnsafeUnpin for ClientResponse<'a, IO>where
&'a mut ClientConnection<IO>: UnsafeUnpin,
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