Skip to main content

LocalCheckAdapter

Struct LocalCheckAdapter 

Source
pub struct LocalCheckAdapter<B: JournalBackend> { /* private fields */ }
Expand description

Registered Ubuntu composition of M5, ProcessPort, and SandboxLauncher.

Implementations§

Source§

impl<B: JournalBackend> LocalCheckAdapter<B>

Source

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.

Source

pub fn command(&self, id: &CommandId) -> Option<&CommandSpec>

Returns the exact installed command when present.

Source

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.

Source

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>

Source§

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,