pub trait ClusterAsyncHandler {
const CLUSTER: Cluster<'static>;
Show 22 methods
// Required methods
fn dataver(&self) -> u32;
fn dataver_changed(&self);
async fn max_networks(&self, ctx: impl ReadContext) -> Result<u8, Error>;
async fn networks<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<NetworkInfoStructArrayBuilder<P>, NetworkInfoStructBuilder<P>>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn interface_enabled(
&self,
ctx: impl ReadContext,
) -> Result<bool, Error>;
async fn last_networking_status(
&self,
ctx: impl ReadContext,
) -> Result<Maybe<NetworkCommissioningStatusEnum, AsNullable>, Error>;
async fn last_network_id<P>(
&self,
ctx: impl ReadContext,
builder: NullableBuilder<P, OctetsBuilder<P>>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn last_connect_error_value(
&self,
ctx: impl ReadContext,
) -> Result<Maybe<i32, AsNullable>, Error>;
async fn set_interface_enabled(
&self,
ctx: impl WriteContext,
value: bool,
) -> Result<(), Error>;
async fn handle_scan_networks<P>(
&self,
ctx: impl InvokeContext,
request: ScanNetworksRequest<'_>,
response: ScanNetworksResponseBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn handle_add_or_update_wi_fi_network<P>(
&self,
ctx: impl InvokeContext,
request: AddOrUpdateWiFiNetworkRequest<'_>,
response: NetworkConfigResponseBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn handle_add_or_update_thread_network<P>(
&self,
ctx: impl InvokeContext,
request: AddOrUpdateThreadNetworkRequest<'_>,
response: NetworkConfigResponseBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn handle_remove_network<P>(
&self,
ctx: impl InvokeContext,
request: RemoveNetworkRequest<'_>,
response: NetworkConfigResponseBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn handle_connect_network<P>(
&self,
ctx: impl InvokeContext,
request: ConnectNetworkRequest<'_>,
response: ConnectNetworkResponseBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn handle_reorder_network<P>(
&self,
ctx: impl InvokeContext,
request: ReorderNetworkRequest<'_>,
response: NetworkConfigResponseBuilder<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 scan_max_time_seconds(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u8, Error>> { ... }
fn connect_max_time_seconds(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u8, Error>> { ... }
fn supported_wi_fi_bands<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<ToTLVArrayBuilder<P, WiFiBandEnum>, ToTLVBuilder<P, WiFiBandEnum>>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
fn supported_thread_features(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<ThreadCapabilitiesBitmap, Error>> { ... }
fn thread_version(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u16, Error>> { ... }
}Expand description
The handler trait for the cluster.
Required Associated Constants§
Required Methods§
fn dataver(&self) -> u32
fn dataver_changed(&self)
async fn max_networks(&self, ctx: impl ReadContext) -> Result<u8, Error>
async fn networks<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<NetworkInfoStructArrayBuilder<P>, NetworkInfoStructBuilder<P>>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn interface_enabled(&self, ctx: impl ReadContext) -> Result<bool, Error>
async fn last_networking_status( &self, ctx: impl ReadContext, ) -> Result<Maybe<NetworkCommissioningStatusEnum, AsNullable>, Error>
async fn last_network_id<P>(
&self,
ctx: impl ReadContext,
builder: NullableBuilder<P, OctetsBuilder<P>>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn last_connect_error_value( &self, ctx: impl ReadContext, ) -> Result<Maybe<i32, AsNullable>, Error>
async fn set_interface_enabled( &self, ctx: impl WriteContext, value: bool, ) -> Result<(), Error>
async fn handle_scan_networks<P>(
&self,
ctx: impl InvokeContext,
request: ScanNetworksRequest<'_>,
response: ScanNetworksResponseBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn handle_add_or_update_wi_fi_network<P>(
&self,
ctx: impl InvokeContext,
request: AddOrUpdateWiFiNetworkRequest<'_>,
response: NetworkConfigResponseBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn handle_add_or_update_thread_network<P>(
&self,
ctx: impl InvokeContext,
request: AddOrUpdateThreadNetworkRequest<'_>,
response: NetworkConfigResponseBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn handle_remove_network<P>(
&self,
ctx: impl InvokeContext,
request: RemoveNetworkRequest<'_>,
response: NetworkConfigResponseBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn handle_connect_network<P>(
&self,
ctx: impl InvokeContext,
request: ConnectNetworkRequest<'_>,
response: ConnectNetworkResponseBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn handle_reorder_network<P>(
&self,
ctx: impl InvokeContext,
request: ReorderNetworkRequest<'_>,
response: NetworkConfigResponseBuilder<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 scan_max_time_seconds( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u8, Error>>
fn connect_max_time_seconds( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u8, Error>>
fn supported_wi_fi_bands<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<ToTLVArrayBuilder<P, WiFiBandEnum>, ToTLVBuilder<P, WiFiBandEnum>>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
fn supported_thread_features( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<ThreadCapabilitiesBitmap, Error>>
fn thread_version( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u16, Error>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".