pub trait ClusterHandler {
const CLUSTER: Cluster<'static>;
// Required methods
fn dataver(&self) -> u32;
fn dataver_changed(&self);
fn hour_format(
&self,
ctx: impl ReadContext,
) -> Result<HourFormatEnum, Error>;
fn set_hour_format(
&self,
ctx: impl WriteContext,
value: HourFormatEnum,
) -> Result<(), Error>;
// Provided methods
fn lifecycle(
&self,
_ctx: impl HandlerContext,
_op: LifecycleOp,
) -> Result<(), Error> { ... }
fn run(
&self,
_ctx: impl HandlerContext,
) -> impl Future<Output = Result<(), Error>> { ... }
fn active_calendar_type(
&self,
ctx: impl ReadContext,
) -> Result<CalendarTypeEnum, Error> { ... }
fn supported_calendar_types<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<ToTLVArrayBuilder<P, CalendarTypeEnum>, ToTLVBuilder<P, CalendarTypeEnum>>,
) -> Result<P, Error>
where P: TLVBuilderParent { ... }
fn set_active_calendar_type(
&self,
ctx: impl WriteContext,
value: CalendarTypeEnum,
) -> Result<(), Error> { ... }
}Expand description
The handler trait for the cluster.
Required Associated Constants§
Required Methods§
fn dataver(&self) -> u32
fn dataver_changed(&self)
fn hour_format(&self, ctx: impl ReadContext) -> Result<HourFormatEnum, Error>
fn set_hour_format( &self, ctx: impl WriteContext, value: HourFormatEnum, ) -> Result<(), Error>
Provided Methods§
fn lifecycle( &self, _ctx: impl HandlerContext, _op: LifecycleOp, ) -> Result<(), Error>
fn run( &self, _ctx: impl HandlerContext, ) -> impl Future<Output = Result<(), Error>>
fn active_calendar_type( &self, ctx: impl ReadContext, ) -> Result<CalendarTypeEnum, Error>
fn supported_calendar_types<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<ToTLVArrayBuilder<P, CalendarTypeEnum>, ToTLVBuilder<P, CalendarTypeEnum>>,
) -> Result<P, Error>where
P: TLVBuilderParent,
fn set_active_calendar_type( &self, ctx: impl WriteContext, value: CalendarTypeEnum, ) -> Result<(), Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".