Struct Encode

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

Encodes gRPC message types

Trait Implementations§

Source§

impl<T, U> Body for Encode<T, U>
where T: Encoder<Item = U::Item>, U: Stream, U::Error: Into<Box<dyn Error + Send + Sync>>,

Source§

type Data = <Bytes as IntoBuf>::Buf

Values yielded by the Body.
Source§

type Error = Status

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>, Status>

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

fn poll_trailers(&mut self) -> Poll<Option<HeaderMap>, Status>

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, U: Debug> Debug for Encode<T, U>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T, U> !Freeze for Encode<T, U>

§

impl<T, U> RefUnwindSafe for Encode<T, U>

§

impl<T, U> Send for Encode<T, U>
where T: Send, U: Send,

§

impl<T, U> Sync for Encode<T, U>
where T: Sync, U: Sync,

§

impl<T, U> Unpin for Encode<T, U>
where T: Unpin, U: Unpin,

§

impl<T, U> UnwindSafe for Encode<T, U>
where T: UnwindSafe, U: 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 + Send + Sync>>,

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.