pub struct ModelSaver<B: StorageBackend> { /* private fields */ }Expand description
Model saver that uses a storage backend
Implementations§
Source§impl<B: StorageBackend> ModelSaver<B>
impl<B: StorageBackend> ModelSaver<B>
Sourcepub async fn save_table(
&self,
workspace_path: &str,
table: &TableData,
) -> Result<(), StorageError>
pub async fn save_table( &self, workspace_path: &str, table: &TableData, ) -> Result<(), StorageError>
Save a table to storage
Saves the table as a YAML file in the workspace’s tables/ directory.
The filename will be based on the table name if yaml_file_path is not provided.
Sourcepub async fn save_relationships(
&self,
workspace_path: &str,
relationships: &[RelationshipData],
) -> Result<(), StorageError>
pub async fn save_relationships( &self, workspace_path: &str, relationships: &[RelationshipData], ) -> Result<(), StorageError>
Save relationships to storage
Saves relationships to relationships.yaml in the workspace directory.
Auto Trait Implementations§
impl<B> Freeze for ModelSaver<B>where
B: Freeze,
impl<B> RefUnwindSafe for ModelSaver<B>where
B: RefUnwindSafe,
impl<B> Send for ModelSaver<B>
impl<B> Sync for ModelSaver<B>
impl<B> Unpin for ModelSaver<B>where
B: Unpin,
impl<B> UnwindSafe for ModelSaver<B>where
B: UnwindSafe,
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