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,

source

pub fn new() -> Self

Constructs empty status report

source

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.

source

pub fn add_seal_issue(&mut self, seal_issue: R::SealIssue) -> &Self

Adds a single SealIssue to the validation report logs

source

pub fn add_failure(&mut self, failure: R::Failure) -> &Self

Adds a single ValidationFailure to the validation report logs

source

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.

source

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.

source

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,

source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
source§

impl<R> Clone for Status<R>where R: ValidationReport + Clone, R::SealIssue: Clone, R::Failure: Clone, R::Warning: Clone, R::Info: Clone,

source§

fn clone(&self) -> Status<R>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<R> Debug for Status<R>where R: ValidationReport + Debug, R::SealIssue: Debug, R::Failure: Debug, R::Warning: Debug, R::Info: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<R> Default for Status<R>where R: ValidationReport + Default, R::SealIssue: Default, R::Failure: Default, R::Warning: Default, R::Info: Default,

source§

fn default() -> Status<R>

Returns the “default value” for a type. Read more
source§

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>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<R> FromIterator<<R as ValidationReport>::Failure> for Status<R>where R: ValidationReport,

source§

fn from_iter<T: IntoIterator<Item = R::Failure>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl<R> Hash for Status<R>where R: ValidationReport + Hash, R::SealIssue: Hash, R::Failure: Hash, R::Warning: Hash, R::Info: Hash,

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<R> PartialEq for Status<R>where R: ValidationReport + PartialEq, R::SealIssue: PartialEq, R::Failure: PartialEq, R::Warning: PartialEq, R::Info: PartialEq,

source§

fn eq(&self, other: &Status<R>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<R> Serialize for Status<R>where R: ValidationReport,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<R> Eq for Status<R>where R: ValidationReport + Eq, R::SealIssue: Eq, R::Failure: Eq, R::Warning: Eq, R::Info: Eq,

source§

impl<R> StructuralEq for Status<R>where R: ValidationReport,

source§

impl<R> StructuralPartialEq for Status<R>where R: ValidationReport,

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> VerifyEq for Twhere T: Eq,

source§

fn verify_eq(&self, other: &T) -> bool

Verifies commit-equivalence of two instances of the same type.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,