pub enum DomainError {
Show 13 variants
InvalidFactId(String),
UnsafeMemoryKey(String),
InvalidSessionId(String),
ConfidenceOutOfRange(f32),
HeatOutOfRange(f32),
CosineOutOfRange(f32),
EmptyFactContent,
EmptyEmbedding,
InvalidTimestamp(String),
IllegalStatusTransition {
from: FactStatus,
to: FactStatus,
},
ConfidenceBelowAcceptThreshold {
threshold: f32,
actual: f32,
},
ValidUntilBeforeValidFrom {
from: Timestamp,
until: Timestamp,
},
SelfConflict(FactId),
}Expand description
All invariants and parse failures the domain layer can report.
Variants are intentionally exhaustive: each one corresponds to a single well-defined invariant of a value object or aggregate. Callers match exhaustively so the compiler flags any new invariant we forget to handle.
Variants§
InvalidFactId(String)
UnsafeMemoryKey(String)
InvalidSessionId(String)
ConfidenceOutOfRange(f32)
HeatOutOfRange(f32)
CosineOutOfRange(f32)
EmptyFactContent
EmptyEmbedding
InvalidTimestamp(String)
IllegalStatusTransition
ConfidenceBelowAcceptThreshold
ValidUntilBeforeValidFrom
SelfConflict(FactId)
Trait Implementations§
Source§impl Debug for DomainError
impl Debug for DomainError
Source§impl Display for DomainError
impl Display for DomainError
Source§impl Error for DomainError
impl Error for DomainError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for DomainError
impl RefUnwindSafe for DomainError
impl Send for DomainError
impl Sync for DomainError
impl Unpin for DomainError
impl UnsafeUnpin for DomainError
impl UnwindSafe for DomainError
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