pub enum DomainError {
AgentNotFound(String),
DomainNotFound(String),
KnowledgeNotFound(String),
ContextError(String),
ConflictError(String),
ConfigError(String),
CoordinationError(String),
InvalidInput(String),
SerializationError(String),
Internal(String),
}Expand description
Errors that can occur during domain agent operations
Variants§
AgentNotFound(String)
Domain agent not found
DomainNotFound(String)
Domain not found
KnowledgeNotFound(String)
Knowledge not found
ContextError(String)
Context error
ConflictError(String)
Conflict error
ConfigError(String)
Configuration error
CoordinationError(String)
Coordination error
InvalidInput(String)
Invalid input
SerializationError(String)
Serialization error
Internal(String)
Internal error
Implementations§
Source§impl DomainError
impl DomainError
Sourcepub fn agent_not_found(domain: impl Into<String>) -> Self
pub fn agent_not_found(domain: impl Into<String>) -> Self
Create a new AgentNotFound error
Sourcepub fn domain_not_found(domain: impl Into<String>) -> Self
pub fn domain_not_found(domain: impl Into<String>) -> Self
Create a new DomainNotFound error
Sourcepub fn knowledge_not_found(knowledge: impl Into<String>) -> Self
pub fn knowledge_not_found(knowledge: impl Into<String>) -> Self
Create a new KnowledgeNotFound error
Sourcepub fn context_error(reason: impl Into<String>) -> Self
pub fn context_error(reason: impl Into<String>) -> Self
Create a new ContextError
Sourcepub fn conflict_error(reason: impl Into<String>) -> Self
pub fn conflict_error(reason: impl Into<String>) -> Self
Create a new ConflictError
Sourcepub fn config_error(reason: impl Into<String>) -> Self
pub fn config_error(reason: impl Into<String>) -> Self
Create a new ConfigError
Sourcepub fn coordination_error(reason: impl Into<String>) -> Self
pub fn coordination_error(reason: impl Into<String>) -> Self
Create a new CoordinationError
Sourcepub fn invalid_input(reason: impl Into<String>) -> Self
pub fn invalid_input(reason: impl Into<String>) -> Self
Create a new InvalidInput error
Sourcepub fn serialization_error(reason: impl Into<String>) -> Self
pub fn serialization_error(reason: impl Into<String>) -> Self
Create a new SerializationError
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 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.