[−][src]Struct sentry_contrib_native::Shutdown
Automatically shuts down the Sentry client on drop.
Examples
fn main() -> Result<()> { let options = Options::new(); let _shutdown: Shutdown = options.init()?; // ... // your application code // ... Ok(()) // Sentry client will automatically shutdown because `Shutdown` is leaving context }
Implementations
impl Shutdown
[src]
pub fn forget(self)
[src]
Disable automatic shutdown. Call shutdown
manually to force
transports to flush out before the program exits.
Examples
fn main() -> Result<()> { sentry_init()?; // ... // your application code // ... // call shutdown manually to make sure transports flush out shutdown(); Ok(()) } fn sentry_init() -> Result<()> { let options = Options::new(); // call forget because we are leaving the context and we don't want to shut down the Sentry client yet options.init()?.forget(); Ok(()) }
pub fn shutdown(self)
[src]
Manually shutdown.
Examples
fn main() -> Result<()> { let options = Options::new(); let shutdown = options.init()?; // ... // your application code // ... // call shutdown manually to make sure transports flush out shutdown.shutdown(); Ok(()) }
Trait Implementations
impl Clone for Shutdown
[src]
impl Debug for Shutdown
[src]
impl Drop for Shutdown
[src]
impl Eq for Shutdown
[src]
impl Hash for Shutdown
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Shutdown
[src]
fn cmp(&self, other: &Shutdown) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Shutdown> for Shutdown
[src]
impl PartialOrd<Shutdown> for Shutdown
[src]
fn partial_cmp(&self, other: &Shutdown) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for Shutdown
[src]
impl StructuralPartialEq for Shutdown
[src]
Auto Trait Implementations
impl RefUnwindSafe for Shutdown
impl Send for Shutdown
impl Sync for Shutdown
impl Unpin for Shutdown
impl UnwindSafe for Shutdown
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,