pub struct Session { /* private fields */ }Expand description
Portable state owner. Transport adapters feed snapshots/deltas and drain events; host UI code only sees owned DTOs and opaque receipts.
Implementations§
Source§impl Session
impl Session
pub fn new(options: SessionOptions) -> Self
pub fn status(&self) -> SessionStatus
pub fn revision(&self) -> StateRevision
pub fn state(&self) -> Option<&TerminalState>
pub fn install_snapshot( &mut self, snapshot: TerminalSnapshot, ) -> Result<(), CoreError>
pub fn apply_delta(&mut self, delta: &TerminalDelta) -> Result<(), CoreError>
pub fn acknowledge(&mut self, receipt: CommitReceipt) -> AcknowledgeResult
Sourcepub fn acknowledge_raw(&mut self, receipt: u64) -> AcknowledgeResult
pub fn acknowledge_raw(&mut self, receipt: u64) -> AcknowledgeResult
A binding-friendly acknowledgement entry point that keeps receipt construction inside the core.
pub fn submit_input(&mut self, bytes: &[u8]) -> Result<InputId, CoreError>
pub fn complete_input( &mut self, id: InputId, outcome: InputOutcome, ) -> Result<(), CoreError>
Sourcepub fn complete_input_raw(
&mut self,
id: u64,
outcome: InputOutcome,
) -> Result<(), CoreError>
pub fn complete_input_raw( &mut self, id: u64, outcome: InputOutcome, ) -> Result<(), CoreError>
A binding-friendly completion entry point for an input id emitted by the core.
pub fn begin_recovery(&mut self) -> Result<(), CoreError>
pub fn suspend(&mut self) -> Result<(), CoreError>
pub fn close(&mut self)
pub fn next_event(&mut self) -> Option<SessionEvent>
pub fn drain_events(&mut self)
pub fn pending_input_count(&self) -> usize
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