pub struct FlatLister<A: Access, L> { /* private fields */ }
Expand description
FlatLister will walk dir in bottom up way:
- List nested dir first
- Go back into parent dirs one by one
Given the following file tree:
.
├── dir_x/
│ ├── dir_y/
│ │ ├── dir_z/
│ │ └── file_c
│ └── file_b
└── file_a
ToFlatLister will output entries like:
dir_x/dir_y/dir_z/file_c
dir_x/dir_y/dir_z/
dir_x/dir_y/file_b
dir_x/dir_y/
dir_x/file_a
dir_x/
§Note
There is no guarantee about the order between files and dirs at the same level. We only make sure the nested dirs will show up before parent dirs.
Especially, for storage services that can’t return dirs first, ToFlatLister may output parent dirs’ files before nested dirs, this is expected because files always output directly while listing.
Implementations§
Source§impl<A, L> FlatLister<A, L>where
A: Access,
impl<A, L> FlatLister<A, L>where
A: Access,
Sourcepub fn new(acc: A, path: &str) -> FlatLister<A, L>
pub fn new(acc: A, path: &str) -> FlatLister<A, L>
Create a new flat lister
Trait Implementations§
Source§impl<A, L> List for FlatLister<A, L>
impl<A, L> List for FlatLister<A, L>
impl<A: Access, L> Send for FlatLister<A, L>
§Safety
wasm32 is a special target that we only have one event-loop for this FlatLister.
impl<A: Access, L> Sync for FlatLister<A, L>
§Safety
We will only take &mut Self
reference for FsLister.
Auto Trait Implementations§
impl<A, L> Freeze for FlatLister<A, L>where
A: Freeze,
impl<A, L> RefUnwindSafe for FlatLister<A, L>where
A: RefUnwindSafe,
L: RefUnwindSafe,
impl<A, L> Unpin for FlatLister<A, L>where
L: Unpin,
impl<A, L> UnwindSafe for FlatLister<A, L>where
A: UnwindSafe,
L: 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
Source§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
Decompress response bodies. Read more
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more