[][src]Struct af_lib::sentry::Error

pub struct Error {
    pub description: String,
    pub detail: String,
    pub fingerprint: Cow<'static, [Cow<'static, str>]>,
    pub type_name: String,
    pub tags: BTreeMap<String, String>,
    pub user: User,
    pub uuid: Uuid,
}

A sentry error.

Errors are automatically reported when dropped.

Fields

description: String

A short description of the error.

detail: String

A detailed description of the error.

fingerprint: Cow<'static, [Cow<'static, str>]>

The fingerprint of the error.

Errors with the same fingerprint are grouped together. The default groups by [type] and ClientOptions::environment.

type_name: String

The type of the error.

tags: BTreeMap<String, String>

Additional tags to apply to the error.

user: User

User data to send with the error.

uuid: Uuid

The UUID of the event.

Implementations

impl Error[src]

pub fn new(type_name: impl Into<String>) -> Error[src]

Creates a new error with the given type.

pub fn set_description(&mut self, description: impl ToString)[src]

Sets the short description of the error.

pub fn set_detail(&mut self, detail: impl ToString)[src]

Sets the detailed description of the error.

pub fn set_tag(&mut self, name: impl Into<String>, value: impl ToString)[src]

Adds extra tagged information.

pub fn with_description(self, description: impl ToString) -> Error[src]

Sets the short description of the error.

pub fn with_detail(self, detail: impl ToString) -> Error[src]

Sets the detailed description of the error.

pub fn with_fingerprint(
    self,
    fingerprint: Cow<'static, [Cow<'static, str>]>
) -> Error
[src]

Sets the fingerprint used to group the error.

pub fn with_tag(self, name: impl Into<String>, value: impl ToString) -> Error[src]

Adds extra tagged information.

pub fn with_user(self, user: User) -> Error[src]

Adds user information.

pub fn with_user_id(self, id: impl ToString) -> Error[src]

Adds user ID information.

pub fn report(self) -> Uuid[src]

Reports this error to sentry.

Equivalent to dropping the error, but returns the error Uuid.

Trait Implementations

impl Debug for Error[src]

impl Drop for Error[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,