[−][src]Struct sentry_contrib_native::RawEnvelope
Wrapper for the raw Envelope that we should send to Sentry.
Examples
struct CustomTransport { #[cfg(feature = "custom-transport")] dsn: Dsn, }; impl Transport for CustomTransport { fn send(&self, raw_envelope: RawEnvelope) { // get the `Event` that is being sent let event: Value = raw_envelope.event(); // serialize it, maybe move this to another thread to prevent blocking let envelope: Envelope = raw_envelope.serialize(); // or convert it into a `Request` right away! #[cfg(feature = "custom-transport")] let request: Request = raw_envelope.to_request(self.dsn.clone()); } }
Implementations
impl RawEnvelope
[src]
#[must_use]pub fn serialize(&self) -> Envelope
[src]
Serialize a RawEnvelope
into an Envelope
.
#[must_use]pub fn event(&self) -> Value
[src]
Yields the event that is being sent in the form of a Value
.
#[must_use]pub fn to_request(&self, dsn: Dsn) -> Request
[src]
This is supported on
feature="custom-transport"
only.Constructs a HTTP request for the provided RawEnvelope
with a
Dsn
.
For more information see Envelope::into_request
.
Trait Implementations
impl Debug for RawEnvelope
[src]
impl Drop for RawEnvelope
[src]
impl Eq for RawEnvelope
[src]
impl Hash for RawEnvelope
[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 RawEnvelope
[src]
fn cmp(&self, other: &RawEnvelope) -> 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<RawEnvelope> for RawEnvelope
[src]
fn eq(&self, other: &RawEnvelope) -> bool
[src]
fn ne(&self, other: &RawEnvelope) -> bool
[src]
impl PartialOrd<RawEnvelope> for RawEnvelope
[src]
fn partial_cmp(&self, other: &RawEnvelope) -> Option<Ordering>
[src]
fn lt(&self, other: &RawEnvelope) -> bool
[src]
fn le(&self, other: &RawEnvelope) -> bool
[src]
fn gt(&self, other: &RawEnvelope) -> bool
[src]
fn ge(&self, other: &RawEnvelope) -> bool
[src]
impl Send for RawEnvelope
[src]
impl StructuralEq for RawEnvelope
[src]
impl StructuralPartialEq for RawEnvelope
[src]
impl Sync for RawEnvelope
[src]
Auto Trait Implementations
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, 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>,