pub enum CodecError {
Show 22 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,
},
DuplicateUpdateEncoding,
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,
},
SessionMissing,
SessionInitInvalid,
SessionUnsupportedMode {
mode: u8,
},
SessionOutOfOrder {
previous: u32,
current: 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: SectionTagDuplicateUpdateEncoding
Multiple update encodings present in one packet.
BaselineTickMismatch
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.
SessionMissing
Missing session state for compact packets.
SessionInitInvalid
Session init packet was invalid.
SessionUnsupportedMode
Session compact header mode is unsupported.
SessionOutOfOrder
Session packets arrived out of order.
Implementations§
Source§impl CodecError
impl CodecError
Sourcepub fn needs_resync(&self) -> bool
pub fn needs_resync(&self) -> bool
Returns true if the error indicates the client should resync via a
session init + full snapshot.
Trait Implementations§
Source§impl Clone for CodecError
impl Clone for CodecError
Source§fn clone(&self) -> CodecError
fn clone(&self) -> CodecError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more