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, 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 pipeline 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 set_options(&mut self, opts: RenderOptions)
pub fn set_options(&mut self, opts: RenderOptions)
Applies new render options to every session. Text already on screen keeps the styling it was rendered with; only new bytes change.
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).