pub struct SandboxPolicy {
pub ephemeral: bool,
pub max_duration_secs: Option<u64>,
pub idle_timeout_secs: Option<u64>,
}Expand description
Sandbox lifecycle policy.
Fields§
§ephemeral: boolWhether the sandbox is ephemeral.
Ephemeral sandboxes are one-off: the host runtime that owns the
process removes the persisted DB row and on-disk state when the VM
reaches a terminal status, and other host runtimes opportunistically
clean up ephemeral leftovers from runtimes that died before they
could self-clean. Defaults to false (persistent); named and created
sandboxes stay inspectable and restartable after they stop.
max_duration_secs: Option<u64>Hard cap on total sandbox lifetime in seconds. None = run forever.
idle_timeout_secs: Option<u64>Idle timeout in seconds. None = no idle detection.
Trait Implementations§
Source§impl Clone for SandboxPolicy
impl Clone for SandboxPolicy
Source§fn clone(&self) -> SandboxPolicy
fn clone(&self) -> SandboxPolicy
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 moreSource§impl Debug for SandboxPolicy
impl Debug for SandboxPolicy
Source§impl Default for SandboxPolicy
impl Default for SandboxPolicy
Source§fn default() -> SandboxPolicy
fn default() -> SandboxPolicy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SandboxPolicy
impl<'de> Deserialize<'de> for SandboxPolicy
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
Auto Trait Implementations§
impl Freeze for SandboxPolicy
impl RefUnwindSafe for SandboxPolicy
impl Send for SandboxPolicy
impl Sync for SandboxPolicy
impl Unpin for SandboxPolicy
impl UnsafeUnpin for SandboxPolicy
impl UnwindSafe for SandboxPolicy
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