pub struct Error {
pub description: String,
pub detail: String,
pub fingerprint: Fingerprint,
pub type_name: String,
pub tags: BTreeMap<String, String>,
pub user: User,
pub uuid: Uuid,
}
Expand description
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: Fingerprint
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.
Additional tags to apply to the error.
user: User
User data to send with the error.
uuid: Uuid
The UUID of the event.
Implementations§
Source§impl Error
impl Error
Sourcepub fn set_description(&mut self, description: impl ToString)
pub fn set_description(&mut self, description: impl ToString)
Sets the short description of the error.
Sourcepub fn set_detail(&mut self, detail: impl ToString)
pub fn set_detail(&mut self, detail: impl ToString)
Sets the detailed description of the error.
Sourcepub fn set_tag(&mut self, name: impl Into<String>, value: impl ToString)
pub fn set_tag(&mut self, name: impl Into<String>, value: impl ToString)
Adds extra tagged information.
Sourcepub fn with_description(self, description: impl ToString) -> Self
pub fn with_description(self, description: impl ToString) -> Self
Sets the short description of the error.
Sourcepub fn with_detail(self, detail: impl ToString) -> Self
pub fn with_detail(self, detail: impl ToString) -> Self
Sets the detailed description of the error.
Sourcepub fn with_fingerprint(self, fingerprint: Fingerprint) -> Self
pub fn with_fingerprint(self, fingerprint: Fingerprint) -> Self
Sets the fingerprint used to group the error.
Sourcepub fn with_tag(self, name: impl Into<String>, value: impl ToString) -> Self
pub fn with_tag(self, name: impl Into<String>, value: impl ToString) -> Self
Adds extra tagged information.
Sourcepub fn with_user_id(self, id: impl ToString) -> Self
pub fn with_user_id(self, id: impl ToString) -> Self
Adds user ID information.
Trait Implementations§
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more