pub struct Session {
pub id: SessionId,
pub state: SessionState,
pub context: SessionContext,
pub created_at: Instant,
pub last_activity: Instant,
}Expand description
A shell session.
A session carries no execution configuration. It is an identifier the audit
trail records against, a place for streaming to attach, and the bookkeeping
in SessionContext; where a command runs and what it runs with are
decided per execute. It once held a shell, a working_dir and an env
that no execute ever read.
Fields§
§id: SessionIdUnique identifier.
state: SessionStateCurrent state.
context: SessionContextExecution bookkeeping (last command, exit code, count).
created_at: InstantTime when session was created.
last_activity: InstantTime of last activity.
Implementations§
Trait Implementations§
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