[−][src]Struct tonic::body::BoxBody
A type erased http body.
Methods
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]
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>>
fn size_hint(&self) -> SizeHint
[src]
ⓘImportant traits for Data<'a, T>fn data(&mut self) -> Data<Self> where
Self: Unpin,
[src]
ⓘImportant traits for Data<'a, T>
Self: Unpin,
ⓘImportant traits for Trailers<'a, T>fn trailers(&mut self) -> Trailers<Self> where
Self: Unpin,
[src]
ⓘImportant traits for Trailers<'a, T>
Self: Unpin,
impl Debug for BoxBody
[src]
impl GrpcService<BoxBody> for Channel
[src]
type ResponseBody = Body
Responses body given by the service.
type Error = Error
Errors produced by the service.
type Future = ResponseFuture
The future response value.
fn poll_ready(&mut self, cx: &mut Context) -> Poll<Result<(), Self::Error>>
[src]
fn call(&mut self, request: Request<BoxBody>) -> Self::Future
[src]
Auto Trait Implementations
impl !RefUnwindSafe for BoxBody
impl Send for BoxBody
impl Sync for BoxBody
impl Unpin for BoxBody
impl !UnwindSafe for BoxBody
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Body for T where
T: Body + Send + Sync + 'static,
<T as Body>::Error: Into<Box<dyn Error + 'static + Sync + Send>>,
[src]
T: Body + Send + Sync + 'static,
<T as Body>::Error: Into<Box<dyn Error + 'static + Sync + Send>>,
type Data = <T as Body>::Data
The body data type.
type Error = <T as Body>::Error
The errors produced from the body.
fn is_end_stream(&Self) -> bool
[src]
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>>>
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> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
ⓘImportant traits for &'_ mut Ffn borrow_mut(&mut self) -> &mut T
[src]
ⓘImportant traits for &'_ mut F
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
ⓘImportant traits for Instrumented<T>fn instrument(self, span: Span) -> Instrumented<Self>
[src]
ⓘImportant traits for Instrumented<T>
ⓘImportant traits for Instrumented<T>fn in_current_span(self) -> Instrumented<Self>
[src]
ⓘImportant traits for Instrumented<T>
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,
impl<T> WithSubscriber for T
[src]
ⓘImportant traits for WithDispatch<T>fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
ⓘImportant traits for WithDispatch<T>
S: Into<Dispatch>,
ⓘImportant traits for WithDispatch<T>fn with_current_subscriber(self) -> WithDispatch<Self>
[src]
ⓘImportant traits for WithDispatch<T>