Struct sentry_contrib_native_sys::Transport [−][src]
#[repr(C)]pub struct Transport(_);
This represents an interface for user-defined transports.
Transports are responsible for sending envelopes to sentry and are the last step in the event pipeline.
Envelopes will be submitted to the transport in a fire and forget fashion, and the transport must send those envelopes in order.
A transport has the following hooks, all of which
take the user provided state
as last parameter. The transport state needs
to be set with sentry_transport_set_state
and typically holds handles and
other information that can be reused across requests.
send_func
: This function will take ownership of an envelope, and is responsible for freeing it viasentry_envelope_free
.startup_func
: This hook will be called by sentry inside ofsentry_init
and instructs the transport to initialize itself. Failures will bubble up tosentry_init
.shutdown_func
: Instructs the transport to flush its queue and shut down. This hook receives a millisecond-resolutiontimeout
parameter and should returntrue
when the transport was flushed and shut down successfully. In case offalse
, sentry will log an error, but continue with freeing the transport.free_func
: Frees the transportsstate
. This hook might be called even thoughshutdown_func
returnedfalse
previously.
The transport interface might be extended in the future with hooks to flush its internal queue without shutting down, and to dump its internal queue to disk in case of a hard crash.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Transport
impl Send for Transport
impl Sync for Transport
impl Unpin for Transport
impl UnwindSafe for Transport
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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,