pub enum ValidationErrorKind {
Show 13 variants
UnexpectedRuntimeError,
EmptySelection,
InvalidArgumentType,
InvalidArgumentValue,
SomeFieldsMissing,
TooManyFieldsGiven,
SelectionSetOnScalar,
RequiredArgumentMissing,
Union,
UnknownArgument,
UnknownInputField,
UnknownSelectionField,
ValueTooLarge,
}Variants§
UnexpectedRuntimeError
EmptySelection
InvalidArgumentType
InvalidArgumentValue
SomeFieldsMissing
TooManyFieldsGiven
SelectionSetOnScalar
RequiredArgumentMissing
See ValidationError::required_argument_missing and
ValidationError::conditionally_required_argument_missing
Union
UnknownArgument
UnknownInputField
UnknownSelectionField
ValueTooLarge
Implementations§
Source§impl ValidationErrorKind
impl ValidationErrorKind
Sourcepub fn code(&self) -> &'static str
pub fn code(&self) -> &'static str
Returns the appropriate code code for the different validation errors.
TODO: Ideally each all validation errors should have the same error code (P2009), or distinct type each of them should have an individual error code. For the time being, we keep the semantics documented in the error reference as users might be relying on the error codes when subscribing to error events. Otherwise, we could be introducing a breaking change.
Trait Implementations§
Source§impl Debug for ValidationErrorKind
impl Debug for ValidationErrorKind
Auto Trait Implementations§
impl Freeze for ValidationErrorKind
impl RefUnwindSafe for ValidationErrorKind
impl Send for ValidationErrorKind
impl Sync for ValidationErrorKind
impl Unpin for ValidationErrorKind
impl UnsafeUnpin for ValidationErrorKind
impl UnwindSafe for ValidationErrorKind
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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