pub struct SandboxHandle { /* private fields */ }Expand description
Handle to a sandbox within a with_sandbox closure.
Owns a clone of the client (cheap — reqwest::Client is Arc-backed).
Implementations§
Source§impl SandboxHandle
impl SandboxHandle
Sourcepub async fn info(&self) -> Result<SandboxInfo>
pub async fn info(&self) -> Result<SandboxInfo>
Get sandbox info.
Sourcepub async fn read_file(&self, path: &str) -> Result<FileReadResponse>
pub async fn read_file(&self, path: &str) -> Result<FileReadResponse>
Read a file from this sandbox.
Sourcepub async fn write_file(
&self,
path: &str,
content: &str,
encoding: Option<&str>,
) -> Result<String>
pub async fn write_file( &self, path: &str, content: &str, encoding: Option<&str>, ) -> Result<String>
Write a file to this sandbox.
Sourcepub async fn delete_file(&self, path: &str) -> Result<String>
pub async fn delete_file(&self, path: &str) -> Result<String>
Delete a file from this sandbox.
Auto Trait Implementations§
impl Freeze for SandboxHandle
impl !RefUnwindSafe for SandboxHandle
impl Send for SandboxHandle
impl Sync for SandboxHandle
impl Unpin for SandboxHandle
impl !UnwindSafe for SandboxHandle
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