pub struct ModelManagementStore { /* private fields */ }Implementations§
Source§impl ModelManagementStore
impl ModelManagementStore
pub fn new(state_root: PathBuf, models_dir: PathBuf) -> Self
pub fn models_dir(&self) -> &Path
pub fn management_state_dir(&self) -> &Path
pub fn receipts_root(&self) -> &Path
pub fn receipt_path(&self, model_id: &str) -> PathBuf
pub fn tombstones_root(&self) -> &Path
pub fn tombstone_path(&self, model_id: &str) -> PathBuf
pub fn leases_root(&self) -> &Path
pub fn lease_path(&self, model_id: &str) -> PathBuf
pub fn mutation_lock_path(&self, model_id: &str) -> PathBuf
pub fn load_receipt( &self, model_id: &str, ) -> Result<Option<InstallReceipt>, ModelManagementError>
Sourcepub fn can_remove(&self, model_id: &str) -> Result<bool, ModelManagementError>
pub fn can_remove(&self, model_id: &str) -> Result<bool, ModelManagementError>
Return whether CAR has a receipt whose current artifact still matches the ownership evidence recorded at install/adoption time.
pub fn acquire_lease( &self, model_id: &str, ) -> Result<ModelLease, ModelManagementError>
pub fn model_in_use(&self, model_id: &str) -> Result<bool, ModelManagementError>
pub fn car_enabled(&self, model_id: &str) -> Result<bool, ModelManagementError>
Trait Implementations§
Source§impl Clone for ModelManagementStore
impl Clone for ModelManagementStore
Auto Trait Implementations§
impl Freeze for ModelManagementStore
impl RefUnwindSafe for ModelManagementStore
impl Send for ModelManagementStore
impl Sync for ModelManagementStore
impl Unpin for ModelManagementStore
impl UnsafeUnpin for ModelManagementStore
impl UnwindSafe for ModelManagementStore
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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