pub struct SchemaValidator { /* private fields */ }
Expand description
JSON Schema validator for unsafe/FFI analysis data
Implementations§
Source§impl SchemaValidator
impl SchemaValidator
Sourcepub fn with_config(config: SchemaValidatorConfig) -> Self
pub fn with_config(config: SchemaValidatorConfig) -> Self
Create a new schema validator with custom configuration
Sourcepub fn validate_unsafe_ffi_analysis(
&self,
data: &Value,
) -> TrackingResult<ValidationResult>
pub fn validate_unsafe_ffi_analysis( &self, data: &Value, ) -> TrackingResult<ValidationResult>
Validate JSON data against the unsafe/FFI analysis schema
Sourcepub fn verify_integrity(
&self,
data: &Value,
expected_hash: &str,
) -> TrackingResult<bool>
pub fn verify_integrity( &self, data: &Value, expected_hash: &str, ) -> TrackingResult<bool>
Verify data integrity using provided hash
Sourcepub fn get_supported_versions(&self) -> &HashMap<String, SchemaVersion>
pub fn get_supported_versions(&self) -> &HashMap<String, SchemaVersion>
Get supported schema versions
Sourcepub fn add_custom_rule(&mut self, rule: CustomValidationRule)
pub fn add_custom_rule(&mut self, rule: CustomValidationRule)
Add custom validation rule
Source§impl SchemaValidator
Convenience functions for common validation tasks
impl SchemaValidator
Convenience functions for common validation tasks
Sourcepub fn without_integrity_check() -> Self
pub fn without_integrity_check() -> Self
Create a validator with integrity checking disabled
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SchemaValidator
impl RefUnwindSafe for SchemaValidator
impl Send for SchemaValidator
impl Sync for SchemaValidator
impl Unpin for SchemaValidator
impl UnwindSafe for SchemaValidator
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more