pub struct Session {
pub id: u64,
pub pty: Pty,
pub title: Option<String>,
pub exited: bool,
pub exit_code: Option<i32>,
pub cols: u16,
pub rows: u16,
}Fields§
§id: u64§pty: Pty§title: Option<String>§exited: bool§exit_code: Option<i32>§cols: u16§rows: u16Implementations§
Source§impl Session
impl Session
pub fn spawn( id: u64, cmd: Option<Vec<String>>, cols: u16, rows: u16, channel: Option<&ChannelName>, ) -> PtyResult<Self>
pub fn read_output(&mut self) -> Vec<u8> ⓘ
Sourcepub fn sync_screen(&mut self)
pub fn sync_screen(&mut self)
Sync screen state without draining pending output. Clears the dirty flag (waking the reader thread from I/O burst budget parking) and syncs the title, but leaves accumulated bytes in the pending buffer so they can be sent to a future subscriber.
pub fn check_exited(&mut self) -> bool
pub fn take_exit_code(&mut self) -> Option<i32>
pub fn generate_snapshot(&mut self) -> Vec<u8> ⓘ
pub fn set_status_callback( &mut self, cb: Option<Box<dyn Fn(PtyStatus) + Send + Sync>>, )
Auto Trait Implementations§
impl !RefUnwindSafe for Session
impl !Sync for Session
impl !UnwindSafe for Session
impl Freeze for Session
impl Send for Session
impl Unpin for Session
impl UnsafeUnpin for Session
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.