pub struct ModelRegistry { /* private fields */ }Expand description
A registry of model assets available on the local node.
Implementations§
Source§impl ModelRegistry
impl ModelRegistry
Sourcepub fn new<P: AsRef<Path>>(base_dir: P) -> Self
pub fn new<P: AsRef<Path>>(base_dir: P) -> Self
Create a new model registry using the specified base directory.
Sourcepub fn register(&self, metadata: ModelMetadata)
pub fn register(&self, metadata: ModelMetadata)
Register a model in the registry.
Sourcepub fn get_metadata(&self, id: &str) -> Option<ModelMetadata>
pub fn get_metadata(&self, id: &str) -> Option<ModelMetadata>
Get metadata for a specific model.
Sourcepub fn list_models(&self) -> Vec<ModelMetadata>
pub fn list_models(&self) -> Vec<ModelMetadata>
List all models in the registry.
Sourcepub fn set_status(&self, id: &str, status: ModelStatus)
pub fn set_status(&self, id: &str, status: ModelStatus)
Set the status of a model.
Sourcepub fn get_status(&self, id: &str) -> ModelStatus
pub fn get_status(&self, id: &str) -> ModelStatus
Get the status of a model.
Auto Trait Implementations§
impl Freeze for ModelRegistry
impl RefUnwindSafe for ModelRegistry
impl Send for ModelRegistry
impl Sync for ModelRegistry
impl Unpin for ModelRegistry
impl UnsafeUnpin for ModelRegistry
impl UnwindSafe for ModelRegistry
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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