pub struct Sessions { /* private fields */ }Expand description
All live sessions, keyed by id.
Implementations§
Source§impl Sessions
impl Sessions
pub fn insert( &mut self, id: SessionId, name: String, port: u16, kind: StreamKind, view: SharedView, opts: RenderOptions, )
pub fn get_mut(&mut self, id: SessionId) -> Option<&mut SessionState>
pub fn remove(&mut self, id: SessionId) -> Option<SessionState>
Sourcepub fn feed(&mut self, id: SessionId, data: &[u8])
pub fn feed(&mut self, id: SessionId, data: &[u8])
Feeds bytes into a session’s renderer and view.
Sourcepub fn mark_reconnected(&mut self, id: SessionId)
pub fn mark_reconnected(&mut self, id: SessionId)
Draws a horizontal rule announcing a reattached client.
Sourcepub fn mark_attached(&mut self, id: SessionId, reattached: bool)
pub fn mark_attached(&mut self, id: SessionId, reattached: bool)
Reflects a ServerEvent::Attached: always marks the session
connected, but draws the “– reconnected –” rule only for a
genuine reattach (reattached), never for a brand-new session’s
first-ever attach — see defect 1 in
.superpowers/sdd/lifecycle-fixes-report.md.
pub fn mark_disconnected(&mut self, id: SessionId)
Sourcepub fn plain_text(&self, id: SessionId) -> Option<String>
pub fn plain_text(&self, id: SessionId) -> Option<String>
One session’s scrollback as plain text, for File > Save As.
Sourcepub fn window_title(&self, id: SessionId) -> Option<String>
pub fn window_title(&self, id: SessionId) -> Option<String>
The title a session’s window should currently show, for reflecting connect/disconnect state after the fact (the window itself is not reachable from here — the caller owns the desktop).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Sessions
impl !Send for Sessions
impl !Sync for Sessions
impl !UnwindSafe for Sessions
impl Freeze for Sessions
impl Unpin for Sessions
impl UnsafeUnpin for Sessions
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