pub struct Error(/* private fields */);Expand description
Error type returned from Gel database calls.
Implementations§
Source§impl Error
impl Error
pub fn is<T>(&self) -> boolwhere
T: ErrorKind,
pub fn has_tag(&self, tag: Tag) -> bool
pub fn chain(&self) -> Chain<'_>
pub fn context<S>(self, msg: S) -> Error
pub fn headers(&self) -> &HashMap<u16, Bytes>
pub fn with_headers(self, headers: HashMap<u16, Bytes>) -> Error
pub fn annotations(&self) -> &HashMap<String, String>
pub fn with_annotations(self, annotations: HashMap<String, String>) -> Error
pub fn kind_name(&self) -> &str
pub fn kind_debug(&self) -> impl Display
pub fn initial_message(&self) -> Option<&str>
pub fn contexts(&self) -> impl DoubleEndedIterator
pub fn hint(&self) -> Option<&str>
pub fn details(&self) -> Option<&str>
pub fn server_traceback(&self) -> Option<&str>
pub fn position_start(&self) -> Option<usize>
pub fn position_end(&self) -> Option<usize>
pub fn line(&self) -> Option<usize>
pub fn column(&self) -> Option<usize>
pub fn from_code(code: u32) -> Error
pub fn code(&self) -> u32
pub fn refine_kind<T>(self) -> Errorwhere
T: ErrorKind,
pub fn set<T>(self, value: impl Into<<T as Field>::Value>) -> Errorwhere
T: Field,
pub fn get<T>(&self) -> Option<&<T as Field>::Value>where
T: Field,
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ErrorResponse> for Error
impl From<ErrorResponse> for Error
Source§fn from(val: ErrorResponse) -> Error
fn from(val: ErrorResponse) -> Error
Converts to this type from the input type.
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(val: ParseError) -> Error
fn from(val: ParseError) -> Error
Converts to this type from the input type.
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> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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> EncoderForExt for Twhere
T: ?Sized,
impl<T> EncoderForExt for Twhere
T: ?Sized,
Source§fn to_vec<F>(&self) -> Vec<u8> ⓘwhere
F: 'static,
Self: EncoderFor<F>,
fn to_vec<F>(&self) -> Vec<u8> ⓘwhere
F: 'static,
Self: EncoderFor<F>,
Convert this builder into a vector of bytes. This is generally
not the most efficient way to perform serialization.
Source§fn encode_buffer<F>(&self, buf: &mut [u8]) -> Result<usize, usize>where
F: 'static,
Self: EncoderFor<F>,
fn encode_buffer<F>(&self, buf: &mut [u8]) -> Result<usize, usize>where
F: 'static,
Self: EncoderFor<F>,
Encode this builder into a given buffer. If the buffer is
too small, the function will return the number of bytes
required to encode the builder.
Source§fn encode_buffer_uninit<'a, F>(
&self,
buf: &'a mut [MaybeUninit<u8>],
) -> Result<&'a mut [u8], usize>where
F: 'static,
Self: EncoderFor<F>,
fn encode_buffer_uninit<'a, F>(
&self,
buf: &'a mut [MaybeUninit<u8>],
) -> Result<&'a mut [u8], usize>where
F: 'static,
Self: EncoderFor<F>,
Encode this builder into a given buffer. If the buffer is
too small, the function will return the number of bytes
required to encode the builder.