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