Struct async_prost::AsyncProstReader [−][src]
A wrapper around an async reader that produces an asynchronous stream of prost-decoded values
Implementations
impl<R, T, D> AsyncProstReader<R, T, D>
[src]
pub fn new(reader: R) -> Self
[src]
create a new reader
pub fn get_ref(&self) -> &R
[src]
gets a reference to the underlying reader
pub fn get_mut(&mut self) -> &mut R
[src]
gets a mutable reference to the underlying reader
pub fn buffer(&self) -> &[u8]
[src]
returns a reference to the internally buffered data
pub fn into_inner(self) -> R
[src]
unwrap the AsyncProstReader
, returning the underlying reader
Trait Implementations
impl<R: Debug, T: Debug, D: Debug> Debug for AsyncProstReader<R, T, D>
[src]
impl<R, T, D> Default for AsyncProstReader<R, T, D> where
R: Default,
[src]
R: Default,
impl<R, T, D> From<R> for AsyncProstReader<R, T, D>
[src]
impl<R, T> Stream for AsyncProstReader<R, T, AsyncDestination> where
T: Message + Default,
R: AsyncRead + Unpin,
[src]
T: Message + Default,
R: AsyncRead + Unpin,
type Item = Result<T, Error>
Values yielded by the stream.
fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Self::Item>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Self::Item>>
pub fn size_hint(&self) -> (usize, Option<usize>)
[src]
impl<R, T> Stream for AsyncProstReader<R, T, AsyncFrameDestination> where
R: AsyncRead + Unpin,
T: Framed + Default,
[src]
R: AsyncRead + Unpin,
T: Framed + Default,
type Item = Result<T, Error>
Values yielded by the stream.
fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Self::Item>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Self::Item>>
pub fn size_hint(&self) -> (usize, Option<usize>)
[src]
impl<R, T, D> Unpin for AsyncProstReader<R, T, D> where
R: Unpin,
[src]
R: Unpin,
Auto Trait Implementations
impl<R, T, D> RefUnwindSafe for AsyncProstReader<R, T, D> where
D: RefUnwindSafe,
R: RefUnwindSafe,
T: RefUnwindSafe,
D: RefUnwindSafe,
R: RefUnwindSafe,
T: RefUnwindSafe,
impl<R, T, D> Send for AsyncProstReader<R, T, D> where
D: Send,
R: Send,
T: Send,
D: Send,
R: Send,
T: Send,
impl<R, T, D> Sync for AsyncProstReader<R, T, D> where
D: Sync,
R: Sync,
T: Sync,
D: Sync,
R: Sync,
T: Sync,
impl<R, T, D> UnwindSafe for AsyncProstReader<R, T, D> where
D: UnwindSafe,
R: UnwindSafe,
T: UnwindSafe,
D: UnwindSafe,
R: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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<!> for T
[src]
impl<T> From<T> for T
[src]
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.
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<S, T, E> TryStream for S where
S: Stream<Item = Result<T, E>> + ?Sized,
[src]
S: Stream<Item = Result<T, E>> + ?Sized,