Struct async_graphql::Error
source · pub struct Error {
pub message: String,
pub source: Option<Arc<dyn Any + Send + Sync>>,
pub extensions: Option<ErrorExtensionValues>,
}
Expand description
An error with a message and optional extensions.
Fields§
§message: String
The error message.
source: Option<Arc<dyn Any + Send + Sync>>
The source of the error.
extensions: Option<ErrorExtensionValues>
Extensions to the error.
Implementations§
source§impl Error
impl Error
sourcepub fn new_with_source(source: impl Display + Send + Sync + 'static) -> Self
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.
sourcepub fn into_server_error(self, pos: Pos) -> ServerError
pub fn into_server_error(self, pos: Pos) -> ServerError
Convert the error to a server error.