Skip to main content

ClusterHandler

Trait ClusterHandler 

Source
pub trait ClusterHandler {
    const CLUSTER: Cluster<'static>;
Show 13 methods // Required methods fn dataver(&self) -> u32; fn dataver_changed(&self); fn main_state(&self, ctx: impl ReadContext) -> Result<MainStateEnum, Error>; fn current_error_list<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<ToTLVArrayBuilder<P, ClosureErrorEnum>, ToTLVBuilder<P, ClosureErrorEnum>>, ) -> Result<P, Error> where P: TLVBuilderParent; fn overall_current_state<P>( &self, ctx: impl ReadContext, builder: NullableBuilder<P, OverallCurrentStateStructBuilder<P>>, ) -> Result<P, Error> where P: TLVBuilderParent; fn overall_target_state<P>( &self, ctx: impl ReadContext, builder: NullableBuilder<P, OverallTargetStateStructBuilder<P>>, ) -> Result<P, Error> where P: TLVBuilderParent; fn handle_stop(&self, ctx: impl InvokeContext) -> Result<(), Error>; fn handle_move_to( &self, ctx: impl InvokeContext, request: MoveToRequest<'_>, ) -> Result<(), Error>; fn handle_calibrate(&self, ctx: impl InvokeContext) -> 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 countdown_time( &self, ctx: impl ReadContext, ) -> Result<Maybe<u32, AsNullable>, Error> { ... } fn latch_control_modes( &self, ctx: impl ReadContext, ) -> Result<LatchControlModesBitmap, Error> { ... }
}
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§

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 countdown_time( &self, ctx: impl ReadContext, ) -> Result<Maybe<u32, AsNullable>, Error>

Source

fn latch_control_modes( &self, ctx: impl ReadContext, ) -> Result<LatchControlModesBitmap, 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> ClusterHandler for &T
where T: ClusterHandler,

Implementors§