#[non_exhaustive]pub struct ErrorExtensions {
pub error_type: Option<String>,
pub code: Option<String>,
pub user_error: Option<bool>,
pub user_presentable_message: Option<String>,
}Expand description
Linear’s extensions object on GraphQL errors.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.error_type: Option<String>Raw wire error type, e.g. "authentication error". Parse with
ErrorExtensions::typed.
code: Option<String>Machine code, e.g. "RATELIMITED".
user_error: Option<bool>Whether the error is safe to show to end users.
user_presentable_message: Option<String>A message intended for direct display to end users.
Implementations§
Source§impl ErrorExtensions
impl ErrorExtensions
Sourcepub fn typed(&self) -> LinearErrorType
pub fn typed(&self) -> LinearErrorType
Parses the wire type (falling back to code) into a
LinearErrorType. Returns LinearErrorType::Unknown when neither
is present.
Trait Implementations§
Source§impl Clone for ErrorExtensions
impl Clone for ErrorExtensions
Source§fn clone(&self) -> ErrorExtensions
fn clone(&self) -> ErrorExtensions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ErrorExtensions
impl Debug for ErrorExtensions
Source§impl<'de> Deserialize<'de> for ErrorExtensions
impl<'de> Deserialize<'de> for ErrorExtensions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ErrorExtensions
impl RefUnwindSafe for ErrorExtensions
impl Send for ErrorExtensions
impl Sync for ErrorExtensions
impl Unpin for ErrorExtensions
impl UnsafeUnpin for ErrorExtensions
impl UnwindSafe for ErrorExtensions
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