pub trait ClusterAsyncHandler {
const CLUSTER: Cluster<'static>;
Show 34 methods
// Required methods
fn dataver(&self) -> u32;
fn dataver_changed(&self);
async fn data_model_revision(
&self,
ctx: impl ReadContext,
) -> Result<u16, Error>;
async fn vendor_name<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn vendor_id(&self, ctx: impl ReadContext) -> Result<u16, Error>;
async fn product_name<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn product_id(&self, ctx: impl ReadContext) -> Result<u16, Error>;
async fn node_label<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn location<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn hardware_version(
&self,
ctx: impl ReadContext,
) -> Result<u16, Error>;
async fn hardware_version_string<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn software_version(
&self,
ctx: impl ReadContext,
) -> Result<u32, Error>;
async fn software_version_string<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn capability_minima<P>(
&self,
ctx: impl ReadContext,
builder: CapabilityMinimaStructBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn set_node_label(
&self,
ctx: impl WriteContext,
value: &str,
) -> Result<(), Error>;
async fn set_location(
&self,
ctx: impl WriteContext,
value: &str,
) -> Result<(), Error>;
async fn handle_mfg_specific_ping(
&self,
ctx: impl InvokeContext,
) -> 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 manufacturing_date<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
fn part_number<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
fn product_url<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
fn product_label<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
fn serial_number<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
fn local_config_disabled(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<bool, Error>> { ... }
fn reachable(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<bool, Error>> { ... }
fn unique_id<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
fn product_appearance<P>(
&self,
ctx: impl ReadContext,
builder: ProductAppearanceStructBuilder<P>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
fn specification_version(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u32, Error>> { ... }
fn max_paths_per_invoke(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u16, Error>> { ... }
fn device_location<P>(
&self,
ctx: impl ReadContext,
builder: NullableBuilder<P, LocationDescriptorStructBuilder<P>>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
fn configuration_version(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u32, Error>> { ... }
fn set_local_config_disabled(
&self,
ctx: impl WriteContext,
value: bool,
) -> impl Future<Output = Result<(), Error>> { ... }
fn set_device_location(
&self,
ctx: impl WriteContext,
value: Maybe<LocationDescriptorStruct<'_>, 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 data_model_revision(&self, ctx: impl ReadContext) -> Result<u16, Error>
async fn vendor_name<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn vendor_id(&self, ctx: impl ReadContext) -> Result<u16, Error>
async fn product_name<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn product_id(&self, ctx: impl ReadContext) -> Result<u16, Error>
async fn node_label<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn location<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn hardware_version(&self, ctx: impl ReadContext) -> Result<u16, Error>
async fn hardware_version_string<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn software_version(&self, ctx: impl ReadContext) -> Result<u32, Error>
async fn software_version_string<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn capability_minima<P>(
&self,
ctx: impl ReadContext,
builder: CapabilityMinimaStructBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn set_node_label( &self, ctx: impl WriteContext, value: &str, ) -> Result<(), Error>
async fn set_location( &self, ctx: impl WriteContext, value: &str, ) -> Result<(), Error>
async fn handle_mfg_specific_ping( &self, ctx: impl InvokeContext, ) -> 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 manufacturing_date<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
fn part_number<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
fn product_url<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
fn product_label<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
fn serial_number<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
fn local_config_disabled( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<bool, Error>>
fn reachable( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<bool, Error>>
fn unique_id<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
fn product_appearance<P>(
&self,
ctx: impl ReadContext,
builder: ProductAppearanceStructBuilder<P>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
fn specification_version( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u32, Error>>
fn max_paths_per_invoke( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u16, Error>>
fn device_location<P>(
&self,
ctx: impl ReadContext,
builder: NullableBuilder<P, LocationDescriptorStructBuilder<P>>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
fn configuration_version( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u32, Error>>
fn set_local_config_disabled( &self, ctx: impl WriteContext, value: bool, ) -> impl Future<Output = Result<(), Error>>
fn set_device_location( &self, ctx: impl WriteContext, value: Maybe<LocationDescriptorStruct<'_>, 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".