pub enum ConversationError {
TurnAlreadyActive,
TurnAlreadySealed,
NoActiveTurn,
UnknownTurn(TurnId),
DuplicateTurnId(TurnId),
TurnNotCompleted(TurnId),
TurnPaused(TurnId),
NotPaused(TurnId),
InvalidSequence(String),
}Expand description
Rejections of the session-level controlled operations. Pure state guards — every variant is deterministic from the aggregate’s facts.
Variants§
TurnAlreadyActive
An open (unsealed) active turn exists; seal-then-commit or abort it first.
TurnAlreadySealed
The active turn is already sealed; commit or abort it before starting a new one.
NoActiveTurn
The operation needs an active turn (e.g. frame), but the slot is empty.
UnknownTurn(TurnId)
The given turn id is not the active turn — including a repeated commit after the slot was cleared.
DuplicateTurnId(TurnId)
begin_turn with an id already present in committed history.
TurnNotCompleted(TurnId)
commit on a turn that is not sealed-and-Completed.
TurnPaused(TurnId)
commit on a paused turn; resume it or abort it instead.
NotPaused(TurnId)
The turn is not paused (no Paused stamp), so it cannot be resumed.
InvalidSequence(String)
Replay validation failed in from_history; carries the reason
(non-monotonic TurnSequence, a duplicate turn id, or a
block-level violation).
Trait Implementations§
Source§impl Clone for ConversationError
impl Clone for ConversationError
Source§fn clone(&self) -> ConversationError
fn clone(&self) -> ConversationError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConversationError
impl Debug for ConversationError
Source§impl Display for ConversationError
impl Display for ConversationError
impl Eq for ConversationError
Source§impl Error for ConversationError
impl Error for ConversationError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()