pub trait ClusterAsyncHandler {
const CLUSTER: Cluster<'static>;
// Required methods
fn dataver(&self) -> u32;
fn dataver_changed(&self);
async fn meter_type(
&self,
ctx: impl ReadContext,
) -> Result<Maybe<MeterTypeEnum, AsNullable>, Error>;
async fn point_of_delivery<P>(
&self,
ctx: impl ReadContext,
builder: NullableBuilder<P, Utf8StrBuilder<P>>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn meter_serial_number<P>(
&self,
ctx: impl ReadContext,
builder: NullableBuilder<P, Utf8StrBuilder<P>>,
) -> Result<P, Error>
where P: TLVBuilderParent;
// Provided methods
fn lifecycle(
&self,
_ctx: impl HandlerContext,
_op: LifecycleOp,
) -> Result<(), Error> { ... }
fn run(
&self,
_ctx: impl HandlerContext,
) -> impl Future<Output = Result<(), Error>> { ... }
fn protocol_version<P>(
&self,
ctx: impl ReadContext,
builder: NullableBuilder<P, Utf8StrBuilder<P>>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
fn power_threshold<P>(
&self,
ctx: impl ReadContext,
builder: NullableBuilder<P, PowerThresholdStructBuilder<P>>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
}Expand description
The handler trait for the cluster.
Required Associated Constants§
Required Methods§
fn dataver(&self) -> u32
fn dataver_changed(&self)
async fn meter_type( &self, ctx: impl ReadContext, ) -> Result<Maybe<MeterTypeEnum, AsNullable>, Error>
async fn point_of_delivery<P>(
&self,
ctx: impl ReadContext,
builder: NullableBuilder<P, Utf8StrBuilder<P>>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn meter_serial_number<P>(
&self,
ctx: impl ReadContext,
builder: NullableBuilder<P, Utf8StrBuilder<P>>,
) -> Result<P, Error>where
P: TLVBuilderParent,
Provided Methods§
fn lifecycle( &self, _ctx: impl HandlerContext, _op: LifecycleOp, ) -> Result<(), Error>
fn run( &self, _ctx: impl HandlerContext, ) -> impl Future<Output = Result<(), Error>>
fn protocol_version<P>(
&self,
ctx: impl ReadContext,
builder: NullableBuilder<P, Utf8StrBuilder<P>>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
fn power_threshold<P>(
&self,
ctx: impl ReadContext,
builder: NullableBuilder<P, PowerThresholdStructBuilder<P>>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".