pub struct TerminalManager { /* private fields */ }Implementations§
Source§impl TerminalManager
impl TerminalManager
pub fn create( &self, owner: &str, spec: TerminalSpec, sink: impl Fn(TerminalEvent) -> bool + Send + Sync + 'static, ) -> Result<TerminalSession>
Sourcepub fn create_with(
&self,
owner: &str,
prepare: impl FnOnce() -> Result<TerminalSpec>,
sink: impl Fn(TerminalEvent) -> bool + Send + Sync + 'static,
) -> Result<TerminalSession>
pub fn create_with( &self, owner: &str, prepare: impl FnOnce() -> Result<TerminalSpec>, sink: impl Fn(TerminalEvent) -> bool + Send + Sync + 'static, ) -> Result<TerminalSession>
Reserve capacity before preparing a slow external program.
pub fn create_prepared( &self, owner: &str, prepare: impl FnOnce() -> Result<PreparedTerminal>, sink: impl Fn(TerminalEvent) -> bool + Send + Sync + 'static, ) -> Result<TerminalSession>
pub fn write(&self, owner: &str, id: &str, bytes: Vec<u8>) -> Result<()>
pub fn mark_native_agent(&self, owner: &str, id: &str) -> Result<()>
pub fn agent_prompt(&self, owner: &str, id: &str, prompt: &str) -> Result<()>
pub fn resize(&self, owner: &str, id: &str, size: TerminalSize) -> Result<()>
pub fn ack(&self, owner: &str, id: &str, seq: u64) -> Result<()>
pub fn launch_state(&self, owner: &str, id: &str) -> Result<LaunchState>
pub fn list(&self, owner: &str) -> Result<Vec<TerminalSession>>
pub fn close(&self, owner: &str, id: &str) -> Result<()>
pub fn detach(&self, owner: &str, id: &str) -> Result<()>
Sourcepub fn open_owner(&self, owner: &str)
pub fn open_owner(&self, owner: &str)
Reopen a trusted workspace identity before accepting new terminal requests.
Sourcepub fn detach_owner(&self, owner: &str) -> impl FnOnce() + Send + 'static
pub fn detach_owner(&self, owner: &str) -> impl FnOnce() + Send + 'static
Atomically reject pending launches and detach PTYs; run cleanup off the UI thread.
Sourcepub fn close_owner(&self, owner: &str)
pub fn close_owner(&self, owner: &str)
Release only the PTYs owned by a closing workspace.
pub fn close_all(&self)
Trait Implementations§
Source§impl Default for TerminalManager
impl Default for TerminalManager
Source§impl Drop for TerminalManager
impl Drop for TerminalManager
Auto Trait Implementations§
impl !Freeze for TerminalManager
impl Forget for TerminalManager
impl Move for TerminalManager
impl RefUnwindSafe for TerminalManagerwhere
Mutex<Sessions>: RefUnwindSafe,
impl Send for TerminalManager
impl Sync for TerminalManager
impl Unpin for TerminalManager
impl UnsafeUnpin for TerminalManagerwhere
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<(String, Arc<Session>)>: UnsafeUnpin,
PhantomData<(String, usize)>: UnsafeUnpin,
PhantomData<(String, u64)>: UnsafeUnpin,
PhantomData<(String, ())>: UnsafeUnpin,
impl UnwindSafe for TerminalManagerwhere
Mutex<Sessions>: UnwindSafe,
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.