Struct ogg::reading::async_api::PacketReader
source · pub struct PacketReader<T>where
T: TokioAsyncRead,{ /* private fields */ }
Available on crate feature
async
only.Expand description
Async packet reading functionality.
Implementations§
source§impl<T: TokioAsyncRead> PacketReader<T>
impl<T: TokioAsyncRead> PacketReader<T>
source§impl<T: FuturesAsyncRead> PacketReader<Compat<T>>
impl<T: FuturesAsyncRead> PacketReader<Compat<T>>
sourcepub fn new_compat(inner: T) -> Self
pub fn new_compat(inner: T) -> Self
Wraps the specified futures_io AsyncRead
into an Ogg packet
reader.
This crate uses Tokio internally, so a wrapper that may have
some performance cost will be used. Therefore, this constructor
is to be used only when dealing with AsyncRead
implementations
from other runtimes, and implementing a Tokio AsyncRead
compatibility layer oneself is not desired.
Trait Implementations§
source§impl<T: TokioAsyncRead> Stream for PacketReader<T>
impl<T: TokioAsyncRead> Stream for PacketReader<T>
§type Item = Result<Packet, OggReadError>
type Item = Result<Packet, OggReadError>
Values yielded by the stream.
impl<'pin, T> Unpin for PacketReader<T>where
T: TokioAsyncRead,
__PacketReader<'pin, T>: Unpin,
Auto Trait Implementations§
impl<T> RefUnwindSafe for PacketReader<T>where
T: RefUnwindSafe,
impl<T> Send for PacketReader<T>where
T: Send,
impl<T> Sync for PacketReader<T>where
T: Sync,
impl<T> UnwindSafe for PacketReader<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more