Skip to main content

ExtensionHost

Trait ExtensionHost 

Source
pub trait ExtensionHost {
    // Required methods
    fn spawn_process<'a>(
        &'a mut self,
        ownership: OwnershipScope,
        request: ExecuteRequest,
    ) -> ExtensionFuture<'a, ProcessStartedResponse>;
    fn write_stdin<'a>(
        &'a mut self,
        ownership: OwnershipScope,
        request: WriteStdinRequest,
    ) -> ExtensionFuture<'a, StdinWrittenResponse>;
    fn close_stdin<'a>(
        &'a mut self,
        ownership: OwnershipScope,
        request: CloseStdinRequest,
    ) -> ExtensionFuture<'a, StdinClosedResponse>;
    fn kill_process<'a>(
        &'a mut self,
        ownership: OwnershipScope,
        request: KillProcessRequest,
    ) -> ExtensionFuture<'a, ProcessKilledResponse>;
    fn poll_event<'a>(
        &'a mut self,
        ownership: OwnershipScope,
        timeout: Duration,
    ) -> ExtensionFuture<'a, Option<EventFrame>>;
    fn guest_filesystem_call<'a>(
        &'a mut self,
        ownership: OwnershipScope,
        request: GuestFilesystemCallRequest,
    ) -> ExtensionFuture<'a, GuestFilesystemResultResponse>;
    fn bind_process_to_session<'a>(
        &'a mut self,
        ownership: OwnershipScope,
        namespace: String,
        ext_session_id: String,
        process_id: String,
    ) -> ExtensionFuture<'a, ()>;
    fn bind_vm_to_session<'a>(
        &'a mut self,
        ownership: OwnershipScope,
        namespace: String,
        ext_session_id: String,
    ) -> ExtensionFuture<'a, ()>;
    fn dispose_session_resources<'a>(
        &'a mut self,
        ownership: OwnershipScope,
        namespace: String,
        ext_session_id: String,
    ) -> ExtensionFuture<'a, Vec<EventFrame>>;
    fn start_buffering_process_output<'a>(
        &'a mut self,
        ownership: OwnershipScope,
        process_id: String,
    ) -> ExtensionFuture<'a, ()>;
    fn handoff_buffered_process_output<'a>(
        &'a mut self,
        ownership: OwnershipScope,
        namespace: String,
        ext_session_id: String,
        process_id: String,
        timeout: Duration,
    ) -> ExtensionFuture<'a, ExtensionBufferedProcessOutput>;
}

Required Methods§

Source

fn spawn_process<'a>( &'a mut self, ownership: OwnershipScope, request: ExecuteRequest, ) -> ExtensionFuture<'a, ProcessStartedResponse>

Source

fn write_stdin<'a>( &'a mut self, ownership: OwnershipScope, request: WriteStdinRequest, ) -> ExtensionFuture<'a, StdinWrittenResponse>

Source

fn close_stdin<'a>( &'a mut self, ownership: OwnershipScope, request: CloseStdinRequest, ) -> ExtensionFuture<'a, StdinClosedResponse>

Source

fn kill_process<'a>( &'a mut self, ownership: OwnershipScope, request: KillProcessRequest, ) -> ExtensionFuture<'a, ProcessKilledResponse>

Source

fn poll_event<'a>( &'a mut self, ownership: OwnershipScope, timeout: Duration, ) -> ExtensionFuture<'a, Option<EventFrame>>

Source

fn guest_filesystem_call<'a>( &'a mut self, ownership: OwnershipScope, request: GuestFilesystemCallRequest, ) -> ExtensionFuture<'a, GuestFilesystemResultResponse>

Source

fn bind_process_to_session<'a>( &'a mut self, ownership: OwnershipScope, namespace: String, ext_session_id: String, process_id: String, ) -> ExtensionFuture<'a, ()>

Source

fn bind_vm_to_session<'a>( &'a mut self, ownership: OwnershipScope, namespace: String, ext_session_id: String, ) -> ExtensionFuture<'a, ()>

Source

fn dispose_session_resources<'a>( &'a mut self, ownership: OwnershipScope, namespace: String, ext_session_id: String, ) -> ExtensionFuture<'a, Vec<EventFrame>>

Source

fn start_buffering_process_output<'a>( &'a mut self, ownership: OwnershipScope, process_id: String, ) -> ExtensionFuture<'a, ()>

Source

fn handoff_buffered_process_output<'a>( &'a mut self, ownership: OwnershipScope, namespace: String, ext_session_id: String, process_id: String, timeout: Duration, ) -> ExtensionFuture<'a, ExtensionBufferedProcessOutput>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<B> ExtensionHost for NativeSidecar<B>
where B: NativeSidecarBridge + Send + 'static, <B as BridgeTypes>::Error: Debug + Send + Sync + 'static,