pub trait ClusterAsyncHandler {
const CLUSTER: Cluster<'static>;
Show 36 methods
// Required methods
fn dataver(&self) -> u32;
fn dataver_changed(&self);
async fn status(
&self,
ctx: impl ReadContext,
) -> Result<PowerSourceStatusEnum, Error>;
async fn order(&self, ctx: impl ReadContext) -> Result<u8, Error>;
async fn description<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn endpoint_list<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<ToTLVArrayBuilder<P, u16>, ToTLVBuilder<P, u16>>,
) -> 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 wired_assessed_input_voltage(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>> { ... }
fn wired_assessed_input_frequency(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<Maybe<u16, AsNullable>, Error>> { ... }
fn wired_current_type(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<WiredCurrentTypeEnum, Error>> { ... }
fn wired_assessed_current(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>> { ... }
fn wired_nominal_voltage(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u32, Error>> { ... }
fn wired_maximum_current(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u32, Error>> { ... }
fn wired_present(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<bool, Error>> { ... }
fn active_wired_faults<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<ToTLVArrayBuilder<P, WiredFaultEnum>, ToTLVBuilder<P, WiredFaultEnum>>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
fn bat_voltage(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>> { ... }
fn bat_percent_remaining(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<Maybe<u8, AsNullable>, Error>> { ... }
fn bat_time_remaining(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>> { ... }
fn bat_charge_level(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<BatChargeLevelEnum, Error>> { ... }
fn bat_replacement_needed(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<bool, Error>> { ... }
fn bat_replaceability(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<BatReplaceabilityEnum, Error>> { ... }
fn bat_present(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<bool, Error>> { ... }
fn active_bat_faults<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<ToTLVArrayBuilder<P, BatFaultEnum>, ToTLVBuilder<P, BatFaultEnum>>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
fn bat_replacement_description<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
fn bat_common_designation(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<BatCommonDesignationEnum, Error>> { ... }
fn bat_ansi_designation<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
fn bat_iec_designation<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
fn bat_approved_chemistry(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<BatApprovedChemistryEnum, Error>> { ... }
fn bat_capacity(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u32, Error>> { ... }
fn bat_quantity(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u8, Error>> { ... }
fn bat_charge_state(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<BatChargeStateEnum, Error>> { ... }
fn bat_time_to_full_charge(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>> { ... }
fn bat_functional_while_charging(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<bool, Error>> { ... }
fn bat_charging_current(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>> { ... }
fn active_bat_charge_faults<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<ToTLVArrayBuilder<P, BatChargeFaultEnum>, ToTLVBuilder<P, BatChargeFaultEnum>>,
) -> 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 status( &self, ctx: impl ReadContext, ) -> Result<PowerSourceStatusEnum, Error>
async fn order(&self, ctx: impl ReadContext) -> Result<u8, Error>
async fn description<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn endpoint_list<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<ToTLVArrayBuilder<P, u16>, ToTLVBuilder<P, u16>>,
) -> 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 wired_assessed_input_voltage( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>>
fn wired_assessed_input_frequency( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u16, AsNullable>, Error>>
fn wired_current_type( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<WiredCurrentTypeEnum, Error>>
fn wired_assessed_current( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>>
fn wired_nominal_voltage( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u32, Error>>
fn wired_maximum_current( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u32, Error>>
fn wired_present( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<bool, Error>>
fn active_wired_faults<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<ToTLVArrayBuilder<P, WiredFaultEnum>, ToTLVBuilder<P, WiredFaultEnum>>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
fn bat_voltage( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>>
fn bat_percent_remaining( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u8, AsNullable>, Error>>
fn bat_time_remaining( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>>
fn bat_charge_level( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<BatChargeLevelEnum, Error>>
fn bat_replacement_needed( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<bool, Error>>
fn bat_replaceability( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<BatReplaceabilityEnum, Error>>
fn bat_present( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<bool, Error>>
fn active_bat_faults<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<ToTLVArrayBuilder<P, BatFaultEnum>, ToTLVBuilder<P, BatFaultEnum>>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
fn bat_replacement_description<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
fn bat_common_designation( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<BatCommonDesignationEnum, Error>>
fn bat_ansi_designation<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
fn bat_iec_designation<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
fn bat_approved_chemistry( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<BatApprovedChemistryEnum, Error>>
fn bat_capacity( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u32, Error>>
fn bat_quantity( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u8, Error>>
fn bat_charge_state( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<BatChargeStateEnum, Error>>
fn bat_time_to_full_charge( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>>
fn bat_functional_while_charging( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<bool, Error>>
fn bat_charging_current( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>>
fn active_bat_charge_faults<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<ToTLVArrayBuilder<P, BatChargeFaultEnum>, ToTLVBuilder<P, BatChargeFaultEnum>>,
) -> 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".