pub enum FormatError {
BadMagic,
UnsupportedVersion,
Truncated,
Unaligned,
InvalidNodeIndex,
InvalidFeatureIndex,
MisalignedTreeOffset,
}Expand description
Errors that can occur when parsing or validating a packed ensemble binary.
Variants§
BadMagic
Magic bytes do not match "IRIT" (0x54495249 LE).
UnsupportedVersion
Format version is not supported by this build.
Truncated
Input buffer is too short to contain the declared structures.
Unaligned
Input buffer pointer is not aligned to 4 bytes.
InvalidNodeIndex
A node’s child index points outside the node array bounds.
InvalidFeatureIndex
A node references a feature index >= n_features.
MisalignedTreeOffset
A tree entry’s byte offset is not aligned to size_of::<PackedNode>().
Trait Implementations§
Source§impl Clone for FormatError
impl Clone for FormatError
Source§fn clone(&self) -> FormatError
fn clone(&self) -> FormatError
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 FormatError
impl Debug for FormatError
Source§impl Display for FormatError
impl Display for FormatError
Source§impl Hash for FormatError
impl Hash for FormatError
Source§impl PartialEq for FormatError
impl PartialEq for FormatError
impl Copy for FormatError
impl Eq for FormatError
impl StructuralPartialEq for FormatError
Auto Trait Implementations§
impl Freeze for FormatError
impl RefUnwindSafe for FormatError
impl Send for FormatError
impl Sync for FormatError
impl Unpin for FormatError
impl UnsafeUnpin for FormatError
impl UnwindSafe for FormatError
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