pub enum ValidationDirective {
Strict,
Warn,
Ignore,
}
client
only.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§
Trait Implementations§
Source§impl Clone for ValidationDirective
impl Clone for ValidationDirective
Source§fn clone(&self) -> ValidationDirective
fn clone(&self) -> ValidationDirective
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for ValidationDirective
impl RefUnwindSafe for ValidationDirective
impl Send for ValidationDirective
impl Sync for ValidationDirective
impl Unpin for ValidationDirective
impl UnwindSafe for ValidationDirective
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more