pub struct ValidationCtx { /* private fields */ }
Expand description

A context for collecting validation error.

This is responsible for tracking the position in the tree at which a given error is reported.

paths/locations

As validation travels down through the object graph, the path is recorded via appropriate calls to methods like in_table and in_field.

Implementations§

Run the provided closer in the context of a new table.

Errors reported in the closure will include the provided identifer in their path.

Run the provided closer in the context of a new field.

Errors reported in the closure will be associated with the field.

Run the provided closer in the context of an array.

Run the provided closer in the context of a new array item.

This must only be called in a closure passed to in_array.

Report a new error, associating it with the current path.

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

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

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Convert this type into T, using the provided data to resolve any offsets.
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.