pub struct ShellSession {
pub channel_id: u32,
pub state: ShellSessionState,
pub pty: Option<PtyInfo>,
pub command: Option<Vec<u8>>,
pub environment: Vec<(Vec<u8>, Vec<u8>)>,
pub exit_code: Option<u32>,
pub exit_signal: Option<Vec<u8>>,
}Expand description
Represents a shell/exec session on a channel
Fields§
§channel_id: u32Channel ID this session is bound to
state: ShellSessionStateSession state
pty: Option<PtyInfo>PTY info (if allocated)
command: Option<Vec<u8>>Command for exec requests (None for interactive shell)
environment: Vec<(Vec<u8>, Vec<u8>)>Environment variables
exit_code: Option<u32>Exit code (set when process exits)
exit_signal: Option<Vec<u8>>Exit signal (set if process killed by signal)
Implementations§
Source§impl ShellSession
impl ShellSession
Sourcepub fn start_exec(&mut self, command: Vec<u8>) -> Result<(), SshError>
pub fn start_exec(&mut self, command: Vec<u8>) -> Result<(), SshError>
Start an exec session
Trait Implementations§
Source§impl Clone for ShellSession
impl Clone for ShellSession
Source§fn clone(&self) -> ShellSession
fn clone(&self) -> ShellSession
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShellSession
impl Debug for ShellSession
Source§impl PartialEq for ShellSession
impl PartialEq for ShellSession
impl Eq for ShellSession
impl StructuralPartialEq for ShellSession
Auto Trait Implementations§
impl Freeze for ShellSession
impl RefUnwindSafe for ShellSession
impl Send for ShellSession
impl Sync for ShellSession
impl Unpin for ShellSession
impl UnwindSafe for ShellSession
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)