Struct tonic::body::BoxBody [−][src]
pub struct BoxBody { /* fields omitted */ }A type erased http body.
Implementations
impl BoxBody[src]
impl BoxBody[src]pub fn new<B>(inner: B) -> Self where
B: Body<Data = Bytes, Error = Status> + Send + Sync + 'static, [src]
B: Body<Data = Bytes, Error = Status> + Send + Sync + 'static,
Create a new BoxBody mapping item and error to the default types.
pub fn map_from<B>(inner: B) -> Self where
B: Body + Send + Sync + 'static,
B::Error: Into<Box<dyn Error + Send + Sync>>, [src]
B: Body + Send + Sync + 'static,
B::Error: Into<Box<dyn Error + Send + Sync>>,
Create a new BoxBody mapping item and error to the default types.
pub fn empty() -> Self[src]
Create a new BoxBody that is empty.
Trait Implementations
impl Body for BoxBody[src]
impl Body for BoxBody[src]type Data = Bytes
Values yielded by the Body.
type Error = Status
The error type this Body might generate.
fn is_end_stream(&self) -> bool[src]
fn poll_data(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Self::Data, Self::Error>>>[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Self::Data, Self::Error>>>
fn poll_trailers(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<Option<HeaderMap>, Self::Error>>[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<Option<HeaderMap>, Self::Error>>
pub fn size_hint(&self) -> SizeHint[src]
pub fn data(&mut self) -> Data<'_, Self>ⓘ where
Self: Unpin, [src]
Self: Unpin,
pub fn trailers(&mut self) -> Trailers<'_, Self>ⓘ where
Self: Unpin, [src]
Self: Unpin,
pub fn map_data<F, B>(self, f: F) -> MapData<Self, F> where
B: Buf,
F: FnMut(Self::Data) -> B, [src]
B: Buf,
F: FnMut(Self::Data) -> B,
pub fn map_err<F, E>(self, f: F) -> MapErr<Self, F> where
F: FnMut(Self::Error) -> E, [src]
F: FnMut(Self::Error) -> E,
pub fn boxed(self) -> BoxBody<Self::Data, Self::Error> where
Self: Send + Sync + 'static, [src]
Self: Send + Sync + 'static,
Auto Trait Implementations
impl !RefUnwindSafe for BoxBody
impl !RefUnwindSafe for BoxBodyimpl !UnwindSafe for BoxBody
impl !UnwindSafe for BoxBodyBlanket Implementations
impl<T> Body for T where
T: Body + Send + Sync + 'static,
<T as Body>::Error: Into<Box<dyn Error + 'static + Sync + Send, Global>>, [src]
impl<T> Body for T where
T: Body + Send + Sync + 'static,
<T as Body>::Error: Into<Box<dyn Error + 'static + Sync + Send, Global>>, [src]type Data = <T as Body>::Data
The body data type.
type Error = <T as Body>::Error
The errors produced from the body.
pub fn is_end_stream(&Self) -> bool[src]
pub fn poll_data(
Pin<&mut T>,
&mut Context<'_>
) -> Poll<Option<Result<<T as Body>::Data, <T as Body>::Error>>>[src]
Pin<&mut T>,
&mut Context<'_>
) -> Poll<Option<Result<<T as Body>::Data, <T as Body>::Error>>>
pub fn poll_trailers(
Pin<&mut T>,
&mut Context<'_>
) -> Poll<Result<Option<HeaderMap<HeaderValue>>, <T as Body>::Error>>[src]
Pin<&mut T>,
&mut Context<'_>
) -> Poll<Result<Option<HeaderMap<HeaderValue>>, <T as Body>::Error>>
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]pub fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;[src]
Notable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;pub fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;[src]
Notable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;impl<T> Instrument for T[src]
impl<T> Instrument for T[src]pub fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;[src]
Notable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;pub fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;[src]
Notable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>, pub fn vzip(self) -> V
impl<T> WithSubscriber for T[src]
impl<T> WithSubscriber for T[src]pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>
impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output; where
S: Into<Dispatch>, [src]
Notable traits for WithDispatch<T>
impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;S: Into<Dispatch>,
pub fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>
impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;[src]
Notable traits for WithDispatch<T>
impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;