pub struct TerminalStreamManager { /* private fields */ }Expand description
Main terminal streaming coordinator
Implementations§
Source§impl TerminalStreamManager
impl TerminalStreamManager
Sourcepub fn with_ipc_channel(ipc_channel: Arc<dyn IpcChannel>) -> Self
pub fn with_ipc_channel(ipc_channel: Arc<dyn IpcChannel>) -> Self
Create a new TerminalStreamManager with a specific IPC channel
Sourcepub async fn create_terminal(
&self,
terminal_id: String,
shell: Option<String>,
rows: u16,
cols: u16,
) -> Result<PtyHandle, Box<dyn Error>>
pub async fn create_terminal( &self, terminal_id: String, shell: Option<String>, rows: u16, cols: u16, ) -> Result<PtyHandle, Box<dyn Error>>
Create a new terminal with streaming
Sourcepub async fn send_input(
&self,
terminal_id: &str,
input: TerminalInput,
) -> Result<(), Box<dyn Error>>
pub async fn send_input( &self, terminal_id: &str, input: TerminalInput, ) -> Result<(), Box<dyn Error>>
Send input to terminal
Sourcepub async fn send_control(
&self,
terminal_id: &str,
control: ControlMessage,
) -> Result<(), Box<dyn Error>>
pub async fn send_control( &self, terminal_id: &str, control: ControlMessage, ) -> Result<(), Box<dyn Error>>
Send control message to terminal
Sourcepub async fn kill_terminal(
&self,
terminal_id: &str,
) -> Result<(), Box<dyn Error>>
pub async fn kill_terminal( &self, terminal_id: &str, ) -> Result<(), Box<dyn Error>>
Kill a terminal
Sourcepub async fn list_terminals(&self) -> Vec<String>
pub async fn list_terminals(&self) -> Vec<String>
List all active terminals
Auto Trait Implementations§
impl Freeze for TerminalStreamManager
impl !RefUnwindSafe for TerminalStreamManager
impl Send for TerminalStreamManager
impl Sync for TerminalStreamManager
impl Unpin for TerminalStreamManager
impl !UnwindSafe for TerminalStreamManager
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.