pub struct CordisError { /* private fields */ }Expand description
Error type used throughout the framework.
Implementations§
Source§impl CordisError
impl CordisError
Sourcepub fn with_message(code: ErrorCode, message: impl Into<String>) -> Self
pub fn with_message(code: ErrorCode, message: impl Into<String>) -> Self
Construct an error with a custom message.
Sourcepub fn with_source(
code: ErrorCode,
message: impl Into<String>,
source: impl Error + Send + Sync + 'static,
) -> Self
pub fn with_source( code: ErrorCode, message: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> Self
Construct an error wrapping an underlying cause.
Sourcepub fn validation(issues: impl IntoIterator<Item = ValidationIssue>) -> Self
pub fn validation(issues: impl IntoIterator<Item = ValidationIssue>) -> Self
Convert validation issues to a Cordis error.
Sourcepub fn validation_error(&self) -> Option<&ValidationError>
pub fn validation_error(&self) -> Option<&ValidationError>
Return validation details when this is an invalid-config error.
Trait Implementations§
Source§impl Clone for CordisError
impl Clone for CordisError
Source§fn clone(&self) -> CordisError
fn clone(&self) -> CordisError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CordisError
impl Debug for CordisError
Source§impl Display for CordisError
impl Display for CordisError
Source§impl Error for CordisError
impl Error for CordisError
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 From<&str> for CordisError
impl From<&str> for CordisError
Source§impl From<String> for CordisError
impl From<String> for CordisError
Source§impl From<ValidationError> for CordisError
impl From<ValidationError> for CordisError
Source§fn from(value: ValidationError) -> Self
fn from(value: ValidationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for CordisError
impl !UnwindSafe for CordisError
impl Freeze for CordisError
impl Send for CordisError
impl Sync for CordisError
impl Unpin for CordisError
impl UnsafeUnpin for CordisError
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