pub enum DomainError {
Show 18 variants
EntityNotFound {
entity_type: EntityType,
id: Uuid,
},
EntityAlreadyExists {
entity_type: EntityType,
id: Uuid,
},
EntityConflict {
entity_type: EntityType,
id: Uuid,
reason: String,
},
InvalidStateTransition {
entity_type: EntityType,
from_state: String,
to_state: String,
reason: String,
},
StaleData {
entity_type: EntityType,
id: Uuid,
expected_version: u64,
actual_version: u64,
},
ValidationFailed {
field: String,
reason: String,
},
ConstraintViolation {
constraint: String,
reason: String,
},
CircularReference {
entity_type: EntityType,
ids: Vec<Uuid>,
},
Contradiction {
artifact_a: Uuid,
artifact_b: Uuid,
description: String,
},
QuotaExceeded {
resource: String,
limit: u64,
requested: u64,
},
PermissionDenied {
agent_id: Uuid,
action: String,
resource: String,
},
LockAcquisitionFailed {
resource: String,
holder: Uuid,
},
LockExpired {
lock_id: Uuid,
},
DelegationFailed {
delegation_id: Uuid,
reason: String,
},
HandoffFailed {
handoff_id: Uuid,
reason: String,
},
ToolPolicyViolation {
tool_name: String,
policy: String,
reason: String,
},
PiiEgressViolation {
field: String,
pii_type: String,
reason: String,
},
PiiManifestInvalid {
violations: Vec<String>,
},
}Expand description
Domain-level errors that affect business logic.
These errors must be persisted and can affect downstream processing.
Variants§
EntityNotFound
EntityAlreadyExists
EntityConflict
InvalidStateTransition
StaleData
ValidationFailed
ConstraintViolation
CircularReference
Contradiction
QuotaExceeded
PermissionDenied
LockAcquisitionFailed
LockExpired
DelegationFailed
HandoffFailed
ToolPolicyViolation
PiiEgressViolation
PiiManifestInvalid
Implementations§
Trait Implementations§
Source§impl Clone for DomainError
impl Clone for DomainError
Source§fn clone(&self) -> DomainError
fn clone(&self) -> DomainError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ComposeSchema for DomainError
impl ComposeSchema for DomainError
Source§impl Debug for DomainError
impl Debug for DomainError
Source§impl<'de> Deserialize<'de> for DomainError
impl<'de> Deserialize<'de> for DomainError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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()
Source§impl PartialEq for DomainError
impl PartialEq for DomainError
Source§impl Serialize for DomainError
impl Serialize for DomainError
Source§impl ToSchema for DomainError
impl ToSchema for DomainError
impl StructuralPartialEq for DomainError
Auto Trait Implementations§
impl Freeze for DomainError
impl RefUnwindSafe for DomainError
impl Send for DomainError
impl Sync for DomainError
impl Unpin 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