PragmaTwice commented on code in PR #5208:
URL: https://github.com/apache/opendal/pull/5208#discussion_r1809198513


##########
core/src/raw/adapters/kv/api.rs:
##########
@@ -18,17 +18,28 @@
 use std::fmt::Debug;
 use std::future::ready;
 
+use futures::stream::Empty;
 use futures::Future;
+use futures::Stream;
 
 use crate::raw::*;
 use crate::Capability;
 use crate::Scheme;
 use crate::*;
 
+/// A noop placeholder for Adapter::ScanIter
+pub type EmptyScanIter = Empty<Result<String>>;
+
 /// KvAdapter is the adapter to underlying kv services.
 ///
 /// By implement this trait, any kv service can work as an OpenDAL Service.
 pub trait Adapter: Send + Sync + Debug + Unpin + 'static {
+    /// async iterator type for Adapter::scan()
+    ///
+    /// TODO: consider to replace it with std::async_iter::AsyncIterator after 
stablized
+    /// TODO: use default associate type `= EmptyScanIter` after stablized
+    type ScanIter: Stream<Item = Result<String>> + Send + Unpin;

Review Comment:
   Done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to