pub struct ShellSession { /* private fields */ }Expand description
A live shell session. Use output() for stdout chunks, events() for
lifecycle events, and write() / resize() / close() to drive it.
Implementations§
Source§impl ShellSession
impl ShellSession
Sourcepub async fn session_id(&self) -> Option<String>
pub async fn session_id(&self) -> Option<String>
Latest server-assigned session id (set after open() resolves; may
change across reconnects only if the server reissues one — usually it
does not).
pub async fn write(&self, bytes: &[u8]) -> Result<(), HeyoError>
pub async fn resize(&self, cols: u16, rows: u16) -> Result<(), HeyoError>
Sourcepub async fn close(&self) -> Result<(), HeyoError>
pub async fn close(&self) -> Result<(), HeyoError>
Send the close frame, then tear down the socket once the server acknowledges (or after 2s).
pub async fn exit_code(&self) -> Option<i32>
pub fn is_closed(&self) -> bool
Auto Trait Implementations§
impl !RefUnwindSafe for ShellSession
impl !UnwindSafe for ShellSession
impl Freeze for ShellSession
impl Send for ShellSession
impl Sync for ShellSession
impl Unpin for ShellSession
impl UnsafeUnpin for ShellSession
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