pub enum ValidationDirective {
    Strict,
    Warn,
    Ignore,
}
Expand description

The validation directive to use for fieldValidation when using server-side apply.

Variants

Strict

Strict mode will fail any invalid manifests.

This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Warn

Warn mode will return a warning for invalid manifests.

This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields.

Ignore

Ignore mode will silently ignore any problems.

This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters.

Implementations

Returns the string format of the directive

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

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

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.