pub struct SandboxSpec { /* private fields */ }Expand description
What a sandbox runs, checked: each value is one dvm run may be
given as it is. Only a SandboxDraft that passes becomes one, deserialized
too.
Implementations§
Source§impl SandboxSpec
impl SandboxSpec
Sourcepub const CPUS: RangeInclusive<u32>
pub const CPUS: RangeInclusive<u32>
The vCPUs a sandbox may have.
Sourcepub const MEMORY_MIB: RangeInclusive<u32>
pub const MEMORY_MIB: RangeInclusive<u32>
The memory a sandbox may have, in MiB.
Sourcepub const SEEDS: RangeInclusive<u64>
pub const SEEDS: RangeInclusive<u64>
The seeds a sandbox may have: those a JSON number carries exactly to every client, a browser’s too (2^53 − 1 at most), so a spec read back runs as it was made.
pub fn name(&self) -> &str
pub fn image(&self) -> &ImageReference
pub fn entrypoint(&self) -> Option<&str>
pub fn command(&self) -> &[String]
pub fn environment(&self) -> &[EnvironmentVariable]
pub fn cpus(&self) -> u32
pub fn memory_mib(&self) -> u32
pub fn seed(&self) -> u64
Sourcepub fn footprint(&self) -> Capacity
pub fn footprint(&self) -> Capacity
What a run of the spec takes from its runner: a host CPU for each vCPU, and the VM’s memory with dvm’s own.
Sourcepub fn takes_commands(&self) -> bool
pub fn takes_commands(&self) -> bool
Whether a sandbox of this spec takes commands (SandboxCommand): one
made with neither a command nor an entrypoint runs nothing until it’s
sent its first, and ends as it’s stopped.
One made with either runs it, and ends with it.
Trait Implementations§
Source§impl Clone for SandboxSpec
impl Clone for SandboxSpec
Source§impl Debug for SandboxSpec
impl Debug for SandboxSpec
Source§impl<'de> Deserialize<'de> for SandboxSpec
impl<'de> Deserialize<'de> for SandboxSpec
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 SandboxSpec
Source§impl From<SandboxSpec> for SandboxDraft
impl From<SandboxSpec> for SandboxDraft
Source§fn from(spec: SandboxSpec) -> Self
fn from(spec: SandboxSpec) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SandboxSpec
impl PartialEq for SandboxSpec
Source§impl Serialize for SandboxSpec
impl Serialize for SandboxSpec
impl StructuralPartialEq for SandboxSpec
Source§impl TryFrom<SandboxDraft> for SandboxSpec
impl TryFrom<SandboxDraft> for SandboxSpec
Auto Trait Implementations§
impl Forget for SandboxSpec
impl Freeze for SandboxSpec
impl RefUnwindSafe for SandboxSpec
impl Send for SandboxSpec
impl Sync for SandboxSpec
impl Unpin for SandboxSpec
impl UnsafeUnpin for SandboxSpec
impl UnwindSafe for SandboxSpec
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