[][src]Struct sentry_core::test::TestTransport

pub struct TestTransport { /* fields omitted */ }

Collects events instead of sending them.

Examples

use sentry::test::TestTransport;
use sentry::{ClientOptions, Hub};
use std::sync::Arc;

let transport = TestTransport::new();
let options = ClientOptions {
    dsn: Some("https://public@example.com/1".parse().unwrap()),
    transport: Some(Arc::new(transport.clone())),
    ..ClientOptions::default()
};
Hub::current().bind_client(Some(Arc::new(options.into())));

Implementations

impl TestTransport[src]

pub fn new() -> Arc<TestTransport>[src]

Creates a new test transport.

pub fn fetch_and_clear_events(&self) -> Vec<Event<'static>>[src]

Fetches and clears the contained events.

pub fn fetch_and_clear_envelopes(&self) -> Vec<Envelope>[src]

Fetches and clears the contained envelopes.

Trait Implementations

impl Transport for TestTransport[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, U> Into<U> for T where
    U: From<T>, 
[src]

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>,