pub struct ModelRegistry { /* private fields */ }Expand description
Model version registry
Implementations§
Source§impl ModelRegistry
impl ModelRegistry
Sourcepub async fn register(&self, model: VersionedModel) -> Result<Uuid>
pub async fn register(&self, model: VersionedModel) -> Result<Uuid>
Register a new model version
Sourcepub async fn get_version(
&self,
version_id: Uuid,
) -> Result<Option<VersionedModel>>
pub async fn get_version( &self, version_id: Uuid, ) -> Result<Option<VersionedModel>>
Get a model version by ID
Sourcepub async fn get_version_by_name(
&self,
model_name: &str,
version: &str,
) -> Result<Option<VersionedModel>>
pub async fn get_version_by_name( &self, model_name: &str, version: &str, ) -> Result<Option<VersionedModel>>
Get a model version by name and version string
Sourcepub async fn list_versions(
&self,
model_name: &str,
) -> Result<Vec<VersionedModel>>
pub async fn list_versions( &self, model_name: &str, ) -> Result<Vec<VersionedModel>>
List all versions for a model
Sourcepub async fn list_models(&self) -> Result<Vec<String>>
pub async fn list_models(&self) -> Result<Vec<String>>
List all model names
Sourcepub async fn query_versions(
&self,
query: VersionQuery,
) -> Result<Vec<VersionedModel>>
pub async fn query_versions( &self, query: VersionQuery, ) -> Result<Vec<VersionedModel>>
Query versions with filters
Sourcepub async fn remove_version(
&self,
version_id: Uuid,
) -> Result<Option<VersionedModel>>
pub async fn remove_version( &self, version_id: Uuid, ) -> Result<Option<VersionedModel>>
Remove a version from the registry
Sourcepub async fn get_versions_by_tag(
&self,
tag_name: &str,
) -> Result<Vec<VersionedModel>>
pub async fn get_versions_by_tag( &self, tag_name: &str, ) -> Result<Vec<VersionedModel>>
Get versions by tag
Sourcepub async fn get_latest_version(
&self,
model_name: &str,
) -> Result<Option<VersionedModel>>
pub async fn get_latest_version( &self, model_name: &str, ) -> Result<Option<VersionedModel>>
Get latest version for a model
Sourcepub async fn get_statistics(&self) -> Result<RegistryStatistics>
pub async fn get_statistics(&self) -> Result<RegistryStatistics>
Get registry statistics
Trait Implementations§
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
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