pub struct SandboxConfig {
pub image: Option<String>,
pub memory: Option<u32>,
pub cpus: Option<u8>,
pub volumes: Vec<String>,
pub ports: Vec<String>,
pub envs: Vec<String>,
pub depends_on: Vec<String>,
pub workdir: Option<String>,
pub shell: Option<String>,
pub scripts: HashMap<String, String>,
pub exec: Option<String>,
}
Expand description
Configuration for a sandbox Similar to microsandbox-core’s Sandbox but with optional fields for update operations
Fields§
§image: Option<String>
The image to use (optional for updates)
memory: Option<u32>
The amount of memory in MiB to use
cpus: Option<u8>
The number of vCPUs to use
volumes: Vec<String>
The volumes to mount
ports: Vec<String>
The ports to expose
envs: Vec<String>
The environment variables to use
depends_on: Vec<String>
The sandboxes to depend on
workdir: Option<String>
The working directory to use
shell: Option<String>
The shell to use (optional for updates)
scripts: HashMap<String, String>
The scripts that can be run
exec: Option<String>
The exec command to run
Trait Implementations§
Source§impl Debug for SandboxConfig
impl Debug for SandboxConfig
Source§impl<'de> Deserialize<'de> for SandboxConfig
impl<'de> Deserialize<'de> for SandboxConfig
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 SandboxConfig
impl RefUnwindSafe for SandboxConfig
impl Send for SandboxConfig
impl Sync for SandboxConfig
impl Unpin for SandboxConfig
impl UnwindSafe for SandboxConfig
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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