pub enum ServiceMode {
Agent,
StrictAgent,
Production,
}Expand description
Service mode for the container.
Determines whether the container runs as an ephemeral agent sandbox, a fail-closed agent sandbox, or a long-running production service.
Variants§
Agent
Ephemeral agent workload (default). Allows degraded fallbacks.
StrictAgent
Ephemeral agent workload with fail-closed isolation, but without production service rootfs, health, sd_notify, or NixOS semantics.
Production
Long-running production service. Enforces strict security invariants:
- Forbids degraded security, chroot fallback, and native host network mode
- Allows gvisor-host only with explicit gVisor runtime and hostinet opt-in
- Requires cgroup resource limits
- Requires pivot_root (no chroot fallback)
- Requires explicit rootfs path (no host bind mounts)
Implementations§
Source§impl ServiceMode
impl ServiceMode
pub fn label(self) -> &'static str
pub fn enforces_strict_isolation(self) -> bool
pub fn requires_user_namespace_mapping(self) -> bool
pub fn requires_cgroup_enforcement(self) -> bool
pub fn requires_explicit_bridge_dns(self) -> bool
Trait Implementations§
Source§impl Clone for ServiceMode
impl Clone for ServiceMode
Source§fn clone(&self) -> ServiceMode
fn clone(&self) -> ServiceMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ServiceMode
Source§impl Debug for ServiceMode
impl Debug for ServiceMode
Source§impl Default for ServiceMode
impl Default for ServiceMode
Source§fn default() -> ServiceMode
fn default() -> ServiceMode
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ServiceMode
impl<'de> Deserialize<'de> for ServiceMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ServiceMode
Source§impl PartialEq for ServiceMode
impl PartialEq for ServiceMode
Source§fn eq(&self, other: &ServiceMode) -> bool
fn eq(&self, other: &ServiceMode) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ServiceMode
impl Serialize for ServiceMode
impl StructuralPartialEq for ServiceMode
Source§impl ValueEnum for ServiceMode
impl ValueEnum for ServiceMode
Auto Trait Implementations§
impl Freeze for ServiceMode
impl RefUnwindSafe for ServiceMode
impl Send for ServiceMode
impl Sync for ServiceMode
impl Unpin for ServiceMode
impl UnsafeUnpin for ServiceMode
impl UnwindSafe for ServiceMode
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