pub enum CodecError {
Show 17 variants
Wire(DecodeError),
Bitstream(BitError),
OutputTooSmall {
needed: usize,
available: usize,
},
SchemaMismatch {
expected: u64,
found: u64,
},
LimitsExceeded {
kind: LimitKind,
limit: usize,
actual: usize,
},
InvalidMask {
kind: MaskKind,
reason: MaskReason,
},
InvalidValue {
component: ComponentId,
field: FieldId,
reason: ValueReason,
},
InvalidEntityOrder {
previous: u32,
current: u32,
},
TrailingSectionData {
section: SectionTag,
remaining_bits: usize,
},
UnexpectedSection {
section: SectionTag,
},
DuplicateSection {
section: SectionTag,
},
BaselineTickMismatch {
expected: u32,
found: u32,
},
BaselineNotFound {
requested_tick: u32,
},
EntityNotFound {
entity_id: u32,
},
ComponentNotFound {
entity_id: u32,
component_id: u16,
},
DuplicateEntity {
entity_id: u32,
},
EntityAlreadyExists {
entity_id: u32,
},
}Expand description
Errors that can occur during snapshot/delta encoding/decoding.
Variants§
Wire(DecodeError)
Wire format error.
Bitstream(BitError)
Bitstream error.
OutputTooSmall
Output buffer is too small.
SchemaMismatch
Schema hash mismatch.
LimitsExceeded
Limits exceeded.
InvalidMask
Invalid mask data.
InvalidValue
Invalid field value for the schema.
InvalidEntityOrder
Entities are not provided in deterministic order.
TrailingSectionData
Section body had trailing bits after parsing.
UnexpectedSection
Unexpected section for the current packet type.
Fields
§
section: SectionTagDuplicateSection
Duplicate section encountered.
Fields
§
section: SectionTagBaselineTickMismatch
Baseline tick does not match the packet.
BaselineNotFound
Baseline tick not found in history.
EntityNotFound
Entity not found when applying delta.
ComponentNotFound
Component not found when applying delta.
DuplicateEntity
Duplicate entity in create section.
EntityAlreadyExists
Entity already exists when creating.
Trait Implementations§
Source§impl Clone for CodecError
impl Clone for CodecError
Source§fn clone(&self) -> CodecError
fn clone(&self) -> CodecError
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 CodecError
impl Debug for CodecError
Source§impl Display for CodecError
impl Display for CodecError
Source§impl Error for CodecError
impl Error for CodecError
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<BitError> for CodecError
impl From<BitError> for CodecError
Source§impl From<DecodeError> for CodecError
impl From<DecodeError> for CodecError
Source§fn from(err: DecodeError) -> Self
fn from(err: DecodeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CodecError
impl PartialEq for CodecError
impl Eq for CodecError
impl StructuralPartialEq for CodecError
Auto Trait Implementations§
impl Freeze for CodecError
impl RefUnwindSafe for CodecError
impl Send for CodecError
impl Sync for CodecError
impl Unpin for CodecError
impl UnwindSafe for CodecError
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