[][src]Struct tonic::body::BoxBody

pub struct BoxBody { /* fields omitted */ }

A type erased http body.

Methods

impl BoxBody[src]

pub fn new<B>(inner: B) -> Self where
    B: Body<Data = <Bytes as IntoBuf>::Buf, Error = Status> + Send + 'static, 
[src]

Create a new BoxBody mapping item and error to the default types.

pub fn map_from<B>(inner: B) -> Self where
    B: Body + Send + 'static,
    B::Data: Into<Bytes>,
    B::Error: Into<Box<dyn Error + Send + Sync>>, 
[src]

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 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.

impl Debug for BoxBody[src]

impl Body for BoxBody[src]

type Data = <Bytes as IntoBuf>::Buf

Values yielded by the Body.

type Error = Status

The error type this Body might generate.

Auto Trait Implementations

impl Send for BoxBody

impl !Sync for BoxBody

impl Unpin for BoxBody

impl !UnwindSafe for BoxBody

impl !RefUnwindSafe for BoxBody

Blanket Implementations

impl<T> Body for T where
    T: Body,
    <T as Body>::Error: Into<Box<dyn Error + 'static + Sync + Send>>, 
[src]

type Data = <T as Body>::Data

The body data type.

type Error = <T as Body>::Error

The errors produced from the body.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Payload for T where
    T: Body + Send + 'static,
    <T as Body>::Data: Send,
    <T as Body>::Error: Into<Box<dyn Error + 'static + Sync + Send>>, 
[src]

type Data = <T as Body>::Data

A buffer of bytes representing a single chunk of a body.

type Error = <T as Body>::Error

The error type of this stream.