Struct ebml_iterable::TagIteratorAsync
source · [−]pub struct TagIteratorAsync<R: AsyncRead + Unpin, TSpec> where
TSpec: EbmlSpecification<TSpec> + EbmlTag<TSpec> + Clone, { /* private fields */ }Expand description
This Can be transformed into a [Stream] using into_stream, or consumed directly by calling [.next().await] in a loop.
The struct can be created with the new() function on any source that implements the [futures::AsyncRead] trait.
Implementations
sourceimpl<R: AsyncRead + Unpin, TSpec> TagIteratorAsync<R, TSpec> where
TSpec: EbmlSpecification<TSpec> + EbmlTag<TSpec> + Clone,
impl<R: AsyncRead + Unpin, TSpec> TagIteratorAsync<R, TSpec> where
TSpec: EbmlSpecification<TSpec> + EbmlTag<TSpec> + Clone,
pub fn new(read: R) -> Self
sourcepub async fn next(&mut self) -> Option<Result<TSpec, TagIteratorError>>
pub async fn next(&mut self) -> Option<Result<TSpec, TagIteratorError>>
can be consumed
pub fn into_stream(self) -> impl Stream<Item = Result<TSpec, TagIteratorError>>
Auto Trait Implementations
impl<R, TSpec> RefUnwindSafe for TagIteratorAsync<R, TSpec> where
R: RefUnwindSafe,
TSpec: RefUnwindSafe,
impl<R, TSpec> Send for TagIteratorAsync<R, TSpec> where
R: Send,
TSpec: Send,
impl<R, TSpec> Sync for TagIteratorAsync<R, TSpec> where
R: Sync,
TSpec: Sync,
impl<R, TSpec> Unpin for TagIteratorAsync<R, TSpec> where
TSpec: Unpin,
impl<R, TSpec> UnwindSafe for TagIteratorAsync<R, TSpec> where
R: UnwindSafe,
TSpec: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more