pub struct SshSessionTag { /* private fields */ }Expand description
Handle to one dequeued SSH session instance.
Minted by SSH_DEQUEUE, consumed once by SSH_PUMP_CHANNEL. Cloning
the value shares the session; metadata reads never consume. Display
shows id and peer only: the command string may carry secrets.
Implementations§
Source§impl SshSessionTag
impl SshSessionTag
pub fn new( command: Option<String>, username: Option<String>, peer_addr: Option<SocketAddr>, pty_size: Arc<Mutex<PtySizeStamp>>, up_rx: Receiver<UpMsg>, down_tx: Sender<DownMsg>, ) -> Self
pub fn command(&self) -> Option<String>
pub fn username(&self) -> Option<String>
pub fn peer_addr(&self) -> Option<SocketAddr>
Sourcepub fn pty_size_handle(&self) -> Arc<Mutex<PtySizeStamp>> ⓘ
pub fn pty_size_handle(&self) -> Arc<Mutex<PtySizeStamp>> ⓘ
Shareable handle to this session’s size cell, for its pty pump.
Sourcepub fn take_pump_ends(&self) -> Result<(Receiver<UpMsg>, Sender<DownMsg>)>
pub fn take_pump_ends(&self) -> Result<(Receiver<UpMsg>, Sender<DownMsg>)>
Take the pump ends for SSH_PUMP_CHANNEL. A second pump on the
same session bails instead of splitting bytes across pumps. The
check runs before either take so a failed pump mutates nothing.
Trait Implementations§
Source§impl Clone for SshSessionTag
impl Clone for SshSessionTag
Source§impl Debug for SshSessionTag
impl Debug for SshSessionTag
Source§impl Display for SshSessionTag
impl Display for SshSessionTag
Source§impl OxDockType for SshSessionTag
impl OxDockType for SshSessionTag
Source§fn descriptor() -> &'static TypeDescriptor
fn descriptor() -> &'static TypeDescriptor
The canonical descriptor deriving from the struct’s name plus doc
comments. The same reference every call: pointer-compare words
against it.
Auto Trait Implementations§
impl Freeze for SshSessionTag
impl RefUnwindSafe for SshSessionTag
impl Send for SshSessionTag
impl Sync for SshSessionTag
impl Unpin for SshSessionTag
impl UnsafeUnpin for SshSessionTag
impl UnwindSafe for SshSessionTag
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.