pub enum ViolationKind {
ConfigMismatch,
PolicyConflict,
DuplicateId,
DimensionMismatch,
}Expand description
Category of a policy or configuration violation detected by the corpus.
The as_python_tag strings must match Python’s violation_type field
exactly for cross-language parity.
Variants§
ConfigMismatch
The supplied CodecConfig hash does not match the corpus’s config.
PolicyConflict
An operation conflicts with the corpus’s compression policy.
DuplicateId
A vector with the same id already exists in the corpus.
DimensionMismatch
The supplied vector’s dimension does not match the corpus’s dimension.
Implementations§
Source§impl ViolationKind
impl ViolationKind
Sourcepub const fn as_python_tag(self) -> &'static str
pub const fn as_python_tag(self) -> &'static str
Returns the canonical Python violation_type string for this kind.
These strings are part of the public API contract; do not change them without updating the Python counterpart.
Trait Implementations§
Source§impl Clone for ViolationKind
impl Clone for ViolationKind
Source§fn clone(&self) -> ViolationKind
fn clone(&self) -> ViolationKind
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 ViolationKind
impl Debug for ViolationKind
Source§impl Hash for ViolationKind
impl Hash for ViolationKind
Source§impl PartialEq for ViolationKind
impl PartialEq for ViolationKind
impl Copy for ViolationKind
impl Eq for ViolationKind
impl StructuralPartialEq for ViolationKind
Auto Trait Implementations§
impl Freeze for ViolationKind
impl RefUnwindSafe for ViolationKind
impl Send for ViolationKind
impl Sync for ViolationKind
impl Unpin for ViolationKind
impl UnsafeUnpin for ViolationKind
impl UnwindSafe for ViolationKind
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