pub trait ClusterAsyncHandler {
const CLUSTER: Cluster<'static>;
Show 13 methods
// Required methods
fn dataver(&self) -> u32;
fn dataver_changed(&self);
async fn description<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn standard_namespace(
&self,
ctx: impl ReadContext,
) -> Result<Maybe<u16, AsNullable>, Error>;
async fn supported_modes<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<ModeOptionStructArrayBuilder<P>, ModeOptionStructBuilder<P>>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn current_mode(&self, ctx: impl ReadContext) -> Result<u8, Error>;
async fn handle_change_to_mode(
&self,
ctx: impl InvokeContext,
request: ChangeToModeRequest<'_>,
) -> 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 start_up_mode(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<Maybe<u8, AsNullable>, Error>> { ... }
fn on_mode(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<Maybe<u8, AsNullable>, Error>> { ... }
fn set_start_up_mode(
&self,
ctx: impl WriteContext,
value: Maybe<u8, AsNullable>,
) -> impl Future<Output = Result<(), Error>> { ... }
fn set_on_mode(
&self,
ctx: impl WriteContext,
value: Maybe<u8, AsNullable>,
) -> 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 description<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn standard_namespace( &self, ctx: impl ReadContext, ) -> Result<Maybe<u16, AsNullable>, Error>
async fn supported_modes<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<ModeOptionStructArrayBuilder<P>, ModeOptionStructBuilder<P>>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn current_mode(&self, ctx: impl ReadContext) -> Result<u8, Error>
async fn handle_change_to_mode( &self, ctx: impl InvokeContext, request: ChangeToModeRequest<'_>, ) -> 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 start_up_mode( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u8, AsNullable>, Error>>
fn on_mode( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u8, AsNullable>, Error>>
fn set_start_up_mode( &self, ctx: impl WriteContext, value: Maybe<u8, AsNullable>, ) -> impl Future<Output = Result<(), Error>>
fn set_on_mode( &self, ctx: impl WriteContext, value: Maybe<u8, AsNullable>, ) -> impl Future<Output = Result<(), Error>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".