pub enum SchemaError {
ValidationFailed {
schema_name: String,
errors: Vec<String>,
},
SchemaNotFound {
schema_name: String,
},
InvalidDefinition {
schema_name: String,
reason: String,
},
VersionMismatch {
expected: String,
actual: String,
},
}
Expand description
Structured schema validation error types
Variants§
Implementations§
Source§impl SchemaError
impl SchemaError
pub fn validation_failed( schema_name: impl Into<String>, errors: Vec<String>, ) -> Self
pub fn schema_not_found(schema_name: impl Into<String>) -> Self
pub fn invalid_definition( schema_name: impl Into<String>, reason: impl Into<String>, ) -> Self
pub fn version_mismatch( expected: impl Into<String>, actual: impl Into<String>, ) -> Self
Trait Implementations§
Source§impl Clone for SchemaError
impl Clone for SchemaError
Source§fn clone(&self) -> SchemaError
fn clone(&self) -> SchemaError
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 SchemaError
impl Debug for SchemaError
Source§impl<'de> Deserialize<'de> for SchemaError
impl<'de> Deserialize<'de> for SchemaError
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 SchemaError
impl Display for SchemaError
Source§impl Error for SchemaError
impl Error for SchemaError
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 From<SchemaError> for RustChainError
impl From<SchemaError> for RustChainError
Source§fn from(source: SchemaError) -> Self
fn from(source: SchemaError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SchemaError
impl RefUnwindSafe for SchemaError
impl Send for SchemaError
impl Sync for SchemaError
impl Unpin for SchemaError
impl UnwindSafe for SchemaError
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more