pub struct SentryClient { /* private fields */ }
Expand description
Sentry client
Implementations§
Source§impl SentryClient
impl SentryClient
Sourcepub fn new(
config: SentryConfig,
request: &Request,
context: &Context,
) -> SentryClient
pub fn new( config: SentryConfig, request: &Request, context: &Context, ) -> SentryClient
Create a Sentry client
Sourcepub fn set_context(&self, name: &str, value: Object)
pub fn set_context(&self, name: &str, value: Object)
See Sentry’s setContext documentation
Sourcepub fn capture_message(&self, message: &str)
pub fn capture_message(&self, message: &str)
See Sentry’s captureMessage documentation
Sourcepub fn capture_exception<T: Error + ?Sized>(&self, error: &T)
pub fn capture_exception<T: Error + ?Sized>(&self, error: &T)
See Sentry’s captureException documentation
Sourcepub fn capture_js_error(&self, js_error: Error)
pub fn capture_js_error(&self, js_error: Error)
Same as capture_exception
but with a js_sys::Error
.
Auto Trait Implementations§
impl Freeze for SentryClient
impl RefUnwindSafe for SentryClient
impl !Send for SentryClient
impl !Sync for SentryClient
impl Unpin for SentryClient
impl UnwindSafe for SentryClient
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