pub struct LocalCheckAdapter<B: JournalBackend> { /* private fields */ }Expand description
Registered Ubuntu composition of M5, ProcessPort, and SandboxLauncher.
Implementations§
Source§impl<B: JournalBackend> LocalCheckAdapter<B>
impl<B: JournalBackend> LocalCheckAdapter<B>
Sourcepub fn new(
backend: B,
process: Arc<dyn ProcessPort>,
launchers: LauncherRegistry,
commands: impl IntoIterator<Item = CommandSpec>,
resources: BTreeMap<String, PathBuf>,
) -> Result<Self, LocalCheckError>
pub fn new( backend: B, process: Arc<dyn ProcessPort>, launchers: LauncherRegistry, commands: impl IntoIterator<Item = CommandSpec>, resources: BTreeMap<String, PathBuf>, ) -> Result<Self, LocalCheckError>
Builds a closed adapter from boot-authorized ports, specs, and native resources.
§Errors
Returns a typed refusal for an empty or duplicate allowlist, or when a command names a missing or inconsistent resource.
Sourcepub fn command(&self, id: &CommandId) -> Option<&CommandSpec>
pub fn command(&self, id: &CommandId) -> Option<&CommandSpec>
Returns the exact installed command when present.
Sourcepub fn run(
&mut self,
request: &LocalCheckRequest,
holder: Datum,
now: u64,
expires_at: u64,
cancellation: &ProcessCancellation,
) -> Result<OperationOutcome, LocalCheckError>
pub fn run( &mut self, request: &LocalCheckRequest, holder: Datum, now: u64, expires_at: u64, cancellation: &ProcessCancellation, ) -> Result<OperationOutcome, LocalCheckError>
Executes or reconciles one local check under a bounded fenced lease.
§Errors
Returns a typed refusal when the request is not installed, its lease is invalid, or the durable lifecycle cannot advance.
Sourcepub fn record(
&self,
request: &LocalCheckRequest,
) -> Result<Option<OperationLifecycleRecord>, LocalCheckError>
pub fn record( &self, request: &LocalCheckRequest, ) -> Result<Option<OperationLifecycleRecord>, LocalCheckError>
Reconstructs the durable lifecycle for a request without performing it.
§Errors
Returns a typed refusal when the request is not installed or the journal cannot be verified.
Trait Implementations§
Source§impl<B: JournalBackend> LocalCheckPort for LocalCheckAdapter<B>
impl<B: JournalBackend> LocalCheckPort for LocalCheckAdapter<B>
Source§fn check(
&mut self,
request: &LocalCheckRequest,
lease: &LocalCheckLease,
cancellation: &ProcessCancellation,
) -> LocalCheckResult
fn check( &mut self, request: &LocalCheckRequest, lease: &LocalCheckLease, cancellation: &ProcessCancellation, ) -> LocalCheckResult
Executes or reconciles one installed exact command under a bounded lease.
Auto Trait Implementations§
impl<B> !RefUnwindSafe for LocalCheckAdapter<B>
impl<B> !UnwindSafe for LocalCheckAdapter<B>
impl<B> Freeze for LocalCheckAdapter<B>where
OperationLifecycle<B>: Freeze,
impl<B> Send for LocalCheckAdapter<B>where
OperationLifecycle<B>: Send,
impl<B> Sync for LocalCheckAdapter<B>where
OperationLifecycle<B>: Sync,
impl<B> Unpin for LocalCheckAdapter<B>where
OperationLifecycle<B>: Unpin,
impl<B> UnsafeUnpin for LocalCheckAdapter<B>where
OperationLifecycle<B>: UnsafeUnpin,
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