Trait hff_std::DataSource
source · pub trait DataSource: Debug {
// Required methods
fn len(&self) -> Option<u64>;
fn prepare(&mut self) -> Result<u64>;
fn as_datatype(&mut self) -> &mut dyn Any;
}
Expand description
A chunk data source.
Required Methods§
sourcefn prepare(&mut self) -> Result<u64>
fn prepare(&mut self) -> Result<u64>
Prepare the chunk data if the length was not available. Returns the size of the data that will be stored.
sourcefn as_datatype(&mut self) -> &mut dyn Any
fn as_datatype(&mut self) -> &mut dyn Any
Get the underlying data type.