Struct dynamic_graphql::Error
source · pub struct Error {
pub message: String,
pub source: Option<Arc<dyn Any + Sync + Send + 'static>>,
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 + Sync + Send + 'static>>
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) -> Error
pub fn new_with_source(source: impl Display + Send + Sync + 'static) -> Error
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.
Trait Implementations§
source§impl ErrorExtensions for Error
impl ErrorExtensions for Error
source§impl PartialEq<Error> for Error
impl PartialEq<Error> for Error
source§impl Serialize for Error
impl Serialize for Error
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more