Trait rocfl::ocfl::ValidationResult
source · [−]pub trait ValidationResult {
fn has_errors(&self) -> bool;
fn has_warnings(&self) -> bool;
fn errors(&self) -> &[ValidationError];
fn warnings(&self) -> &[ValidationWarning];
fn errors_mut(&mut self) -> &mut Vec<ValidationError>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
;
fn warnings_mut(&mut self) -> &mut Vec<ValidationWarning>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
;
fn error(
&mut self,
location: ProblemLocation,
code: ErrorCode,
message: String
);
fn warn(
&mut self,
location: ProblemLocation,
code: WarnCode,
message: String
);
fn has_errors_or_warnings(&self) -> bool { ... }
}
Required methods
fn has_errors(&self) -> bool
fn has_errors(&self) -> bool
true
if errors were identified
fn has_warnings(&self) -> bool
fn has_warnings(&self) -> bool
true
if warnings were identified
fn errors(&self) -> &[ValidationError]
fn errors(&self) -> &[ValidationError]
The list of identified errors
fn warnings(&self) -> &[ValidationWarning]
fn warnings(&self) -> &[ValidationWarning]
The list of identified warnings
fn errors_mut(&mut self) -> &mut Vec<ValidationError>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn errors_mut(&mut self) -> &mut Vec<ValidationError>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
The list of identified errors
fn warnings_mut(&mut self) -> &mut Vec<ValidationWarning>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn warnings_mut(&mut self) -> &mut Vec<ValidationWarning>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
The list of identified warnings
fn error(&mut self, location: ProblemLocation, code: ErrorCode, message: String)
fn error(&mut self, location: ProblemLocation, code: ErrorCode, message: String)
Adds a new error
fn warn(&mut self, location: ProblemLocation, code: WarnCode, message: String)
fn warn(&mut self, location: ProblemLocation, code: WarnCode, message: String)
Adds a new warning
Provided methods
fn has_errors_or_warnings(&self) -> bool
fn has_errors_or_warnings(&self) -> bool
true
if errors or warnings were identified