pub struct ModelLoader<B: StorageBackend> { /* private fields */ }Expand description
Model loader that uses a storage backend
Implementations§
Source§impl<B: StorageBackend> ModelLoader<B>
impl<B: StorageBackend> ModelLoader<B>
Sourcepub async fn load_model(
&self,
workspace_path: &str,
) -> Result<ModelLoadResult, StorageError>
pub async fn load_model( &self, workspace_path: &str, ) -> Result<ModelLoadResult, StorageError>
Load a model from storage
For file-based backends (FileSystemStorageBackend, BrowserStorageBackend):
- Loads from
tables/subdirectory with YAML files - Loads from
relationships.yamlfile
For API backend (ApiStorageBackend), use load_model_from_api() instead.
Returns the loaded model data and a list of orphaned relationships (relationships that reference non-existent tables).
Auto Trait Implementations§
impl<B> Freeze for ModelLoader<B>where
B: Freeze,
impl<B> RefUnwindSafe for ModelLoader<B>where
B: RefUnwindSafe,
impl<B> Send for ModelLoader<B>
impl<B> Sync for ModelLoader<B>
impl<B> Unpin for ModelLoader<B>where
B: Unpin,
impl<B> UnwindSafe for ModelLoader<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