pub enum ReadError {
MissingRequiredFields {
missing_mask: u64,
meta: &'static [(&'static str, u16, u8)],
},
InvalidValue {
name: &'static str,
tag: u16,
msg: &'static str,
},
}Expand description
Strict parse error type for generated read() APIs.
This error type is designed for high-performance parsing scenarios where detailed error information is needed for debugging and validation.
Variants§
MissingRequiredFields
Aggregated (bitmask) missing required members: fields (kind=0), components (kind=1), groups (kind=2).
The meta slice layout is: (name, tag_or_count_tag, kind)
Fields
InvalidValue
Invalid value encountered during parsing
Implementations§
Source§impl ReadError
impl ReadError
Sourcepub fn missing_member_names(&self) -> Option<Vec<&'static str>>
pub fn missing_member_names(&self) -> Option<Vec<&'static str>>
Returns the list of names of missing required members when this is
ReadError::MissingRequiredFields.
Returns Some(Vec::new()) if the variant is present but no bits are
actually missing (mask == 0), and None for other variants.
Trait Implementations§
Source§impl Error for ReadError
impl Error for ReadError
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()
Auto Trait Implementations§
impl Freeze for ReadError
impl RefUnwindSafe for ReadError
impl Send for ReadError
impl Sync for ReadError
impl Unpin for ReadError
impl UnwindSafe for ReadError
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