Enum DatapackSnapshotError
#[non_exhaustive]pub enum DatapackSnapshotError {
Malformed,
TooLarge,
UnknownRegistry {
registry: String,
},
SchemaMismatch {
registry: String,
},
MissingRegistry {
registry: String,
},
InvalidEntry {
registry: String,
entry: String,
},
Unresolved(Box<DatapackLoadError>),
}Expand description
Why a snapshot was refused. A refused snapshot activates nothing.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Malformed
The bytes are not a snapshot, or are more than MAX_SNAPSHOT_BYTES.
TooLarge
More registries or entries than MAX_SNAPSHOT_REGISTRIES and MAX_SNAPSHOT_ENTRIES.
UnknownRegistry
The snapshot has a registry this side did not declare.
SchemaMismatch
This side declared the registry with a different schema, or the snapshot lists it twice.
MissingRegistry
This side declared the registry as required and the snapshot has none of it.
InvalidEntry
An entry is not a valid id, is listed twice, or has a value its field refuses.
Unresolved(Box<DatapackLoadError>)
A reference names an entry the snapshot does not have.
Trait Implementations§
§impl Clone for DatapackSnapshotError
impl Clone for DatapackSnapshotError
§fn clone(&self) -> DatapackSnapshotError
fn clone(&self) -> DatapackSnapshotError
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 more§impl Debug for DatapackSnapshotError
impl Debug for DatapackSnapshotError
§impl PartialEq for DatapackSnapshotError
impl PartialEq for DatapackSnapshotError
impl StructuralPartialEq for DatapackSnapshotError
Auto Trait Implementations§
impl Freeze for DatapackSnapshotError
impl RefUnwindSafe for DatapackSnapshotError
impl Send for DatapackSnapshotError
impl Sync for DatapackSnapshotError
impl Unpin for DatapackSnapshotError
impl UnsafeUnpin for DatapackSnapshotError
impl UnwindSafe for DatapackSnapshotError
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