#[non_exhaustive]pub enum HostCommand {
Init {
step_budget: u64,
allowed_hosts: Vec<String>,
},
Run {
input: String,
},
Cancel,
Mount {
path: String,
},
ReadFile {
path: String,
},
WriteFile {
path: String,
data: Vec<u8>,
},
ListDir {
path: String,
},
}Expand description
A command sent from the host to the worker.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Init
Initialize the shell runtime with optional configuration.
Fields
Run
Execute a shell command string.
Cancel
Cancel the currently running execution.
Mount
Mount a virtual filesystem at the given path.
ReadFile
Read a file from the virtual filesystem.
WriteFile
Write data to a file in the virtual filesystem.
Fields
ListDir
List directory contents.
Trait Implementations§
Source§impl Clone for HostCommand
impl Clone for HostCommand
Source§fn clone(&self) -> HostCommand
fn clone(&self) -> HostCommand
Returns a duplicate of the value. Read more
1.0.0 · 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 HostCommand
impl Debug for HostCommand
Source§impl<'de> Deserialize<'de> for HostCommand
impl<'de> Deserialize<'de> for HostCommand
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
Source§impl PartialEq for HostCommand
impl PartialEq for HostCommand
Source§impl Serialize for HostCommand
impl Serialize for HostCommand
impl Eq for HostCommand
impl StructuralPartialEq for HostCommand
Auto Trait Implementations§
impl Freeze for HostCommand
impl RefUnwindSafe for HostCommand
impl Send for HostCommand
impl Sync for HostCommand
impl Unpin for HostCommand
impl UnsafeUnpin for HostCommand
impl UnwindSafe for HostCommand
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