pub trait ClusterAsyncHandler {
const CLUSTER: Cluster<'static>;
// Required methods
fn dataver(&self) -> u32;
fn dataver_changed(&self);
async fn number_of_positions(
&self,
ctx: impl ReadContext,
) -> Result<u8, Error>;
async fn current_position(&self, ctx: impl ReadContext) -> Result<u8, Error>;
// Provided methods
fn run(
&self,
_ctx: impl HandlerContext,
) -> impl Future<Output = Result<(), Error>> { ... }
fn multi_press_max(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u8, Error>> { ... }
}Expand description
The handler trait for the cluster.
Required Associated Constants§
Required Methods§
fn dataver(&self) -> u32
fn dataver_changed(&self)
async fn number_of_positions(&self, ctx: impl ReadContext) -> Result<u8, Error>
async fn current_position(&self, ctx: impl ReadContext) -> Result<u8, Error>
Provided Methods§
fn run( &self, _ctx: impl HandlerContext, ) -> impl Future<Output = Result<(), Error>>
fn multi_press_max( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u8, Error>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".