Skip to main content

ClusterAsyncHandler

Trait ClusterAsyncHandler 

Source
pub trait ClusterAsyncHandler {
    const CLUSTER: Cluster<'static>;
Show 14 methods // Required methods fn dataver(&self) -> u32; fn dataver_changed(&self); async fn phase_list<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<NullableBuilder<P, Utf8StrArrayBuilder<P>>, Utf8StrBuilder<P>>, ) -> Result<P, Error> where P: TLVBuilderParent; async fn current_phase( &self, ctx: impl ReadContext, ) -> Result<Maybe<u8, AsNullable>, Error>; async fn operational_state_list<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<OperationalStateStructArrayBuilder<P>, OperationalStateStructBuilder<P>>, ) -> Result<P, Error> where P: TLVBuilderParent; async fn operational_state( &self, ctx: impl ReadContext, ) -> Result<OperationalStateEnum, Error>; async fn operational_error<P>( &self, ctx: impl ReadContext, builder: ErrorStateStructBuilder<P>, ) -> Result<P, Error> where P: TLVBuilderParent; async fn handle_pause<P>( &self, ctx: impl InvokeContext, response: OperationalCommandResponseBuilder<P>, ) -> Result<P, Error> where P: TLVBuilderParent; async fn handle_stop<P>( &self, ctx: impl InvokeContext, response: OperationalCommandResponseBuilder<P>, ) -> Result<P, Error> where P: TLVBuilderParent; async fn handle_start<P>( &self, ctx: impl InvokeContext, response: OperationalCommandResponseBuilder<P>, ) -> Result<P, Error> where P: TLVBuilderParent; async fn handle_resume<P>( &self, ctx: impl InvokeContext, response: OperationalCommandResponseBuilder<P>, ) -> Result<P, Error> where P: TLVBuilderParent; // 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, ) -> impl Future<Output = Result<Maybe<u32, AsNullable>, 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§

Source

fn dataver(&self) -> u32

Source

fn dataver_changed(&self)

Source

async fn phase_list<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<NullableBuilder<P, Utf8StrArrayBuilder<P>>, Utf8StrBuilder<P>>, ) -> Result<P, Error>

Source

async fn current_phase( &self, ctx: impl ReadContext, ) -> Result<Maybe<u8, AsNullable>, Error>

Source

async fn operational_state_list<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<OperationalStateStructArrayBuilder<P>, OperationalStateStructBuilder<P>>, ) -> Result<P, Error>

Source

async fn operational_state( &self, ctx: impl ReadContext, ) -> Result<OperationalStateEnum, Error>

Source

async fn operational_error<P>( &self, ctx: impl ReadContext, builder: ErrorStateStructBuilder<P>, ) -> Result<P, Error>

Source

async fn handle_pause<P>( &self, ctx: impl InvokeContext, response: OperationalCommandResponseBuilder<P>, ) -> Result<P, Error>

Source

async fn handle_stop<P>( &self, ctx: impl InvokeContext, response: OperationalCommandResponseBuilder<P>, ) -> Result<P, Error>

Source

async fn handle_start<P>( &self, ctx: impl InvokeContext, response: OperationalCommandResponseBuilder<P>, ) -> Result<P, Error>

Source

async fn handle_resume<P>( &self, ctx: impl InvokeContext, response: OperationalCommandResponseBuilder<P>, ) -> Result<P, Error>

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, ) -> impl Future<Output = Result<Maybe<u32, AsNullable>, 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> ClusterAsyncHandler for &T

Source§

const CLUSTER: Cluster<'static> = T::CLUSTER

Source§

fn dataver(&self) -> u32

Source§

fn dataver_changed(&self)

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 phase_list<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<NullableBuilder<P, Utf8StrArrayBuilder<P>>, Utf8StrBuilder<P>>, ) -> impl Future<Output = Result<P, Error>>

Source§

fn current_phase( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u8, AsNullable>, Error>>

Source§

fn countdown_time( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>>

Source§

fn operational_state_list<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<OperationalStateStructArrayBuilder<P>, OperationalStateStructBuilder<P>>, ) -> impl Future<Output = Result<P, Error>>

Source§

fn operational_state( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<OperationalStateEnum, Error>>

Source§

fn operational_error<P>( &self, ctx: impl ReadContext, builder: ErrorStateStructBuilder<P>, ) -> impl Future<Output = Result<P, Error>>

Source§

fn handle_pause<P>( &self, ctx: impl InvokeContext, response: OperationalCommandResponseBuilder<P>, ) -> impl Future<Output = Result<P, Error>>

Source§

fn handle_stop<P>( &self, ctx: impl InvokeContext, response: OperationalCommandResponseBuilder<P>, ) -> impl Future<Output = Result<P, Error>>

Source§

fn handle_start<P>( &self, ctx: impl InvokeContext, response: OperationalCommandResponseBuilder<P>, ) -> impl Future<Output = Result<P, Error>>

Source§

fn handle_resume<P>( &self, ctx: impl InvokeContext, response: OperationalCommandResponseBuilder<P>, ) -> impl Future<Output = Result<P, Error>>

Implementors§