pub struct SessionStateMachine {
state: SessionState,
}Expand description
Pure state machine for MoQT session lifecycle. Transitions: Connecting -> SetupExchange -> Active -> Draining -> Closed.
Fields§
§state: SessionStateImplementations§
Source§impl SessionStateMachine
impl SessionStateMachine
Sourcepub fn state(&self) -> SessionState
pub fn state(&self) -> SessionState
Returns the current session state.
Sourcepub fn on_connect(&mut self) -> Result<(), SessionError>
pub fn on_connect(&mut self) -> Result<(), SessionError>
Transition: Connecting -> SetupExchange.
Sourcepub fn on_setup_complete(&mut self) -> Result<(), SessionError>
pub fn on_setup_complete(&mut self) -> Result<(), SessionError>
Transition: SetupExchange -> Active.
Sourcepub fn on_goaway(&mut self) -> Result<(), SessionError>
pub fn on_goaway(&mut self) -> Result<(), SessionError>
Transition: Active -> Draining (GOAWAY received).
Sourcepub fn on_close(&mut self) -> Result<(), SessionError>
pub fn on_close(&mut self) -> Result<(), SessionError>
Transition: Active|Draining -> Closed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SessionStateMachine
impl RefUnwindSafe for SessionStateMachine
impl Send for SessionStateMachine
impl Sync for SessionStateMachine
impl Unpin for SessionStateMachine
impl UnsafeUnpin for SessionStateMachine
impl UnwindSafe for SessionStateMachine
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