pub struct Session {
pub name: SessionId,
pub windows: Vec<Window>,
pub active_window: usize,
pub options: SessionOptions,
pub created_at: SystemTime,
/* private fields */
}Fields§
§name: SessionId§windows: Vec<Window>§active_window: usize§options: SessionOptions§created_at: SystemTimeImplementations§
Source§impl Session
impl Session
pub fn new_window(&mut self, pane: Pane) -> WindowId
Sourcepub fn kill_window(
&mut self,
window_id: WindowId,
) -> Result<(bool, Vec<Box<dyn PtyBackend>>)>
pub fn kill_window( &mut self, window_id: WindowId, ) -> Result<(bool, Vec<Box<dyn PtyBackend>>)>
Kill a window by ID. Returns (session_empty, backends) so the caller can close the backends outside the session manager lock.
pub fn to_info(&self) -> SessionInfo
Sourcepub fn find_window(&self, window_id: WindowId) -> Option<&Window>
pub fn find_window(&self, window_id: WindowId) -> Option<&Window>
Find a window by ID.
pub fn find_window_mut(&mut self, window_id: WindowId) -> Option<&mut Window>
Auto Trait Implementations§
impl Freeze for Session
impl !RefUnwindSafe for Session
impl Send for Session
impl !Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
impl !UnwindSafe for Session
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