#[non_exhaustive]pub enum EncoderError {
NoVariantForDiscriminant,
TooManyElements {
count: usize,
},
AlternativeTooLong {
length: usize,
},
TypeMismatch {
context: &'static str,
},
IndexOutOfRange {
index: usize,
size: usize,
},
InvalidValue {
type_name: &'static str,
detail: String,
},
}Expand description
Reasons why a value cannot be encoded.
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.
NoVariantForDiscriminant
A variant record has no alternative registered for its active discriminant.
TooManyElements
An array, string or octet sequence has more elements than the signed 32-bit element count can hold.
AlternativeTooLong
The alternative of an HLAextendableVariantRecord is longer than its 32-bit length field allows.
TypeMismatch
An element does not have the type its container requires.
IndexOutOfRange
An index is outside a container.
InvalidValue
A value is outside the range of its datatype (for example a non-ASCII character).
Trait Implementations§
Source§impl Clone for EncoderError
impl Clone for EncoderError
Source§impl Debug for EncoderError
impl Debug for EncoderError
Source§impl Display for EncoderError
impl Display for EncoderError
impl Eq for EncoderError
Source§impl Error for EncoderError
impl Error for EncoderError
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<EncoderError> for RtiError
impl From<EncoderError> for RtiError
Source§fn from(error: EncoderError) -> Self
fn from(error: EncoderError) -> Self
Converts to this type from the input type.
Source§impl From<EncoderError> for Reason
impl From<EncoderError> for Reason
Source§fn from(source: EncoderError) -> Self
fn from(source: EncoderError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for EncoderError
impl PartialEq for EncoderError
impl StructuralPartialEq for EncoderError
Auto Trait Implementations§
impl Forget for EncoderError
impl Freeze for EncoderError
impl Move for EncoderError
impl RefUnwindSafe for EncoderError
impl Send for EncoderError
impl Sync for EncoderErrorwhere
RawVecInner: Sync,
impl Unpin for EncoderError
impl UnsafeUnpin for EncoderError
impl UnwindSafe for EncoderError
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