pub enum IntentDispatchError {
Unauthorized {
reason: String,
},
ValidationFailed {
reason: String,
},
FlowBudgetExceeded {
reason: String,
},
JournalError {
reason: String,
},
ReactiveError {
reason: String,
},
InternalError {
reason: String,
},
}Expand description
Base error type for intent dispatch.
This provides common error variants that any intent system should support. Concrete implementations can wrap this or define their own more specific errors.
Variants§
The intent was not authorized
Fields
ValidationFailed
The intent failed validation
FlowBudgetExceeded
Flow budget exceeded
JournalError
Journal error during fact recording
ReactiveError
Reactive system error during state update
InternalError
Internal error during dispatch
Implementations§
Source§impl IntentDispatchError
impl IntentDispatchError
Create an unauthorized error
Sourcepub fn validation_failed(reason: impl Into<String>) -> IntentDispatchError
pub fn validation_failed(reason: impl Into<String>) -> IntentDispatchError
Create a validation error
Sourcepub fn flow_budget_exceeded(reason: impl Into<String>) -> IntentDispatchError
pub fn flow_budget_exceeded(reason: impl Into<String>) -> IntentDispatchError
Create a flow budget error
Sourcepub fn journal_error(reason: impl Into<String>) -> IntentDispatchError
pub fn journal_error(reason: impl Into<String>) -> IntentDispatchError
Create a journal error
Sourcepub fn reactive_error(reason: impl Into<String>) -> IntentDispatchError
pub fn reactive_error(reason: impl Into<String>) -> IntentDispatchError
Create a reactive error
Sourcepub fn internal_error(reason: impl Into<String>) -> IntentDispatchError
pub fn internal_error(reason: impl Into<String>) -> IntentDispatchError
Create an internal error
Trait Implementations§
Source§impl Clone for IntentDispatchError
impl Clone for IntentDispatchError
Source§fn clone(&self) -> IntentDispatchError
fn clone(&self) -> IntentDispatchError
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 Debug for IntentDispatchError
impl Debug for IntentDispatchError
Source§impl<'de> Deserialize<'de> for IntentDispatchError
impl<'de> Deserialize<'de> for IntentDispatchError
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<IntentDispatchError, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<IntentDispatchError, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for IntentDispatchError
impl Display for IntentDispatchError
Source§impl Error for IntentDispatchError
impl Error for IntentDispatchError
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 Serialize for IntentDispatchError
impl Serialize for IntentDispatchError
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for IntentDispatchError
impl RefUnwindSafe for IntentDispatchError
impl Send for IntentDispatchError
impl Sync for IntentDispatchError
impl Unpin for IntentDispatchError
impl UnsafeUnpin for IntentDispatchError
impl UnwindSafe for IntentDispatchError
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