pub trait AsyncSource: Send + Sync {
// Required methods
fn open_async(&self) -> BoxFuture<'_, Result<Box<dyn AsyncSourceIterator>>>;
fn name(&self) -> &str;
// Provided method
fn len_hint(&self) -> Option<u64> { ... }
}Expand description
Async-capable source of training data.
Required Methods§
Sourcefn open_async(&self) -> BoxFuture<'_, Result<Box<dyn AsyncSourceIterator>>>
fn open_async(&self) -> BoxFuture<'_, Result<Box<dyn AsyncSourceIterator>>>
Open the source asynchronously and return an async iterator.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".