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
sourceimpl<T> FutureExt for T
impl<T> FutureExt for T
sourcefn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
sourcefn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more