pub struct SandboxSession { /* private fields */ }Expand description
A Client bound to one sandbox session id – obtained from
Client::with_sandbox. Holds a cheap clone of the underlying Client
(see Client’s own note on cloning), so it is Clone and can outlive
the borrow that produced it.
Implementations§
Source§impl SandboxSession
impl SandboxSession
Sourcepub fn client(&self) -> &Client
pub fn client(&self) -> &Client
The underlying Client, for the handful of calls not scoped to a
single session (e.g. Client::list_sandboxes).
pub async fn exec( &self, command: &str, options: ExecOptions, ) -> Result<ExecResult, BoxxkiteError>
pub async fn http_request( &self, method: &str, url: &str, options: HttpRequestOptions, ) -> Result<HttpRequestResult, BoxxkiteError>
pub async fn file_create( &self, path: &str, content: &str, options: FileOptions, ) -> Result<FileCreateResult, BoxxkiteError>
pub async fn view( &self, path: &str, options: ViewOptions, ) -> Result<ViewResult, BoxxkiteError>
pub async fn str_replace( &self, path: &str, old_str: &str, new_str: &str, options: StrReplaceOptions, ) -> Result<StrReplaceResult, BoxxkiteError>
pub async fn ls(&self, options: LsOptions) -> Result<LsResult, BoxxkiteError>
pub async fn glob( &self, pattern: &str, options: GlobOptions, ) -> Result<GlobResult, BoxxkiteError>
pub async fn grep( &self, pattern: &str, options: GrepOptions, ) -> Result<GrepResult, BoxxkiteError>
pub async fn get_log( &self, options: GetLogOptions, ) -> Result<AuditLogResponse, BoxxkiteError>
pub fn watch( &self, ) -> Pin<Box<dyn Stream<Item = Result<AuditLogEntry, BoxxkiteError>> + Send + 'static>>
pub async fn start_process( &self, command: &str, options: StartProcessOptions, ) -> Result<ProcessStartResult, BoxxkiteError>
pub async fn list_processes(&self) -> Result<ProcessListResult, BoxxkiteError>
pub async fn get_process_output( &self, process_id: &str, since_offset: i64, ) -> Result<ProcessOutputResult, BoxxkiteError>
pub async fn send_process_input( &self, process_id: &str, data: &str, ) -> Result<ProcessInputResult, BoxxkiteError>
pub async fn stop_process( &self, process_id: &str, ) -> Result<ProcessStopResult, BoxxkiteError>
pub async fn takeover(&self) -> Result<TakeoverStream, BoxxkiteError>
pub async fn desktop_takeover(&self) -> Result<DesktopStream, BoxxkiteError>
pub async fn create_preview_url( &self, port: u16, ttl_seconds: Option<u32>, ) -> Result<PreviewUrl, BoxxkiteError>
pub async fn revoke_preview_url( &self, port: u16, token_id: &str, ) -> Result<PreviewRevokeResult, BoxxkiteError>
pub async fn lsp_start( &self, language: &str, ) -> Result<LspStartResult, BoxxkiteError>
pub async fn lsp_open( &self, lsp_id: &str, path: &str, content: &str, ) -> Result<LspOpenResult, BoxxkiteError>
pub async fn lsp_completion( &self, lsp_id: &str, path: &str, line: u32, character: u32, ) -> Result<LspCompletionResult, BoxxkiteError>
pub async fn lsp_stop( &self, lsp_id: &str, ) -> Result<LspStopResult, BoxxkiteError>
Trait Implementations§
Source§impl Clone for SandboxSession
impl Clone for SandboxSession
Auto Trait Implementations§
impl !RefUnwindSafe for SandboxSession
impl !UnwindSafe for SandboxSession
impl Freeze for SandboxSession
impl Send for SandboxSession
impl Sync for SandboxSession
impl Unpin for SandboxSession
impl UnsafeUnpin for SandboxSession
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