pub struct TerminalManager { /* private fields */ }Implementations§
Source§impl TerminalManager
impl TerminalManager
pub fn new() -> Self
pub async fn create( &self, name: String, cwd: Option<PathBuf>, cols: u16, rows: u16, sandbox: Option<&SandboxSession>, ) -> Result<TerminalInfo>
pub async fn create_named( &self, name: String, cwd: Option<PathBuf>, cols: u16, rows: u16, sandbox: Option<&SandboxSession>, ) -> Result<TerminalInfo>
pub async fn write_stdin( &self, name: &str, input: &str, yield_ms: u64, max_output: usize, ) -> Result<TerminalOutput>
pub async fn exec_one_shot( &self, cmd: &str, cwd: Option<PathBuf>, _cols: u16, _rows: u16, yield_ms: u64, max_output: usize, sandbox: Option<&SandboxSession>, ) -> Result<TerminalOutput>
pub async fn remove(&self, name: &str) -> Result<()>
pub async fn remove_all(&self)
pub async fn list(&self) -> Vec<TerminalInfo>
pub async fn get(&self, name: &str) -> Option<TerminalInfo>
pub async fn contains(&self, name: &str) -> bool
pub async fn resize(&self, name: &str, cols: u16, rows: u16) -> Result<()>
pub async fn read_history(&self, name: &str) -> Result<String>
pub async fn reset_command_state(&self, name: &str) -> Result<()>
pub async fn touch_output_activity(&self, name: &str) -> Result<()>
pub async fn close_ephemeral_idle_older_than( &self, idle: Duration, ) -> Vec<String>
Trait Implementations§
Source§impl Clone for TerminalManager
impl Clone for TerminalManager
Source§fn clone(&self) -> TerminalManager
fn clone(&self) -> TerminalManager
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for TerminalManager
impl !UnwindSafe for TerminalManager
impl Freeze for TerminalManager
impl Send for TerminalManager
impl Sync for TerminalManager
impl Unpin for TerminalManager
impl UnsafeUnpin for TerminalManager
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more