pub struct ModelMetadataManager { /* private fields */ }
Expand description
Manager for model metadata storage and retrieval
Implementations§
Source§impl ModelMetadataManager
impl ModelMetadataManager
Sourcepub fn get_model(&self, model_name: &str) -> Option<&ModelMetadata>
pub fn get_model(&self, model_name: &str) -> Option<&ModelMetadata>
Get metadata for a specific model
Sourcepub fn add_model(&mut self, metadata: ModelMetadata) -> Result<()>
pub fn add_model(&mut self, metadata: ModelMetadata) -> Result<()>
Add or update model metadata
Sourcepub fn remove_model(&mut self, model_name: &str) -> Result<()>
pub fn remove_model(&mut self, model_name: &str) -> Result<()>
Remove model metadata
Sourcepub fn list_models(&self) -> Vec<&ModelMetadata>
pub fn list_models(&self) -> Vec<&ModelMetadata>
List all installed models
Sourcepub fn mark_used(&mut self, model_name: &str) -> Result<()>
pub fn mark_used(&mut self, model_name: &str) -> Result<()>
Update last used timestamp for a model
Sourcepub fn get_models_dir() -> PathBuf
pub fn get_models_dir() -> PathBuf
Get the cache directory for models
Auto Trait Implementations§
impl Freeze for ModelMetadataManager
impl RefUnwindSafe for ModelMetadataManager
impl Send for ModelMetadataManager
impl Sync for ModelMetadataManager
impl Unpin for ModelMetadataManager
impl UnwindSafe for ModelMetadataManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more