Type Alias async_graphql::FieldError

source ·
pub type FieldError = Error;
Expand description

An alias of async_graphql::Error. Present for backward compatibility reasons.

Aliased Type§

struct FieldError {
    pub message: String,
    pub source: Option<Arc<dyn Any + Send + Sync, Global>>,
    pub extensions: Option<ErrorExtensionValues>,
}

Fields§

§message: String

The error message.

§source: Option<Arc<dyn Any + Send + Sync, Global>>

The source of the error.

§extensions: Option<ErrorExtensionValues>

Extensions to the error.

Implementations§

source§

impl Error

source

pub fn new(message: impl Into<String>) -> Self

Create an error from the given error message.

source

pub fn new_with_source(source: impl Display + Send + Sync + 'static) -> Self

Create an error with a type that implements Display, and it will also set the source of the error to this value.

source

pub fn into_server_error(self, pos: Pos) -> ServerError

Convert the error to a server error.

Trait Implementations§

source§

impl Clone for Error

source§

fn clone(&self) -> Error

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl ErrorExtensions for Error

source§

fn extend(&self) -> Error

Convert the error to a Error.
source§

fn extend_with<C>(self, cb: C) -> Errorwhere C: FnOnce(&Self, &mut ErrorExtensionValues),

Add extensions to the error, using a callback to make the extensions.
source§

impl<T: Display + Send + Sync> From<T> for Error

source§

fn from(e: T) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Error> for Error

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Error

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more