Struct client_side_validation::Status
source · pub struct Status<R>where
R: ValidationReport,{
pub seal_issues: Vec<R::SealIssue>,
pub failures: Vec<R::Failure>,
pub warnings: Vec<R::Warning>,
pub info: Vec<R::Info>,
}
Expand description
Client-side-validation status containing all reports from the validation process
Fields§
§seal_issues: Vec<R::SealIssue>
List of seal resolver reported issues (see SealIssue
trait for
details).
failures: Vec<R::Failure>
Failures generated during client-side-validation.
When the failure happens, the process of client-side-validation is not stopped and proceeds to the rest of data items, such that there might be a multiple validation failures stored in this array.
Does not include issues from single-use-seal resolution, which are
stored in Status::seal_issues
and must be handled separately.
warnings: Vec<R::Warning>
Warnings generated during client-side-validation.
Warnings are issues which does not render client-side-validated data invalid, but which should be reported to the user anyway
See also ValidationReport::Warning
.
info: Vec<R::Info>
Information reports about client-side-validation, which do not affect data safety or validity and may not be presented to the user
See also ValidationReport::Info
.
Implementations§
source§impl<R> Status<R>where
R: ValidationReport,
impl<R> Status<R>where R: ValidationReport,
sourcepub fn from_failure(failure: R::Failure) -> Self
pub fn from_failure(failure: R::Failure) -> Self
Constructs status report from a single failure with the rest of log lists set to the empty state.
sourcepub fn add_seal_issue(&mut self, seal_issue: R::SealIssue) -> &Self
pub fn add_seal_issue(&mut self, seal_issue: R::SealIssue) -> &Self
Adds a single SealIssue
to the validation report logs
sourcepub fn add_failure(&mut self, failure: R::Failure) -> &Self
pub fn add_failure(&mut self, failure: R::Failure) -> &Self
Adds a single ValidationFailure
to the validation report logs
sourcepub fn add_warning(&mut self, warning: R::Warning) -> &Self
pub fn add_warning(&mut self, warning: R::Warning) -> &Self
Adds a single warning entry to the validation report logs. See
ValidationReport::Warning
for more details about warnings.
sourcepub fn add_info(&mut self, info: R::Info) -> &Self
pub fn add_info(&mut self, info: R::Info) -> &Self
Adds a single information record to the validation report logs. See
ValidationReport::Info
for more details about information log
entries.
sourcepub fn validity(&self) -> Validity
pub fn validity(&self) -> Validity
Returns validity of the client-side data deduced from the current status containing all reported issues.
Client-side data are valid (Validity::Valid
status) only and only if
the status report contains no validation failures and seal resolution
issues.
See also Validity
for the details of possible validation statuses.
Trait Implementations§
source§impl<R> AddAssign for Status<R>where
R: ValidationReport,
impl<R> AddAssign for Status<R>where R: ValidationReport,
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
+=
operation. Read moresource§impl<R> Clone for Status<R>where
R: ValidationReport + Clone,
R::SealIssue: Clone,
R::Failure: Clone,
R::Warning: Clone,
R::Info: Clone,
impl<R> Clone for Status<R>where R: ValidationReport + Clone, R::SealIssue: Clone, R::Failure: Clone, R::Warning: Clone, R::Info: Clone,
source§impl<R> Debug for Status<R>where
R: ValidationReport + Debug,
R::SealIssue: Debug,
R::Failure: Debug,
R::Warning: Debug,
R::Info: Debug,
impl<R> Debug for Status<R>where R: ValidationReport + Debug, R::SealIssue: Debug, R::Failure: Debug, R::Warning: Debug, R::Info: Debug,
source§impl<R> Default for Status<R>where
R: ValidationReport + Default,
R::SealIssue: Default,
R::Failure: Default,
R::Warning: Default,
R::Info: Default,
impl<R> Default for Status<R>where R: ValidationReport + Default, R::SealIssue: Default, R::Failure: Default, R::Warning: Default, R::Info: Default,
source§impl<'de, R> Deserialize<'de> for Status<R>where
R: ValidationReport,
impl<'de, R> Deserialize<'de> for Status<R>where R: ValidationReport,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl<R> FromIterator<<R as ValidationReport>::Failure> for Status<R>where
R: ValidationReport,
impl<R> FromIterator<<R as ValidationReport>::Failure> for Status<R>where R: ValidationReport,
source§impl<R> Hash for Status<R>where
R: ValidationReport + Hash,
R::SealIssue: Hash,
R::Failure: Hash,
R::Warning: Hash,
R::Info: Hash,
impl<R> Hash for Status<R>where R: ValidationReport + Hash, R::SealIssue: Hash, R::Failure: Hash, R::Warning: Hash, R::Info: Hash,
source§impl<R> PartialEq for Status<R>where
R: ValidationReport + PartialEq,
R::SealIssue: PartialEq,
R::Failure: PartialEq,
R::Warning: PartialEq,
R::Info: PartialEq,
impl<R> PartialEq for Status<R>where R: ValidationReport + PartialEq, R::SealIssue: PartialEq, R::Failure: PartialEq, R::Warning: PartialEq, R::Info: PartialEq,
source§impl<R> Serialize for Status<R>where
R: ValidationReport,
impl<R> Serialize for Status<R>where R: ValidationReport,
impl<R> Eq for Status<R>where R: ValidationReport + Eq, R::SealIssue: Eq, R::Failure: Eq, R::Warning: Eq, R::Info: Eq,
impl<R> StructuralEq for Status<R>where R: ValidationReport,
impl<R> StructuralPartialEq for Status<R>where R: ValidationReport,
Auto Trait Implementations§
impl<R> RefUnwindSafe for Status<R>where <R as ValidationReport>::Failure: RefUnwindSafe, <R as ValidationReport>::Info: RefUnwindSafe, <R as ValidationReport>::SealIssue: RefUnwindSafe, <R as ValidationReport>::Warning: RefUnwindSafe,
impl<R> Send for Status<R>where <R as ValidationReport>::Failure: Send, <R as ValidationReport>::Info: Send, <R as ValidationReport>::SealIssue: Send, <R as ValidationReport>::Warning: Send,
impl<R> Sync for Status<R>where <R as ValidationReport>::Failure: Sync, <R as ValidationReport>::Info: Sync, <R as ValidationReport>::SealIssue: Sync, <R as ValidationReport>::Warning: Sync,
impl<R> Unpin for Status<R>where <R as ValidationReport>::Failure: Unpin, <R as ValidationReport>::Info: Unpin, <R as ValidationReport>::SealIssue: Unpin, <R as ValidationReport>::Warning: Unpin,
impl<R> UnwindSafe for Status<R>where <R as ValidationReport>::Failure: UnwindSafe, <R as ValidationReport>::Info: UnwindSafe, <R as ValidationReport>::SealIssue: UnwindSafe, <R as ValidationReport>::Warning: UnwindSafe,
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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.