[go: up one dir, main page]

Struct Encode

Source
pub struct Encode<T>
where T: Stream,
{ /* private fields */ }
Expand description

A protobuf encoded gRPC response body

Trait Implementations§

Source§

impl<T> Body for Encode<T>
where T: Stream<Error = Status>, T::Item: Message,

Source§

type Data = <Encode<Encoder<<T as Stream>::Item>, T> as Body>::Data

Values yielded by the Body.
Source§

type Error = <Encode<Encoder<<T as Stream>::Item>, T> as Body>::Error

The error type this BufStream might generate.
Source§

fn is_end_stream(&self) -> bool

Returns true when the end of stream has been reached. Read more
Source§

fn poll_data(&mut self) -> Poll<Option<Self::Data>, Self::Error>

Attempt to pull out the next data buffer of this stream.
Source§

fn poll_trailers(&mut self) -> Poll<Option<HeaderMap>, Self::Error>

Poll for an optional single HeaderMap of trailers. Read more
Source§

fn size_hint(&self) -> SizeHint

Returns the bounds on the remaining length of the stream. Read more
Source§

impl<T> Debug for Encode<T>
where T: Stream + Debug, T::Item: Debug, T::Error: Debug,

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> !Freeze for Encode<T>

§

impl<T> RefUnwindSafe for Encode<T>

§

impl<T> Send for Encode<T>
where T: Send, <T as Stream>::Item: Send,

§

impl<T> Sync for Encode<T>
where T: Sync, <T as Stream>::Item: Sync,

§

impl<T> Unpin for Encode<T>
where T: Unpin, <T as Stream>::Item: Unpin,

§

impl<T> UnwindSafe for Encode<T>
where T: UnwindSafe, <T as Stream>::Item: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Body for T
where T: Body, <T as Body>::Error: Into<Box<dyn Error + Sync + Send>>,

Source§

type Data = <T as Body>::Data

Source§

type Error = <T as Body>::Error

Source§

fn is_end_stream(&self) -> bool

Source§

fn poll_data( &mut self, ) -> Result<Async<Option<<T as Body>::Data>>, <T as Body>::Error>

Source§

fn poll_trailers( &mut self, ) -> Result<Async<Option<HeaderMap>>, <T as Body>::Error>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.