pub struct InputValueError<T> { /* private fields */ }
Implementations§
Source§impl<T> InputValueError<T>
impl<T> InputValueError<T>
pub fn new(message: String) -> Self
Sourcepub fn expected_type(actual: Value) -> Selfwhere
T: GetInputTypeRef,
pub fn expected_type(actual: Value) -> Selfwhere
T: GetInputTypeRef,
The expected input type did not match the actual input type.
Sourcepub fn custom(msg: impl Display) -> Selfwhere
T: GetInputTypeRef,
pub fn custom(msg: impl Display) -> Selfwhere
T: GetInputTypeRef,
A custom error message.
Any type that implements Display
is automatically converted to this if
you use the ?
operator.
Sourcepub fn propagate<U: GetInputTypeRef>(self) -> InputValueError<U>where
T: GetInputTypeRef,
pub fn propagate<U: GetInputTypeRef>(self) -> InputValueError<U>where
T: GetInputTypeRef,
Propagate the error message to a different type.
pub fn with_extension( self, name: impl AsRef<str>, value: impl Into<Value>, ) -> Self
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.
pub fn into_arg_error(self, name: &str) -> Error
pub fn into_field_error(self, name: &str) -> Error
Trait Implementations§
Source§impl<T: Debug> Debug for InputValueError<T>
impl<T: Debug> Debug for InputValueError<T>
Source§impl<T: GetInputTypeRef> From<Error> for InputValueError<T>
impl<T: GetInputTypeRef> From<Error> for InputValueError<T>
Source§impl<T> From<InputValueError<T>> for Error
impl<T> From<InputValueError<T>> for Error
Source§fn from(value: InputValueError<T>) -> Self
fn from(value: InputValueError<T>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<T> Freeze for InputValueError<T>
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§
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