pub struct ReferenceValidation {
pub is_valid: bool,
pub errors: Vec<String>,
pub warnings: Vec<String>,
pub total_references: usize,
pub resource_count: usize,
pub release_count: usize,
pub deal_count: usize,
}Expand description
Reference validation result
Comprehensive validation report for all references generated during streaming DDEX XML creation, including error detection and statistics.
§Example
use ddex_builder::streaming::reference_manager::StreamingReferenceManager;
let mut manager = StreamingReferenceManager::new();
// ... generate resources and releases ...
let validation = manager.validate_references();
if !validation.is_valid {
for error in &validation.errors {
eprintln!("Validation error: {}", error);
}
}
for warning in &validation.warnings {
println!("Warning: {}", warning);
}
println!("Validated {} total references ({} resources, {} releases, {} deals)",
validation.total_references,
validation.resource_count,
validation.release_count,
validation.deal_count);Fields§
§is_valid: boolWhether all references are valid (no errors found)
errors: Vec<String>List of validation errors found during reference checking
warnings: Vec<String>List of warnings generated (non-fatal issues)
total_references: usizeTotal number of references checked during validation
resource_count: usizeNumber of resource references validated
release_count: usizeNumber of release references validated
deal_count: usizeNumber of deal references validated
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReferenceValidation
impl RefUnwindSafe for ReferenceValidation
impl Send for ReferenceValidation
impl Sync for ReferenceValidation
impl Unpin for ReferenceValidation
impl UnwindSafe for ReferenceValidation
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