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.
Trait Implementations§
source§impl ErrorExtensions for Error
impl ErrorExtensions for Error
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)