pub struct DatasetCollection { /* private fields */ }Expand description
Dataset collection for managing multiple datasets
Implementations§
Source§impl DatasetCollection
impl DatasetCollection
Sourcepub fn add_dataset(&mut self, dataset: Dataset) -> Result<()>
pub fn add_dataset(&mut self, dataset: Dataset) -> Result<()>
Add a dataset to the collection
Sourcepub fn get_dataset(&self, name: &str) -> Option<&Dataset>
pub fn get_dataset(&self, name: &str) -> Option<&Dataset>
Get a dataset by name
Sourcepub fn remove_dataset(&mut self, name: &str) -> Option<Dataset>
pub fn remove_dataset(&mut self, name: &str) -> Option<Dataset>
Remove a dataset
Sourcepub fn list_datasets(&self) -> Vec<String>
pub fn list_datasets(&self) -> Vec<String>
List all dataset names
Sourcepub async fn save_to_directory<P: AsRef<Path>>(&self, dir_path: P) -> Result<()>
pub async fn save_to_directory<P: AsRef<Path>>(&self, dir_path: P) -> Result<()>
Save entire collection to directory
Sourcepub async fn load_from_directory<P: AsRef<Path>>(dir_path: P) -> Result<Self>
pub async fn load_from_directory<P: AsRef<Path>>(dir_path: P) -> Result<Self>
Load collection from directory
Sourcepub fn statistics(&self) -> HashMap<String, Value>
pub fn statistics(&self) -> HashMap<String, Value>
Get collection statistics
Trait Implementations§
Source§impl Debug for DatasetCollection
impl Debug for DatasetCollection
Auto Trait Implementations§
impl Freeze for DatasetCollection
impl RefUnwindSafe for DatasetCollection
impl Send for DatasetCollection
impl Sync for DatasetCollection
impl Unpin for DatasetCollection
impl UnwindSafe for DatasetCollection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more