Skip to main content

FakeIsolationRuntime

Struct FakeIsolationRuntime 

Source
pub struct FakeIsolationRuntime { /* private fields */ }
Expand description

In-memory fake isolation runtime fixture for SDK conformance tests. Use it to script deterministic behavior in memory; any transcript or endpoint mutation is documented on the method that performs it.

Implementations§

Source§

impl FakeIsolationRuntime

Source

pub fn with_report(report: IsolationCapabilityReport) -> Self

Returns this value with its report setting replaced. The method follows builder-style data construction and does not execute external work.

Source

pub fn unsupported_host( adapter_ref: impl Into<IsolationRuntimeRef>, missing: impl IntoIterator<Item = impl Into<String>>, ) -> Self

Builds the unsupported host value. This is data construction and performs no I/O, journal append, event publication, or process work.

Source

pub fn host_process_only(adapter_ref: impl Into<IsolationRuntimeRef>) -> Self

Builds the host process only value. This is data construction and performs no I/O, journal append, event publication, or process work.

Source

pub fn with_cleanup_status(self, cleanup_status: CleanupStatus) -> Self

Returns this value with its cleanup status setting replaced. The method follows builder-style data construction and does not execute external work.

Source

pub fn calls(&self) -> Vec<String>

Operates on in-memory or journal-derived testing::isolation state for diagnostics and repair evidence. It does not create a second run loop or product workflow owner.

Source

pub fn call_count(&self) -> usize

Returns the call count currently held by this value. This reads deterministic in-memory test state and performs no external I/O.

Source

pub fn start_process_call_count(&self) -> usize

Start process call count. This reads the fake adapter call counter and does not start or signal a process.

Trait Implementations§

Source§

impl Clone for FakeIsolationRuntime

Source§

fn clone(&self) -> FakeIsolationRuntime

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FakeIsolationRuntime

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl IsolationRuntime for FakeIsolationRuntime

Source§

fn runtime_ref(&self) -> &IsolationRuntimeRef

Returns runtime ref for the current value. This is a read-only or data-construction helper unless the method body explicitly calls a port or store.
Source§

fn capability_report(&self) -> Result<IsolationCapabilityReport, AgentError>

Returns capability report for the current value. This is a read-only or data-construction helper unless the method body explicitly calls a port or store.
Source§

fn prepare_session( &self, _request: SessionPrepareRequest, ) -> Result<IsolationSessionRef, AgentError>

Prepares or selects an isolation session for the request. Implementations allocate or select an isolation session for the request; they may mutate adapter sandbox state but must not start the process.
Source§

fn resolve_image( &self, request: ImageResolveRequest, ) -> Result<ImageResolution, AgentError>

Resolves an image request into adapter-specific image metadata. Implementations resolve isolation planning data; only process-start methods may launch a process.
Source§

fn prepare_rootfs( &self, _request: RootfsPrepareRequest, ) -> Result<RootfsRef, AgentError>

Prepares the root filesystem for the isolation session. Implementations materialize or select the requested root filesystem and may touch host storage or image caches; they must not start the process.
Source§

fn resolve_mounts( &self, _request: MountResolveRequest, ) -> Result<MountPlan, AgentError>

Resolves requested mounts into a mount plan for the environment. Implementations resolve isolation planning data; only process-start methods may launch a process.
Source§

fn configure_network( &self, _request: NetworkPrepareRequest, ) -> Result<NetworkNamespaceRef, AgentError>

Configures or selects the network namespace for the environment. Implementations resolve isolation planning data; only process-start methods may launch a process.
Source§

fn prepare_secrets( &self, request: SecretPrepareRequest, ) -> Result<SecretMaterializationPlan, AgentError>

Prepares secret mounts or handles for the environment. Implementations materialize secret mounts or handles for the isolated environment and must not return raw secret values.
Source§

fn prepare_environment( &self, _request: EnvironmentPrepareRequest, ) -> Result<PreparedEnvironmentRef, AgentError>

Combines prepared isolation pieces into an executable environment. Implementations combine prepared rootfs, mounts, network, and secrets into an executable environment handle; they must not start the process.
Source§

fn start_process( &self, request: ProcessStartRequest, ) -> Result<ProcessStartResult, AgentError>

Starts the prepared isolated process through the host adapter. Implementations may launch a process or container and return process handles, but journal intent/result recording stays with the runtime.
Source§

fn stream_io( &self, _request: ProcessIoRequest, ) -> Result<ProcessIoFrame, AgentError>

Reads or writes one bounded I/O frame for an isolated process. Implementations may touch host process streams, but must preserve redaction and return stream refs or bounded data according to policy.
Source§

fn signal_process( &self, request: ProcessSignalRequest, ) -> Result<ProcessSignalResult, AgentError>

Sends a control signal to an already-started isolated process. Implementations return the observed signal result and leave lifecycle journal evidence to the runtime.
Source§

fn collect_stats( &self, request: ProcessStatsRequest, ) -> Result<ProcessStatsSnapshot, AgentError>

Collects statistics for an already-started isolated process. Implementations may query host process/container state and must return bounded metadata rather than raw process output.
Source§

fn cleanup(&self, request: CleanupRequest) -> Result<CleanupResult, AgentError>

Cleans up adapter-owned isolation resources for a finished process. Implementations may remove sessions, mounts, namespaces, or reclaim tickets selected by the cleanup request.
Source§

fn detach( &self, _request: DetachTransferRequest, ) -> Result<DetachTransferResult, AgentError>

Transfers ownership of isolation resources according to a detach plan. Implementations may leave processes or resources running under a reclaim ticket, but must not silently discard cleanup responsibility.
Source§

fn reclaim(&self, request: ReclaimRequest) -> Result<ReclaimResult, AgentError>

Reclaims resources that were previously detached from runtime ownership. Implementations may stop processes or remove resources referenced by the reclaim ticket and must report any cleanup failure for repair.

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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.