pub enum PartialFormatErrorKind {
TooShort {
observed: usize,
minimum: usize,
},
WrongMagic {
found: [u8; 4],
},
WrongVersion {
expected: u8,
found: u8,
},
Crc,
ParadigmMismatch {
expected: u8,
found: u8,
},
KernelMismatch {
expected: u32,
found: u32,
},
GridMismatch {
detail: String,
},
ParityMismatch {
expected: u8,
found: u8,
},
RkyvDecode {
detail: String,
},
Internal {
detail: String,
},
}Expand description
Sub-discriminator for PartialError::Format. The validation
pipeline runs cheapest-first, so the variant also indicates how
far the validator got before tripping.
Tag stability is part of the public Python surface. The
snake_case Self::tag strings appear on the FFI exception’s
kind attribute and are asserted against in the parity test
suite. Renames require a coordinated stub + test update.
Variants§
TooShort
Length too short to contain even the framing header.
WrongMagic
Magic-bytes prefix did not match b"VRPS".
WrongVersion
format_version byte did not match the receiving rank’s
compiled-in crate::envelope::FORMAT_VERSION.
Crc
CRC32 footer did not match. Truncation, transport corruption, or hand-crafted payload.
ParadigmMismatch
paradigm_kind byte did not match. Means the partial belongs
to a different paradigm (e.g., a semantic partial loaded by
an instance evaluator).
KernelMismatch
discriminator did not match within a paradigm. For instance:
merging a bbox partial into a segm evaluator. Each paradigm
defines its own discriminator semantics; the value is opaque
to this crate.
The tag "kernel_mismatch" is preserved for backward
compatibility with ADR-0031 v1 instance partials.
Fields
GridMismatch
Header shape_fingerprint did not match. Each paradigm
interprets the four u32 slots: instance uses
(n_categories, n_area_ranges, n_images, retain_iou),
semantic uses (n_classes, 0, n_images, 0), panoptic uses
(n_categories, 0, n_images, things_stuff_split).
The tag "grid_mismatch" is preserved for backward
compatibility with ADR-0031 v1 instance partials.
ParityMismatch
parity_mode byte did not match.
Fields
RkyvDecode
rkyv archive validation refused the payload. Pointer offsets out of range, bad enum tag, etc.
Internal
Catch-all for internal-state failures that need to surface
through the partial-error vocabulary because they share the
FFI exception class but aren’t framing-related: e.g., a
background worker that was shut down before the FFI call
reached it, or an op invoked after finalize. Distinct from
Self::RkyvDecode so users don’t see a misleading
“rkyv_decode” tag for a non-archive failure.
Implementations§
Trait Implementations§
Source§impl Clone for PartialFormatErrorKind
impl Clone for PartialFormatErrorKind
Source§fn clone(&self) -> PartialFormatErrorKind
fn clone(&self) -> PartialFormatErrorKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PartialFormatErrorKind
impl Debug for PartialFormatErrorKind
Source§impl Display for PartialFormatErrorKind
impl Display for PartialFormatErrorKind
Source§impl Error for PartialFormatErrorKind
impl Error for PartialFormatErrorKind
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for PartialFormatErrorKind
impl PartialEq for PartialFormatErrorKind
Source§fn eq(&self, other: &PartialFormatErrorKind) -> bool
fn eq(&self, other: &PartialFormatErrorKind) -> bool
self and other values to be equal, and is used by ==.impl Eq for PartialFormatErrorKind
impl StructuralPartialEq for PartialFormatErrorKind
Auto Trait Implementations§
impl Freeze for PartialFormatErrorKind
impl RefUnwindSafe for PartialFormatErrorKind
impl Send for PartialFormatErrorKind
impl Sync for PartialFormatErrorKind
impl Unpin for PartialFormatErrorKind
impl UnsafeUnpin for PartialFormatErrorKind
impl UnwindSafe for PartialFormatErrorKind
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.