pub struct BackendCtx {
pub pool_config: PoolConfig,
pub ninep_decider: Arc<dyn AccessDecider>,
pub ninep_monitor: Option<Arc<ReferenceMonitor>>,
pub image_config: ImageConfig,
pub rafs_store: Arc<RafsStore>,
}Expand description
Per-call construction context threaded to a backend’s construct fn.
inventory items are 'static, so BackendRegistration::construct must be
a bare fn pointer that cannot capture per-call state. This struct carries
everything a backend constructor needs at selection time.
Fields§
§pool_config: PoolConfigSandbox pool configuration (paths, hypervisor, limits).
ninep_decider: Arc<dyn AccessDecider>Mandatory resolver-backed, audited policy-enforcement point for every 9P export constructed by a backend.
ninep_monitor: Option<Arc<ReferenceMonitor>>#1269: full MAC reference monitor for 9P exports. Some at every
production constructor — the anonymous_floor() fallback is not
reachable. None in tests only.
image_config: ImageConfigImage storage configuration. Any backend that composes the RAFS image
filesystem (kata over virtio-fs, or nspawn over FUSE — Model B #715)
consumes it, so it exists on the oci-image build, not just kata-vm.
The Cargo manifest is explicit that the RAFS image service “lives on
oci-image, not kata-vm”.
rafs_store: Arc<RafsStore>RAFS/nydus image store — available whenever the image filesystem service
is compiled in (oci-image), so both the kata (virtio-fs) and nspawn
(FUSE, #715) backends can compose a per-sandbox VFS from it.
Auto Trait Implementations§
impl Freeze for BackendCtx
impl !RefUnwindSafe for BackendCtx
impl Send for BackendCtx
impl Sync for BackendCtx
impl Unpin for BackendCtx
impl UnsafeUnpin for BackendCtx
impl !UnwindSafe for BackendCtx
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
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>
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