pub struct Workspace {
pub pipes: Pipes,
/* private fields */
}Expand description
Temporary workspace for sandbox execution.
Fields§
§pipes: PipesImplementations§
Source§impl Workspace
impl Workspace
pub fn new() -> Result<Self>
pub fn with_prefix(prefix: &str) -> Result<Self>
pub fn root(&self) -> &Path
pub fn write_file( &self, path: &str, content: &[u8], executable: bool, ) -> Result<PathBuf>
pub fn create_dir(&self, path: &str) -> Result<PathBuf>
Sourcepub fn setup_sandbox_dirs(&self) -> Result<()>
pub fn setup_sandbox_dirs(&self) -> Result<()>
Create standard sandbox directories.
Only creates the writable workspace directories (work, tmp, home).
No rootfs directories (proc, dev, etc.) needed since we don’t use pivot_root.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Workspace
impl RefUnwindSafe for Workspace
impl Send for Workspace
impl Sync for Workspace
impl Unpin for Workspace
impl UnsafeUnpin for Workspace
impl UnwindSafe for Workspace
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