pub struct LocalRegistry { /* private fields */ }Expand description
Deterministic in-memory index keyed by release_id.
Implementations§
Source§impl LocalRegistry
impl LocalRegistry
Sourcepub fn install(
&mut self,
release: InstalledRelease,
) -> Result<(), InstrumentError>
pub fn install( &mut self, release: InstalledRelease, ) -> Result<(), InstrumentError>
Store a collected release. Open records (closed == false) are allowed.
Duplicate release_id is Canonical("already installed") unless the
digest matches (idempotent no-op). Empty digest is MissingField.
Sourcepub fn lookup(&self, release_id: &str) -> Option<&InstalledRelease>
pub fn lookup(&self, release_id: &str) -> Option<&InstalledRelease>
Looks up an entry; None when absent.
Sourcepub fn uninstall(&mut self, release_id: &str) -> Option<InstalledRelease>
pub fn uninstall(&mut self, release_id: &str) -> Option<InstalledRelease>
Drop a collected release. Receipt history is not this index.
Sourcepub fn activate(
&self,
release_id: &str,
) -> Result<&InstalledRelease, InstrumentError>
pub fn activate( &self, release_id: &str, ) -> Result<&InstalledRelease, InstrumentError>
Fail closed: activation requires closed == true (all required deps verified).
Trait Implementations§
Source§impl Clone for LocalRegistry
impl Clone for LocalRegistry
Source§impl Debug for LocalRegistry
impl Debug for LocalRegistry
Auto Trait Implementations§
impl Freeze for LocalRegistry
impl RefUnwindSafe for LocalRegistry
impl Send for LocalRegistry
impl Sync for LocalRegistry
impl Unpin for LocalRegistry
impl UnsafeUnpin for LocalRegistry
impl UnwindSafe for LocalRegistry
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.