Struct async_graphql::InputValueError
source · [−]pub struct InputValueError<T> { /* private fields */ }
Expand description
An error parsing an input value.
This type is generic over T as it uses T’s type name when converting to a regular error.
Implementations
sourceimpl<T: InputType> InputValueError<T>
impl<T: InputType> InputValueError<T>
sourcepub fn expected_type(actual: Value) -> Self
pub fn expected_type(actual: Value) -> Self
The expected input type did not match the actual input type.
sourcepub fn custom(msg: impl Display) -> Self
pub fn custom(msg: impl Display) -> Self
A custom error message.
Any type that implements Display
is automatically converted to this if
you use the ?
operator.
sourcepub fn propagate<U: InputType>(self) -> InputValueError<U>
pub fn propagate<U: InputType>(self) -> InputValueError<U>
Propagate the error message to a different type.
sourcepub fn into_server_error(self, pos: Pos) -> ServerError
pub fn into_server_error(self, pos: Pos) -> ServerError
Convert the error into a server error.
Trait Implementations
sourceimpl<T: Debug> Debug for InputValueError<T>
impl<T: Debug> Debug for InputValueError<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for InputValueError<T>where
T: RefUnwindSafe,
impl<T> Send for InputValueError<T>where
T: Send,
impl<T> Sync for InputValueError<T>where
T: Sync,
impl<T> Unpin for InputValueError<T>where
T: Unpin,
impl<T> UnwindSafe for InputValueError<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more