pub trait SessionImpl: Send {
// Required methods
fn round(&mut self, incoming: &[Message]) -> Result<RoundResult>;
fn result(&self) -> Result<Vec<u8>>;
fn destroy(&mut self);
}Expand description
Per-session scheme state, driven round-by-round by the framework.
A SessionImpl is not Sync — it owns mutable protocol state
for exactly one party’s view of one session. The framework moves it
between threads via the owning crate::session::Session handle.
Required Methods§
Sourcefn round(&mut self, incoming: &[Message]) -> Result<RoundResult>
fn round(&mut self, incoming: &[Message]) -> Result<RoundResult>
Advance one round. Consumes the messages received since the last
round and returns the messages to send next, plus a complete
flag indicating the session has produced its output and no more
rounds are needed.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".