pub enum ModelError {
InvalidSnapshotId(String),
UnsupportedSchemaVersion(String),
SerializationError(String),
DeserializationError(String),
}Expand description
Errors that can occur when working with models.
This enum covers all error cases for model operations including:
- Invalid snapshot identifier parsing
- Unsupported schema versions
- Serialization/deserialization failures
Variants§
InvalidSnapshotId(String)
Invalid snapshot identifier format.
The snapshot identifier could not be parsed. Valid formats are:
{language}{project}_namespace_{number} (e.g., “enwiki_namespace_0”)
UnsupportedSchemaVersion(String)
Unsupported schema version.
The schema version in an envelope is not supported by this library.
See crate::envelope::SUPPORTED_SCHEMA_VERSIONS for supported versions.
SerializationError(String)
Serialization error.
Failed to serialize a model to JSON.
DeserializationError(String)
Deserialization error.
Failed to deserialize JSON to a model.
Trait Implementations§
Source§impl Clone for ModelError
impl Clone for ModelError
Source§fn clone(&self) -> ModelError
fn clone(&self) -> ModelError
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 ModelError
impl Debug for ModelError
Source§impl Display for ModelError
impl Display for ModelError
Source§impl Error for ModelError
impl Error for ModelError
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 ModelError
impl PartialEq for ModelError
impl StructuralPartialEq for ModelError
Auto Trait Implementations§
impl Freeze for ModelError
impl RefUnwindSafe for ModelError
impl Send for ModelError
impl Sync for ModelError
impl Unpin for ModelError
impl UnsafeUnpin for ModelError
impl UnwindSafe for ModelError
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