Struct tonic::body::BoxBody [−][src]
A type erased http body.
Implementations
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>>
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,
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 + Send + Sync, Global>>,
[src]
T: Body + Send + Sync + 'static,
<T as Body>::Error: Into<Box<dyn Error + 'static + Send + Sync, Global>>,
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> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut Tⓘ
[src]
impl<T> From<T> 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]
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, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a Tⓘ
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Tⓘ
[src]
pub unsafe fn drop(ptr: usize)
[src]
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.
pub 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.
pub 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]
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;