Type Alias InspectData

Source
pub type InspectData = Data<Inspect>;
Expand description

A diagnostics data object containing inspect data.

Aliased Type§

struct InspectData {
    pub data_source: DataSource,
    pub metadata: InspectMetadata,
    pub moniker: ExtendedMoniker,
    pub payload: Option<DiagnosticsHierarchy>,
    pub version: u64,
}

Fields§

§data_source: DataSource

The source of the data.

§metadata: InspectMetadata

The metadata for the diagnostics payload.

§moniker: ExtendedMoniker

Moniker of the component that generated the payload.

§payload: Option<DiagnosticsHierarchy>

Payload containing diagnostics data, if the payload exists, else None.

§version: u64

Schema version.

Implementations

Source§

impl<D> Data<D>
where D: DiagnosticsData,

Source

pub fn drop_payload(&mut self)

Returns a Data with an error indicating that the payload was dropped.

Source

pub fn sort_payload(&mut self)

Sorts this Data’s payload if one is present.

Source

pub fn filter(self, selectors: &[Selector]) -> Result<Option<Self>, Error>

Uses a set of Selectors to filter self’s payload and returns the resulting Data. If the resulting payload is empty, it returns Ok(None).

Source§

impl Data<Inspect>

Source

pub fn name(&self) -> &str

Access the name or filename within self.metadata.

Trait Implementations

Source§

impl<D: Clone + DiagnosticsData> Clone for Data<D>
where D::Metadata: Clone, D::Key: Clone,

Source§

fn clone(&self) -> Data<D>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<D: Debug + DiagnosticsData> Debug for Data<D>
where D::Metadata: Debug, D::Key: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, D: DiagnosticsData> Deserialize<'de> for Data<D>

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<D: PartialEq + DiagnosticsData> PartialEq for Data<D>

Source§

fn eq(&self, other: &Data<D>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<D: DiagnosticsData> Serialize for Data<D>
where D::Metadata: Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<D: DiagnosticsData> StructuralPartialEq for Data<D>