#[non_exhaustive]pub enum CodecError {
RecursiveDataType {
cycle: String,
},
NestingTooDeep {
data_type: String,
limit: usize,
},
UnknownDataType {
name: String,
},
UnknownHandle {
kind: &'static str,
handle: u32,
},
NotAMember {
kind: &'static str,
class: String,
member: String,
},
Encode(Box<Failure>),
Decode(Box<Failure>),
}Expand description
Errors of FomCodec.
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.
RecursiveDataType
A data type of the FDD contains itself. cycle lists the names: Node -> NodeList -> Node.
Fields
NestingTooDeep
Data types nest deeper than the codec accepts.
UnknownDataType
The FDD has no data type of this name.
UnknownHandle
A handle is outside the tables of the FDD the codec was built from.
Fields
NotAMember
A name or handle is not an available attribute (parameter) of the class.
Fields
Encode(Box<Failure>)
A value cannot be encoded as its data type.
Decode(Box<Failure>)
Octets cannot be decoded as the data type.
Implementations§
Source§impl CodecError
impl CodecError
Sourcepub fn failure(&self) -> Option<&Failure>
pub fn failure(&self) -> Option<&Failure>
The place and reason of an CodecError::Encode or CodecError::Decode error.
Trait Implementations§
Source§impl Clone for CodecError
impl Clone for CodecError
Source§impl Debug for CodecError
impl Debug for CodecError
Source§impl Display for CodecError
impl Display for CodecError
impl Eq for CodecError
Source§impl Error for CodecError
impl Error for CodecError
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 From<CodecError> for RtiError
CouldNotEncode and CouldNotDecode for values, InconsistentFOM for data type tables the codec
rejects, RTIinternalError for names and handles the FDD does not have.
impl From<CodecError> for RtiError
CouldNotEncode and CouldNotDecode for values, InconsistentFOM for data type tables the codec
rejects, RTIinternalError for names and handles the FDD does not have.
Source§fn from(error: CodecError) -> Self
fn from(error: CodecError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CodecError
impl PartialEq for CodecError
impl StructuralPartialEq for CodecError
Auto Trait Implementations§
impl Forget for CodecError
impl Freeze for CodecError
impl Move for CodecError
impl RefUnwindSafe for CodecError
impl Send for CodecError
impl Sync for CodecError
impl Unpin for CodecError
impl UnsafeUnpin for CodecErrorwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
&'static str: UnsafeUnpin,
*const Failure is !null: UnsafeUnpin,
PhantomData<Failure>: UnsafeUnpin,
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