Skip to main content

GErrView

Struct GErrView 

Source
pub struct GErrView<'a, C: Config, D> {
    pub id: Option<&'a C::Id>,
    pub message: &'a str,
    pub code: Option<&'a str>,
    pub data: Option<&'a D>,
    pub tags: Option<&'a [Cow<'static, str>]>,
    pub sources: Option<&'a [Source]>,
    pub help: Option<&'a str>,
    pub location: &'a ErrorLocation,
    pub backtrace: &'a Backtrace,
}
Expand description

GErrView - GErr in borrowed form for reporting.

Fields§

§id: Option<&'a C::Id>

Error id.

§message: &'a str

Error message.

§code: Option<&'a str>

Error code.

§data: Option<&'a D>

Error data.

§tags: Option<&'a [Cow<'static, str>]>

Error tags.

§sources: Option<&'a [Source]>

Error sources.

§help: Option<&'a str>

Error help hint.

§location: &'a ErrorLocation

Error location.

§backtrace: &'a Backtrace

Error backtrace.

Trait Implementations§

Source§

impl<'a, C: Config, D> From<&'a Box<GErr<C, D>>> for GErrView<'a, C, D>

Source§

fn from(err: &'a GErrBox<C, D>) -> Self

Converts to this type from the input type.
Source§

impl<'a, C: Config, D> From<&'a GErr<C, D>> for GErrView<'a, C, D>

Source§

fn from(err: &'a GErr<C, D>) -> Self

Converts to this type from the input type.
Source§

impl<'a, C: Config, D> From<&GErrView<'a, C, D>> for JsonData
where C::Id: Serialize, D: Serialize,

Source§

fn from(err: &GErrView<'a, C, D>) -> Self

Converts to this type from the input type.
Source§

impl<'a, C: Config, D> From<&GErrView<'a, C, D>> for DisplayJsonData
where C::Id: Serialize, D: Serialize,

Source§

fn from(err: &GErrView<'a, C, D>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a, C, D> !RefUnwindSafe for GErrView<'a, C, D>

§

impl<'a, C, D> !UnwindSafe for GErrView<'a, C, D>

§

impl<'a, C, D> Freeze for GErrView<'a, C, D>

§

impl<'a, C, D> Send for GErrView<'a, C, D>
where <C as Config>::Id: Sync, D: Sync,

§

impl<'a, C, D> Sync for GErrView<'a, C, D>
where <C as Config>::Id: Sync, D: Sync,

§

impl<'a, C, D> Unpin for GErrView<'a, C, D>

§

impl<'a, C, D> UnsafeUnpin for GErrView<'a, C, D>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.