Skip to main content

ReportContext

Trait ReportContext 

Source
pub trait ReportContext: HandlerContext {
    // Required methods
    fn exchange(&self) -> &Exchange<'_>;
    fn subscription(&self) -> SubscriptionCtx;
}
Expand description

A context type passed to a ReportDataHandler when it processes a server-initiated ReportData message (the controller / subscriber role).

Like ReadContext / InvokeContext, it is a HandlerContext — so the report handler has the same ambient access to the Matter stack, crypto, KV store, networks, node metadata and buffer pool as any cluster handler — plus the originating Exchange and the SubscriptionCtx identifying the subscription the report belongs to.

Required Methods§

Source

fn exchange(&self) -> &Exchange<'_>

The exchange the report arrived on.

Source

fn subscription(&self) -> SubscriptionCtx

The (fabric, peer, subscription-id) identity of the report.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> ReportContext for &T
where T: ReportContext,

Implementors§