[]Struct ckb_sentry::Envelope

pub struct Envelope { /* fields omitted */ }

A Sentry Envelope.

An Envelope is the data format that Sentry uses for Ingestion. It can contain multiple Items, some of which are related, such as Events, and Event Attachments. Other Items, such as Sessions are independent.

See the documentation on Envelopes for more details.

Implementations

impl Envelope

pub fn new() -> Envelope

Creates a new empty Envelope.

pub fn add_item<I>(&mut self, item: I) where
    I: Into<EnvelopeItem>, 

Add a new Envelope Item.

pub fn items(&self) -> EnvelopeItemIter<'_>

Notable traits for EnvelopeItemIter<'s>

impl<'s> Iterator for EnvelopeItemIter<'s> type Item = &'s EnvelopeItem;

Create an Iterator over all the EnvelopeItems.

pub fn uuid(&self) -> Option<&Uuid>

Returns the Envelopes Uuid, if any.

pub fn event(&self) -> Option<&Event<'static>>

Returns the Event contained in this Envelope, if any.

pub fn to_writer<W>(&self, writer: W) -> Result<(), Error> where
    W: Write

Serialize the Envelope into the given Write.

Trait Implementations

impl Clone for Envelope

impl Debug for Envelope

impl Default for Envelope

impl From<Event<'static>> for Envelope

impl From<Transaction<'static>> for Envelope

impl PartialEq<Envelope> for Envelope

impl StructuralPartialEq for Envelope

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> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> WithSubscriber for T[src]