Struct semval::context::Context[][src]

pub struct Context<V> where
    V: Invalidity
{ /* fields omitted */ }
Expand description

A collection of invalidities resulting from a validation

Collects invalidities that are detected while performing a validation.

Implementations

Create a new valid and empty context

Check if the context is still valid

Record a new invalidity within this context

Conditionally record a new invalidity within this context

Merge the results of another validation

Needed for collecting results from custom validation functions.

Merge the mapped results of another validation

Needed for collecting results from custom validation functions.

👎 Deprecated since 0.2.0:

Please use merge_result_with instead

Merge the mapped results of another validation

Validate the target and merge the result into this context

Validate the target and merge the mapped result into this context

👎 Deprecated since 0.2.0:

Please use validate_with instead

Validate the target, map the result, and merge it into this context

Finish the current validation of this context with a result

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Performs the conversion.

Transform the validation context into an iterator that yields all the collected invalidities.

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Convert self into output value and validate the output

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.