#[non_exhaustive]pub enum ValidationError {
EmptyField(&'static str),
TypeUidMismatch {
type_uid: u64,
class_uid: u32,
activity_id: u8,
},
ClassUidMismatch(u32),
BadCategory(u8),
BadCharterType(u8),
BadSeverity(u8),
BadStatus(u8),
BadActivityId(u8),
StopReasonPairMismatch,
ZeroTime,
}Expand description
A structural validation failure.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EmptyField(&'static str)
A required string field was empty.
TypeUidMismatch
type_uid doesn’t match class_uid * 100 + activity_id.
Fields
ClassUidMismatch(u32)
class_uid doesn’t match the class enum.
BadCategory(u8)
Event is not in the OCSF Application Activity category.
BadCharterType(u8)
Charter is not represented as an OCSF Regular File.
BadSeverity(u8)
Severity outside 1–6.
BadStatus(u8)
Status outside 0–2.
BadActivityId(u8)
Round-38 F3: activity_id must be < 100 or the
class_uid × 100 + activity_id bijection collapses:
class_uid=9901, activity_id=100 produces the same
type_uid = 990200 as class_uid=9902, activity_id=0,
so downstream SIEM pipelines routing/aggregating by
type_uid mis-classify. Not currently reachable via the
builder (defaults 1) but the field is #[non_exhaustive]
and constructable directly; enforce the bijection
invariant at validate time.
StopReasonPairMismatch
stop_reason caption present without id (or vice versa).
ZeroTime
Timestamp is zero.
Trait Implementations§
Source§impl Debug for ValidationError
impl Debug for ValidationError
Source§impl Display for ValidationError
impl Display for ValidationError
Source§impl Error for ValidationError
impl Error for ValidationError
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 ValidationError
impl PartialEq for ValidationError
Source§fn eq(&self, other: &ValidationError) -> bool
fn eq(&self, other: &ValidationError) -> bool
self and other values to be equal, and is used by ==.impl Eq for ValidationError
impl StructuralPartialEq for ValidationError
Auto Trait Implementations§
impl Freeze for ValidationError
impl RefUnwindSafe for ValidationError
impl Send for ValidationError
impl Sync for ValidationError
impl Unpin for ValidationError
impl UnsafeUnpin for ValidationError
impl UnwindSafe for ValidationError
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.