pub struct AppRegistry { /* private fields */ }Expand description
Bounded installed-app registry (cold construction / inspection only).
§Security
- Does not execute, launch, or load application code.
inspect/get/listare read-only and do not mutate state.- Malformed packages are quarantined when identity is recoverable; otherwise rejected.
Implementations§
Source§impl AppRegistry
impl AppRegistry
Sourcepub fn new() -> Self
pub fn new() -> Self
Empty registry with DEFAULT_ENGINE_VERSION.
Sourcepub fn with_engine_version(engine_version: impl Into<String>) -> Self
pub fn with_engine_version(engine_version: impl Into<String>) -> Self
Empty registry with an explicit engine version for compatibility checks.
Sourcepub fn with_bundled_poet_fixture() -> Self
pub fn with_bundled_poet_fixture() -> Self
Seed a registry that already contains the bundled POET fixture as Active.
Fixture is in-memory only — not a claim that package bytes exist on disk.
Sourcepub fn engine_version(&self) -> &str
pub fn engine_version(&self) -> &str
Registered engine version.
Sourcepub fn register_manifest(
&mut self,
manifest: &PortableAppManifest,
) -> Result<&InstalledAppRecord, AppRegistryError>
pub fn register_manifest( &mut self, manifest: &PortableAppManifest, ) -> Result<&InstalledAppRecord, AppRegistryError>
Register a decoded/validated manifest (no external package digest check).
Integrity is treated as ok unless compatibility marks the slot incompatible.
Sourcepub fn register_manifest_bytes(
&mut self,
bytes: &[u8],
package_digest: Option<&[u8; 32]>,
) -> Result<&InstalledAppRecord, AppRegistryError>
pub fn register_manifest_bytes( &mut self, bytes: &[u8], package_digest: Option<&[u8; 32]>, ) -> Result<&InstalledAppRecord, AppRegistryError>
Decode bytes, optionally verify package_digest against the integrity block.
- Decode/validate failure → quarantine when identity recoverable, else reject.
- Digest mismatch → quarantine (identity from decoded or probed fields).
Sourcepub fn list(&self) -> Vec<&InstalledAppRecord>
pub fn list(&self) -> Vec<&InstalledAppRecord>
Read-only list of records in slot order (occupied slots only).
Sourcepub fn get(&self, app_id: &str) -> Option<&InstalledAppRecord>
pub fn get(&self, app_id: &str) -> Option<&InstalledAppRecord>
Look up by app_id (exact match).
Sourcepub fn inspect(&self, app_id: &str) -> Option<AppInspectView>
pub fn inspect(&self, app_id: &str) -> Option<AppInspectView>
Read-only inspect view. Does not mutate the registry and does not launch.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppRegistry
impl RefUnwindSafe for AppRegistry
impl Send for AppRegistry
impl Sync for AppRegistry
impl Unpin for AppRegistry
impl UnsafeUnpin for AppRegistry
impl UnwindSafe for AppRegistry
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
§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.