pub trait ClusterAsyncHandler {
const CLUSTER: Cluster<'static>;
Show 34 methods
// Required methods
fn dataver(&self) -> u32;
fn dataver_changed(&self);
async fn type(&self, ctx: impl ReadContext) -> Result<Type, Error>;
async fn config_status(
&self,
ctx: impl ReadContext,
) -> Result<ConfigStatus, Error>;
async fn operational_status(
&self,
ctx: impl ReadContext,
) -> Result<OperationalStatus, Error>;
async fn end_product_type(
&self,
ctx: impl ReadContext,
) -> Result<EndProductType, Error>;
async fn mode(&self, ctx: impl ReadContext) -> Result<Mode, Error>;
async fn set_mode(
&self,
ctx: impl WriteContext,
value: Mode,
) -> Result<(), Error>;
async fn handle_up_or_open(
&self,
ctx: impl InvokeContext,
) -> Result<(), Error>;
async fn handle_down_or_close(
&self,
ctx: impl InvokeContext,
) -> Result<(), Error>;
async fn handle_stop_motion(
&self,
ctx: impl InvokeContext,
) -> Result<(), Error>;
async fn handle_go_to_lift_value(
&self,
ctx: impl InvokeContext,
request: GoToLiftValueRequest<'_>,
) -> Result<(), Error>;
async fn handle_go_to_lift_percentage(
&self,
ctx: impl InvokeContext,
request: GoToLiftPercentageRequest<'_>,
) -> Result<(), Error>;
async fn handle_go_to_tilt_value(
&self,
ctx: impl InvokeContext,
request: GoToTiltValueRequest<'_>,
) -> Result<(), Error>;
async fn handle_go_to_tilt_percentage(
&self,
ctx: impl InvokeContext,
request: GoToTiltPercentageRequest<'_>,
) -> 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 physical_closed_limit_lift(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u16, Error>> { ... }
fn physical_closed_limit_tilt(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u16, Error>> { ... }
fn current_position_lift(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<Maybe<u16, AsNullable>, Error>> { ... }
fn current_position_tilt(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<Maybe<u16, AsNullable>, Error>> { ... }
fn number_of_actuations_lift(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u16, Error>> { ... }
fn number_of_actuations_tilt(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u16, Error>> { ... }
fn current_position_lift_percentage(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<Maybe<u8, AsNullable>, Error>> { ... }
fn current_position_tilt_percentage(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<Maybe<u8, AsNullable>, Error>> { ... }
fn target_position_lift_percent_100_ths(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<Maybe<u16, AsNullable>, Error>> { ... }
fn target_position_tilt_percent_100_ths(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<Maybe<u16, AsNullable>, Error>> { ... }
fn current_position_lift_percent_100_ths(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<Maybe<u16, AsNullable>, Error>> { ... }
fn current_position_tilt_percent_100_ths(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<Maybe<u16, AsNullable>, Error>> { ... }
fn installed_open_limit_lift(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u16, Error>> { ... }
fn installed_closed_limit_lift(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u16, Error>> { ... }
fn installed_open_limit_tilt(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u16, Error>> { ... }
fn installed_closed_limit_tilt(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u16, Error>> { ... }
fn safety_status(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<SafetyStatus, Error>> { ... }
}Expand description
The handler trait for the cluster.
Required Associated Constants§
Required Methods§
fn dataver(&self) -> u32
fn dataver_changed(&self)
async fn type(&self, ctx: impl ReadContext) -> Result<Type, Error>
async fn config_status( &self, ctx: impl ReadContext, ) -> Result<ConfigStatus, Error>
async fn operational_status( &self, ctx: impl ReadContext, ) -> Result<OperationalStatus, Error>
async fn end_product_type( &self, ctx: impl ReadContext, ) -> Result<EndProductType, Error>
async fn mode(&self, ctx: impl ReadContext) -> Result<Mode, Error>
async fn set_mode( &self, ctx: impl WriteContext, value: Mode, ) -> Result<(), Error>
async fn handle_up_or_open(&self, ctx: impl InvokeContext) -> Result<(), Error>
async fn handle_down_or_close( &self, ctx: impl InvokeContext, ) -> Result<(), Error>
async fn handle_stop_motion(&self, ctx: impl InvokeContext) -> Result<(), Error>
async fn handle_go_to_lift_value( &self, ctx: impl InvokeContext, request: GoToLiftValueRequest<'_>, ) -> Result<(), Error>
async fn handle_go_to_lift_percentage( &self, ctx: impl InvokeContext, request: GoToLiftPercentageRequest<'_>, ) -> Result<(), Error>
async fn handle_go_to_tilt_value( &self, ctx: impl InvokeContext, request: GoToTiltValueRequest<'_>, ) -> Result<(), Error>
async fn handle_go_to_tilt_percentage( &self, ctx: impl InvokeContext, request: GoToTiltPercentageRequest<'_>, ) -> 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 physical_closed_limit_lift( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u16, Error>>
fn physical_closed_limit_tilt( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u16, Error>>
fn current_position_lift( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u16, AsNullable>, Error>>
fn current_position_tilt( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u16, AsNullable>, Error>>
fn number_of_actuations_lift( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u16, Error>>
fn number_of_actuations_tilt( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u16, Error>>
fn current_position_lift_percentage( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u8, AsNullable>, Error>>
fn current_position_tilt_percentage( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u8, AsNullable>, Error>>
fn target_position_lift_percent_100_ths( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u16, AsNullable>, Error>>
fn target_position_tilt_percent_100_ths( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u16, AsNullable>, Error>>
fn current_position_lift_percent_100_ths( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u16, AsNullable>, Error>>
fn current_position_tilt_percent_100_ths( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u16, AsNullable>, Error>>
fn installed_open_limit_lift( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u16, Error>>
fn installed_closed_limit_lift( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u16, Error>>
fn installed_open_limit_tilt( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u16, Error>>
fn installed_closed_limit_tilt( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u16, Error>>
fn safety_status( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<SafetyStatus, Error>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".