Skip to content

Commit

Permalink
chore: clearer doc for list metakey (#3666)
Browse files Browse the repository at this point in the history
* add example in list api

* fmt

* fmt

* fix
  • Loading branch information
wcy-fdu authored Nov 30, 2023
1 parent 10cc031 commit fb4b8ea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/src/types/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down

0 comments on commit fb4b8ea

Please sign in to comment.