Struct sentry_contrib_native::RawEnvelope
source · [−]pub struct RawEnvelope(_);
Expand description
Wrapper for the raw envelope that we should send to Sentry.
Examples
struct CustomTransport {
#[cfg(feature = "transport-custom")]
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 = "transport-custom")]
let request: Request = raw_envelope.to_request(self.dsn.clone());
}
}
Implementations
sourceimpl RawEnvelope
impl RawEnvelope
sourcepub fn serialize(&self) -> Envelope
pub fn serialize(&self) -> Envelope
Serialize a RawEnvelope
into an Envelope
.
sourcepub fn to_request(&self, dsn: Dsn) -> Request
pub fn to_request(&self, dsn: Dsn) -> Request
Constructs a HTTP request for the provided RawEnvelope
with a
Dsn
.
For more information see Envelope::into_request
.
Trait Implementations
sourceimpl Debug for RawEnvelope
impl Debug for RawEnvelope
sourceimpl Drop for RawEnvelope
impl Drop for RawEnvelope
sourceimpl Hash for RawEnvelope
impl Hash for RawEnvelope
sourceimpl Ord for RawEnvelope
impl Ord for RawEnvelope
sourceimpl PartialEq<RawEnvelope> for RawEnvelope
impl PartialEq<RawEnvelope> for RawEnvelope
sourcefn eq(&self, other: &RawEnvelope) -> bool
fn eq(&self, other: &RawEnvelope) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RawEnvelope) -> bool
fn ne(&self, other: &RawEnvelope) -> bool
This method tests for !=
.
sourceimpl PartialOrd<RawEnvelope> for RawEnvelope
impl PartialOrd<RawEnvelope> for RawEnvelope
sourcefn partial_cmp(&self, other: &RawEnvelope) -> Option<Ordering>
fn partial_cmp(&self, other: &RawEnvelope) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for RawEnvelope
impl Send for RawEnvelope
impl StructuralEq for RawEnvelope
impl StructuralPartialEq for RawEnvelope
impl Sync for RawEnvelope
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more