This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
The following commit(s) were added to refs/heads/main by this push:
new fb4b8ea76 chore: clearer doc for list metakey (#3666)
fb4b8ea76 is described below
commit fb4b8ea76955e8882be49c8fe484e452a7cb74ab
Author: congyi wang <[email protected]>
AuthorDate: Thu Nov 30 10:17:11 2023 +0800
chore: clearer doc for list metakey (#3666)
* add example in list api
* fmt
* fmt
* fix
---
core/src/types/list.rs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/core/src/types/list.rs b/core/src/types/list.rs
index 7a1699db9..bc2e75120 100644
--- a/core/src/types/list.rs
+++ b/core/src/types/list.rs
@@ -34,10 +34,13 @@ use crate::*;
/// Lister is designed to list entries at given path in an asynchronous
/// manner.
///
-/// Users can construct Lister by [`Operator::lister`] or
[`Operator::lister_with`].
+/// Users can construct Lister by [`Operator::lister`] or
[`Operator::lister_with`], and can use `metakey` along with list.
+/// For example, suppose you need to access `content_length`, you can bring
the corresponding field in metakey when listing:
+/// `op.list_with("dir/").metakey(Metakey::ContentLength).await?;`.
///
/// - Lister implements `Stream<Item = Result<Entry>>`.
/// - Lister will return `None` if there is no more entries or error has been
returned.
+///
pub struct Lister {
acc: FusedAccessor,
lister: Option<oio::Lister>,