mirror of
https://git.proxmox.com/git/pxar
synced 2025-04-28 15:51:57 +00:00
accessor: use aio Decoder in aio Accessor
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
da286c2802
commit
afe05f3ffa
@ -13,7 +13,7 @@ use std::sync::Arc;
|
||||
use std::task::{Context, Poll};
|
||||
|
||||
use crate::accessor::{self, cache::Cache, ReadAt};
|
||||
use crate::decoder::Decoder;
|
||||
use crate::decoder::aio::Decoder;
|
||||
use crate::format::GoodbyeItem;
|
||||
use crate::poll_fn::poll_fn;
|
||||
use crate::Entry;
|
||||
|
@ -51,6 +51,12 @@ impl<T: SeqRead> Decoder<T> {
|
||||
})
|
||||
}
|
||||
|
||||
/// Internal helper for `Accessor`. In this case we have the low-level state machine, and the
|
||||
/// layer "above" the `Accessor` propagates the actual type (sync vs async).
|
||||
pub(crate) fn from_impl(inner: decoder::DecoderImpl<T>) -> Self {
|
||||
Self { inner }
|
||||
}
|
||||
|
||||
/// If this is a directory entry, get the next item inside the directory.
|
||||
pub async fn next(&mut self) -> Option<io::Result<Entry>> {
|
||||
self.inner.next_do().await.transpose()
|
||||
|
Loading…
Reference in New Issue
Block a user