pub trait ClusterHandler {
const CLUSTER: Cluster<'static>;
Show 34 methods
// Required methods
fn dataver(&self) -> u32;
fn dataver_changed(&self);
fn data_model_revision(&self, ctx: impl ReadContext) -> Result<u16, Error>;
fn vendor_name<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
fn vendor_id(&self, ctx: impl ReadContext) -> Result<u16, Error>;
fn product_name<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
fn product_id(&self, ctx: impl ReadContext) -> Result<u16, Error>;
fn node_label<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
fn location<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
fn hardware_version(&self, ctx: impl ReadContext) -> Result<u16, Error>;
fn hardware_version_string<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
fn software_version(&self, ctx: impl ReadContext) -> Result<u32, Error>;
fn software_version_string<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
fn capability_minima<P>(
&self,
ctx: impl ReadContext,
builder: CapabilityMinimaStructBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
fn set_node_label(
&self,
ctx: impl WriteContext,
value: &str,
) -> Result<(), Error>;
fn set_location(
&self,
ctx: impl WriteContext,
value: &str,
) -> Result<(), Error>;
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>,
) -> Result<P, Error>
where P: TLVBuilderParent { ... }
fn part_number<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent { ... }
fn product_url<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent { ... }
fn product_label<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent { ... }
fn serial_number<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent { ... }
fn local_config_disabled(
&self,
ctx: impl ReadContext,
) -> Result<bool, Error> { ... }
fn reachable(&self, ctx: impl ReadContext) -> Result<bool, Error> { ... }
fn unique_id<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent { ... }
fn product_appearance<P>(
&self,
ctx: impl ReadContext,
builder: ProductAppearanceStructBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent { ... }
fn specification_version(&self, ctx: impl ReadContext) -> Result<u32, Error> { ... }
fn max_paths_per_invoke(&self, ctx: impl ReadContext) -> Result<u16, Error> { ... }
fn device_location<P>(
&self,
ctx: impl ReadContext,
builder: NullableBuilder<P, LocationDescriptorStructBuilder<P>>,
) -> Result<P, Error>
where P: TLVBuilderParent { ... }
fn configuration_version(&self, ctx: impl ReadContext) -> Result<u32, Error> { ... }
fn set_local_config_disabled(
&self,
ctx: impl WriteContext,
value: bool,
) -> Result<(), Error> { ... }
fn set_device_location(
&self,
ctx: impl WriteContext,
value: Maybe<LocationDescriptorStruct<'_>, AsNullable>,
) -> Result<(), Error> { ... }
}Expand description
The handler trait for the cluster.
Required Associated Constants§
Required Methods§
fn dataver(&self) -> u32
fn dataver_changed(&self)
fn data_model_revision(&self, ctx: impl ReadContext) -> Result<u16, Error>
fn vendor_name<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
fn vendor_id(&self, ctx: impl ReadContext) -> Result<u16, Error>
fn product_name<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
fn product_id(&self, ctx: impl ReadContext) -> Result<u16, Error>
fn node_label<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
fn location<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
fn hardware_version(&self, ctx: impl ReadContext) -> Result<u16, Error>
fn hardware_version_string<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
fn software_version(&self, ctx: impl ReadContext) -> Result<u32, Error>
fn software_version_string<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
fn capability_minima<P>(
&self,
ctx: impl ReadContext,
builder: CapabilityMinimaStructBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
fn set_node_label( &self, ctx: impl WriteContext, value: &str, ) -> Result<(), Error>
fn set_location(&self, ctx: impl WriteContext, value: &str) -> Result<(), Error>
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>,
) -> Result<P, Error>where
P: TLVBuilderParent,
fn part_number<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
fn product_url<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
fn product_label<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
fn serial_number<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
fn local_config_disabled(&self, ctx: impl ReadContext) -> Result<bool, Error>
fn reachable(&self, ctx: impl ReadContext) -> Result<bool, Error>
fn unique_id<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
fn product_appearance<P>(
&self,
ctx: impl ReadContext,
builder: ProductAppearanceStructBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
fn specification_version(&self, ctx: impl ReadContext) -> Result<u32, Error>
fn max_paths_per_invoke(&self, ctx: impl ReadContext) -> Result<u16, Error>
fn device_location<P>(
&self,
ctx: impl ReadContext,
builder: NullableBuilder<P, LocationDescriptorStructBuilder<P>>,
) -> Result<P, Error>where
P: TLVBuilderParent,
fn configuration_version(&self, ctx: impl ReadContext) -> Result<u32, Error>
fn set_local_config_disabled( &self, ctx: impl WriteContext, value: bool, ) -> Result<(), Error>
fn set_device_location( &self, ctx: impl WriteContext, value: Maybe<LocationDescriptorStruct<'_>, AsNullable>, ) -> Result<(), Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".