Skip to main content

ClusterAsyncHandler

Trait ClusterAsyncHandler 

Source
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§

Source

const CLUSTER: Cluster<'static>

The cluster-metadata corresponding to this handler trait.

Required Methods§

Source

fn dataver(&self) -> u32

Source

fn dataver_changed(&self)

Source

async fn status( &self, ctx: impl ReadContext, ) -> Result<PowerSourceStatusEnum, Error>

Source

async fn order(&self, ctx: impl ReadContext) -> Result<u8, Error>

Source

async fn description<P>( &self, ctx: impl ReadContext, builder: Utf8StrBuilder<P>, ) -> Result<P, Error>

Source

async fn endpoint_list<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<ToTLVArrayBuilder<P, u16>, ToTLVBuilder<P, u16>>, ) -> Result<P, Error>

Provided Methods§

Source

fn lifecycle( &self, _ctx: impl HandlerContext, _op: LifecycleOp, ) -> Result<(), Error>

Source

fn run( &self, _ctx: impl HandlerContext, ) -> impl Future<Output = Result<(), Error>>

Source

fn wired_assessed_input_voltage( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>>

Source

fn wired_assessed_input_frequency( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u16, AsNullable>, Error>>

Source

fn wired_current_type( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<WiredCurrentTypeEnum, Error>>

Source

fn wired_assessed_current( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>>

Source

fn wired_nominal_voltage( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u32, Error>>

Source

fn wired_maximum_current( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u32, Error>>

Source

fn wired_present( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<bool, Error>>

Source

fn active_wired_faults<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<ToTLVArrayBuilder<P, WiredFaultEnum>, ToTLVBuilder<P, WiredFaultEnum>>, ) -> impl Future<Output = Result<P, Error>>

Source

fn bat_voltage( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>>

Source

fn bat_percent_remaining( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u8, AsNullable>, Error>>

Source

fn bat_time_remaining( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>>

Source

fn bat_charge_level( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<BatChargeLevelEnum, Error>>

Source

fn bat_replacement_needed( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<bool, Error>>

Source

fn bat_replaceability( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<BatReplaceabilityEnum, Error>>

Source

fn bat_present( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<bool, Error>>

Source

fn active_bat_faults<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<ToTLVArrayBuilder<P, BatFaultEnum>, ToTLVBuilder<P, BatFaultEnum>>, ) -> impl Future<Output = Result<P, Error>>

Source

fn bat_replacement_description<P>( &self, ctx: impl ReadContext, builder: Utf8StrBuilder<P>, ) -> impl Future<Output = Result<P, Error>>

Source

fn bat_common_designation( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<BatCommonDesignationEnum, Error>>

Source

fn bat_ansi_designation<P>( &self, ctx: impl ReadContext, builder: Utf8StrBuilder<P>, ) -> impl Future<Output = Result<P, Error>>

Source

fn bat_iec_designation<P>( &self, ctx: impl ReadContext, builder: Utf8StrBuilder<P>, ) -> impl Future<Output = Result<P, Error>>

Source

fn bat_approved_chemistry( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<BatApprovedChemistryEnum, Error>>

Source

fn bat_capacity( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u32, Error>>

Source

fn bat_quantity( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u8, Error>>

Source

fn bat_charge_state( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<BatChargeStateEnum, Error>>

Source

fn bat_time_to_full_charge( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>>

Source

fn bat_functional_while_charging( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<bool, Error>>

Source

fn bat_charging_current( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>>

Source

fn active_bat_charge_faults<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<ToTLVArrayBuilder<P, BatChargeFaultEnum>, ToTLVBuilder<P, BatChargeFaultEnum>>, ) -> impl Future<Output = Result<P, Error>>

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> ClusterAsyncHandler for &T

Source§

const CLUSTER: Cluster<'static> = T::CLUSTER

Source§

fn dataver(&self) -> u32

Source§

fn dataver_changed(&self)

Source§

fn lifecycle( &self, ctx: impl HandlerContext, op: LifecycleOp, ) -> Result<(), Error>

Source§

fn run( &self, ctx: impl HandlerContext, ) -> impl Future<Output = Result<(), Error>>

Source§

fn status( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<PowerSourceStatusEnum, Error>>

Source§

fn order( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u8, Error>>

Source§

fn description<P>( &self, ctx: impl ReadContext, builder: Utf8StrBuilder<P>, ) -> impl Future<Output = Result<P, Error>>

Source§

fn wired_assessed_input_voltage( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>>

Source§

fn wired_assessed_input_frequency( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u16, AsNullable>, Error>>

Source§

fn wired_current_type( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<WiredCurrentTypeEnum, Error>>

Source§

fn wired_assessed_current( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>>

Source§

fn wired_nominal_voltage( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u32, Error>>

Source§

fn wired_maximum_current( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u32, Error>>

Source§

fn wired_present( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<bool, Error>>

Source§

fn active_wired_faults<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<ToTLVArrayBuilder<P, WiredFaultEnum>, ToTLVBuilder<P, WiredFaultEnum>>, ) -> impl Future<Output = Result<P, Error>>

Source§

fn bat_voltage( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>>

Source§

fn bat_percent_remaining( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u8, AsNullable>, Error>>

Source§

fn bat_time_remaining( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>>

Source§

fn bat_charge_level( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<BatChargeLevelEnum, Error>>

Source§

fn bat_replacement_needed( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<bool, Error>>

Source§

fn bat_replaceability( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<BatReplaceabilityEnum, Error>>

Source§

fn bat_present( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<bool, Error>>

Source§

fn active_bat_faults<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<ToTLVArrayBuilder<P, BatFaultEnum>, ToTLVBuilder<P, BatFaultEnum>>, ) -> impl Future<Output = Result<P, Error>>

Source§

fn bat_replacement_description<P>( &self, ctx: impl ReadContext, builder: Utf8StrBuilder<P>, ) -> impl Future<Output = Result<P, Error>>

Source§

fn bat_common_designation( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<BatCommonDesignationEnum, Error>>

Source§

fn bat_ansi_designation<P>( &self, ctx: impl ReadContext, builder: Utf8StrBuilder<P>, ) -> impl Future<Output = Result<P, Error>>

Source§

fn bat_iec_designation<P>( &self, ctx: impl ReadContext, builder: Utf8StrBuilder<P>, ) -> impl Future<Output = Result<P, Error>>

Source§

fn bat_approved_chemistry( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<BatApprovedChemistryEnum, Error>>

Source§

fn bat_capacity( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u32, Error>>

Source§

fn bat_quantity( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u8, Error>>

Source§

fn bat_charge_state( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<BatChargeStateEnum, Error>>

Source§

fn bat_time_to_full_charge( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>>

Source§

fn bat_functional_while_charging( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<bool, Error>>

Source§

fn bat_charging_current( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>>

Source§

fn active_bat_charge_faults<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<ToTLVArrayBuilder<P, BatChargeFaultEnum>, ToTLVBuilder<P, BatChargeFaultEnum>>, ) -> impl Future<Output = Result<P, Error>>

Source§

fn endpoint_list<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<ToTLVArrayBuilder<P, u16>, ToTLVBuilder<P, u16>>, ) -> impl Future<Output = Result<P, Error>>

Implementors§