#[non_exhaustive]pub enum CheckpointError {
Show 19 variants
NotInstalled(&'static str),
UnsupportedFormat {
found: u32,
},
RemovedComponent {
path: String,
},
Json(Error),
Serialize {
path: String,
source: Error,
},
Deserialize {
entity: usize,
path: String,
source: Error,
},
Unregistered {
entity: usize,
path: String,
},
HandlerKeyMismatch {
key: HandlerKey,
},
DuplicateSavedHandler {
key: HandlerKey,
},
DuplicateSuppliedHandler {
key: HandlerKey,
},
UnrequiredHandler {
key: HandlerKey,
},
MissingHandler {
key: HandlerKey,
},
MissingSavedHandler {
key: HandlerKey,
},
FamilyChanged {
key: HandlerKey,
saved: EffectFamily,
found: EffectFamily,
},
DescriptorChanged {
key: HandlerKey,
},
UnresumableStream,
Content(ContentError),
Binary(BinaryError),
InvalidGraph(&'static str),
}Expand description
Why a checkpoint cannot be saved, parsed, validated, or restored.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotInstalled(&'static str)
The world lacks a resource that RigPlugin installs.
UnsupportedFormat
The envelope is a format other than CHECKPOINT_FORMAT.
RemovedComponent
The checkpoint carries a component this format no longer persists.
Json(Error)
The checkpoint envelope does not serialize to or parse from JSON.
Serialize
A live component does not serialize through reflection.
Deserialize
A saved component does not deserialize as its registered type.
Fields
entity: usizeThe entity’s index in Checkpoint::entities.
Unregistered
A saved type path is not a component registered in the destination.
HandlerKeyMismatch
A saved handler’s binding key differs from its descriptor’s key.
Fields
key: HandlerKeyThe binding key.
DuplicateSavedHandler
Two saved handlers share a key.
Fields
key: HandlerKeyThe repeated key.
DuplicateSuppliedHandler
The host supplied two handlers for one key.
Fields
key: HandlerKeyThe repeated key.
UnrequiredHandler
The host supplied a handler the checkpoint does not require.
Fields
key: HandlerKeyThe supplied key.
MissingHandler
A required handler is neither supplied nor installed in the destination.
Fields
key: HandlerKeyThe required key.
MissingSavedHandler
An unfinished effect names a handler the checkpoint did not save.
Fields
key: HandlerKeyThe effect’s handler key.
FamilyChanged
A handler serves a different effect family than the saved one.
Fields
key: HandlerKeyThe handler key.
saved: EffectFamilyThe saved family.
found: EffectFamilyThe destination’s family.
DescriptorChanged
Under RestoreMode::Strict, a handler’s descriptor differs from the
saved one. RestoreMode::Replace accepts the change.
Fields
key: HandlerKeyThe handler key.
UnresumableStream
An unfinished stream already delivered progress and has no provider cursor.
Content(ContentError)
A saved utterance does not convert to a message.
Binary(BinaryError)
The saved binary store is invalid or conflicts with the destination’s.
InvalidGraph(&'static str)
The saved graph violates a structural invariant.
Trait Implementations§
Source§impl Debug for CheckpointError
impl Debug for CheckpointError
Source§impl Display for CheckpointError
impl Display for CheckpointError
Source§impl Error for CheckpointError
impl Error for CheckpointError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<BinaryError> for CheckpointError
impl From<BinaryError> for CheckpointError
Source§fn from(source: BinaryError) -> Self
fn from(source: BinaryError) -> Self
Source§impl From<ContentError> for CheckpointError
impl From<ContentError> for CheckpointError
Source§fn from(source: ContentError) -> Self
fn from(source: ContentError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for CheckpointError
impl !UnwindSafe for CheckpointError
impl Freeze for CheckpointError
impl Send for CheckpointError
impl Sync for CheckpointError
impl Unpin for CheckpointError
impl UnsafeUnpin for CheckpointError
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
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.