[][src]Struct reporting_api::ReportBody

pub struct ReportBody(_);

Contains the body of a single report. The actual content for each kind of report is stored in its own Rust type, which must implement the ReportPayload trait.

Methods

impl ReportBody[src]

pub fn new<P: ReportPayload>(payload: P) -> ReportBody[src]

Create a new report body containing the given payload content.

pub fn is<P: ReportPayload>(&self) -> bool[src]

Returns whether the content of this report body has a given type.

pub fn downcast_ref<P: ReportPayload>(&self) -> Option<&P>[src]

Returns a reference to the body content if it's of type P, or None if it isn't.

Trait Implementations

impl PartialEq<ReportBody> for ReportBody[src]

#[must_use]
default fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Debug for ReportBody[src]

impl Serialize for ReportBody[src]

impl<'de> Deserialize<'de> for ReportBody[src]

Auto Trait Implementations

impl !Send for ReportBody

impl !Sync for ReportBody

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto 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<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Serialize for T where
    T: Serialize + ?Sized
[src]