From 367c090fd1cf49cd6863395a28e0045d02dd7cb7 Mon Sep 17 00:00:00 2001 From: Marcos Boyington <15697303+gmarcosb@users.noreply.github.com> Date: Tue, 27 Jan 2026 12:19:47 -0700 Subject: [PATCH 1/9] Remove non-async cluster methods & go full-async Methods were already being wrapped in async helpers to translate the method to async, so this removes a lot of code maintenance Rust & LLVM *should* be able to optimize away any async method which don't actually suspend, resulting in similar footprints Allowing all methods to be async simplifies long-running tasks such as writing to disk, scanning networks, etc. In C++ this is currently done via a split - the response message (containing e.g. wifi networks) is sent at a later time via an ad-hock callback Rust having everything be async will provide a consistent & clean interface for all clusters vs hacky callbacks in C++ --- bloat-check/src/bin/bloat-check.rs | 4 +- examples/src/bin/bridge.rs | 27 +- examples/src/bin/chip_tool_tests.rs | 19 +- examples/src/bin/dimmable_light.rs | 10 +- examples/src/bin/media_player.rs | 36 +- examples/src/bin/onoff_light.rs | 7 +- examples/src/bin/onoff_light_bt.rs | 2 +- examples/src/bin/speaker.rs | 9 +- rs-matter-macros/.rustfmt.toml | 1 + rs-matter-macros/src/idl.rs | 4492 +++++++++++------ rs-matter-macros/src/idl/handler.rs | 374 +- rs-matter/src/dm/clusters/acl.rs | 18 +- rs-matter/src/dm/clusters/adm_comm.rs | 15 +- rs-matter/src/dm/clusters/basic_info.rs | 58 +- rs-matter/src/dm/clusters/desc.rs | 8 +- rs-matter/src/dm/clusters/eth_diag.rs | 2 +- rs-matter/src/dm/clusters/gen_comm.rs | 26 +- rs-matter/src/dm/clusters/gen_diag.rs | 12 +- rs-matter/src/dm/clusters/grp_key_mgmt.rs | 18 +- rs-matter/src/dm/clusters/level_control.rs | 6 +- rs-matter/src/dm/clusters/net_comm.rs | 6 +- rs-matter/src/dm/clusters/noc.rs | 32 +- rs-matter/src/dm/clusters/on_off.rs | 6 +- rs-matter/src/dm/clusters/thread_diag.rs | 43 +- rs-matter/src/dm/clusters/unit_testing.rs | 434 +- rs-matter/src/dm/clusters/wifi_diag.rs | 18 +- rs-matter/src/dm/endpoints.rs | 58 +- rs-matter/src/dm/types/handler.rs | 194 +- rs-matter/src/dm/types/metadata.rs | 34 +- rs-matter/tests/common/e2e/im/echo_cluster.rs | 14 +- rs-matter/tests/common/e2e/im/handler.rs | 27 +- rs-matter/tests/data_model/attributes.rs | 2 +- rs-matter/tests/data_model/commands.rs | 2 +- 33 files changed, 3576 insertions(+), 2438 deletions(-) create mode 100644 rs-matter-macros/.rustfmt.toml diff --git a/bloat-check/src/bin/bloat-check.rs b/bloat-check/src/bin/bloat-check.rs index 7131526ad..8beea639d 100644 --- a/bloat-check/src/bin/bloat-check.rs +++ b/bloat-check/src/bin/bloat-check.rs @@ -197,7 +197,7 @@ type AppBtp<'a> = Btp<&'a BtpContext, CriticalSectionRawMutex, FakeGattPeripheral>; type AppTransport<'a> = ChainedNetwork, fn(&Address) -> bool>; type AppHandler<'a> = handler_chain_type!( - EpClMatcher => on_off::HandlerAsyncAdaptor>, + EpClMatcher => on_off::HandlerAdaptor>, EpClMatcher => Async>> | EmptyHandler ); @@ -639,7 +639,7 @@ where ) .chain( EpClMatcher::new(Some(1), Some(TestOnOffDeviceLogic::CLUSTER.id)), - on_off::HandlerAsyncAdaptor(on_off), + on_off::HandlerAdaptor(on_off), ), ), ) diff --git a/examples/src/bin/bridge.rs b/examples/src/bin/bridge.rs index bbd27e629..5790717f6 100644 --- a/examples/src/bin/bridge.rs +++ b/examples/src/bin/bridge.rs @@ -36,8 +36,8 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::unix::UnixNetifs; use rs_matter::dm::subscriptions::DefaultSubscriptions; use rs_matter::dm::{ - Async, AsyncHandler, AsyncMetadata, Cluster, DataModel, Dataver, EmptyHandler, Endpoint, - EpClMatcher, InvokeContext, Node, ReadContext, + AsyncHandler, AsyncMetadata, Cluster, DataModel, Dataver, EmptyHandler, Endpoint, EpClMatcher, + InvokeContext, Node, ReadContext, }; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -220,10 +220,7 @@ fn dm_handler<'a, OH: OnOffHooks, LH: LevelControlHooks>( // https://www.1home.io/docs/en/server/configure-devices#manage-rooms .chain( EpClMatcher::new(Some(1), Some(desc::DescHandler::CLUSTER.id)), - Async( - desc::DescHandler::new_aggregator(Dataver::new_rand(matter.rand())) - .adapt(), - ), + desc::DescHandler::new_aggregator(Dataver::new_rand(matter.rand())).adapt(), ) // The following chains are the handlers for the bridged devices corresponding to ep 2 and ep3. // @@ -236,27 +233,27 @@ fn dm_handler<'a, OH: OnOffHooks, LH: LevelControlHooks>( // the lamp, or to switch it on/off. .chain( EpClMatcher::new(Some(2), Some(desc::DescHandler::CLUSTER.id)), - Async(desc::DescHandler::new(Dataver::new_rand(matter.rand())).adapt()), + desc::DescHandler::new(Dataver::new_rand(matter.rand())).adapt(), ) .chain( EpClMatcher::new(Some(2), Some(TestOnOffDeviceLogic::CLUSTER.id)), - on_off::HandlerAsyncAdaptor(on_off_ep2), + on_off::HandlerAdaptor(on_off_ep2), ) .chain( EpClMatcher::new(Some(2), Some(BridgedHandler::CLUSTER.id)), - Async(BridgedHandler::new(Dataver::new_rand(matter.rand())).adapt()), + BridgedHandler::new(Dataver::new_rand(matter.rand())).adapt(), ) .chain( EpClMatcher::new(Some(3), Some(desc::DescHandler::CLUSTER.id)), - Async(desc::DescHandler::new(Dataver::new_rand(matter.rand())).adapt()), + desc::DescHandler::new(Dataver::new_rand(matter.rand())).adapt(), ) .chain( EpClMatcher::new(Some(3), Some(TestOnOffDeviceLogic::CLUSTER.id)), - on_off::HandlerAsyncAdaptor(on_off_ep3), + on_off::HandlerAdaptor(on_off_ep3), ) .chain( EpClMatcher::new(Some(3), Some(BridgedHandler::CLUSTER.id)), - Async(BridgedHandler::new(Dataver::new_rand(matter.rand())).adapt()), + BridgedHandler::new(Dataver::new_rand(matter.rand())).adapt(), ), ), ), @@ -292,7 +289,7 @@ impl bridged_device_basic_information::ClusterHandler for BridgedHandler { self.dataver.changed(); } - fn reachable(&self, _ctx: impl ReadContext) -> Result { + async fn reachable(&self, _ctx: impl ReadContext) -> Result { // This is the only mandatory attribute. // // We always report that the bridged device is reachable, @@ -301,7 +298,7 @@ impl bridged_device_basic_information::ClusterHandler for BridgedHandler { Ok(true) } - fn unique_id( + async fn unique_id( &self, _ctx: impl ReadContext, _builder: Utf8StrBuilder

, @@ -309,7 +306,7 @@ impl bridged_device_basic_information::ClusterHandler for BridgedHandler { todo!() } - fn handle_keep_active( + async fn handle_keep_active( &self, _ctx: impl InvokeContext, _request: KeepActiveRequest<'_>, diff --git a/examples/src/bin/chip_tool_tests.rs b/examples/src/bin/chip_tool_tests.rs index bc7f09802..d42dab1be 100644 --- a/examples/src/bin/chip_tool_tests.rs +++ b/examples/src/bin/chip_tool_tests.rs @@ -49,8 +49,7 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::unix::UnixNetifs; use rs_matter::dm::subscriptions::DefaultSubscriptions; use rs_matter::dm::{ - Async, AsyncHandler, AsyncMetadata, DataModel, Dataver, EmptyHandler, Endpoint, EpClMatcher, - Node, + AsyncHandler, AsyncMetadata, DataModel, Dataver, EmptyHandler, Endpoint, EpClMatcher, Node, }; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -276,21 +275,19 @@ fn dm_handler<'a, OH: OnOffHooks, LH: LevelControlHooks>( EmptyHandler .chain( EpClMatcher::new(Some(1), Some(desc::DescHandler::CLUSTER.id)), - Async(desc::DescHandler::new(Dataver::new_rand(matter.rand())).adapt()), + desc::DescHandler::new(Dataver::new_rand(matter.rand())).adapt(), ) .chain( EpClMatcher::new(Some(1), Some(TestOnOffDeviceLogic::CLUSTER.id)), - on_off::HandlerAsyncAdaptor(on_off), + on_off::HandlerAdaptor(on_off), ) .chain( EpClMatcher::new(Some(1), Some(UnitTestingHandler::CLUSTER.id)), - Async( - UnitTestingHandler::new( - Dataver::new_rand(matter.rand()), - unit_testing_data, - ) - .adapt(), - ), + UnitTestingHandler::new( + Dataver::new_rand(matter.rand()), + unit_testing_data, + ) + .adapt(), ), ), ), diff --git a/examples/src/bin/dimmable_light.rs b/examples/src/bin/dimmable_light.rs index 4d95de226..8ce3478e8 100644 --- a/examples/src/bin/dimmable_light.rs +++ b/examples/src/bin/dimmable_light.rs @@ -49,8 +49,8 @@ use rs_matter::dm::networks::unix::UnixNetifs; use rs_matter::dm::subscriptions::DefaultSubscriptions; use rs_matter::dm::IMBuffer; use rs_matter::dm::{ - Async, AsyncHandler, AsyncMetadata, Cluster, DataModel, Dataver, EmptyHandler, Endpoint, - EpClMatcher, Node, + AsyncHandler, AsyncMetadata, Cluster, DataModel, Dataver, EmptyHandler, Endpoint, EpClMatcher, + Node, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::pairing::qr::QrTextType; @@ -282,15 +282,15 @@ fn dm_handler<'a, LH: LevelControlHooks, OH: OnOffHooks>( EmptyHandler .chain( EpClMatcher::new(Some(1), Some(desc::DescHandler::CLUSTER.id)), - Async(desc::DescHandler::new(Dataver::new_rand(matter.rand())).adapt()), + desc::DescHandler::new(Dataver::new_rand(matter.rand())).adapt(), ) .chain( EpClMatcher::new(Some(1), Some(OnOffDeviceLogic::CLUSTER.id)), - on_off::HandlerAsyncAdaptor(on_off), + on_off::HandlerAdaptor(on_off), ) .chain( EpClMatcher::new(Some(1), Some(LevelControlDeviceLogic::CLUSTER.id)), - level_control::HandlerAsyncAdaptor(level_control), + level_control::HandlerAdaptor(level_control), ), ), ), diff --git a/examples/src/bin/media_player.rs b/examples/src/bin/media_player.rs index 344cb99e0..68de933b4 100644 --- a/examples/src/bin/media_player.rs +++ b/examples/src/bin/media_player.rs @@ -34,19 +34,19 @@ use log::info; // Import the MediaPlayback, ContentLauncher and KeypadInput clusters from `rs-matter`. // -// User needs to implement the `ClusterAsyncHandler` trait or the `ClusterHandler` trait +// User needs to implement the `ClusterHandler` trait // so as to handle the requests from the controller. use rs_matter::dm::clusters::decl::content_launcher::{ - self, ClusterAsyncHandler as _, LaunchContentRequest, LaunchURLRequest, - LauncherResponseBuilder, SupportedProtocolsBitmap, + self, ClusterHandler as _, LaunchContentRequest, LaunchURLRequest, LauncherResponseBuilder, + SupportedProtocolsBitmap, }; use rs_matter::dm::clusters::decl::keypad_input::{ - self, ClusterAsyncHandler as _, SendKeyRequest, SendKeyResponseBuilder, + self, ClusterHandler as _, SendKeyRequest, SendKeyResponseBuilder, }; use rs_matter::dm::clusters::decl::media_playback::{ - self, ActivateAudioTrackRequest, ActivateTextTrackRequest, ClusterAsyncHandler as _, + self, ActivateAudioTrackRequest, ActivateTextTrackRequest, ClusterHandler as _, FastForwardRequest, PlaybackResponseBuilder, PlaybackStateEnum, RewindRequest, SeekRequest, SkipBackwardRequest, SkipForwardRequest, StatusEnum, }; @@ -61,8 +61,8 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::unix::UnixNetifs; use rs_matter::dm::subscriptions::DefaultSubscriptions; use rs_matter::dm::{ - ArrayAttributeRead, Async, AsyncHandler, AsyncMetadata, Cluster, DataModel, Dataver, - EmptyHandler, Endpoint, EpClMatcher, InvokeContext, Node, ReadContext, + ArrayAttributeRead, AsyncHandler, AsyncMetadata, Cluster, DataModel, Dataver, EmptyHandler, + Endpoint, EpClMatcher, InvokeContext, Node, ReadContext, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::pairing::qr::QrTextType; @@ -196,7 +196,7 @@ fn dm_handler<'a, OH: OnOffHooks, LH: LevelControlHooks>( EmptyHandler .chain( EpClMatcher::new(Some(1), Some(desc::DescHandler::CLUSTER.id)), - Async(desc::DescHandler::new(Dataver::new_rand(matter.rand())).adapt()), + desc::DescHandler::new(Dataver::new_rand(matter.rand())).adapt(), ) .chain( EpClMatcher::new(Some(1), Some(MediaHandler::CLUSTER.id)), @@ -212,7 +212,7 @@ fn dm_handler<'a, OH: OnOffHooks, LH: LevelControlHooks>( ) .chain( EpClMatcher::new(Some(1), Some(TestOnOffDeviceLogic::CLUSTER.id)), - on_off::HandlerAsyncAdaptor(on_off), + on_off::HandlerAdaptor(on_off), ), ), ), @@ -235,8 +235,8 @@ impl MediaHandler { } /// Adapt the handler instance to the generic `rs-matter` `AsyncHandler` trait - pub const fn adapt(self) -> media_playback::HandlerAsyncAdaptor { - media_playback::HandlerAsyncAdaptor(self) + pub const fn adapt(self) -> media_playback::HandlerAdaptor { + media_playback::HandlerAdaptor(self) } /// Update the state of the handler @@ -251,7 +251,7 @@ impl MediaHandler { } } -impl media_playback::ClusterAsyncHandler for MediaHandler { +impl media_playback::ClusterHandler for MediaHandler { /// The metadata cluster definition corresponding to the handler const CLUSTER: Cluster<'static> = media_playback::FULL_CLUSTER .with_attrs(with!(required)) @@ -424,12 +424,12 @@ impl ContentHandler { } /// Adapt the handler instance to the generic `rs-matter` `AsyncHandler` trait - pub const fn adapt(self) -> content_launcher::HandlerAsyncAdaptor { - content_launcher::HandlerAsyncAdaptor(self) + pub const fn adapt(self) -> content_launcher::HandlerAdaptor { + content_launcher::HandlerAdaptor(self) } } -impl content_launcher::ClusterAsyncHandler for ContentHandler { +impl content_launcher::ClusterHandler for ContentHandler { const CLUSTER: Cluster<'static> = content_launcher::FULL_CLUSTER .with_features(0b11) .with_attrs( @@ -535,12 +535,12 @@ impl KeypadInputHandler { } /// Adapt the handler instance to the generic `rs-matter` `AsyncHandler` trait - pub const fn adapt(self) -> keypad_input::HandlerAsyncAdaptor { - keypad_input::HandlerAsyncAdaptor(self) + pub const fn adapt(self) -> keypad_input::HandlerAdaptor { + keypad_input::HandlerAdaptor(self) } } -impl keypad_input::ClusterAsyncHandler for KeypadInputHandler { +impl keypad_input::ClusterHandler for KeypadInputHandler { const CLUSTER: Cluster<'static> = keypad_input::FULL_CLUSTER .with_attrs(with!(required)) .with_cmds(with!(keypad_input::CommandId::SendKey)); diff --git a/examples/src/bin/onoff_light.rs b/examples/src/bin/onoff_light.rs index 0454ac911..1fdc39a50 100644 --- a/examples/src/bin/onoff_light.rs +++ b/examples/src/bin/onoff_light.rs @@ -37,8 +37,7 @@ use rs_matter::dm::networks::unix::UnixNetifs; use rs_matter::dm::subscriptions::DefaultSubscriptions; use rs_matter::dm::IMBuffer; use rs_matter::dm::{ - Async, AsyncHandler, AsyncMetadata, DataModel, Dataver, EmptyHandler, Endpoint, EpClMatcher, - Node, + AsyncHandler, AsyncMetadata, DataModel, Dataver, EmptyHandler, Endpoint, EpClMatcher, Node, }; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -224,11 +223,11 @@ fn dm_handler<'a, OH: OnOffHooks, LH: LevelControlHooks>( EmptyHandler .chain( EpClMatcher::new(Some(1), Some(desc::DescHandler::CLUSTER.id)), - Async(desc::DescHandler::new(Dataver::new_rand(matter.rand())).adapt()), + desc::DescHandler::new(Dataver::new_rand(matter.rand())).adapt(), ) .chain( EpClMatcher::new(Some(1), Some(TestOnOffDeviceLogic::CLUSTER.id)), - on_off::HandlerAsyncAdaptor(on_off), + on_off::HandlerAdaptor(on_off), ), ), ), diff --git a/examples/src/bin/onoff_light_bt.rs b/examples/src/bin/onoff_light_bt.rs index 0b816d5ba..5cbffd14c 100644 --- a/examples/src/bin/onoff_light_bt.rs +++ b/examples/src/bin/onoff_light_bt.rs @@ -275,7 +275,7 @@ where ) .chain( EpClMatcher::new(Some(1), Some(TestOnOffDeviceLogic::CLUSTER.id)), - on_off::HandlerAsyncAdaptor(on_off), + on_off::HandlerAdaptor(on_off), ), ), ), diff --git a/examples/src/bin/speaker.rs b/examples/src/bin/speaker.rs index 911d79ac2..b01389c9b 100644 --- a/examples/src/bin/speaker.rs +++ b/examples/src/bin/speaker.rs @@ -38,8 +38,7 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::unix::UnixNetifs; use rs_matter::dm::subscriptions::DefaultSubscriptions; use rs_matter::dm::{ - Async, AsyncHandler, AsyncMetadata, DataModel, Dataver, EmptyHandler, Endpoint, EpClMatcher, - Node, + AsyncHandler, AsyncMetadata, DataModel, Dataver, EmptyHandler, Endpoint, EpClMatcher, Node, }; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -191,15 +190,15 @@ fn dm_handler<'a, LH: LevelControlHooks, OH: OnOffHooks>( EmptyHandler .chain( EpClMatcher::new(Some(1), Some(desc::DescHandler::CLUSTER.id)), - Async(desc::DescHandler::new(Dataver::new_rand(matter.rand())).adapt()), + desc::DescHandler::new(Dataver::new_rand(matter.rand())).adapt(), ) .chain( EpClMatcher::new(Some(1), Some(LevelControlDeviceLogic::CLUSTER.id)), - level_control::HandlerAsyncAdaptor(level_control), + level_control::HandlerAdaptor(level_control), ) .chain( EpClMatcher::new(Some(1), Some(TestOnOffDeviceLogic::CLUSTER.id)), - on_off::HandlerAsyncAdaptor(on_off), + on_off::HandlerAdaptor(on_off), ), ), ), diff --git a/rs-matter-macros/.rustfmt.toml b/rs-matter-macros/.rustfmt.toml new file mode 100644 index 000000000..36c419bb3 --- /dev/null +++ b/rs-matter-macros/.rustfmt.toml @@ -0,0 +1 @@ +edition = "2021" \ No newline at end of file diff --git a/rs-matter-macros/src/idl.rs b/rs-matter-macros/src/idl.rs index e557a642e..2a507dae1 100644 --- a/rs-matter-macros/src/idl.rs +++ b/rs-matter-macros/src/idl.rs @@ -70,13 +70,12 @@ impl IdlGenerateContext { /// in the provided IDL cluster: /// pub fn cluster(cluster: &Cluster, globals: &Entities, context: &IdlGenerateContext) -> TokenStream { - cluster_internal(cluster, globals, true, context) + cluster_internal(cluster, globals, context) } fn cluster_internal( cluster: &Cluster, globals: &Entities, - with_async: bool, context: &IdlGenerateContext, ) -> TokenStream { let cluster_module_name = Ident::new( @@ -101,9 +100,9 @@ fn cluster_internal( let command_response_id = cluster::command_response_id(entities, context); let cluster_meta = cluster::cluster(cluster, globals, context); - let handler = handler::handler(false, false, cluster, globals, context); - let handler_inherent_impl = handler::handler(false, true, cluster, globals, context); - let handler_adaptor = handler::handler_adaptor(false, cluster, globals, context); + let handler = handler::handler(false, cluster, globals, context); + let handler_inherent_impl = handler::handler(true, cluster, globals, context); + let handler_adaptor = handler::handler_adaptor(cluster, globals, context); let quote = quote!( #bitmaps @@ -131,24 +130,6 @@ fn cluster_internal( #handler_adaptor ); - let quote = if with_async { - let async_handler = handler::handler(true, false, cluster, globals, context); - let async_handler_inherent_impl = handler::handler(true, true, cluster, globals, context); - let async_handler_adaptor = handler::handler_adaptor(true, cluster, globals, context); - - quote!( - #quote - - #async_handler - - #async_handler_inherent_impl - - #async_handler_adaptor - ) - } else { - quote - }; - quote!( #[doc = #cluster_module_doc] #[allow(async_fn_in_trait)] @@ -241,11 +222,11 @@ mod tests { // panic!( // "====\n{}\n====", - // &cluster_internal(cluster, &idl.globals, false, &context) + // &cluster_internal(cluster, &idl.globals, &context) // ); assert_tokenstreams_eq!( - &cluster_internal(cluster, &idl.globals, false, &context), + &cluster_internal(cluster, &idl.globals, &context), &TOKEN_STREAM_OUTPUT ); } @@ -274,193 +255,417 @@ mod tests { #[allow(clippy::uninlined_format_args)] #[allow(unexpected_cfgs)] pub mod globals { - #[cfg(not(feature = "defmt"))] rs_matter_crate::reexport::bitflags::bitflags! { # [repr (transparent)] # [derive (Default , Debug , Copy , Clone , Eq , PartialEq , Hash)] pub struct TestGlobalBitmap : u32 { const FIRST_BIT = 1 ; const SECOND_BIT = 2 ; const _INTERNAL_ALL_BITS = ! 0 ; } } #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::bitflags! { # [repr (transparent)] # [derive (Default)] pub struct TestGlobalBitmap : u32 { const FIRST_BIT = 1 ; const SECOND_BIT = 2 ; const _INTERNAL_ALL_BITS = ! 0 ; } } rs_matter_crate::bitflags_tlv!(TestGlobalBitmap , u32); #[derive(Debug, PartialEq, Eq, Copy, Clone, Hash, rs_matter_crate :: tlv :: FromTLV, rs_matter_crate :: tlv :: ToTLV)] + #[cfg(not(feature = "defmt"))] + rs_matter_crate::reexport::bitflags::bitflags! { # [repr (transparent)] # [derive (Default , Debug , Copy , Clone , Eq , PartialEq , Hash)] pub struct TestGlobalBitmap : u32 { const FIRST_BIT = 1 ; const SECOND_BIT = 2 ; const _INTERNAL_ALL_BITS = ! 0 ; } } + #[cfg(feature = "defmt")] + rs_matter_crate::reexport::defmt::bitflags! { # [repr (transparent)] # [derive (Default)] pub struct TestGlobalBitmap : u32 { const FIRST_BIT = 1 ; const SECOND_BIT = 2 ; const _INTERNAL_ALL_BITS = ! 0 ; } } + rs_matter_crate::bitflags_tlv!(TestGlobalBitmap, u32); + #[derive( + Debug, + PartialEq, + Eq, + Copy, + Clone, + Hash, + rs_matter_crate :: tlv :: FromTLV, + rs_matter_crate :: tlv :: ToTLV, + )] #[tlvargs(datatype = "u8")] #[cfg_attr(feature = "defmt", derive(rs_matter_crate::reexport::defmt::Format))] #[repr(u8)] pub enum AreaTypeTag { - #[enumval(0)] Aisle = 0, - #[enumval(1)] Attic = 1, - #[enumval(2)] BackDoor = 2, - #[enumval(3)] BackYard = 3, - #[enumval(4)] Balcony = 4, - #[enumval(5)] Ballroom = 5, - #[enumval(6)] Bathroom = 6, - #[enumval(7)] Bedroom = 7, - #[enumval(8)] Border = 8, - #[enumval(9)] Boxroom = 9, - #[enumval(10)] BreakfastRoom = 10, - #[enumval(11)] Carport = 11, - #[enumval(12)] Cellar = 12, - #[enumval(13)] Cloakroom = 13, - #[enumval(14)] Closet = 14, - #[enumval(15)] Conservatory = 15, - #[enumval(16)] Corridor = 16, - #[enumval(17)] CraftRoom = 17, - #[enumval(18)] Cupboard = 18, - #[enumval(19)] Deck = 19, - #[enumval(20)] Den = 20, - #[enumval(21)] Dining = 21, - #[enumval(22)] DrawingRoom = 22, - #[enumval(23)] DressingRoom = 23, - #[enumval(24)] Driveway = 24, - #[enumval(25)] Elevator = 25, - #[enumval(26)] Ensuite = 26, - #[enumval(27)] Entrance = 27, - #[enumval(28)] Entryway = 28, - #[enumval(29)] FamilyRoom = 29, - #[enumval(30)] Foyer = 30, - #[enumval(31)] FrontDoor = 31, - #[enumval(32)] FrontYard = 32, - #[enumval(33)] GameRoom = 33, - #[enumval(34)] Garage = 34, - #[enumval(35)] GarageDoor = 35, - #[enumval(36)] Garden = 36, - #[enumval(37)] GardenDoor = 37, - #[enumval(38)] GuestBathroom = 38, - #[enumval(39)] GuestBedroom = 39, - #[enumval(41)] GuestRoom = 41, - #[enumval(42)] Gym = 42, - #[enumval(43)] Hallway = 43, - #[enumval(44)] HearthRoom = 44, - #[enumval(45)] KidsRoom = 45, - #[enumval(46)] KidsBedroom = 46, - #[enumval(47)] Kitchen = 47, - #[enumval(49)] LaundryRoom = 49, - #[enumval(50)] Lawn = 50, - #[enumval(51)] Library = 51, - #[enumval(52)] LivingRoom = 52, - #[enumval(53)] Lounge = 53, - #[enumval(54)] MediaTVRoom = 54, - #[enumval(55)] MudRoom = 55, - #[enumval(56)] MusicRoom = 56, - #[enumval(57)] Nursery = 57, - #[enumval(58)] Office = 58, - #[enumval(59)] OutdoorKitchen = 59, - #[enumval(60)] Outside = 60, - #[enumval(61)] Pantry = 61, - #[enumval(62)] ParkingLot = 62, - #[enumval(63)] Parlor = 63, - #[enumval(64)] Patio = 64, - #[enumval(65)] PlayRoom = 65, - #[enumval(66)] PoolRoom = 66, - #[enumval(67)] Porch = 67, - #[enumval(68)] PrimaryBathroom = 68, - #[enumval(69)] PrimaryBedroom = 69, - #[enumval(70)] Ramp = 70, - #[enumval(71)] ReceptionRoom = 71, - #[enumval(72)] RecreationRoom = 72, - #[enumval(74)] Roof = 74, - #[enumval(75)] Sauna = 75, - #[enumval(76)] Scullery = 76, - #[enumval(77)] SewingRoom = 77, - #[enumval(78)] Shed = 78, - #[enumval(79)] SideDoor = 79, - #[enumval(80)] SideYard = 80, - #[enumval(81)] SittingRoom = 81, - #[enumval(82)] Snug = 82, - #[enumval(83)] Spa = 83, - #[enumval(84)] Staircase = 84, - #[enumval(85)] SteamRoom = 85, - #[enumval(86)] StorageRoom = 86, - #[enumval(87)] Studio = 87, - #[enumval(88)] Study = 88, - #[enumval(89)] SunRoom = 89, - #[enumval(90)] SwimmingPool = 90, - #[enumval(91)] Terrace = 91, - #[enumval(92)] UtilityRoom = 92, - #[enumval(93)] Ward = 93, - #[enumval(94)] Workshop = 94, - #[enumval(95)] Toilet = 95, - } - #[derive(Debug, PartialEq, Eq, Copy, Clone, Hash, rs_matter_crate :: tlv :: FromTLV, rs_matter_crate :: tlv :: ToTLV)] + #[enumval(0)] + Aisle = 0, + #[enumval(1)] + Attic = 1, + #[enumval(2)] + BackDoor = 2, + #[enumval(3)] + BackYard = 3, + #[enumval(4)] + Balcony = 4, + #[enumval(5)] + Ballroom = 5, + #[enumval(6)] + Bathroom = 6, + #[enumval(7)] + Bedroom = 7, + #[enumval(8)] + Border = 8, + #[enumval(9)] + Boxroom = 9, + #[enumval(10)] + BreakfastRoom = 10, + #[enumval(11)] + Carport = 11, + #[enumval(12)] + Cellar = 12, + #[enumval(13)] + Cloakroom = 13, + #[enumval(14)] + Closet = 14, + #[enumval(15)] + Conservatory = 15, + #[enumval(16)] + Corridor = 16, + #[enumval(17)] + CraftRoom = 17, + #[enumval(18)] + Cupboard = 18, + #[enumval(19)] + Deck = 19, + #[enumval(20)] + Den = 20, + #[enumval(21)] + Dining = 21, + #[enumval(22)] + DrawingRoom = 22, + #[enumval(23)] + DressingRoom = 23, + #[enumval(24)] + Driveway = 24, + #[enumval(25)] + Elevator = 25, + #[enumval(26)] + Ensuite = 26, + #[enumval(27)] + Entrance = 27, + #[enumval(28)] + Entryway = 28, + #[enumval(29)] + FamilyRoom = 29, + #[enumval(30)] + Foyer = 30, + #[enumval(31)] + FrontDoor = 31, + #[enumval(32)] + FrontYard = 32, + #[enumval(33)] + GameRoom = 33, + #[enumval(34)] + Garage = 34, + #[enumval(35)] + GarageDoor = 35, + #[enumval(36)] + Garden = 36, + #[enumval(37)] + GardenDoor = 37, + #[enumval(38)] + GuestBathroom = 38, + #[enumval(39)] + GuestBedroom = 39, + #[enumval(41)] + GuestRoom = 41, + #[enumval(42)] + Gym = 42, + #[enumval(43)] + Hallway = 43, + #[enumval(44)] + HearthRoom = 44, + #[enumval(45)] + KidsRoom = 45, + #[enumval(46)] + KidsBedroom = 46, + #[enumval(47)] + Kitchen = 47, + #[enumval(49)] + LaundryRoom = 49, + #[enumval(50)] + Lawn = 50, + #[enumval(51)] + Library = 51, + #[enumval(52)] + LivingRoom = 52, + #[enumval(53)] + Lounge = 53, + #[enumval(54)] + MediaTVRoom = 54, + #[enumval(55)] + MudRoom = 55, + #[enumval(56)] + MusicRoom = 56, + #[enumval(57)] + Nursery = 57, + #[enumval(58)] + Office = 58, + #[enumval(59)] + OutdoorKitchen = 59, + #[enumval(60)] + Outside = 60, + #[enumval(61)] + Pantry = 61, + #[enumval(62)] + ParkingLot = 62, + #[enumval(63)] + Parlor = 63, + #[enumval(64)] + Patio = 64, + #[enumval(65)] + PlayRoom = 65, + #[enumval(66)] + PoolRoom = 66, + #[enumval(67)] + Porch = 67, + #[enumval(68)] + PrimaryBathroom = 68, + #[enumval(69)] + PrimaryBedroom = 69, + #[enumval(70)] + Ramp = 70, + #[enumval(71)] + ReceptionRoom = 71, + #[enumval(72)] + RecreationRoom = 72, + #[enumval(74)] + Roof = 74, + #[enumval(75)] + Sauna = 75, + #[enumval(76)] + Scullery = 76, + #[enumval(77)] + SewingRoom = 77, + #[enumval(78)] + Shed = 78, + #[enumval(79)] + SideDoor = 79, + #[enumval(80)] + SideYard = 80, + #[enumval(81)] + SittingRoom = 81, + #[enumval(82)] + Snug = 82, + #[enumval(83)] + Spa = 83, + #[enumval(84)] + Staircase = 84, + #[enumval(85)] + SteamRoom = 85, + #[enumval(86)] + StorageRoom = 86, + #[enumval(87)] + Studio = 87, + #[enumval(88)] + Study = 88, + #[enumval(89)] + SunRoom = 89, + #[enumval(90)] + SwimmingPool = 90, + #[enumval(91)] + Terrace = 91, + #[enumval(92)] + UtilityRoom = 92, + #[enumval(93)] + Ward = 93, + #[enumval(94)] + Workshop = 94, + #[enumval(95)] + Toilet = 95, + } + #[derive( + Debug, + PartialEq, + Eq, + Copy, + Clone, + Hash, + rs_matter_crate :: tlv :: FromTLV, + rs_matter_crate :: tlv :: ToTLV, + )] #[tlvargs(datatype = "u8")] #[cfg_attr(feature = "defmt", derive(rs_matter_crate::reexport::defmt::Format))] #[repr(u8)] - pub enum AtomicRequestTypeEnum { #[enumval(0)] BeginWrite = 0, #[enumval(1)] CommitWrite = 1, #[enumval(2)] RollbackWrite = 2 } - #[derive(Debug, PartialEq, Eq, Copy, Clone, Hash, rs_matter_crate :: tlv :: FromTLV, rs_matter_crate :: tlv :: ToTLV)] + pub enum AtomicRequestTypeEnum { + #[enumval(0)] + BeginWrite = 0, + #[enumval(1)] + CommitWrite = 1, + #[enumval(2)] + RollbackWrite = 2, + } + #[derive( + Debug, + PartialEq, + Eq, + Copy, + Clone, + Hash, + rs_matter_crate :: tlv :: FromTLV, + rs_matter_crate :: tlv :: ToTLV, + )] #[tlvargs(datatype = "u8")] #[cfg_attr(feature = "defmt", derive(rs_matter_crate::reexport::defmt::Format))] #[repr(u8)] pub enum LandmarkTag { - #[enumval(0)] AirConditioner = 0, - #[enumval(1)] AirPurifier = 1, - #[enumval(2)] BackDoor = 2, - #[enumval(3)] BarStool = 3, - #[enumval(4)] BathMat = 4, - #[enumval(5)] Bathtub = 5, - #[enumval(6)] Bed = 6, - #[enumval(7)] Bookshelf = 7, - #[enumval(8)] Chair = 8, - #[enumval(9)] ChristmasTree = 9, - #[enumval(10)] CoatRack = 10, - #[enumval(11)] CoffeeTable = 11, - #[enumval(12)] CookingRange = 12, - #[enumval(13)] Couch = 13, - #[enumval(14)] Countertop = 14, - #[enumval(15)] Cradle = 15, - #[enumval(16)] Crib = 16, - #[enumval(17)] Desk = 17, - #[enumval(18)] DiningTable = 18, - #[enumval(19)] Dishwasher = 19, - #[enumval(20)] Door = 20, - #[enumval(21)] Dresser = 21, - #[enumval(22)] LaundryDryer = 22, - #[enumval(23)] Fan = 23, - #[enumval(24)] Fireplace = 24, - #[enumval(25)] Freezer = 25, - #[enumval(26)] FrontDoor = 26, - #[enumval(27)] HighChair = 27, - #[enumval(28)] KitchenIsland = 28, - #[enumval(29)] Lamp = 29, - #[enumval(30)] LitterBox = 30, - #[enumval(31)] Mirror = 31, - #[enumval(32)] Nightstand = 32, - #[enumval(33)] Oven = 33, - #[enumval(34)] PetBed = 34, - #[enumval(35)] PetBowl = 35, - #[enumval(36)] PetCrate = 36, - #[enumval(37)] Refrigerator = 37, - #[enumval(38)] ScratchingPost = 38, - #[enumval(39)] ShoeRack = 39, - #[enumval(40)] Shower = 40, - #[enumval(41)] SideDoor = 41, - #[enumval(42)] Sink = 42, - #[enumval(43)] Sofa = 43, - #[enumval(44)] Stove = 44, - #[enumval(45)] Table = 45, - #[enumval(46)] Toilet = 46, - #[enumval(47)] TrashCan = 47, - #[enumval(48)] LaundryWasher = 48, - #[enumval(49)] Window = 49, - #[enumval(50)] WineCooler = 50, + #[enumval(0)] + AirConditioner = 0, + #[enumval(1)] + AirPurifier = 1, + #[enumval(2)] + BackDoor = 2, + #[enumval(3)] + BarStool = 3, + #[enumval(4)] + BathMat = 4, + #[enumval(5)] + Bathtub = 5, + #[enumval(6)] + Bed = 6, + #[enumval(7)] + Bookshelf = 7, + #[enumval(8)] + Chair = 8, + #[enumval(9)] + ChristmasTree = 9, + #[enumval(10)] + CoatRack = 10, + #[enumval(11)] + CoffeeTable = 11, + #[enumval(12)] + CookingRange = 12, + #[enumval(13)] + Couch = 13, + #[enumval(14)] + Countertop = 14, + #[enumval(15)] + Cradle = 15, + #[enumval(16)] + Crib = 16, + #[enumval(17)] + Desk = 17, + #[enumval(18)] + DiningTable = 18, + #[enumval(19)] + Dishwasher = 19, + #[enumval(20)] + Door = 20, + #[enumval(21)] + Dresser = 21, + #[enumval(22)] + LaundryDryer = 22, + #[enumval(23)] + Fan = 23, + #[enumval(24)] + Fireplace = 24, + #[enumval(25)] + Freezer = 25, + #[enumval(26)] + FrontDoor = 26, + #[enumval(27)] + HighChair = 27, + #[enumval(28)] + KitchenIsland = 28, + #[enumval(29)] + Lamp = 29, + #[enumval(30)] + LitterBox = 30, + #[enumval(31)] + Mirror = 31, + #[enumval(32)] + Nightstand = 32, + #[enumval(33)] + Oven = 33, + #[enumval(34)] + PetBed = 34, + #[enumval(35)] + PetBowl = 35, + #[enumval(36)] + PetCrate = 36, + #[enumval(37)] + Refrigerator = 37, + #[enumval(38)] + ScratchingPost = 38, + #[enumval(39)] + ShoeRack = 39, + #[enumval(40)] + Shower = 40, + #[enumval(41)] + SideDoor = 41, + #[enumval(42)] + Sink = 42, + #[enumval(43)] + Sofa = 43, + #[enumval(44)] + Stove = 44, + #[enumval(45)] + Table = 45, + #[enumval(46)] + Toilet = 46, + #[enumval(47)] + TrashCan = 47, + #[enumval(48)] + LaundryWasher = 48, + #[enumval(49)] + Window = 49, + #[enumval(50)] + WineCooler = 50, } #[derive(Debug, PartialEq, Eq, Copy, Clone, Hash)] #[cfg_attr(feature = "defmt", derive(rs_matter_crate::reexport::defmt::Format))] #[repr(u8)] - pub enum CurrencyStructTag { Currency = 0, DecimalPoints = 1 } + pub enum CurrencyStructTag { + Currency = 0, + DecimalPoints = 1, + } #[derive(Debug, PartialEq, Eq, Copy, Clone, Hash)] #[cfg_attr(feature = "defmt", derive(rs_matter_crate::reexport::defmt::Format))] #[repr(u8)] - pub enum PriceStructTag { Amount = 0, Currency = 1 } + pub enum PriceStructTag { + Amount = 0, + Currency = 1, + } #[derive(Debug, PartialEq, Eq, Copy, Clone, Hash)] #[cfg_attr(feature = "defmt", derive(rs_matter_crate::reexport::defmt::Format))] #[repr(u8)] - pub enum MeasurementAccuracyRangeStructTag { RangeMin = 0, RangeMax = 1, PercentMax = 2, PercentMin = 3, PercentTypical = 4, FixedMax = 5, FixedMin = 6, FixedTypical = 7 } + pub enum MeasurementAccuracyRangeStructTag { + RangeMin = 0, + RangeMax = 1, + PercentMax = 2, + PercentMin = 3, + PercentTypical = 4, + FixedMax = 5, + FixedMin = 6, + FixedTypical = 7, + } #[derive(PartialEq, Eq, Clone, Hash)] - pub struct CurrencyStruct<'a> (rs_matter_crate::tlv::TLVElement<'a>); + pub struct CurrencyStruct<'a>(rs_matter_crate::tlv::TLVElement<'a>); impl<'a> CurrencyStruct<'a> { #[doc = "Create a new instance"] - pub const fn new(element: rs_matter_crate::tlv::TLVElement<'a>) -> Self { Self(element) } + pub const fn new(element: rs_matter_crate::tlv::TLVElement<'a>) -> Self { + Self(element) + } #[doc = "Return the underlying TLV element"] - pub const fn tlv_element(&self) -> &rs_matter_crate::tlv::TLVElement<'a> { &self.0 } - pub fn currency(&self) -> Result { rs_matter_crate::tlv::FromTLV::from_tlv(&self.0.structure()?.ctx(0)?) } - pub fn decimal_points(&self) -> Result { rs_matter_crate::tlv::FromTLV::from_tlv(&self.0.structure()?.ctx(1)?) } + pub const fn tlv_element(&self) -> &rs_matter_crate::tlv::TLVElement<'a> { + &self.0 + } + pub fn currency(&self) -> Result { + rs_matter_crate::tlv::FromTLV::from_tlv(&self.0.structure()?.ctx(0)?) + } + pub fn decimal_points(&self) -> Result { + rs_matter_crate::tlv::FromTLV::from_tlv(&self.0.structure()?.ctx(1)?) + } + } + impl<'a> rs_matter_crate::tlv::FromTLV<'a> for CurrencyStruct<'a> { + fn from_tlv( + element: &rs_matter_crate::tlv::TLVElement<'a>, + ) -> Result { + Ok(Self::new(element.clone())) + } } - impl<'a> rs_matter_crate::tlv::FromTLV<'a> for CurrencyStruct<'a> { fn from_tlv(element: &rs_matter_crate::tlv::TLVElement<'a>) -> Result { Ok(Self::new(element.clone())) } } impl rs_matter_crate::tlv::ToTLV for CurrencyStruct<'_> { - fn to_tlv(&self, tag: &rs_matter_crate::tlv::TLVTag, tw: W) -> Result<(), rs_matter_crate::error::Error> { self.0.to_tlv(tag, tw) } - fn tlv_iter(&self, tag: rs_matter_crate::tlv::TLVTag) -> impl Iterator> { self.0.tlv_iter(tag) } + fn to_tlv( + &self, + tag: &rs_matter_crate::tlv::TLVTag, + tw: W, + ) -> Result<(), rs_matter_crate::error::Error> { + self.0.to_tlv(tag, tw) + } + fn tlv_iter( + &self, + tag: rs_matter_crate::tlv::TLVTag, + ) -> impl Iterator> + { + self.0.tlv_iter(tag) + } } impl core::fmt::Debug for CurrencyStruct<'_> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { @@ -481,30 +686,73 @@ pub mod globals { fn format(&self, f: rs_matter_crate::reexport::defmt::Formatter<'_>) { rs_matter_crate::reexport::defmt::write!(f, "{} {{", "CurrencyStruct"); match self.currency() { - Ok(value) => rs_matter_crate::reexport::defmt::write!(f, "{}: {:?},", "currency", value), - Err(e) => rs_matter_crate::reexport::defmt::write!(f, "{}: ??? {:?},", "currency", e.code()), + Ok(value) => { + rs_matter_crate::reexport::defmt::write!(f, "{}: {:?},", "currency", value) + } + Err(e) => rs_matter_crate::reexport::defmt::write!( + f, + "{}: ??? {:?},", + "currency", + e.code() + ), } match self.decimal_points() { - Ok(value) => rs_matter_crate::reexport::defmt::write!(f, "{}: {:?},", "decimal_points", value), - Err(e) => rs_matter_crate::reexport::defmt::write!(f, "{}: ??? {:?},", "decimal_points", e.code()), + Ok(value) => rs_matter_crate::reexport::defmt::write!( + f, + "{}: {:?},", + "decimal_points", + value + ), + Err(e) => rs_matter_crate::reexport::defmt::write!( + f, + "{}: ??? {:?},", + "decimal_points", + e.code() + ), } rs_matter_crate::reexport::defmt::write!(f, "}}") } } #[derive(PartialEq, Eq, Clone, Hash)] - pub struct PriceStruct<'a> (rs_matter_crate::tlv::TLVElement<'a>); + pub struct PriceStruct<'a>(rs_matter_crate::tlv::TLVElement<'a>); impl<'a> PriceStruct<'a> { #[doc = "Create a new instance"] - pub const fn new(element: rs_matter_crate::tlv::TLVElement<'a>) -> Self { Self(element) } + pub const fn new(element: rs_matter_crate::tlv::TLVElement<'a>) -> Self { + Self(element) + } #[doc = "Return the underlying TLV element"] - pub const fn tlv_element(&self) -> &rs_matter_crate::tlv::TLVElement<'a> { &self.0 } - pub fn amount(&self) -> Result { rs_matter_crate::tlv::FromTLV::from_tlv(&self.0.structure()?.ctx(0)?) } - pub fn currency(&self) -> Result, rs_matter_crate::error::Error> { rs_matter_crate::tlv::FromTLV::from_tlv(&self.0.structure()?.ctx(1)?) } + pub const fn tlv_element(&self) -> &rs_matter_crate::tlv::TLVElement<'a> { + &self.0 + } + pub fn amount(&self) -> Result { + rs_matter_crate::tlv::FromTLV::from_tlv(&self.0.structure()?.ctx(0)?) + } + pub fn currency(&self) -> Result, rs_matter_crate::error::Error> { + rs_matter_crate::tlv::FromTLV::from_tlv(&self.0.structure()?.ctx(1)?) + } + } + impl<'a> rs_matter_crate::tlv::FromTLV<'a> for PriceStruct<'a> { + fn from_tlv( + element: &rs_matter_crate::tlv::TLVElement<'a>, + ) -> Result { + Ok(Self::new(element.clone())) + } } - impl<'a> rs_matter_crate::tlv::FromTLV<'a> for PriceStruct<'a> { fn from_tlv(element: &rs_matter_crate::tlv::TLVElement<'a>) -> Result { Ok(Self::new(element.clone())) } } impl rs_matter_crate::tlv::ToTLV for PriceStruct<'_> { - fn to_tlv(&self, tag: &rs_matter_crate::tlv::TLVTag, tw: W) -> Result<(), rs_matter_crate::error::Error> { self.0.to_tlv(tag, tw) } - fn tlv_iter(&self, tag: rs_matter_crate::tlv::TLVTag) -> impl Iterator> { self.0.tlv_iter(tag) } + fn to_tlv( + &self, + tag: &rs_matter_crate::tlv::TLVTag, + tw: W, + ) -> Result<(), rs_matter_crate::error::Error> { + self.0.to_tlv(tag, tw) + } + fn tlv_iter( + &self, + tag: rs_matter_crate::tlv::TLVTag, + ) -> impl Iterator> + { + self.0.tlv_iter(tag) + } } impl core::fmt::Debug for PriceStruct<'_> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { @@ -525,54 +773,124 @@ pub mod globals { fn format(&self, f: rs_matter_crate::reexport::defmt::Formatter<'_>) { rs_matter_crate::reexport::defmt::write!(f, "{} {{", "PriceStruct"); match self.amount() { - Ok(value) => rs_matter_crate::reexport::defmt::write!(f, "{}: {:?},", "amount", value), - Err(e) => rs_matter_crate::reexport::defmt::write!(f, "{}: ??? {:?},", "amount", e.code()), + Ok(value) => { + rs_matter_crate::reexport::defmt::write!(f, "{}: {:?},", "amount", value) + } + Err(e) => { + rs_matter_crate::reexport::defmt::write!(f, "{}: ??? {:?},", "amount", e.code()) + } } match self.currency() { - Ok(value) => rs_matter_crate::reexport::defmt::write!(f, "{}: {:?},", "currency", value), - Err(e) => rs_matter_crate::reexport::defmt::write!(f, "{}: ??? {:?},", "currency", e.code()), + Ok(value) => { + rs_matter_crate::reexport::defmt::write!(f, "{}: {:?},", "currency", value) + } + Err(e) => rs_matter_crate::reexport::defmt::write!( + f, + "{}: ??? {:?},", + "currency", + e.code() + ), } rs_matter_crate::reexport::defmt::write!(f, "}}") } } #[derive(PartialEq, Eq, Clone, Hash)] - pub struct MeasurementAccuracyRangeStruct<'a> (rs_matter_crate::tlv::TLVElement<'a>); + pub struct MeasurementAccuracyRangeStruct<'a>(rs_matter_crate::tlv::TLVElement<'a>); impl<'a> MeasurementAccuracyRangeStruct<'a> { #[doc = "Create a new instance"] - pub const fn new(element: rs_matter_crate::tlv::TLVElement<'a>) -> Self { Self(element) } + pub const fn new(element: rs_matter_crate::tlv::TLVElement<'a>) -> Self { + Self(element) + } #[doc = "Return the underlying TLV element"] - pub const fn tlv_element(&self) -> &rs_matter_crate::tlv::TLVElement<'a> { &self.0 } - pub fn range_min(&self) -> Result { rs_matter_crate::tlv::FromTLV::from_tlv(&self.0.structure()?.ctx(0)?) } - pub fn range_max(&self) -> Result { rs_matter_crate::tlv::FromTLV::from_tlv(&self.0.structure()?.ctx(1)?) } - pub fn percent_max(&self) -> Result, rs_matter_crate::error::Error> { + pub const fn tlv_element(&self) -> &rs_matter_crate::tlv::TLVElement<'a> { + &self.0 + } + pub fn range_min(&self) -> Result { + rs_matter_crate::tlv::FromTLV::from_tlv(&self.0.structure()?.ctx(0)?) + } + pub fn range_max(&self) -> Result { + rs_matter_crate::tlv::FromTLV::from_tlv(&self.0.structure()?.ctx(1)?) + } + pub fn percent_max( + &self, + ) -> Result, rs_matter_crate::error::Error> + { let element = self.0.structure()?.find_ctx(2)?; - if element.is_empty() { Ok(None) } else { Ok(Some(rs_matter_crate::tlv::FromTLV::from_tlv(&element)?)) } + if element.is_empty() { + Ok(None) + } else { + Ok(Some(rs_matter_crate::tlv::FromTLV::from_tlv(&element)?)) + } } - pub fn percent_min(&self) -> Result, rs_matter_crate::error::Error> { + pub fn percent_min( + &self, + ) -> Result, rs_matter_crate::error::Error> + { let element = self.0.structure()?.find_ctx(3)?; - if element.is_empty() { Ok(None) } else { Ok(Some(rs_matter_crate::tlv::FromTLV::from_tlv(&element)?)) } + if element.is_empty() { + Ok(None) + } else { + Ok(Some(rs_matter_crate::tlv::FromTLV::from_tlv(&element)?)) + } } - pub fn percent_typical(&self) -> Result, rs_matter_crate::error::Error> { + pub fn percent_typical( + &self, + ) -> Result, rs_matter_crate::error::Error> + { let element = self.0.structure()?.find_ctx(4)?; - if element.is_empty() { Ok(None) } else { Ok(Some(rs_matter_crate::tlv::FromTLV::from_tlv(&element)?)) } + if element.is_empty() { + Ok(None) + } else { + Ok(Some(rs_matter_crate::tlv::FromTLV::from_tlv(&element)?)) + } } pub fn fixed_max(&self) -> Result, rs_matter_crate::error::Error> { let element = self.0.structure()?.find_ctx(5)?; - if element.is_empty() { Ok(None) } else { Ok(Some(rs_matter_crate::tlv::FromTLV::from_tlv(&element)?)) } + if element.is_empty() { + Ok(None) + } else { + Ok(Some(rs_matter_crate::tlv::FromTLV::from_tlv(&element)?)) + } } pub fn fixed_min(&self) -> Result, rs_matter_crate::error::Error> { let element = self.0.structure()?.find_ctx(6)?; - if element.is_empty() { Ok(None) } else { Ok(Some(rs_matter_crate::tlv::FromTLV::from_tlv(&element)?)) } + if element.is_empty() { + Ok(None) + } else { + Ok(Some(rs_matter_crate::tlv::FromTLV::from_tlv(&element)?)) + } } pub fn fixed_typical(&self) -> Result, rs_matter_crate::error::Error> { let element = self.0.structure()?.find_ctx(7)?; - if element.is_empty() { Ok(None) } else { Ok(Some(rs_matter_crate::tlv::FromTLV::from_tlv(&element)?)) } + if element.is_empty() { + Ok(None) + } else { + Ok(Some(rs_matter_crate::tlv::FromTLV::from_tlv(&element)?)) + } + } + } + impl<'a> rs_matter_crate::tlv::FromTLV<'a> for MeasurementAccuracyRangeStruct<'a> { + fn from_tlv( + element: &rs_matter_crate::tlv::TLVElement<'a>, + ) -> Result { + Ok(Self::new(element.clone())) } } - impl<'a> rs_matter_crate::tlv::FromTLV<'a> for MeasurementAccuracyRangeStruct<'a> { fn from_tlv(element: &rs_matter_crate::tlv::TLVElement<'a>) -> Result { Ok(Self::new(element.clone())) } } impl rs_matter_crate::tlv::ToTLV for MeasurementAccuracyRangeStruct<'_> { - fn to_tlv(&self, tag: &rs_matter_crate::tlv::TLVTag, tw: W) -> Result<(), rs_matter_crate::error::Error> { self.0.to_tlv(tag, tw) } - fn tlv_iter(&self, tag: rs_matter_crate::tlv::TLVTag) -> impl Iterator> { self.0.tlv_iter(tag) } + fn to_tlv( + &self, + tag: &rs_matter_crate::tlv::TLVTag, + tw: W, + ) -> Result<(), rs_matter_crate::error::Error> { + self.0.to_tlv(tag, tw) + } + fn tlv_iter( + &self, + tag: rs_matter_crate::tlv::TLVTag, + ) -> impl Iterator> + { + self.0.tlv_iter(tag) + } } impl core::fmt::Debug for MeasurementAccuracyRangeStruct<'_> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { @@ -623,90 +941,242 @@ pub mod globals { fn format(&self, f: rs_matter_crate::reexport::defmt::Formatter<'_>) { rs_matter_crate::reexport::defmt::write!(f, "{} {{", "MeasurementAccuracyRangeStruct"); match self.range_min() { - Ok(value) => rs_matter_crate::reexport::defmt::write!(f, "{}: {:?},", "range_min", value), - Err(e) => rs_matter_crate::reexport::defmt::write!(f, "{}: ??? {:?},", "range_min", e.code()), + Ok(value) => { + rs_matter_crate::reexport::defmt::write!(f, "{}: {:?},", "range_min", value) + } + Err(e) => rs_matter_crate::reexport::defmt::write!( + f, + "{}: ??? {:?},", + "range_min", + e.code() + ), } match self.range_max() { - Ok(value) => rs_matter_crate::reexport::defmt::write!(f, "{}: {:?},", "range_max", value), - Err(e) => rs_matter_crate::reexport::defmt::write!(f, "{}: ??? {:?},", "range_max", e.code()), + Ok(value) => { + rs_matter_crate::reexport::defmt::write!(f, "{}: {:?},", "range_max", value) + } + Err(e) => rs_matter_crate::reexport::defmt::write!( + f, + "{}: ??? {:?},", + "range_max", + e.code() + ), } match self.percent_max() { - Ok(Some(value)) => rs_matter_crate::reexport::defmt::write!(f, "{}: Some({:?}),", "percent_max", value), + Ok(Some(value)) => rs_matter_crate::reexport::defmt::write!( + f, + "{}: Some({:?}),", + "percent_max", + value + ), Ok(None) => rs_matter_crate::reexport::defmt::write!(f, "{}: None,", "percent_max"), - Err(e) => rs_matter_crate::reexport::defmt::write!(f, "{}: ??? {:?},", "percent_max", e.code()), + Err(e) => rs_matter_crate::reexport::defmt::write!( + f, + "{}: ??? {:?},", + "percent_max", + e.code() + ), } match self.percent_min() { - Ok(Some(value)) => rs_matter_crate::reexport::defmt::write!(f, "{}: Some({:?}),", "percent_min", value), + Ok(Some(value)) => rs_matter_crate::reexport::defmt::write!( + f, + "{}: Some({:?}),", + "percent_min", + value + ), Ok(None) => rs_matter_crate::reexport::defmt::write!(f, "{}: None,", "percent_min"), - Err(e) => rs_matter_crate::reexport::defmt::write!(f, "{}: ??? {:?},", "percent_min", e.code()), + Err(e) => rs_matter_crate::reexport::defmt::write!( + f, + "{}: ??? {:?},", + "percent_min", + e.code() + ), } match self.percent_typical() { - Ok(Some(value)) => rs_matter_crate::reexport::defmt::write!(f, "{}: Some({:?}),", "percent_typical", value), - Ok(None) => rs_matter_crate::reexport::defmt::write!(f, "{}: None,", "percent_typical"), - Err(e) => rs_matter_crate::reexport::defmt::write!(f, "{}: ??? {:?},", "percent_typical", e.code()), + Ok(Some(value)) => rs_matter_crate::reexport::defmt::write!( + f, + "{}: Some({:?}),", + "percent_typical", + value + ), + Ok(None) => { + rs_matter_crate::reexport::defmt::write!(f, "{}: None,", "percent_typical") + } + Err(e) => rs_matter_crate::reexport::defmt::write!( + f, + "{}: ??? {:?},", + "percent_typical", + e.code() + ), } match self.fixed_max() { - Ok(Some(value)) => rs_matter_crate::reexport::defmt::write!(f, "{}: Some({:?}),", "fixed_max", value), - Ok(None) => rs_matter_crate::reexport::defmt::write!(f, "{}: None,", "fixed_max"), - Err(e) => rs_matter_crate::reexport::defmt::write!(f, "{}: ??? {:?},", "fixed_max", e.code()), - } + Ok(Some(value)) => rs_matter_crate::reexport::defmt::write!( + f, + "{}: Some({:?}),", + "fixed_max", + value + ), + Ok(None) => rs_matter_crate::reexport::defmt::write!(f, "{}: None,", "fixed_max"), + Err(e) => rs_matter_crate::reexport::defmt::write!( + f, + "{}: ??? {:?},", + "fixed_max", + e.code() + ), + } match self.fixed_min() { - Ok(Some(value)) => rs_matter_crate::reexport::defmt::write!(f, "{}: Some({:?}),", "fixed_min", value), + Ok(Some(value)) => rs_matter_crate::reexport::defmt::write!( + f, + "{}: Some({:?}),", + "fixed_min", + value + ), Ok(None) => rs_matter_crate::reexport::defmt::write!(f, "{}: None,", "fixed_min"), - Err(e) => rs_matter_crate::reexport::defmt::write!(f, "{}: ??? {:?},", "fixed_min", e.code()), + Err(e) => rs_matter_crate::reexport::defmt::write!( + f, + "{}: ??? {:?},", + "fixed_min", + e.code() + ), } match self.fixed_typical() { - Ok(Some(value)) => rs_matter_crate::reexport::defmt::write!(f, "{}: Some({:?}),", "fixed_typical", value), - Ok(None) => rs_matter_crate::reexport::defmt::write!(f, "{}: None,", "fixed_typical"), - Err(e) => rs_matter_crate::reexport::defmt::write!(f, "{}: ??? {:?},", "fixed_typical", e.code()), + Ok(Some(value)) => rs_matter_crate::reexport::defmt::write!( + f, + "{}: Some({:?}),", + "fixed_typical", + value + ), + Ok(None) => { + rs_matter_crate::reexport::defmt::write!(f, "{}: None,", "fixed_typical") + } + Err(e) => rs_matter_crate::reexport::defmt::write!( + f, + "{}: ??? {:?},", + "fixed_typical", + e.code() + ), } rs_matter_crate::reexport::defmt::write!(f, "}}") } } - pub struct CurrencyStructBuilder (P); - impl

CurrencyStructBuilder

where P: rs_matter_crate::tlv::TLVBuilderParent, { + pub struct CurrencyStructBuilder(P); + impl

CurrencyStructBuilder

+ where + P: rs_matter_crate::tlv::TLVBuilderParent, + { #[doc = "Create a new instance"] - pub fn new(mut parent: P, tag: &rs_matter_crate::tlv::TLVTag) -> Result { + pub fn new( + mut parent: P, + tag: &rs_matter_crate::tlv::TLVTag, + ) -> Result { use rs_matter_crate::tlv::TLVWrite; parent.writer().start_struct(tag)?; Ok(Self(parent)) } } #[cfg(feature = "defmt")] - impl

CurrencyStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug + rs_matter_crate::reexport::defmt::Format, { - pub fn currency(mut self, value: u16) -> Result, rs_matter_crate::error::Error> { - #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!("{:?}::{} -> {:?} +" , self , "currency" , value); - #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +" , self , "currency" , value); - rs_matter_crate::tlv::ToTLV::to_tlv(&value, &rs_matter_crate::tlv::TLVTag::Context(0), self.0.writer())?; + impl

CurrencyStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent + + core::fmt::Debug + + rs_matter_crate::reexport::defmt::Format, + { + pub fn currency( + mut self, + value: u16, + ) -> Result, rs_matter_crate::error::Error> { + #[cfg(feature = "defmt")] + rs_matter_crate::reexport::defmt::debug!("{:?}::{} -> {:?} +", self, "currency", value); + #[cfg(feature = "log")] + rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +", self, "currency", value); + rs_matter_crate::tlv::ToTLV::to_tlv( + &value, + &rs_matter_crate::tlv::TLVTag::Context(0), + self.0.writer(), + )?; Ok(CurrencyStructBuilder(self.0)) } } #[cfg(not(feature = "defmt"))] - impl

CurrencyStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug, { - pub fn currency(mut self, value: u16) -> Result, rs_matter_crate::error::Error> { - #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +" , self , "currency" , value); - rs_matter_crate::tlv::ToTLV::to_tlv(&value, &rs_matter_crate::tlv::TLVTag::Context(0), self.0.writer())?; + impl

CurrencyStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug, + { + pub fn currency( + mut self, + value: u16, + ) -> Result, rs_matter_crate::error::Error> { + #[cfg(feature = "log")] + rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +", self, "currency", value); + rs_matter_crate::tlv::ToTLV::to_tlv( + &value, + &rs_matter_crate::tlv::TLVTag::Context(0), + self.0.writer(), + )?; Ok(CurrencyStructBuilder(self.0)) } } #[cfg(feature = "defmt")] - impl

CurrencyStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug + rs_matter_crate::reexport::defmt::Format, { - pub fn decimal_points(mut self, value: u8) -> Result, rs_matter_crate::error::Error> { - #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!("{:?}::{} -> {:?} +" , self , "decimalPoints" , value); - #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +" , self , "decimalPoints" , value); - rs_matter_crate::tlv::ToTLV::to_tlv(&value, &rs_matter_crate::tlv::TLVTag::Context(1), self.0.writer())?; + impl

CurrencyStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent + + core::fmt::Debug + + rs_matter_crate::reexport::defmt::Format, + { + pub fn decimal_points( + mut self, + value: u8, + ) -> Result, rs_matter_crate::error::Error> { + #[cfg(feature = "defmt")] + rs_matter_crate::reexport::defmt::debug!( + "{:?}::{} -> {:?} +", + self, + "decimalPoints", + value + ); + #[cfg(feature = "log")] + rs_matter_crate::reexport::log::debug!( + "{:?}::{} -> {:?} +", + self, + "decimalPoints", + value + ); + rs_matter_crate::tlv::ToTLV::to_tlv( + &value, + &rs_matter_crate::tlv::TLVTag::Context(1), + self.0.writer(), + )?; Ok(CurrencyStructBuilder(self.0)) } } #[cfg(not(feature = "defmt"))] - impl

CurrencyStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug, { - pub fn decimal_points(mut self, value: u8) -> Result, rs_matter_crate::error::Error> { - #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +" , self , "decimalPoints" , value); - rs_matter_crate::tlv::ToTLV::to_tlv(&value, &rs_matter_crate::tlv::TLVTag::Context(1), self.0.writer())?; + impl

CurrencyStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug, + { + pub fn decimal_points( + mut self, + value: u8, + ) -> Result, rs_matter_crate::error::Error> { + #[cfg(feature = "log")] + rs_matter_crate::reexport::log::debug!( + "{:?}::{} -> {:?} +", + self, + "decimalPoints", + value + ); + rs_matter_crate::tlv::ToTLV::to_tlv( + &value, + &rs_matter_crate::tlv::TLVTag::Context(1), + self.0.writer(), + )?; Ok(CurrencyStructBuilder(self.0)) } } - impl

CurrencyStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent, { + impl

CurrencyStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent, + { #[doc = "Finish the struct and return the parent"] pub fn end(mut self) -> Result { use rs_matter_crate::tlv::TLVWrite; @@ -714,27 +1184,72 @@ pub mod globals { Ok(self.0) } } - impl core::fmt::Debug for CurrencyStructBuilder where P: core::fmt::Debug, { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{:?}::{}", self.0, "CurrencyStruct") } } + impl core::fmt::Debug for CurrencyStructBuilder + where + P: core::fmt::Debug, + { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{:?}::{}", self.0, "CurrencyStruct") + } + } #[cfg(feature = "defmt")] - impl rs_matter_crate::reexport::defmt::Format for CurrencyStructBuilder where P: rs_matter_crate::reexport::defmt::Format, { fn format(&self, f: rs_matter_crate::reexport::defmt::Formatter<'_>) { rs_matter_crate::reexport::defmt::write!(f, "{:?}::{}", self.0, "CurrencyStruct") } } - impl rs_matter_crate::tlv::TLVBuilderParent for CurrencyStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent, { + impl rs_matter_crate::reexport::defmt::Format for CurrencyStructBuilder + where + P: rs_matter_crate::reexport::defmt::Format, + { + fn format(&self, f: rs_matter_crate::reexport::defmt::Formatter<'_>) { + rs_matter_crate::reexport::defmt::write!(f, "{:?}::{}", self.0, "CurrencyStruct") + } + } + impl rs_matter_crate::tlv::TLVBuilderParent for CurrencyStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent, + { type Write = P::Write; - fn writer(&mut self) -> &mut P::Write { self.0.writer() } + fn writer(&mut self) -> &mut P::Write { + self.0.writer() + } } - impl

rs_matter_crate::tlv::TLVBuilder

for CurrencyStructBuilder

where P: rs_matter_crate::tlv::TLVBuilderParent, { - fn new(parent: P, tag: &rs_matter_crate::tlv::TLVTag) -> Result { Self::new(parent, tag) } - fn unchecked_into_parent(self) -> P { self.0 } + impl

rs_matter_crate::tlv::TLVBuilder

for CurrencyStructBuilder

+ where + P: rs_matter_crate::tlv::TLVBuilderParent, + { + fn new( + parent: P, + tag: &rs_matter_crate::tlv::TLVTag, + ) -> Result { + Self::new(parent, tag) + } + fn unchecked_into_parent(self) -> P { + self.0 + } } - pub struct CurrencyStructArrayBuilder

(P); - impl

CurrencyStructArrayBuilder

where P: rs_matter_crate::tlv::TLVBuilderParent, { + pub struct CurrencyStructArrayBuilder

(P); + impl

CurrencyStructArrayBuilder

+ where + P: rs_matter_crate::tlv::TLVBuilderParent, + { #[doc = "Create a new instance"] - pub fn new(mut parent: P, tag: &rs_matter_crate::tlv::TLVTag) -> Result { + pub fn new( + mut parent: P, + tag: &rs_matter_crate::tlv::TLVTag, + ) -> Result { use rs_matter_crate::tlv::TLVWrite; parent.writer().start_array(tag)?; Ok(Self(parent)) } #[doc = "Push a new element into the array"] - pub fn push(self) -> Result>, rs_matter_crate::error::Error> { rs_matter_crate::tlv::TLVBuilder::new(CurrencyStructArrayBuilder(self.0), &rs_matter_crate::tlv::TLVTag::Anonymous) } + pub fn push( + self, + ) -> Result< + CurrencyStructBuilder>, + rs_matter_crate::error::Error, + > { + rs_matter_crate::tlv::TLVBuilder::new( + CurrencyStructArrayBuilder(self.0), + &rs_matter_crate::tlv::TLVTag::Anonymous, + ) + } #[doc = "Finish the array and return the parent"] pub fn end(mut self) -> Result { use rs_matter_crate::tlv::TLVWrite; @@ -742,45 +1257,123 @@ pub mod globals { Ok(self.0) } } - impl

core::fmt::Debug for CurrencyStructArrayBuilder

where P: core::fmt::Debug, { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{:?}::{}", self.0, "CurrencyStruct[]") } } + impl

core::fmt::Debug for CurrencyStructArrayBuilder

+ where + P: core::fmt::Debug, + { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{:?}::{}", self.0, "CurrencyStruct[]") + } + } #[cfg(feature = "defmt")] - impl

rs_matter_crate::reexport::defmt::Format for CurrencyStructArrayBuilder

where P: rs_matter_crate::reexport::defmt::Format, { fn format(&self, f: rs_matter_crate::reexport::defmt::Formatter<'_>) { rs_matter_crate::reexport::defmt::write!(f, "{:?}::{}", self.0, "CurrencyStruct[]") } } - impl

rs_matter_crate::tlv::TLVBuilderParent for CurrencyStructArrayBuilder

where P: rs_matter_crate::tlv::TLVBuilderParent, { + impl

rs_matter_crate::reexport::defmt::Format for CurrencyStructArrayBuilder

+ where + P: rs_matter_crate::reexport::defmt::Format, + { + fn format(&self, f: rs_matter_crate::reexport::defmt::Formatter<'_>) { + rs_matter_crate::reexport::defmt::write!(f, "{:?}::{}", self.0, "CurrencyStruct[]") + } + } + impl

rs_matter_crate::tlv::TLVBuilderParent for CurrencyStructArrayBuilder

+ where + P: rs_matter_crate::tlv::TLVBuilderParent, + { type Write = P::Write; - fn writer(&mut self) -> &mut P::Write { self.0.writer() } + fn writer(&mut self) -> &mut P::Write { + self.0.writer() + } } - impl

rs_matter_crate::tlv::TLVBuilder

for CurrencyStructArrayBuilder

where P: rs_matter_crate::tlv::TLVBuilderParent, { - fn new(parent: P, tag: &rs_matter_crate::tlv::TLVTag) -> Result { Self::new(parent, tag) } - fn unchecked_into_parent(self) -> P { self.0 } + impl

rs_matter_crate::tlv::TLVBuilder

for CurrencyStructArrayBuilder

+ where + P: rs_matter_crate::tlv::TLVBuilderParent, + { + fn new( + parent: P, + tag: &rs_matter_crate::tlv::TLVTag, + ) -> Result { + Self::new(parent, tag) + } + fn unchecked_into_parent(self) -> P { + self.0 + } } - pub struct PriceStructBuilder (P); - impl

PriceStructBuilder

where P: rs_matter_crate::tlv::TLVBuilderParent, { + pub struct PriceStructBuilder(P); + impl

PriceStructBuilder

+ where + P: rs_matter_crate::tlv::TLVBuilderParent, + { #[doc = "Create a new instance"] - pub fn new(mut parent: P, tag: &rs_matter_crate::tlv::TLVTag) -> Result { + pub fn new( + mut parent: P, + tag: &rs_matter_crate::tlv::TLVTag, + ) -> Result { use rs_matter_crate::tlv::TLVWrite; parent.writer().start_struct(tag)?; Ok(Self(parent)) } } #[cfg(feature = "defmt")] - impl

PriceStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug + rs_matter_crate::reexport::defmt::Format, { - pub fn amount(mut self, value: money) -> Result, rs_matter_crate::error::Error> { - #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!("{:?}::{} -> {:?} +" , self , "amount" , value); - #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +" , self , "amount" , value); - rs_matter_crate::tlv::ToTLV::to_tlv(&value, &rs_matter_crate::tlv::TLVTag::Context(0), self.0.writer())?; + impl

PriceStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent + + core::fmt::Debug + + rs_matter_crate::reexport::defmt::Format, + { + pub fn amount( + mut self, + value: rs_matter_crate::im::Money, + ) -> Result, rs_matter_crate::error::Error> { + #[cfg(feature = "defmt")] + rs_matter_crate::reexport::defmt::debug!("{:?}::{} -> {:?} +", self, "amount", value); + #[cfg(feature = "log")] + rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +", self, "amount", value); + rs_matter_crate::tlv::ToTLV::to_tlv( + &value, + &rs_matter_crate::tlv::TLVTag::Context(0), + self.0.writer(), + )?; Ok(PriceStructBuilder(self.0)) } } #[cfg(not(feature = "defmt"))] - impl

PriceStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug, { - pub fn amount(mut self, value: money) -> Result, rs_matter_crate::error::Error> { - #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +" , self , "amount" , value); - rs_matter_crate::tlv::ToTLV::to_tlv(&value, &rs_matter_crate::tlv::TLVTag::Context(0), self.0.writer())?; + impl

PriceStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug, + { + pub fn amount( + mut self, + value: rs_matter_crate::im::Money, + ) -> Result, rs_matter_crate::error::Error> { + #[cfg(feature = "log")] + rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +", self, "amount", value); + rs_matter_crate::tlv::ToTLV::to_tlv( + &value, + &rs_matter_crate::tlv::TLVTag::Context(0), + self.0.writer(), + )?; Ok(PriceStructBuilder(self.0)) } } - impl

PriceStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent, { pub fn currency(self) -> Result>, rs_matter_crate::error::Error> { rs_matter_crate::tlv::TLVBuilder::new(PriceStructBuilder(self.0), &rs_matter_crate::tlv::TLVTag::Context(1)) } } - impl

PriceStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent, { + impl

PriceStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent, + { + pub fn currency( + self, + ) -> Result< + CurrencyStructBuilder>, + rs_matter_crate::error::Error, + > { + rs_matter_crate::tlv::TLVBuilder::new( + PriceStructBuilder(self.0), + &rs_matter_crate::tlv::TLVTag::Context(1), + ) + } + } + impl

PriceStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent, + { #[doc = "Finish the struct and return the parent"] pub fn end(mut self) -> Result { use rs_matter_crate::tlv::TLVWrite; @@ -788,191 +1381,528 @@ pub mod globals { Ok(self.0) } } - impl core::fmt::Debug for PriceStructBuilder where P: core::fmt::Debug, { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{:?}::{}", self.0, "PriceStruct") } } - #[cfg(feature = "defmt")] - impl rs_matter_crate::reexport::defmt::Format for PriceStructBuilder where P: rs_matter_crate::reexport::defmt::Format, { fn format(&self, f: rs_matter_crate::reexport::defmt::Formatter<'_>) { rs_matter_crate::reexport::defmt::write!(f, "{:?}::{}", self.0, "PriceStruct") } } - impl rs_matter_crate::tlv::TLVBuilderParent for PriceStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent, { - type Write = P::Write; - fn writer(&mut self) -> &mut P::Write { self.0.writer() } - } - impl

rs_matter_crate::tlv::TLVBuilder

for PriceStructBuilder

where P: rs_matter_crate::tlv::TLVBuilderParent, { - fn new(parent: P, tag: &rs_matter_crate::tlv::TLVTag) -> Result { Self::new(parent, tag) } - fn unchecked_into_parent(self) -> P { self.0 } - } - pub struct PriceStructArrayBuilder

(P); - impl

PriceStructArrayBuilder

where P: rs_matter_crate::tlv::TLVBuilderParent, { - #[doc = "Create a new instance"] - pub fn new(mut parent: P, tag: &rs_matter_crate::tlv::TLVTag) -> Result { - use rs_matter_crate::tlv::TLVWrite; - parent.writer().start_array(tag)?; - Ok(Self(parent)) - } - #[doc = "Push a new element into the array"] - pub fn push(self) -> Result>, rs_matter_crate::error::Error> { rs_matter_crate::tlv::TLVBuilder::new(PriceStructArrayBuilder(self.0), &rs_matter_crate::tlv::TLVTag::Anonymous) } - #[doc = "Finish the array and return the parent"] - pub fn end(mut self) -> Result { - use rs_matter_crate::tlv::TLVWrite; - self.0.writer().end_container()?; - Ok(self.0) + impl core::fmt::Debug for PriceStructBuilder + where + P: core::fmt::Debug, + { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{:?}::{}", self.0, "PriceStruct") } } - impl

core::fmt::Debug for PriceStructArrayBuilder

where P: core::fmt::Debug, { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{:?}::{}", self.0, "PriceStruct[]") } } #[cfg(feature = "defmt")] - impl

rs_matter_crate::reexport::defmt::Format for PriceStructArrayBuilder

where P: rs_matter_crate::reexport::defmt::Format, { fn format(&self, f: rs_matter_crate::reexport::defmt::Formatter<'_>) { rs_matter_crate::reexport::defmt::write!(f, "{:?}::{}", self.0, "PriceStruct[]") } } - impl

rs_matter_crate::tlv::TLVBuilderParent for PriceStructArrayBuilder

where P: rs_matter_crate::tlv::TLVBuilderParent, { - type Write = P::Write; - fn writer(&mut self) -> &mut P::Write { self.0.writer() } - } - impl

rs_matter_crate::tlv::TLVBuilder

for PriceStructArrayBuilder

where P: rs_matter_crate::tlv::TLVBuilderParent, { - fn new(parent: P, tag: &rs_matter_crate::tlv::TLVTag) -> Result { Self::new(parent, tag) } - fn unchecked_into_parent(self) -> P { self.0 } + impl rs_matter_crate::reexport::defmt::Format for PriceStructBuilder + where + P: rs_matter_crate::reexport::defmt::Format, + { + fn format(&self, f: rs_matter_crate::reexport::defmt::Formatter<'_>) { + rs_matter_crate::reexport::defmt::write!(f, "{:?}::{}", self.0, "PriceStruct") + } } - pub struct MeasurementAccuracyRangeStructBuilder (P); - impl

MeasurementAccuracyRangeStructBuilder

where P: rs_matter_crate::tlv::TLVBuilderParent, { + impl rs_matter_crate::tlv::TLVBuilderParent for PriceStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent, + { + type Write = P::Write; + fn writer(&mut self) -> &mut P::Write { + self.0.writer() + } + } + impl

rs_matter_crate::tlv::TLVBuilder

for PriceStructBuilder

+ where + P: rs_matter_crate::tlv::TLVBuilderParent, + { + fn new( + parent: P, + tag: &rs_matter_crate::tlv::TLVTag, + ) -> Result { + Self::new(parent, tag) + } + fn unchecked_into_parent(self) -> P { + self.0 + } + } + pub struct PriceStructArrayBuilder

(P); + impl

PriceStructArrayBuilder

+ where + P: rs_matter_crate::tlv::TLVBuilderParent, + { #[doc = "Create a new instance"] - pub fn new(mut parent: P, tag: &rs_matter_crate::tlv::TLVTag) -> Result { + pub fn new( + mut parent: P, + tag: &rs_matter_crate::tlv::TLVTag, + ) -> Result { + use rs_matter_crate::tlv::TLVWrite; + parent.writer().start_array(tag)?; + Ok(Self(parent)) + } + #[doc = "Push a new element into the array"] + pub fn push( + self, + ) -> Result>, rs_matter_crate::error::Error> + { + rs_matter_crate::tlv::TLVBuilder::new( + PriceStructArrayBuilder(self.0), + &rs_matter_crate::tlv::TLVTag::Anonymous, + ) + } + #[doc = "Finish the array and return the parent"] + pub fn end(mut self) -> Result { + use rs_matter_crate::tlv::TLVWrite; + self.0.writer().end_container()?; + Ok(self.0) + } + } + impl

core::fmt::Debug for PriceStructArrayBuilder

+ where + P: core::fmt::Debug, + { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{:?}::{}", self.0, "PriceStruct[]") + } + } + #[cfg(feature = "defmt")] + impl

rs_matter_crate::reexport::defmt::Format for PriceStructArrayBuilder

+ where + P: rs_matter_crate::reexport::defmt::Format, + { + fn format(&self, f: rs_matter_crate::reexport::defmt::Formatter<'_>) { + rs_matter_crate::reexport::defmt::write!(f, "{:?}::{}", self.0, "PriceStruct[]") + } + } + impl

rs_matter_crate::tlv::TLVBuilderParent for PriceStructArrayBuilder

+ where + P: rs_matter_crate::tlv::TLVBuilderParent, + { + type Write = P::Write; + fn writer(&mut self) -> &mut P::Write { + self.0.writer() + } + } + impl

rs_matter_crate::tlv::TLVBuilder

for PriceStructArrayBuilder

+ where + P: rs_matter_crate::tlv::TLVBuilderParent, + { + fn new( + parent: P, + tag: &rs_matter_crate::tlv::TLVTag, + ) -> Result { + Self::new(parent, tag) + } + fn unchecked_into_parent(self) -> P { + self.0 + } + } + pub struct MeasurementAccuracyRangeStructBuilder(P); + impl

MeasurementAccuracyRangeStructBuilder

+ where + P: rs_matter_crate::tlv::TLVBuilderParent, + { + #[doc = "Create a new instance"] + pub fn new( + mut parent: P, + tag: &rs_matter_crate::tlv::TLVTag, + ) -> Result { use rs_matter_crate::tlv::TLVWrite; parent.writer().start_struct(tag)?; Ok(Self(parent)) } } #[cfg(feature = "defmt")] - impl

MeasurementAccuracyRangeStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug + rs_matter_crate::reexport::defmt::Format, { - pub fn range_min(mut self, value: i64) -> Result, rs_matter_crate::error::Error> { - #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!("{:?}::{} -> {:?} +" , self , "rangeMin" , value); - #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +" , self , "rangeMin" , value); - rs_matter_crate::tlv::ToTLV::to_tlv(&value, &rs_matter_crate::tlv::TLVTag::Context(0), self.0.writer())?; + impl

MeasurementAccuracyRangeStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent + + core::fmt::Debug + + rs_matter_crate::reexport::defmt::Format, + { + pub fn range_min( + mut self, + value: i64, + ) -> Result, rs_matter_crate::error::Error> + { + #[cfg(feature = "defmt")] + rs_matter_crate::reexport::defmt::debug!("{:?}::{} -> {:?} +", self, "rangeMin", value); + #[cfg(feature = "log")] + rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +", self, "rangeMin", value); + rs_matter_crate::tlv::ToTLV::to_tlv( + &value, + &rs_matter_crate::tlv::TLVTag::Context(0), + self.0.writer(), + )?; Ok(MeasurementAccuracyRangeStructBuilder(self.0)) } } #[cfg(not(feature = "defmt"))] - impl

MeasurementAccuracyRangeStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug, { - pub fn range_min(mut self, value: i64) -> Result, rs_matter_crate::error::Error> { - #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +" , self , "rangeMin" , value); - rs_matter_crate::tlv::ToTLV::to_tlv(&value, &rs_matter_crate::tlv::TLVTag::Context(0), self.0.writer())?; + impl

MeasurementAccuracyRangeStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug, + { + pub fn range_min( + mut self, + value: i64, + ) -> Result, rs_matter_crate::error::Error> + { + #[cfg(feature = "log")] + rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +", self, "rangeMin", value); + rs_matter_crate::tlv::ToTLV::to_tlv( + &value, + &rs_matter_crate::tlv::TLVTag::Context(0), + self.0.writer(), + )?; Ok(MeasurementAccuracyRangeStructBuilder(self.0)) } } #[cfg(feature = "defmt")] - impl

MeasurementAccuracyRangeStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug + rs_matter_crate::reexport::defmt::Format, { - pub fn range_max(mut self, value: i64) -> Result, rs_matter_crate::error::Error> { - #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!("{:?}::{} -> {:?} +" , self , "rangeMax" , value); - #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +" , self , "rangeMax" , value); - rs_matter_crate::tlv::ToTLV::to_tlv(&value, &rs_matter_crate::tlv::TLVTag::Context(1), self.0.writer())?; + impl

MeasurementAccuracyRangeStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent + + core::fmt::Debug + + rs_matter_crate::reexport::defmt::Format, + { + pub fn range_max( + mut self, + value: i64, + ) -> Result, rs_matter_crate::error::Error> + { + #[cfg(feature = "defmt")] + rs_matter_crate::reexport::defmt::debug!("{:?}::{} -> {:?} +", self, "rangeMax", value); + #[cfg(feature = "log")] + rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +", self, "rangeMax", value); + rs_matter_crate::tlv::ToTLV::to_tlv( + &value, + &rs_matter_crate::tlv::TLVTag::Context(1), + self.0.writer(), + )?; Ok(MeasurementAccuracyRangeStructBuilder(self.0)) } } #[cfg(not(feature = "defmt"))] - impl

MeasurementAccuracyRangeStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug, { - pub fn range_max(mut self, value: i64) -> Result, rs_matter_crate::error::Error> { - #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +" , self , "rangeMax" , value); - rs_matter_crate::tlv::ToTLV::to_tlv(&value, &rs_matter_crate::tlv::TLVTag::Context(1), self.0.writer())?; + impl

MeasurementAccuracyRangeStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug, + { + pub fn range_max( + mut self, + value: i64, + ) -> Result, rs_matter_crate::error::Error> + { + #[cfg(feature = "log")] + rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +", self, "rangeMax", value); + rs_matter_crate::tlv::ToTLV::to_tlv( + &value, + &rs_matter_crate::tlv::TLVTag::Context(1), + self.0.writer(), + )?; Ok(MeasurementAccuracyRangeStructBuilder(self.0)) } } #[cfg(feature = "defmt")] - impl

MeasurementAccuracyRangeStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug + rs_matter_crate::reexport::defmt::Format, { - pub fn percent_max(mut self, value: Option) -> Result, rs_matter_crate::error::Error> { - #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!("{:?}::{} -> {:?} +" , self , "percentMax" , value); - #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +" , self , "percentMax" , value); - rs_matter_crate::tlv::ToTLV::to_tlv(&value, &rs_matter_crate::tlv::TLVTag::Context(2), self.0.writer())?; + impl

MeasurementAccuracyRangeStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent + + core::fmt::Debug + + rs_matter_crate::reexport::defmt::Format, + { + pub fn percent_max( + mut self, + value: Option, + ) -> Result, rs_matter_crate::error::Error> + { + #[cfg(feature = "defmt")] + rs_matter_crate::reexport::defmt::debug!( + "{:?}::{} -> {:?} +", + self, + "percentMax", + value + ); + #[cfg(feature = "log")] + rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +", self, "percentMax", value); + rs_matter_crate::tlv::ToTLV::to_tlv( + &value, + &rs_matter_crate::tlv::TLVTag::Context(2), + self.0.writer(), + )?; Ok(MeasurementAccuracyRangeStructBuilder(self.0)) } } #[cfg(not(feature = "defmt"))] - impl

MeasurementAccuracyRangeStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug, { - pub fn percent_max(mut self, value: Option) -> Result, rs_matter_crate::error::Error> { - #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +" , self , "percentMax" , value); - rs_matter_crate::tlv::ToTLV::to_tlv(&value, &rs_matter_crate::tlv::TLVTag::Context(2), self.0.writer())?; + impl

MeasurementAccuracyRangeStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug, + { + pub fn percent_max( + mut self, + value: Option, + ) -> Result, rs_matter_crate::error::Error> + { + #[cfg(feature = "log")] + rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +", self, "percentMax", value); + rs_matter_crate::tlv::ToTLV::to_tlv( + &value, + &rs_matter_crate::tlv::TLVTag::Context(2), + self.0.writer(), + )?; Ok(MeasurementAccuracyRangeStructBuilder(self.0)) } } #[cfg(feature = "defmt")] - impl

MeasurementAccuracyRangeStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug + rs_matter_crate::reexport::defmt::Format, { - pub fn percent_min(mut self, value: Option) -> Result, rs_matter_crate::error::Error> { - #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!("{:?}::{} -> {:?} +" , self , "percentMin" , value); - #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +" , self , "percentMin" , value); - rs_matter_crate::tlv::ToTLV::to_tlv(&value, &rs_matter_crate::tlv::TLVTag::Context(3), self.0.writer())?; + impl

MeasurementAccuracyRangeStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent + + core::fmt::Debug + + rs_matter_crate::reexport::defmt::Format, + { + pub fn percent_min( + mut self, + value: Option, + ) -> Result, rs_matter_crate::error::Error> + { + #[cfg(feature = "defmt")] + rs_matter_crate::reexport::defmt::debug!( + "{:?}::{} -> {:?} +", + self, + "percentMin", + value + ); + #[cfg(feature = "log")] + rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +", self, "percentMin", value); + rs_matter_crate::tlv::ToTLV::to_tlv( + &value, + &rs_matter_crate::tlv::TLVTag::Context(3), + self.0.writer(), + )?; Ok(MeasurementAccuracyRangeStructBuilder(self.0)) } } #[cfg(not(feature = "defmt"))] - impl

MeasurementAccuracyRangeStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug, { - pub fn percent_min(mut self, value: Option) -> Result, rs_matter_crate::error::Error> { - #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +" , self , "percentMin" , value); - rs_matter_crate::tlv::ToTLV::to_tlv(&value, &rs_matter_crate::tlv::TLVTag::Context(3), self.0.writer())?; + impl

MeasurementAccuracyRangeStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug, + { + pub fn percent_min( + mut self, + value: Option, + ) -> Result, rs_matter_crate::error::Error> + { + #[cfg(feature = "log")] + rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +", self, "percentMin", value); + rs_matter_crate::tlv::ToTLV::to_tlv( + &value, + &rs_matter_crate::tlv::TLVTag::Context(3), + self.0.writer(), + )?; Ok(MeasurementAccuracyRangeStructBuilder(self.0)) } } #[cfg(feature = "defmt")] - impl

MeasurementAccuracyRangeStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug + rs_matter_crate::reexport::defmt::Format, { - pub fn percent_typical(mut self, value: Option) -> Result, rs_matter_crate::error::Error> { - #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!("{:?}::{} -> {:?} +" , self , "percentTypical" , value); - #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +" , self , "percentTypical" , value); - rs_matter_crate::tlv::ToTLV::to_tlv(&value, &rs_matter_crate::tlv::TLVTag::Context(4), self.0.writer())?; + impl

MeasurementAccuracyRangeStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent + + core::fmt::Debug + + rs_matter_crate::reexport::defmt::Format, + { + pub fn percent_typical( + mut self, + value: Option, + ) -> Result, rs_matter_crate::error::Error> + { + #[cfg(feature = "defmt")] + rs_matter_crate::reexport::defmt::debug!( + "{:?}::{} -> {:?} +", + self, + "percentTypical", + value + ); + #[cfg(feature = "log")] + rs_matter_crate::reexport::log::debug!( + "{:?}::{} -> {:?} +", + self, + "percentTypical", + value + ); + rs_matter_crate::tlv::ToTLV::to_tlv( + &value, + &rs_matter_crate::tlv::TLVTag::Context(4), + self.0.writer(), + )?; Ok(MeasurementAccuracyRangeStructBuilder(self.0)) } } #[cfg(not(feature = "defmt"))] - impl

MeasurementAccuracyRangeStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug, { - pub fn percent_typical(mut self, value: Option) -> Result, rs_matter_crate::error::Error> { - #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +" , self , "percentTypical" , value); - rs_matter_crate::tlv::ToTLV::to_tlv(&value, &rs_matter_crate::tlv::TLVTag::Context(4), self.0.writer())?; + impl

MeasurementAccuracyRangeStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug, + { + pub fn percent_typical( + mut self, + value: Option, + ) -> Result, rs_matter_crate::error::Error> + { + #[cfg(feature = "log")] + rs_matter_crate::reexport::log::debug!( + "{:?}::{} -> {:?} +", + self, + "percentTypical", + value + ); + rs_matter_crate::tlv::ToTLV::to_tlv( + &value, + &rs_matter_crate::tlv::TLVTag::Context(4), + self.0.writer(), + )?; Ok(MeasurementAccuracyRangeStructBuilder(self.0)) } } #[cfg(feature = "defmt")] - impl

MeasurementAccuracyRangeStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug + rs_matter_crate::reexport::defmt::Format, { - pub fn fixed_max(mut self, value: Option) -> Result, rs_matter_crate::error::Error> { - #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!("{:?}::{} -> {:?} +" , self , "fixedMax" , value); - #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +" , self , "fixedMax" , value); - rs_matter_crate::tlv::ToTLV::to_tlv(&value, &rs_matter_crate::tlv::TLVTag::Context(5), self.0.writer())?; + impl

MeasurementAccuracyRangeStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent + + core::fmt::Debug + + rs_matter_crate::reexport::defmt::Format, + { + pub fn fixed_max( + mut self, + value: Option, + ) -> Result, rs_matter_crate::error::Error> + { + #[cfg(feature = "defmt")] + rs_matter_crate::reexport::defmt::debug!("{:?}::{} -> {:?} +", self, "fixedMax", value); + #[cfg(feature = "log")] + rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +", self, "fixedMax", value); + rs_matter_crate::tlv::ToTLV::to_tlv( + &value, + &rs_matter_crate::tlv::TLVTag::Context(5), + self.0.writer(), + )?; Ok(MeasurementAccuracyRangeStructBuilder(self.0)) } } #[cfg(not(feature = "defmt"))] - impl

MeasurementAccuracyRangeStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug, { - pub fn fixed_max(mut self, value: Option) -> Result, rs_matter_crate::error::Error> { - #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +" , self , "fixedMax" , value); - rs_matter_crate::tlv::ToTLV::to_tlv(&value, &rs_matter_crate::tlv::TLVTag::Context(5), self.0.writer())?; + impl

MeasurementAccuracyRangeStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug, + { + pub fn fixed_max( + mut self, + value: Option, + ) -> Result, rs_matter_crate::error::Error> + { + #[cfg(feature = "log")] + rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +", self, "fixedMax", value); + rs_matter_crate::tlv::ToTLV::to_tlv( + &value, + &rs_matter_crate::tlv::TLVTag::Context(5), + self.0.writer(), + )?; Ok(MeasurementAccuracyRangeStructBuilder(self.0)) } } #[cfg(feature = "defmt")] - impl

MeasurementAccuracyRangeStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug + rs_matter_crate::reexport::defmt::Format, { - pub fn fixed_min(mut self, value: Option) -> Result, rs_matter_crate::error::Error> { - #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!("{:?}::{} -> {:?} +" , self , "fixedMin" , value); - #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +" , self , "fixedMin" , value); - rs_matter_crate::tlv::ToTLV::to_tlv(&value, &rs_matter_crate::tlv::TLVTag::Context(6), self.0.writer())?; + impl

MeasurementAccuracyRangeStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent + + core::fmt::Debug + + rs_matter_crate::reexport::defmt::Format, + { + pub fn fixed_min( + mut self, + value: Option, + ) -> Result, rs_matter_crate::error::Error> + { + #[cfg(feature = "defmt")] + rs_matter_crate::reexport::defmt::debug!("{:?}::{} -> {:?} +", self, "fixedMin", value); + #[cfg(feature = "log")] + rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +", self, "fixedMin", value); + rs_matter_crate::tlv::ToTLV::to_tlv( + &value, + &rs_matter_crate::tlv::TLVTag::Context(6), + self.0.writer(), + )?; Ok(MeasurementAccuracyRangeStructBuilder(self.0)) } } #[cfg(not(feature = "defmt"))] - impl

MeasurementAccuracyRangeStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug, { - pub fn fixed_min(mut self, value: Option) -> Result, rs_matter_crate::error::Error> { - #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +" , self , "fixedMin" , value); - rs_matter_crate::tlv::ToTLV::to_tlv(&value, &rs_matter_crate::tlv::TLVTag::Context(6), self.0.writer())?; + impl

MeasurementAccuracyRangeStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug, + { + pub fn fixed_min( + mut self, + value: Option, + ) -> Result, rs_matter_crate::error::Error> + { + #[cfg(feature = "log")] + rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +", self, "fixedMin", value); + rs_matter_crate::tlv::ToTLV::to_tlv( + &value, + &rs_matter_crate::tlv::TLVTag::Context(6), + self.0.writer(), + )?; Ok(MeasurementAccuracyRangeStructBuilder(self.0)) } } #[cfg(feature = "defmt")] - impl

MeasurementAccuracyRangeStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug + rs_matter_crate::reexport::defmt::Format, { - pub fn fixed_typical(mut self, value: Option) -> Result, rs_matter_crate::error::Error> { - #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!("{:?}::{} -> {:?} +" , self , "fixedTypical" , value); - #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +" , self , "fixedTypical" , value); - rs_matter_crate::tlv::ToTLV::to_tlv(&value, &rs_matter_crate::tlv::TLVTag::Context(7), self.0.writer())?; + impl

MeasurementAccuracyRangeStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent + + core::fmt::Debug + + rs_matter_crate::reexport::defmt::Format, + { + pub fn fixed_typical( + mut self, + value: Option, + ) -> Result, rs_matter_crate::error::Error> + { + #[cfg(feature = "defmt")] + rs_matter_crate::reexport::defmt::debug!( + "{:?}::{} -> {:?} +", + self, + "fixedTypical", + value + ); + #[cfg(feature = "log")] + rs_matter_crate::reexport::log::debug!( + "{:?}::{} -> {:?} +", + self, + "fixedTypical", + value + ); + rs_matter_crate::tlv::ToTLV::to_tlv( + &value, + &rs_matter_crate::tlv::TLVTag::Context(7), + self.0.writer(), + )?; Ok(MeasurementAccuracyRangeStructBuilder(self.0)) } } #[cfg(not(feature = "defmt"))] - impl

MeasurementAccuracyRangeStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug, { - pub fn fixed_typical(mut self, value: Option) -> Result, rs_matter_crate::error::Error> { - #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!("{:?}::{} -> {:?} +" , self , "fixedTypical" , value); - rs_matter_crate::tlv::ToTLV::to_tlv(&value, &rs_matter_crate::tlv::TLVTag::Context(7), self.0.writer())?; + impl

MeasurementAccuracyRangeStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent + core::fmt::Debug, + { + pub fn fixed_typical( + mut self, + value: Option, + ) -> Result, rs_matter_crate::error::Error> + { + #[cfg(feature = "log")] + rs_matter_crate::reexport::log::debug!( + "{:?}::{} -> {:?} +", + self, + "fixedTypical", + value + ); + rs_matter_crate::tlv::ToTLV::to_tlv( + &value, + &rs_matter_crate::tlv::TLVTag::Context(7), + self.0.writer(), + )?; Ok(MeasurementAccuracyRangeStructBuilder(self.0)) } } - impl

MeasurementAccuracyRangeStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent, { + impl

MeasurementAccuracyRangeStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent, + { #[doc = "Finish the struct and return the parent"] pub fn end(mut self) -> Result { use rs_matter_crate::tlv::TLVWrite; @@ -980,27 +1910,79 @@ pub mod globals { Ok(self.0) } } - impl core::fmt::Debug for MeasurementAccuracyRangeStructBuilder where P: core::fmt::Debug, { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{:?}::{}", self.0, "MeasurementAccuracyRangeStruct") } } + impl core::fmt::Debug for MeasurementAccuracyRangeStructBuilder + where + P: core::fmt::Debug, + { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{:?}::{}", self.0, "MeasurementAccuracyRangeStruct") + } + } #[cfg(feature = "defmt")] - impl rs_matter_crate::reexport::defmt::Format for MeasurementAccuracyRangeStructBuilder where P: rs_matter_crate::reexport::defmt::Format, { fn format(&self, f: rs_matter_crate::reexport::defmt::Formatter<'_>) { rs_matter_crate::reexport::defmt::write!(f, "{:?}::{}", self.0, "MeasurementAccuracyRangeStruct") } } - impl rs_matter_crate::tlv::TLVBuilderParent for MeasurementAccuracyRangeStructBuilder where P: rs_matter_crate::tlv::TLVBuilderParent, { + impl rs_matter_crate::reexport::defmt::Format + for MeasurementAccuracyRangeStructBuilder + where + P: rs_matter_crate::reexport::defmt::Format, + { + fn format(&self, f: rs_matter_crate::reexport::defmt::Formatter<'_>) { + rs_matter_crate::reexport::defmt::write!( + f, + "{:?}::{}", + self.0, + "MeasurementAccuracyRangeStruct" + ) + } + } + impl rs_matter_crate::tlv::TLVBuilderParent + for MeasurementAccuracyRangeStructBuilder + where + P: rs_matter_crate::tlv::TLVBuilderParent, + { type Write = P::Write; - fn writer(&mut self) -> &mut P::Write { self.0.writer() } + fn writer(&mut self) -> &mut P::Write { + self.0.writer() + } } - impl

rs_matter_crate::tlv::TLVBuilder

for MeasurementAccuracyRangeStructBuilder

where P: rs_matter_crate::tlv::TLVBuilderParent, { - fn new(parent: P, tag: &rs_matter_crate::tlv::TLVTag) -> Result { Self::new(parent, tag) } - fn unchecked_into_parent(self) -> P { self.0 } + impl

rs_matter_crate::tlv::TLVBuilder

for MeasurementAccuracyRangeStructBuilder

+ where + P: rs_matter_crate::tlv::TLVBuilderParent, + { + fn new( + parent: P, + tag: &rs_matter_crate::tlv::TLVTag, + ) -> Result { + Self::new(parent, tag) + } + fn unchecked_into_parent(self) -> P { + self.0 + } } - pub struct MeasurementAccuracyRangeStructArrayBuilder

(P); - impl

MeasurementAccuracyRangeStructArrayBuilder

where P: rs_matter_crate::tlv::TLVBuilderParent, { + pub struct MeasurementAccuracyRangeStructArrayBuilder

(P); + impl

MeasurementAccuracyRangeStructArrayBuilder

+ where + P: rs_matter_crate::tlv::TLVBuilderParent, + { #[doc = "Create a new instance"] - pub fn new(mut parent: P, tag: &rs_matter_crate::tlv::TLVTag) -> Result { + pub fn new( + mut parent: P, + tag: &rs_matter_crate::tlv::TLVTag, + ) -> Result { use rs_matter_crate::tlv::TLVWrite; parent.writer().start_array(tag)?; Ok(Self(parent)) } #[doc = "Push a new element into the array"] - pub fn push(self) -> Result>, rs_matter_crate::error::Error> { rs_matter_crate::tlv::TLVBuilder::new(MeasurementAccuracyRangeStructArrayBuilder(self.0), &rs_matter_crate::tlv::TLVTag::Anonymous) } + pub fn push( + self, + ) -> Result< + MeasurementAccuracyRangeStructBuilder>, + rs_matter_crate::error::Error, + > { + rs_matter_crate::tlv::TLVBuilder::new( + MeasurementAccuracyRangeStructArrayBuilder(self.0), + &rs_matter_crate::tlv::TLVTag::Anonymous, + ) + } #[doc = "Finish the array and return the parent"] pub fn end(mut self) -> Result { use rs_matter_crate::tlv::TLVWrite; @@ -1008,16 +1990,50 @@ pub mod globals { Ok(self.0) } } - impl

core::fmt::Debug for MeasurementAccuracyRangeStructArrayBuilder

where P: core::fmt::Debug, { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{:?}::{}", self.0, "MeasurementAccuracyRangeStruct[]") } } + impl

core::fmt::Debug for MeasurementAccuracyRangeStructArrayBuilder

+ where + P: core::fmt::Debug, + { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{:?}::{}", self.0, "MeasurementAccuracyRangeStruct[]") + } + } #[cfg(feature = "defmt")] - impl

rs_matter_crate::reexport::defmt::Format for MeasurementAccuracyRangeStructArrayBuilder

where P: rs_matter_crate::reexport::defmt::Format, { fn format(&self, f: rs_matter_crate::reexport::defmt::Formatter<'_>) { rs_matter_crate::reexport::defmt::write!(f, "{:?}::{}", self.0, "MeasurementAccuracyRangeStruct[]") } } - impl

rs_matter_crate::tlv::TLVBuilderParent for MeasurementAccuracyRangeStructArrayBuilder

where P: rs_matter_crate::tlv::TLVBuilderParent, { + impl

rs_matter_crate::reexport::defmt::Format for MeasurementAccuracyRangeStructArrayBuilder

+ where + P: rs_matter_crate::reexport::defmt::Format, + { + fn format(&self, f: rs_matter_crate::reexport::defmt::Formatter<'_>) { + rs_matter_crate::reexport::defmt::write!( + f, + "{:?}::{}", + self.0, + "MeasurementAccuracyRangeStruct[]" + ) + } + } + impl

rs_matter_crate::tlv::TLVBuilderParent for MeasurementAccuracyRangeStructArrayBuilder

+ where + P: rs_matter_crate::tlv::TLVBuilderParent, + { type Write = P::Write; - fn writer(&mut self) -> &mut P::Write { self.0.writer() } + fn writer(&mut self) -> &mut P::Write { + self.0.writer() + } } - impl

rs_matter_crate::tlv::TLVBuilder

for MeasurementAccuracyRangeStructArrayBuilder

where P: rs_matter_crate::tlv::TLVBuilderParent, { - fn new(parent: P, tag: &rs_matter_crate::tlv::TLVTag) -> Result { Self::new(parent, tag) } - fn unchecked_into_parent(self) -> P { self.0 } + impl

rs_matter_crate::tlv::TLVBuilder

for MeasurementAccuracyRangeStructArrayBuilder

+ where + P: rs_matter_crate::tlv::TLVBuilderParent, + { + fn new( + parent: P, + tag: &rs_matter_crate::tlv::TLVTag, + ) -> Result { + Self::new(parent, tag) + } + fn unchecked_into_parent(self) -> P { + self.0 + } } } "#; @@ -1659,7 +2675,10 @@ pub mod unit_testing { Ok(Some(rs_matter_crate::tlv::FromTLV::from_tlv(&element)?)) } } - pub fn fabric_index(&self) -> Result, rs_matter_crate::error::Error> { + pub fn fabric_index( + &self, + ) -> Result, rs_matter_crate::error::Error> + { let element = self.0.structure()?.find_ctx(254)?; if element.is_empty() { Ok(None) @@ -7516,7 +8535,7 @@ pub mod unit_testing { { pub fn fabric_index( mut self, - value: Option, + value: Option, ) -> Result, rs_matter_crate::error::Error> { #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( @@ -7547,7 +8566,7 @@ pub mod unit_testing { { pub fn fabric_index( mut self, - value: Option, + value: Option, ) -> Result, rs_matter_crate::error::Error> { #[cfg(feature = "log")] rs_matter_crate::reexport::log::debug!( @@ -21760,112 +22779,118 @@ pub mod unit_testing { const CLUSTER: rs_matter_crate::dm::Cluster<'static>; fn dataver(&self) -> u32; fn dataver_changed(&self); - fn boolean( + fn run( + &self, + _ctx: impl rs_matter_crate::dm::HandlerContext, + ) -> impl core::future::Future> { + core::future::pending::>() + } + async fn boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn bitmap_8( + async fn bitmap_8( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn bitmap_16( + async fn bitmap_16( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn bitmap_32( + async fn bitmap_32( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn bitmap_64( + async fn bitmap_64( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn int_8_u( + async fn int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn int_16_u( + async fn int_16_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn int_24_u( + async fn int_24_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn int_32_u( + async fn int_32_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn int_40_u( + async fn int_40_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn int_48_u( + async fn int_48_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn int_56_u( + async fn int_56_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn int_64_u( + async fn int_64_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn int_8_s( + async fn int_8_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn int_16_s( + async fn int_16_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn int_24_s( + async fn int_24_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn int_32_s( + async fn int_32_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn int_40_s( + async fn int_40_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn int_48_s( + async fn int_48_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn int_56_s( + async fn int_56_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn int_64_s( + async fn int_64_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn enum_8( + async fn enum_8( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn enum_16( + async fn enum_16( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn float_single( + async fn float_single( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn float_double( + async fn float_double( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn octet_string( + async fn octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::OctetsBuilder

, ) -> Result; - fn list_int_8_u( + async fn list_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::dm::ArrayAttributeRead< @@ -21873,7 +22898,7 @@ pub mod unit_testing { rs_matter_crate::tlv::ToTLVBuilder, >, ) -> Result; - fn list_octet_string( + async fn list_octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::dm::ArrayAttributeRead< @@ -21881,7 +22906,7 @@ pub mod unit_testing { rs_matter_crate::tlv::OctetsBuilder

, >, ) -> Result; - fn list_struct_octet_string( + async fn list_struct_octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::dm::ArrayAttributeRead< @@ -21889,34 +22914,34 @@ pub mod unit_testing { TestListStructOctetBuilder

, >, ) -> Result; - fn long_octet_string( + async fn long_octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::OctetsBuilder

, ) -> Result; - fn char_string( + async fn char_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::Utf8StrBuilder

, ) -> Result; - fn long_char_string( + async fn long_char_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::Utf8StrBuilder

, ) -> Result; - fn epoch_us( + async fn epoch_us( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn epoch_s( + async fn epoch_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn vendor_id( + async fn vendor_id( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn list_nullables_and_optionals_struct( + async fn list_nullables_and_optionals_struct( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::dm::ArrayAttributeRead< @@ -21924,32 +22949,32 @@ pub mod unit_testing { NullablesAndOptionalsStructBuilder

, >, ) -> Result; - fn enum_attr( + async fn enum_attr( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn struct_attr( + async fn struct_attr( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: SimpleStructBuilder

, ) -> Result; - fn range_restricted_int_8_u( + async fn range_restricted_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn range_restricted_int_8_s( + async fn range_restricted_int_8_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn range_restricted_int_16_u( + async fn range_restricted_int_16_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn range_restricted_int_16_s( + async fn range_restricted_int_16_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn list_long_octet_string( + async fn list_long_octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::dm::ArrayAttributeRead< @@ -21957,7 +22982,7 @@ pub mod unit_testing { rs_matter_crate::tlv::OctetsBuilder

, >, ) -> Result; - fn list_fabric_scoped( + async fn list_fabric_scoped( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::dm::ArrayAttributeRead< @@ -21965,125 +22990,125 @@ pub mod unit_testing { TestFabricScopedBuilder

, >, ) -> Result; - fn timed_write_boolean( + async fn timed_write_boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn general_error_boolean( + async fn general_error_boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn cluster_error_boolean( + async fn cluster_error_boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn unsupported( + async fn unsupported( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result { Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) } - fn nullable_boolean( + async fn nullable_boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_bitmap_8( + async fn nullable_bitmap_8( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_bitmap_16( + async fn nullable_bitmap_16( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_bitmap_32( + async fn nullable_bitmap_32( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_bitmap_64( + async fn nullable_bitmap_64( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_int_8_u( + async fn nullable_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_int_16_u( + async fn nullable_int_16_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_int_24_u( + async fn nullable_int_24_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_int_32_u( + async fn nullable_int_32_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_int_40_u( + async fn nullable_int_40_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_int_48_u( + async fn nullable_int_48_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_int_56_u( + async fn nullable_int_56_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_int_64_u( + async fn nullable_int_64_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_int_8_s( + async fn nullable_int_8_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_int_16_s( + async fn nullable_int_16_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_int_24_s( + async fn nullable_int_24_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_int_32_s( + async fn nullable_int_32_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_int_40_s( + async fn nullable_int_40_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_int_48_s( + async fn nullable_int_48_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_int_56_s( + async fn nullable_int_56_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_int_64_s( + async fn nullable_int_64_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_enum_8( + async fn nullable_enum_8( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_enum_16( + async fn nullable_enum_16( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_float_single( + async fn nullable_float_single( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_float_double( + async fn nullable_float_double( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_octet_string( + async fn nullable_octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::NullableBuilder< @@ -22091,7 +23116,7 @@ pub mod unit_testing { rs_matter_crate::tlv::OctetsBuilder

, >, ) -> Result; - fn nullable_char_string( + async fn nullable_char_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::NullableBuilder< @@ -22099,172 +23124,172 @@ pub mod unit_testing { rs_matter_crate::tlv::Utf8StrBuilder

, >, ) -> Result; - fn nullable_enum_attr( + async fn nullable_enum_attr( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_struct( + async fn nullable_struct( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::NullableBuilder>, ) -> Result; - fn nullable_range_restricted_int_8_u( + async fn nullable_range_restricted_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_range_restricted_int_8_s( + async fn nullable_range_restricted_int_8_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_range_restricted_int_16_u( + async fn nullable_range_restricted_int_16_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn nullable_range_restricted_int_16_s( + async fn nullable_range_restricted_int_16_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; - fn write_only_int_8_u( + async fn write_only_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result { Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) } - fn mei_int_8_u( + async fn mei_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn set_boolean( + async fn set_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_bitmap_8( + async fn set_bitmap_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: Bitmap8MaskMap, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_bitmap_16( + async fn set_bitmap_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: Bitmap16MaskMap, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_bitmap_32( + async fn set_bitmap_32( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: Bitmap32MaskMap, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_bitmap_64( + async fn set_bitmap_64( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: Bitmap64MaskMap, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_int_8_u( + async fn set_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_int_16_u( + async fn set_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_int_24_u( + async fn set_int_24_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u32, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_int_32_u( + async fn set_int_32_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u32, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_int_40_u( + async fn set_int_40_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_int_48_u( + async fn set_int_48_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_int_56_u( + async fn set_int_56_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_int_64_u( + async fn set_int_64_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_int_8_s( + async fn set_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i8, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_int_16_s( + async fn set_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i16, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_int_24_s( + async fn set_int_24_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i32, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_int_32_s( + async fn set_int_32_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i32, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_int_40_s( + async fn set_int_40_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i64, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_int_48_s( + async fn set_int_48_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i64, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_int_56_s( + async fn set_int_56_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i64, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_int_64_s( + async fn set_int_64_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i64, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_enum_8( + async fn set_enum_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_enum_16( + async fn set_enum_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_float_single( + async fn set_float_single( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: f32, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_float_double( + async fn set_float_double( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: f64, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_octet_string( + async fn set_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::OctetStr<'_>, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_list_int_8_u( + async fn set_list_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< @@ -22272,7 +23297,7 @@ pub mod unit_testing { u8, >, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_list_octet_string( + async fn set_list_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< @@ -22280,7 +23305,7 @@ pub mod unit_testing { rs_matter_crate::tlv::OctetStr<'_>, >, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_list_struct_octet_string( + async fn set_list_struct_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< @@ -22288,37 +23313,37 @@ pub mod unit_testing { TestListStructOctet<'_>, >, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_long_octet_string( + async fn set_long_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::OctetStr<'_>, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_char_string( + async fn set_char_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Utf8Str<'_>, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_long_char_string( + async fn set_long_char_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Utf8Str<'_>, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_epoch_us( + async fn set_epoch_us( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_epoch_s( + async fn set_epoch_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u32, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_vendor_id( + async fn set_vendor_id( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_list_nullables_and_optionals_struct( + async fn set_list_nullables_and_optionals_struct( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< @@ -22326,37 +23351,37 @@ pub mod unit_testing { NullablesAndOptionalsStruct<'_>, >, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_enum_attr( + async fn set_enum_attr( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: SimpleEnum, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_struct_attr( + async fn set_struct_attr( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: SimpleStruct<'_>, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_range_restricted_int_8_u( + async fn set_range_restricted_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_range_restricted_int_8_s( + async fn set_range_restricted_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i8, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_range_restricted_int_16_u( + async fn set_range_restricted_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_range_restricted_int_16_s( + async fn set_range_restricted_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i16, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_list_long_octet_string( + async fn set_list_long_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< @@ -22364,7 +23389,7 @@ pub mod unit_testing { rs_matter_crate::tlv::OctetStr<'_>, >, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_list_fabric_scoped( + async fn set_list_fabric_scoped( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< @@ -22372,265 +23397,273 @@ pub mod unit_testing { TestFabricScoped<'_>, >, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_timed_write_boolean( + async fn set_timed_write_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_general_error_boolean( + async fn set_general_error_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_cluster_error_boolean( + async fn set_cluster_error_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_unsupported( + async fn set_unsupported( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, ) -> Result<(), rs_matter_crate::error::Error> { Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) } - fn set_nullable_boolean( + async fn set_nullable_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_bitmap_8( + async fn set_nullable_bitmap_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_bitmap_16( + async fn set_nullable_bitmap_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_bitmap_32( + async fn set_nullable_bitmap_32( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_bitmap_64( + async fn set_nullable_bitmap_64( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_int_8_u( + async fn set_nullable_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_int_16_u( + async fn set_nullable_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_int_24_u( + async fn set_nullable_int_24_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_int_32_u( + async fn set_nullable_int_32_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_int_40_u( + async fn set_nullable_int_40_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_int_48_u( + async fn set_nullable_int_48_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_int_56_u( + async fn set_nullable_int_56_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_int_64_u( + async fn set_nullable_int_64_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_int_8_s( + async fn set_nullable_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_int_16_s( + async fn set_nullable_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_int_24_s( + async fn set_nullable_int_24_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_int_32_s( + async fn set_nullable_int_32_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_int_40_s( + async fn set_nullable_int_40_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_int_48_s( + async fn set_nullable_int_48_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_int_56_s( + async fn set_nullable_int_56_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_int_64_s( + async fn set_nullable_int_64_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_enum_8( + async fn set_nullable_enum_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_enum_16( + async fn set_nullable_enum_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_float_single( + async fn set_nullable_float_single( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_float_double( + async fn set_nullable_float_double( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_octet_string( + async fn set_nullable_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable>, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_char_string( + async fn set_nullable_char_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable>, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_enum_attr( + async fn set_nullable_enum_attr( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_struct( + async fn set_nullable_struct( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable>, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_range_restricted_int_8_u( + async fn set_nullable_range_restricted_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_range_restricted_int_8_s( + async fn set_nullable_range_restricted_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_range_restricted_int_16_u( + async fn set_nullable_range_restricted_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_nullable_range_restricted_int_16_s( + async fn set_nullable_range_restricted_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; - fn set_write_only_int_8_u( + async fn set_write_only_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, ) -> Result<(), rs_matter_crate::error::Error> { Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) } - fn set_mei_int_8_u( + async fn set_mei_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, ) -> Result<(), rs_matter_crate::error::Error>; - fn handle_test( + async fn handle_test( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> Result<(), rs_matter_crate::error::Error>; - fn handle_test_not_handled( + async fn handle_test_not_handled( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> Result<(), rs_matter_crate::error::Error>; - fn handle_test_specific( + async fn handle_test_specific( &self, ctx: impl rs_matter_crate::dm::InvokeContext, response: TestSpecificResponseBuilder

, ) -> Result; - fn handle_test_unknown_command( + async fn handle_test_unknown_command( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> Result<(), rs_matter_crate::error::Error>; - fn handle_test_add_arguments( + async fn handle_test_add_arguments( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestAddArgumentsRequest<'_>, response: TestAddArgumentsResponseBuilder

, ) -> Result; - fn handle_test_simple_argument_request( + async fn handle_test_simple_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestSimpleArgumentRequestRequest<'_>, response: TestSimpleArgumentResponseBuilder

, ) -> Result; - fn handle_test_struct_array_argument_request( + async fn handle_test_struct_array_argument_request< + P: rs_matter_crate::tlv::TLVBuilderParent, + >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestStructArrayArgumentRequestRequest<'_>, response: TestStructArrayArgumentResponseBuilder

, ) -> Result; - fn handle_test_struct_argument_request( + async fn handle_test_struct_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestStructArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, ) -> Result; - fn handle_test_nested_struct_argument_request( + async fn handle_test_nested_struct_argument_request< + P: rs_matter_crate::tlv::TLVBuilderParent, + >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestNestedStructArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, ) -> Result; - fn handle_test_list_struct_argument_request( + async fn handle_test_list_struct_argument_request< + P: rs_matter_crate::tlv::TLVBuilderParent, + >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestListStructArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, ) -> Result; - fn handle_test_list_int_8_u_argument_request( + async fn handle_test_list_int_8_u_argument_request< + P: rs_matter_crate::tlv::TLVBuilderParent, + >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestListInt8UArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, ) -> Result; - fn handle_test_nested_struct_list_argument_request< + async fn handle_test_nested_struct_list_argument_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( &self, @@ -22638,7 +23671,7 @@ pub mod unit_testing { request: TestNestedStructListArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, ) -> Result; - fn handle_test_list_nested_struct_list_argument_request< + async fn handle_test_list_nested_struct_list_argument_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( &self, @@ -22646,25 +23679,27 @@ pub mod unit_testing { request: TestListNestedStructListArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, ) -> Result; - fn handle_test_list_int_8_u_reverse_request( + async fn handle_test_list_int_8_u_reverse_request< + P: rs_matter_crate::tlv::TLVBuilderParent, + >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestListInt8UReverseRequestRequest<'_>, response: TestListInt8UReverseResponseBuilder

, ) -> Result; - fn handle_test_enums_request( + async fn handle_test_enums_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestEnumsRequestRequest<'_>, response: TestEnumsResponseBuilder

, ) -> Result; - fn handle_test_nullable_optional_request( + async fn handle_test_nullable_optional_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestNullableOptionalRequestRequest<'_>, response: TestNullableOptionalResponseBuilder

, ) -> Result; - fn handle_test_complex_nullable_optional_request< + async fn handle_test_complex_nullable_optional_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( &self, @@ -22672,28 +23707,28 @@ pub mod unit_testing { request: TestComplexNullableOptionalRequestRequest<'_>, response: TestComplexNullableOptionalResponseBuilder

, ) -> Result; - fn handle_simple_struct_echo_request( + async fn handle_simple_struct_echo_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: SimpleStructEchoRequestRequest<'_>, response: SimpleStructResponseBuilder

, ) -> Result; - fn handle_timed_invoke_request( + async fn handle_timed_invoke_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> Result<(), rs_matter_crate::error::Error>; - fn handle_test_simple_optional_argument_request( + async fn handle_test_simple_optional_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestSimpleOptionalArgumentRequestRequest<'_>, ) -> Result<(), rs_matter_crate::error::Error>; - fn handle_test_emit_test_event_request( + async fn handle_test_emit_test_event_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestEmitTestEventRequestRequest<'_>, response: TestEmitTestEventResponseBuilder

, ) -> Result; - fn handle_test_emit_test_fabric_scoped_event_request< + async fn handle_test_emit_test_fabric_scoped_event_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( &self, @@ -22701,19 +23736,23 @@ pub mod unit_testing { request: TestEmitTestFabricScopedEventRequestRequest<'_>, response: TestEmitTestFabricScopedEventResponseBuilder

, ) -> Result; - fn handle_test_batch_helper_request( + async fn handle_test_batch_helper_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestBatchHelperRequestRequest<'_>, response: TestBatchHelperResponseBuilder

, ) -> Result; - fn handle_test_second_batch_helper_request( + async fn handle_test_second_batch_helper_request< + P: rs_matter_crate::tlv::TLVBuilderParent, + >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestSecondBatchHelperRequestRequest<'_>, response: TestBatchHelperResponseBuilder

, ) -> Result; - fn handle_test_different_vendor_mei_request( + async fn handle_test_different_vendor_mei_request< + P: rs_matter_crate::tlv::TLVBuilderParent, + >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestDifferentVendorMeiRequestRequest<'_>, @@ -22731,161 +23770,189 @@ pub mod unit_testing { fn dataver_changed(&self) { T::dataver_changed(self) } + fn run( + &self, + ctx: impl rs_matter_crate::dm::HandlerContext, + ) -> impl core::future::Future> { + (**self).run(ctx) + } fn boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::boolean(self, ctx) } fn bitmap_8( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::bitmap_8(self, ctx) } fn bitmap_16( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::bitmap_16(self, ctx) } fn bitmap_32( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::bitmap_32(self, ctx) } fn bitmap_64( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::bitmap_64(self, ctx) } fn int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> { T::int_8_u(self, ctx) } fn int_16_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::int_16_u(self, ctx) } fn int_24_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::int_24_u(self, ctx) } fn int_32_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::int_32_u(self, ctx) } fn int_40_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::int_40_u(self, ctx) } fn int_48_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::int_48_u(self, ctx) } fn int_56_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::int_56_u(self, ctx) } fn int_64_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::int_64_u(self, ctx) } fn int_8_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> { T::int_8_s(self, ctx) } fn int_16_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::int_16_s(self, ctx) } fn int_24_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::int_24_s(self, ctx) } fn int_32_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::int_32_s(self, ctx) } fn int_40_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::int_40_s(self, ctx) } fn int_48_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::int_48_s(self, ctx) } fn int_56_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::int_56_s(self, ctx) } fn int_64_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::int_64_s(self, ctx) } fn enum_8( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> { T::enum_8(self, ctx) } fn enum_16( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::enum_16(self, ctx) } fn float_single( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::float_single(self, ctx) } fn float_double( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::float_double(self, ctx) } fn octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::OctetsBuilder

, - ) -> Result { + ) -> impl core::future::Future> { T::octet_string(self, ctx, builder) } fn list_int_8_u( @@ -22895,7 +23962,7 @@ pub mod unit_testing { rs_matter_crate::tlv::ToTLVArrayBuilder, rs_matter_crate::tlv::ToTLVBuilder, >, - ) -> Result { + ) -> impl core::future::Future> { T::list_int_8_u(self, ctx, builder) } fn list_octet_string( @@ -22905,7 +23972,7 @@ pub mod unit_testing { rs_matter_crate::tlv::OctetsArrayBuilder

, rs_matter_crate::tlv::OctetsBuilder

, >, - ) -> Result { + ) -> impl core::future::Future> { T::list_octet_string(self, ctx, builder) } fn list_struct_octet_string( @@ -22915,46 +23982,49 @@ pub mod unit_testing { TestListStructOctetArrayBuilder

, TestListStructOctetBuilder

, >, - ) -> Result { + ) -> impl core::future::Future> { T::list_struct_octet_string(self, ctx, builder) } fn long_octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::OctetsBuilder

, - ) -> Result { + ) -> impl core::future::Future> { T::long_octet_string(self, ctx, builder) } fn char_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::Utf8StrBuilder

, - ) -> Result { + ) -> impl core::future::Future> { T::char_string(self, ctx, builder) } fn long_char_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::Utf8StrBuilder

, - ) -> Result { + ) -> impl core::future::Future> { T::long_char_string(self, ctx, builder) } fn epoch_us( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::epoch_us(self, ctx) } fn epoch_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::epoch_s(self, ctx) } fn vendor_id( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::vendor_id(self, ctx) } fn list_nullables_and_optionals_struct( @@ -22964,44 +24034,47 @@ pub mod unit_testing { NullablesAndOptionalsStructArrayBuilder

, NullablesAndOptionalsStructBuilder

, >, - ) -> Result { + ) -> impl core::future::Future> { T::list_nullables_and_optionals_struct(self, ctx, builder) } fn enum_attr( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::enum_attr(self, ctx) } fn struct_attr( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: SimpleStructBuilder

, - ) -> Result { + ) -> impl core::future::Future> { T::struct_attr(self, ctx, builder) } fn range_restricted_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> { T::range_restricted_int_8_u(self, ctx) } fn range_restricted_int_8_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> { T::range_restricted_int_8_s(self, ctx) } fn range_restricted_int_16_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::range_restricted_int_16_u(self, ctx) } fn range_restricted_int_16_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::range_restricted_int_16_s(self, ctx) } fn list_long_octet_string( @@ -23011,7 +24084,7 @@ pub mod unit_testing { rs_matter_crate::tlv::OctetsArrayBuilder

, rs_matter_crate::tlv::OctetsBuilder

, >, - ) -> Result { + ) -> impl core::future::Future> { T::list_long_octet_string(self, ctx, builder) } fn list_fabric_scoped( @@ -23021,185 +24094,247 @@ pub mod unit_testing { TestFabricScopedArrayBuilder

, TestFabricScopedBuilder

, >, - ) -> Result { + ) -> impl core::future::Future> { T::list_fabric_scoped(self, ctx, builder) } fn timed_write_boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::timed_write_boolean(self, ctx) } fn general_error_boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::general_error_boolean(self, ctx) } fn cluster_error_boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::cluster_error_boolean(self, ctx) } fn unsupported( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::unsupported(self, ctx) } fn nullable_boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_boolean(self, ctx) } fn nullable_bitmap_8( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> - { + ) -> impl core::future::Future< + Output = Result< + rs_matter_crate::tlv::Nullable, + rs_matter_crate::error::Error, + >, + > { T::nullable_bitmap_8(self, ctx) } fn nullable_bitmap_16( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> - { + ) -> impl core::future::Future< + Output = Result< + rs_matter_crate::tlv::Nullable, + rs_matter_crate::error::Error, + >, + > { T::nullable_bitmap_16(self, ctx) } fn nullable_bitmap_32( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> - { + ) -> impl core::future::Future< + Output = Result< + rs_matter_crate::tlv::Nullable, + rs_matter_crate::error::Error, + >, + > { T::nullable_bitmap_32(self, ctx) } fn nullable_bitmap_64( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> - { + ) -> impl core::future::Future< + Output = Result< + rs_matter_crate::tlv::Nullable, + rs_matter_crate::error::Error, + >, + > { T::nullable_bitmap_64(self, ctx) } fn nullable_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_int_8_u(self, ctx) } fn nullable_int_16_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_int_16_u(self, ctx) } fn nullable_int_24_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_int_24_u(self, ctx) } fn nullable_int_32_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_int_32_u(self, ctx) } fn nullable_int_40_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_int_40_u(self, ctx) } fn nullable_int_48_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_int_48_u(self, ctx) } fn nullable_int_56_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_int_56_u(self, ctx) } fn nullable_int_64_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_int_64_u(self, ctx) } fn nullable_int_8_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_int_8_s(self, ctx) } fn nullable_int_16_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_int_16_s(self, ctx) } fn nullable_int_24_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_int_24_s(self, ctx) } fn nullable_int_32_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_int_32_s(self, ctx) } fn nullable_int_40_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_int_40_s(self, ctx) } fn nullable_int_48_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_int_48_s(self, ctx) } fn nullable_int_56_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_int_56_s(self, ctx) } fn nullable_int_64_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_int_64_s(self, ctx) } fn nullable_enum_8( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_enum_8(self, ctx) } fn nullable_enum_16( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_enum_16(self, ctx) } fn nullable_float_single( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_float_single(self, ctx) } fn nullable_float_double( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_float_double(self, ctx) } fn nullable_octet_string( @@ -23209,7 +24344,7 @@ pub mod unit_testing { P, rs_matter_crate::tlv::OctetsBuilder

, >, - ) -> Result { + ) -> impl core::future::Future> { T::nullable_octet_string(self, ctx, builder) } fn nullable_char_string( @@ -23219,242 +24354,254 @@ pub mod unit_testing { P, rs_matter_crate::tlv::Utf8StrBuilder

, >, - ) -> Result { + ) -> impl core::future::Future> { T::nullable_char_string(self, ctx, builder) } fn nullable_enum_attr( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> - { + ) -> impl core::future::Future< + Output = Result< + rs_matter_crate::tlv::Nullable, + rs_matter_crate::error::Error, + >, + > { T::nullable_enum_attr(self, ctx) } fn nullable_struct( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::NullableBuilder>, - ) -> Result { + ) -> impl core::future::Future> { T::nullable_struct(self, ctx, builder) } fn nullable_range_restricted_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_range_restricted_int_8_u(self, ctx) } fn nullable_range_restricted_int_8_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_range_restricted_int_8_s(self, ctx) } fn nullable_range_restricted_int_16_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_range_restricted_int_16_u(self, ctx) } fn nullable_range_restricted_int_16_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error> { + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { T::nullable_range_restricted_int_16_s(self, ctx) } fn write_only_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> { T::write_only_int_8_u(self, ctx) } fn mei_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> { T::mei_int_8_u(self, ctx) } - fn set_boolean( + async fn set_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_boolean(self, ctx, value) + T::set_boolean(self, ctx, value).await } - fn set_bitmap_8( + async fn set_bitmap_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: Bitmap8MaskMap, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_bitmap_8(self, ctx, value) + T::set_bitmap_8(self, ctx, value).await } - fn set_bitmap_16( + async fn set_bitmap_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: Bitmap16MaskMap, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_bitmap_16(self, ctx, value) + T::set_bitmap_16(self, ctx, value).await } - fn set_bitmap_32( + async fn set_bitmap_32( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: Bitmap32MaskMap, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_bitmap_32(self, ctx, value) + T::set_bitmap_32(self, ctx, value).await } - fn set_bitmap_64( + async fn set_bitmap_64( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: Bitmap64MaskMap, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_bitmap_64(self, ctx, value) + T::set_bitmap_64(self, ctx, value).await } - fn set_int_8_u( + async fn set_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_8_u(self, ctx, value) + T::set_int_8_u(self, ctx, value).await } - fn set_int_16_u( + async fn set_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_16_u(self, ctx, value) + T::set_int_16_u(self, ctx, value).await } - fn set_int_24_u( + async fn set_int_24_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u32, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_24_u(self, ctx, value) + T::set_int_24_u(self, ctx, value).await } - fn set_int_32_u( + async fn set_int_32_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u32, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_32_u(self, ctx, value) + T::set_int_32_u(self, ctx, value).await } - fn set_int_40_u( + async fn set_int_40_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_40_u(self, ctx, value) + T::set_int_40_u(self, ctx, value).await } - fn set_int_48_u( + async fn set_int_48_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_48_u(self, ctx, value) + T::set_int_48_u(self, ctx, value).await } - fn set_int_56_u( + async fn set_int_56_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_56_u(self, ctx, value) + T::set_int_56_u(self, ctx, value).await } - fn set_int_64_u( + async fn set_int_64_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_64_u(self, ctx, value) + T::set_int_64_u(self, ctx, value).await } - fn set_int_8_s( + async fn set_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i8, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_8_s(self, ctx, value) + T::set_int_8_s(self, ctx, value).await } - fn set_int_16_s( + async fn set_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i16, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_16_s(self, ctx, value) + T::set_int_16_s(self, ctx, value).await } - fn set_int_24_s( + async fn set_int_24_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i32, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_24_s(self, ctx, value) + T::set_int_24_s(self, ctx, value).await } - fn set_int_32_s( + async fn set_int_32_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i32, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_32_s(self, ctx, value) + T::set_int_32_s(self, ctx, value).await } - fn set_int_40_s( + async fn set_int_40_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i64, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_40_s(self, ctx, value) + T::set_int_40_s(self, ctx, value).await } - fn set_int_48_s( + async fn set_int_48_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i64, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_48_s(self, ctx, value) + T::set_int_48_s(self, ctx, value).await } - fn set_int_56_s( + async fn set_int_56_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i64, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_56_s(self, ctx, value) + T::set_int_56_s(self, ctx, value).await } - fn set_int_64_s( + async fn set_int_64_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i64, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_64_s(self, ctx, value) + T::set_int_64_s(self, ctx, value).await } - fn set_enum_8( + async fn set_enum_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_enum_8(self, ctx, value) + T::set_enum_8(self, ctx, value).await } - fn set_enum_16( + async fn set_enum_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_enum_16(self, ctx, value) + T::set_enum_16(self, ctx, value).await } - fn set_float_single( + async fn set_float_single( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: f32, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_float_single(self, ctx, value) + T::set_float_single(self, ctx, value).await } - fn set_float_double( + async fn set_float_double( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: f64, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_float_double(self, ctx, value) + T::set_float_double(self, ctx, value).await } - fn set_octet_string( + async fn set_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::OctetStr<'_>, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_octet_string(self, ctx, value) + T::set_octet_string(self, ctx, value).await } - fn set_list_int_8_u( + async fn set_list_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< @@ -23462,9 +24609,9 @@ pub mod unit_testing { u8, >, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_list_int_8_u(self, ctx, value) + T::set_list_int_8_u(self, ctx, value).await } - fn set_list_octet_string( + async fn set_list_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< @@ -23472,9 +24619,9 @@ pub mod unit_testing { rs_matter_crate::tlv::OctetStr<'_>, >, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_list_octet_string(self, ctx, value) + T::set_list_octet_string(self, ctx, value).await } - fn set_list_struct_octet_string( + async fn set_list_struct_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< @@ -23482,51 +24629,51 @@ pub mod unit_testing { TestListStructOctet<'_>, >, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_list_struct_octet_string(self, ctx, value) + T::set_list_struct_octet_string(self, ctx, value).await } - fn set_long_octet_string( + async fn set_long_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::OctetStr<'_>, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_long_octet_string(self, ctx, value) + T::set_long_octet_string(self, ctx, value).await } - fn set_char_string( + async fn set_char_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Utf8Str<'_>, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_char_string(self, ctx, value) + T::set_char_string(self, ctx, value).await } - fn set_long_char_string( + async fn set_long_char_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Utf8Str<'_>, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_long_char_string(self, ctx, value) + T::set_long_char_string(self, ctx, value).await } - fn set_epoch_us( + async fn set_epoch_us( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_epoch_us(self, ctx, value) + T::set_epoch_us(self, ctx, value).await } - fn set_epoch_s( + async fn set_epoch_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u32, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_epoch_s(self, ctx, value) + T::set_epoch_s(self, ctx, value).await } - fn set_vendor_id( + async fn set_vendor_id( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_vendor_id(self, ctx, value) + T::set_vendor_id(self, ctx, value).await } - fn set_list_nullables_and_optionals_struct( + async fn set_list_nullables_and_optionals_struct( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< @@ -23534,51 +24681,51 @@ pub mod unit_testing { NullablesAndOptionalsStruct<'_>, >, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_list_nullables_and_optionals_struct(self, ctx, value) + T::set_list_nullables_and_optionals_struct(self, ctx, value).await } - fn set_enum_attr( + async fn set_enum_attr( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: SimpleEnum, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_enum_attr(self, ctx, value) + T::set_enum_attr(self, ctx, value).await } - fn set_struct_attr( + async fn set_struct_attr( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: SimpleStruct<'_>, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_struct_attr(self, ctx, value) + T::set_struct_attr(self, ctx, value).await } - fn set_range_restricted_int_8_u( + async fn set_range_restricted_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_range_restricted_int_8_u(self, ctx, value) + T::set_range_restricted_int_8_u(self, ctx, value).await } - fn set_range_restricted_int_8_s( + async fn set_range_restricted_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i8, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_range_restricted_int_8_s(self, ctx, value) + T::set_range_restricted_int_8_s(self, ctx, value).await } - fn set_range_restricted_int_16_u( + async fn set_range_restricted_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_range_restricted_int_16_u(self, ctx, value) + T::set_range_restricted_int_16_u(self, ctx, value).await } - fn set_range_restricted_int_16_s( + async fn set_range_restricted_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i16, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_range_restricted_int_16_s(self, ctx, value) + T::set_range_restricted_int_16_s(self, ctx, value).await } - fn set_list_long_octet_string( + async fn set_list_long_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< @@ -23586,9 +24733,9 @@ pub mod unit_testing { rs_matter_crate::tlv::OctetStr<'_>, >, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_list_long_octet_string(self, ctx, value) + T::set_list_long_octet_string(self, ctx, value).await } - fn set_list_fabric_scoped( + async fn set_list_fabric_scoped( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< @@ -23596,363 +24743,371 @@ pub mod unit_testing { TestFabricScoped<'_>, >, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_list_fabric_scoped(self, ctx, value) + T::set_list_fabric_scoped(self, ctx, value).await } - fn set_timed_write_boolean( + async fn set_timed_write_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_timed_write_boolean(self, ctx, value) + T::set_timed_write_boolean(self, ctx, value).await } - fn set_general_error_boolean( + async fn set_general_error_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_general_error_boolean(self, ctx, value) + T::set_general_error_boolean(self, ctx, value).await } - fn set_cluster_error_boolean( + async fn set_cluster_error_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_cluster_error_boolean(self, ctx, value) + T::set_cluster_error_boolean(self, ctx, value).await } - fn set_unsupported( + async fn set_unsupported( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_unsupported(self, ctx, value) + T::set_unsupported(self, ctx, value).await } - fn set_nullable_boolean( + async fn set_nullable_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_boolean(self, ctx, value) + T::set_nullable_boolean(self, ctx, value).await } - fn set_nullable_bitmap_8( + async fn set_nullable_bitmap_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_bitmap_8(self, ctx, value) + T::set_nullable_bitmap_8(self, ctx, value).await } - fn set_nullable_bitmap_16( + async fn set_nullable_bitmap_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_bitmap_16(self, ctx, value) + T::set_nullable_bitmap_16(self, ctx, value).await } - fn set_nullable_bitmap_32( + async fn set_nullable_bitmap_32( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_bitmap_32(self, ctx, value) + T::set_nullable_bitmap_32(self, ctx, value).await } - fn set_nullable_bitmap_64( + async fn set_nullable_bitmap_64( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_bitmap_64(self, ctx, value) + T::set_nullable_bitmap_64(self, ctx, value).await } - fn set_nullable_int_8_u( + async fn set_nullable_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_8_u(self, ctx, value) + T::set_nullable_int_8_u(self, ctx, value).await } - fn set_nullable_int_16_u( + async fn set_nullable_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_16_u(self, ctx, value) + T::set_nullable_int_16_u(self, ctx, value).await } - fn set_nullable_int_24_u( + async fn set_nullable_int_24_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_24_u(self, ctx, value) + T::set_nullable_int_24_u(self, ctx, value).await } - fn set_nullable_int_32_u( + async fn set_nullable_int_32_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_32_u(self, ctx, value) + T::set_nullable_int_32_u(self, ctx, value).await } - fn set_nullable_int_40_u( + async fn set_nullable_int_40_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_40_u(self, ctx, value) + T::set_nullable_int_40_u(self, ctx, value).await } - fn set_nullable_int_48_u( + async fn set_nullable_int_48_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_48_u(self, ctx, value) + T::set_nullable_int_48_u(self, ctx, value).await } - fn set_nullable_int_56_u( + async fn set_nullable_int_56_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_56_u(self, ctx, value) + T::set_nullable_int_56_u(self, ctx, value).await } - fn set_nullable_int_64_u( + async fn set_nullable_int_64_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_64_u(self, ctx, value) + T::set_nullable_int_64_u(self, ctx, value).await } - fn set_nullable_int_8_s( + async fn set_nullable_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_8_s(self, ctx, value) + T::set_nullable_int_8_s(self, ctx, value).await } - fn set_nullable_int_16_s( + async fn set_nullable_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_16_s(self, ctx, value) + T::set_nullable_int_16_s(self, ctx, value).await } - fn set_nullable_int_24_s( + async fn set_nullable_int_24_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_24_s(self, ctx, value) + T::set_nullable_int_24_s(self, ctx, value).await } - fn set_nullable_int_32_s( + async fn set_nullable_int_32_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_32_s(self, ctx, value) + T::set_nullable_int_32_s(self, ctx, value).await } - fn set_nullable_int_40_s( + async fn set_nullable_int_40_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_40_s(self, ctx, value) + T::set_nullable_int_40_s(self, ctx, value).await } - fn set_nullable_int_48_s( + async fn set_nullable_int_48_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_48_s(self, ctx, value) + T::set_nullable_int_48_s(self, ctx, value).await } - fn set_nullable_int_56_s( + async fn set_nullable_int_56_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_56_s(self, ctx, value) + T::set_nullable_int_56_s(self, ctx, value).await } - fn set_nullable_int_64_s( + async fn set_nullable_int_64_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_64_s(self, ctx, value) + T::set_nullable_int_64_s(self, ctx, value).await } - fn set_nullable_enum_8( + async fn set_nullable_enum_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_enum_8(self, ctx, value) + T::set_nullable_enum_8(self, ctx, value).await } - fn set_nullable_enum_16( + async fn set_nullable_enum_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_enum_16(self, ctx, value) + T::set_nullable_enum_16(self, ctx, value).await } - fn set_nullable_float_single( + async fn set_nullable_float_single( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_float_single(self, ctx, value) + T::set_nullable_float_single(self, ctx, value).await } - fn set_nullable_float_double( + async fn set_nullable_float_double( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_float_double(self, ctx, value) + T::set_nullable_float_double(self, ctx, value).await } - fn set_nullable_octet_string( + async fn set_nullable_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable>, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_octet_string(self, ctx, value) + T::set_nullable_octet_string(self, ctx, value).await } - fn set_nullable_char_string( + async fn set_nullable_char_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable>, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_char_string(self, ctx, value) + T::set_nullable_char_string(self, ctx, value).await } - fn set_nullable_enum_attr( + async fn set_nullable_enum_attr( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_enum_attr(self, ctx, value) + T::set_nullable_enum_attr(self, ctx, value).await } - fn set_nullable_struct( + async fn set_nullable_struct( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable>, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_struct(self, ctx, value) + T::set_nullable_struct(self, ctx, value).await } - fn set_nullable_range_restricted_int_8_u( + async fn set_nullable_range_restricted_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_range_restricted_int_8_u(self, ctx, value) + T::set_nullable_range_restricted_int_8_u(self, ctx, value).await } - fn set_nullable_range_restricted_int_8_s( + async fn set_nullable_range_restricted_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_range_restricted_int_8_s(self, ctx, value) + T::set_nullable_range_restricted_int_8_s(self, ctx, value).await } - fn set_nullable_range_restricted_int_16_u( + async fn set_nullable_range_restricted_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_range_restricted_int_16_u(self, ctx, value) + T::set_nullable_range_restricted_int_16_u(self, ctx, value).await } - fn set_nullable_range_restricted_int_16_s( + async fn set_nullable_range_restricted_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_range_restricted_int_16_s(self, ctx, value) + T::set_nullable_range_restricted_int_16_s(self, ctx, value).await } - fn set_write_only_int_8_u( + async fn set_write_only_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_write_only_int_8_u(self, ctx, value) + T::set_write_only_int_8_u(self, ctx, value).await } - fn set_mei_int_8_u( + async fn set_mei_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_mei_int_8_u(self, ctx, value) + T::set_mei_int_8_u(self, ctx, value).await } - fn handle_test( + async fn handle_test( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> Result<(), rs_matter_crate::error::Error> { - T::handle_test(self, ctx) + T::handle_test(self, ctx).await } - fn handle_test_not_handled( + async fn handle_test_not_handled( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> Result<(), rs_matter_crate::error::Error> { - T::handle_test_not_handled(self, ctx) + T::handle_test_not_handled(self, ctx).await } - fn handle_test_specific( + async fn handle_test_specific( &self, ctx: impl rs_matter_crate::dm::InvokeContext, response: TestSpecificResponseBuilder

, ) -> Result { - T::handle_test_specific(self, ctx, response) + T::handle_test_specific(self, ctx, response).await } - fn handle_test_unknown_command( + async fn handle_test_unknown_command( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> Result<(), rs_matter_crate::error::Error> { - T::handle_test_unknown_command(self, ctx) + T::handle_test_unknown_command(self, ctx).await } - fn handle_test_add_arguments( + async fn handle_test_add_arguments( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestAddArgumentsRequest<'_>, response: TestAddArgumentsResponseBuilder

, ) -> Result { - T::handle_test_add_arguments(self, ctx, request, response) + T::handle_test_add_arguments(self, ctx, request, response).await } - fn handle_test_simple_argument_request( + async fn handle_test_simple_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestSimpleArgumentRequestRequest<'_>, response: TestSimpleArgumentResponseBuilder

, ) -> Result { - T::handle_test_simple_argument_request(self, ctx, request, response) + T::handle_test_simple_argument_request(self, ctx, request, response).await } - fn handle_test_struct_array_argument_request( + async fn handle_test_struct_array_argument_request< + P: rs_matter_crate::tlv::TLVBuilderParent, + >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestStructArrayArgumentRequestRequest<'_>, response: TestStructArrayArgumentResponseBuilder

, ) -> Result { - T::handle_test_struct_array_argument_request(self, ctx, request, response) + T::handle_test_struct_array_argument_request(self, ctx, request, response).await } - fn handle_test_struct_argument_request( + async fn handle_test_struct_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestStructArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, ) -> Result { - T::handle_test_struct_argument_request(self, ctx, request, response) + T::handle_test_struct_argument_request(self, ctx, request, response).await } - fn handle_test_nested_struct_argument_request( + async fn handle_test_nested_struct_argument_request< + P: rs_matter_crate::tlv::TLVBuilderParent, + >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestNestedStructArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, ) -> Result { - T::handle_test_nested_struct_argument_request(self, ctx, request, response) + T::handle_test_nested_struct_argument_request(self, ctx, request, response).await } - fn handle_test_list_struct_argument_request( + async fn handle_test_list_struct_argument_request< + P: rs_matter_crate::tlv::TLVBuilderParent, + >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestListStructArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, ) -> Result { - T::handle_test_list_struct_argument_request(self, ctx, request, response) + T::handle_test_list_struct_argument_request(self, ctx, request, response).await } - fn handle_test_list_int_8_u_argument_request( + async fn handle_test_list_int_8_u_argument_request< + P: rs_matter_crate::tlv::TLVBuilderParent, + >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestListInt8UArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, ) -> Result { - T::handle_test_list_int_8_u_argument_request(self, ctx, request, response) + T::handle_test_list_int_8_u_argument_request(self, ctx, request, response).await } - fn handle_test_nested_struct_list_argument_request< + async fn handle_test_nested_struct_list_argument_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( &self, @@ -23960,9 +25115,9 @@ pub mod unit_testing { request: TestNestedStructListArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, ) -> Result { - T::handle_test_nested_struct_list_argument_request(self, ctx, request, response) + T::handle_test_nested_struct_list_argument_request(self, ctx, request, response).await } - fn handle_test_list_nested_struct_list_argument_request< + async fn handle_test_list_nested_struct_list_argument_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( &self, @@ -23971,32 +25126,37 @@ pub mod unit_testing { response: BooleanResponseBuilder

, ) -> Result { T::handle_test_list_nested_struct_list_argument_request(self, ctx, request, response) + .await } - fn handle_test_list_int_8_u_reverse_request( + async fn handle_test_list_int_8_u_reverse_request< + P: rs_matter_crate::tlv::TLVBuilderParent, + >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestListInt8UReverseRequestRequest<'_>, response: TestListInt8UReverseResponseBuilder

, ) -> Result { - T::handle_test_list_int_8_u_reverse_request(self, ctx, request, response) + T::handle_test_list_int_8_u_reverse_request(self, ctx, request, response).await } - fn handle_test_enums_request( + async fn handle_test_enums_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestEnumsRequestRequest<'_>, response: TestEnumsResponseBuilder

, ) -> Result { - T::handle_test_enums_request(self, ctx, request, response) + T::handle_test_enums_request(self, ctx, request, response).await } - fn handle_test_nullable_optional_request( + async fn handle_test_nullable_optional_request< + P: rs_matter_crate::tlv::TLVBuilderParent, + >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestNullableOptionalRequestRequest<'_>, response: TestNullableOptionalResponseBuilder

, ) -> Result { - T::handle_test_nullable_optional_request(self, ctx, request, response) + T::handle_test_nullable_optional_request(self, ctx, request, response).await } - fn handle_test_complex_nullable_optional_request< + async fn handle_test_complex_nullable_optional_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( &self, @@ -24004,38 +25164,38 @@ pub mod unit_testing { request: TestComplexNullableOptionalRequestRequest<'_>, response: TestComplexNullableOptionalResponseBuilder

, ) -> Result { - T::handle_test_complex_nullable_optional_request(self, ctx, request, response) + T::handle_test_complex_nullable_optional_request(self, ctx, request, response).await } - fn handle_simple_struct_echo_request( + async fn handle_simple_struct_echo_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: SimpleStructEchoRequestRequest<'_>, response: SimpleStructResponseBuilder

, ) -> Result { - T::handle_simple_struct_echo_request(self, ctx, request, response) + T::handle_simple_struct_echo_request(self, ctx, request, response).await } - fn handle_timed_invoke_request( + async fn handle_timed_invoke_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> Result<(), rs_matter_crate::error::Error> { - T::handle_timed_invoke_request(self, ctx) + T::handle_timed_invoke_request(self, ctx).await } - fn handle_test_simple_optional_argument_request( + async fn handle_test_simple_optional_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestSimpleOptionalArgumentRequestRequest<'_>, ) -> Result<(), rs_matter_crate::error::Error> { - T::handle_test_simple_optional_argument_request(self, ctx, request) + T::handle_test_simple_optional_argument_request(self, ctx, request).await } - fn handle_test_emit_test_event_request( + async fn handle_test_emit_test_event_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestEmitTestEventRequestRequest<'_>, response: TestEmitTestEventResponseBuilder

, ) -> Result { - T::handle_test_emit_test_event_request(self, ctx, request, response) + T::handle_test_emit_test_event_request(self, ctx, request, response).await } - fn handle_test_emit_test_fabric_scoped_event_request< + async fn handle_test_emit_test_fabric_scoped_event_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( &self, @@ -24043,43 +25203,47 @@ pub mod unit_testing { request: TestEmitTestFabricScopedEventRequestRequest<'_>, response: TestEmitTestFabricScopedEventResponseBuilder

, ) -> Result { - T::handle_test_emit_test_fabric_scoped_event_request(self, ctx, request, response) + T::handle_test_emit_test_fabric_scoped_event_request(self, ctx, request, response).await } - fn handle_test_batch_helper_request( + async fn handle_test_batch_helper_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestBatchHelperRequestRequest<'_>, response: TestBatchHelperResponseBuilder

, ) -> Result { - T::handle_test_batch_helper_request(self, ctx, request, response) + T::handle_test_batch_helper_request(self, ctx, request, response).await } - fn handle_test_second_batch_helper_request( + async fn handle_test_second_batch_helper_request< + P: rs_matter_crate::tlv::TLVBuilderParent, + >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestSecondBatchHelperRequestRequest<'_>, response: TestBatchHelperResponseBuilder

, ) -> Result { - T::handle_test_second_batch_helper_request(self, ctx, request, response) + T::handle_test_second_batch_helper_request(self, ctx, request, response).await } - fn handle_test_different_vendor_mei_request( + async fn handle_test_different_vendor_mei_request< + P: rs_matter_crate::tlv::TLVBuilderParent, + >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestDifferentVendorMeiRequestRequest<'_>, response: TestDifferentVendorMeiResponseBuilder

, ) -> Result { - T::handle_test_different_vendor_mei_request(self, ctx, request, response) + T::handle_test_different_vendor_mei_request(self, ctx, request, response).await } } #[doc = "The handler adaptor for the cluster-specific handler. This adaptor implements the generic `rs-matter` handler trait."] #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] #[cfg_attr(feature = "defmt", derive(rs_matter_crate::reexport::defmt::Format))] pub struct HandlerAdaptor(pub T); - impl rs_matter_crate::dm::Handler for HandlerAdaptor + impl rs_matter_crate::dm::AsyncHandler for HandlerAdaptor where T: ClusterHandler, { #[allow(unreachable_code)] - fn read( + async fn read( &self, ctx: impl rs_matter_crate::dm::ReadContext, reply: impl rs_matter_crate::dm::ReadReply, @@ -24090,7 +25254,7 @@ pub mod unit_testing { } else { match AttributeId::try_from(ctx.attr().attr_id)? { AttributeId::Boolean => { - let attr_read_result = self.0.boolean(&ctx); + let attr_read_result = self.0.boolean(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24114,7 +25278,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Bitmap8 => { - let attr_read_result = self.0.bitmap_8(&ctx); + let attr_read_result = self.0.bitmap_8(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24138,7 +25302,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Bitmap16 => { - let attr_read_result = self.0.bitmap_16(&ctx); + let attr_read_result = self.0.bitmap_16(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24162,7 +25326,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Bitmap32 => { - let attr_read_result = self.0.bitmap_32(&ctx); + let attr_read_result = self.0.bitmap_32(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24186,7 +25350,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Bitmap64 => { - let attr_read_result = self.0.bitmap_64(&ctx); + let attr_read_result = self.0.bitmap_64(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24210,7 +25374,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int8u => { - let attr_read_result = self.0.int_8_u(&ctx); + let attr_read_result = self.0.int_8_u(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24234,7 +25398,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int16u => { - let attr_read_result = self.0.int_16_u(&ctx); + let attr_read_result = self.0.int_16_u(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24258,7 +25422,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int24u => { - let attr_read_result = self.0.int_24_u(&ctx); + let attr_read_result = self.0.int_24_u(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24282,7 +25446,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int32u => { - let attr_read_result = self.0.int_32_u(&ctx); + let attr_read_result = self.0.int_32_u(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24306,7 +25470,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int40u => { - let attr_read_result = self.0.int_40_u(&ctx); + let attr_read_result = self.0.int_40_u(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24330,7 +25494,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int48u => { - let attr_read_result = self.0.int_48_u(&ctx); + let attr_read_result = self.0.int_48_u(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24354,7 +25518,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int56u => { - let attr_read_result = self.0.int_56_u(&ctx); + let attr_read_result = self.0.int_56_u(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24378,7 +25542,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int64u => { - let attr_read_result = self.0.int_64_u(&ctx); + let attr_read_result = self.0.int_64_u(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24402,7 +25566,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int8s => { - let attr_read_result = self.0.int_8_s(&ctx); + let attr_read_result = self.0.int_8_s(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24426,7 +25590,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int16s => { - let attr_read_result = self.0.int_16_s(&ctx); + let attr_read_result = self.0.int_16_s(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24450,7 +25614,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int24s => { - let attr_read_result = self.0.int_24_s(&ctx); + let attr_read_result = self.0.int_24_s(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24474,7 +25638,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int32s => { - let attr_read_result = self.0.int_32_s(&ctx); + let attr_read_result = self.0.int_32_s(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24498,7 +25662,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int40s => { - let attr_read_result = self.0.int_40_s(&ctx); + let attr_read_result = self.0.int_40_s(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24522,7 +25686,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int48s => { - let attr_read_result = self.0.int_48_s(&ctx); + let attr_read_result = self.0.int_48_s(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24546,7 +25710,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int56s => { - let attr_read_result = self.0.int_56_s(&ctx); + let attr_read_result = self.0.int_56_s(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24570,7 +25734,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int64s => { - let attr_read_result = self.0.int_64_s(&ctx); + let attr_read_result = self.0.int_64_s(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24594,7 +25758,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Enum8 => { - let attr_read_result = self.0.enum_8(&ctx); + let attr_read_result = self.0.enum_8(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24618,7 +25782,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Enum16 => { - let attr_read_result = self.0.enum_16(&ctx); + let attr_read_result = self.0.enum_16(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24642,7 +25806,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::FloatSingle => { - let attr_read_result = self.0.float_single(&ctx); + let attr_read_result = self.0.float_single(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24666,7 +25830,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::FloatDouble => { - let attr_read_result = self.0.float_double(&ctx); + let attr_read_result = self.0.float_double(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24710,20 +25874,23 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self.0.octet_string( - &ctx, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug((AttributeId::OctetString, false)), - )), - tw, - ), - tag, - )?, - ); + let attr_read_result = self + .0 + .octet_string( + &ctx, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, + MetadataDebug((AttributeId::OctetString, false)), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24768,21 +25935,24 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self.0.list_int_8_u( - &ctx, - rs_matter_crate::dm::ArrayAttributeRead::new( - ctx.attr().list_index.clone(), - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug((AttributeId::ListInt8u, false)), - )), - tw, - ), - tag, - )?, - ); + let attr_read_result = self + .0 + .list_int_8_u( + &ctx, + rs_matter_crate::dm::ArrayAttributeRead::new( + ctx.attr().list_index.clone(), + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, + MetadataDebug((AttributeId::ListInt8u, false)), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24827,21 +25997,27 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self.0.list_octet_string( - &ctx, - rs_matter_crate::dm::ArrayAttributeRead::new( - ctx.attr().list_index.clone(), - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug((AttributeId::ListOctetString, false)), - )), - tw, - ), - tag, - )?, - ); + let attr_read_result = self + .0 + .list_octet_string( + &ctx, + rs_matter_crate::dm::ArrayAttributeRead::new( + ctx.attr().list_index.clone(), + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, + MetadataDebug(( + AttributeId::ListOctetString, + false, + )), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24886,24 +26062,27 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self.0.list_struct_octet_string( - &ctx, - rs_matter_crate::dm::ArrayAttributeRead::new( - ctx.attr().list_index.clone(), - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, + let attr_read_result = self + .0 + .list_struct_octet_string( + &ctx, + rs_matter_crate::dm::ArrayAttributeRead::new( + ctx.attr().list_index.clone(), + rs_matter_crate::tlv::TLVWriteParent::new( MetadataDebug(( - AttributeId::ListStructOctetString, - false, + ctx.attr().endpoint_id, + self, + MetadataDebug(( + AttributeId::ListStructOctetString, + false, + )), )), - )), - tw, - ), - tag, - )?, - ); + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -24948,20 +26127,26 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self.0.long_octet_string( - &ctx, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug((AttributeId::LongOctetString, false)), - )), - tw, - ), - tag, - )?, - ); + let attr_read_result = self + .0 + .long_octet_string( + &ctx, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, + MetadataDebug(( + AttributeId::LongOctetString, + false, + )), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25006,20 +26191,23 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self.0.char_string( - &ctx, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug((AttributeId::CharString, false)), - )), - tw, - ), - tag, - )?, - ); + let attr_read_result = self + .0 + .char_string( + &ctx, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, + MetadataDebug((AttributeId::CharString, false)), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25064,20 +26252,23 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self.0.long_char_string( - &ctx, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug((AttributeId::LongCharString, false)), - )), - tw, - ), - tag, - )?, - ); + let attr_read_result = self + .0 + .long_char_string( + &ctx, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, + MetadataDebug((AttributeId::LongCharString, false)), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25102,7 +26293,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::complete(writer) } AttributeId::EpochUs => { - let attr_read_result = self.0.epoch_us(&ctx); + let attr_read_result = self.0.epoch_us(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25126,7 +26317,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::EpochS => { - let attr_read_result = self.0.epoch_s(&ctx); + let attr_read_result = self.0.epoch_s(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25150,7 +26341,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::VendorId => { - let attr_read_result = self.0.vendor_id(&ctx); + let attr_read_result = self.0.vendor_id(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25200,24 +26391,27 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self.0.list_nullables_and_optionals_struct( - &ctx, - rs_matter_crate::dm::ArrayAttributeRead::new( - ctx.attr().list_index.clone(), - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, + let attr_read_result = self + .0 + .list_nullables_and_optionals_struct( + &ctx, + rs_matter_crate::dm::ArrayAttributeRead::new( + ctx.attr().list_index.clone(), + rs_matter_crate::tlv::TLVWriteParent::new( MetadataDebug(( - AttributeId::ListNullablesAndOptionalsStruct, - false, + ctx.attr().endpoint_id, + self, + MetadataDebug(( + AttributeId::ListNullablesAndOptionalsStruct, + false, + )), )), - )), - tw, - ), - tag, - )?, - ); + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25248,7 +26442,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::complete(writer) } AttributeId::EnumAttr => { - let attr_read_result = self.0.enum_attr(&ctx); + let attr_read_result = self.0.enum_attr(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25292,20 +26486,23 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self.0.struct_attr( - &ctx, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug((AttributeId::StructAttr, false)), - )), - tw, - ), - tag, - )?, - ); + let attr_read_result = self + .0 + .struct_attr( + &ctx, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, + MetadataDebug((AttributeId::StructAttr, false)), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25330,7 +26527,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::complete(writer) } AttributeId::RangeRestrictedInt8u => { - let attr_read_result = self.0.range_restricted_int_8_u(&ctx); + let attr_read_result = self.0.range_restricted_int_8_u(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25354,7 +26551,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::RangeRestrictedInt8s => { - let attr_read_result = self.0.range_restricted_int_8_s(&ctx); + let attr_read_result = self.0.range_restricted_int_8_s(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25378,7 +26575,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::RangeRestrictedInt16u => { - let attr_read_result = self.0.range_restricted_int_16_u(&ctx); + let attr_read_result = self.0.range_restricted_int_16_u(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25402,7 +26599,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::RangeRestrictedInt16s => { - let attr_read_result = self.0.range_restricted_int_16_s(&ctx); + let attr_read_result = self.0.range_restricted_int_16_s(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25446,24 +26643,27 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self.0.list_long_octet_string( - &ctx, - rs_matter_crate::dm::ArrayAttributeRead::new( - ctx.attr().list_index.clone(), - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, + let attr_read_result = self + .0 + .list_long_octet_string( + &ctx, + rs_matter_crate::dm::ArrayAttributeRead::new( + ctx.attr().list_index.clone(), + rs_matter_crate::tlv::TLVWriteParent::new( MetadataDebug(( - AttributeId::ListLongOctetString, - false, + ctx.attr().endpoint_id, + self, + MetadataDebug(( + AttributeId::ListLongOctetString, + false, + )), )), - )), - tw, - ), - tag, - )?, - ); + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25508,21 +26708,27 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self.0.list_fabric_scoped( - &ctx, - rs_matter_crate::dm::ArrayAttributeRead::new( - ctx.attr().list_index.clone(), - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug((AttributeId::ListFabricScoped, false)), - )), - tw, - ), - tag, - )?, - ); + let attr_read_result = self + .0 + .list_fabric_scoped( + &ctx, + rs_matter_crate::dm::ArrayAttributeRead::new( + ctx.attr().list_index.clone(), + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, + MetadataDebug(( + AttributeId::ListFabricScoped, + false, + )), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25547,7 +26753,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::complete(writer) } AttributeId::TimedWriteBoolean => { - let attr_read_result = self.0.timed_write_boolean(&ctx); + let attr_read_result = self.0.timed_write_boolean(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25571,7 +26777,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::GeneralErrorBoolean => { - let attr_read_result = self.0.general_error_boolean(&ctx); + let attr_read_result = self.0.general_error_boolean(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25595,7 +26801,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::ClusterErrorBoolean => { - let attr_read_result = self.0.cluster_error_boolean(&ctx); + let attr_read_result = self.0.cluster_error_boolean(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25619,7 +26825,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Unsupported => { - let attr_read_result = self.0.unsupported(&ctx); + let attr_read_result = self.0.unsupported(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25643,7 +26849,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableBoolean => { - let attr_read_result = self.0.nullable_boolean(&ctx); + let attr_read_result = self.0.nullable_boolean(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25667,7 +26873,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableBitmap8 => { - let attr_read_result = self.0.nullable_bitmap_8(&ctx); + let attr_read_result = self.0.nullable_bitmap_8(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25691,7 +26897,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableBitmap16 => { - let attr_read_result = self.0.nullable_bitmap_16(&ctx); + let attr_read_result = self.0.nullable_bitmap_16(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25715,7 +26921,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableBitmap32 => { - let attr_read_result = self.0.nullable_bitmap_32(&ctx); + let attr_read_result = self.0.nullable_bitmap_32(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25739,7 +26945,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableBitmap64 => { - let attr_read_result = self.0.nullable_bitmap_64(&ctx); + let attr_read_result = self.0.nullable_bitmap_64(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25763,7 +26969,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt8u => { - let attr_read_result = self.0.nullable_int_8_u(&ctx); + let attr_read_result = self.0.nullable_int_8_u(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25787,7 +26993,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt16u => { - let attr_read_result = self.0.nullable_int_16_u(&ctx); + let attr_read_result = self.0.nullable_int_16_u(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25811,7 +27017,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt24u => { - let attr_read_result = self.0.nullable_int_24_u(&ctx); + let attr_read_result = self.0.nullable_int_24_u(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25835,7 +27041,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt32u => { - let attr_read_result = self.0.nullable_int_32_u(&ctx); + let attr_read_result = self.0.nullable_int_32_u(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25859,7 +27065,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt40u => { - let attr_read_result = self.0.nullable_int_40_u(&ctx); + let attr_read_result = self.0.nullable_int_40_u(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25883,7 +27089,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt48u => { - let attr_read_result = self.0.nullable_int_48_u(&ctx); + let attr_read_result = self.0.nullable_int_48_u(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25907,7 +27113,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt56u => { - let attr_read_result = self.0.nullable_int_56_u(&ctx); + let attr_read_result = self.0.nullable_int_56_u(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25931,7 +27137,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt64u => { - let attr_read_result = self.0.nullable_int_64_u(&ctx); + let attr_read_result = self.0.nullable_int_64_u(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25955,7 +27161,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt8s => { - let attr_read_result = self.0.nullable_int_8_s(&ctx); + let attr_read_result = self.0.nullable_int_8_s(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25979,7 +27185,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt16s => { - let attr_read_result = self.0.nullable_int_16_s(&ctx); + let attr_read_result = self.0.nullable_int_16_s(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26003,7 +27209,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt24s => { - let attr_read_result = self.0.nullable_int_24_s(&ctx); + let attr_read_result = self.0.nullable_int_24_s(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26027,7 +27233,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt32s => { - let attr_read_result = self.0.nullable_int_32_s(&ctx); + let attr_read_result = self.0.nullable_int_32_s(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26051,7 +27257,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt40s => { - let attr_read_result = self.0.nullable_int_40_s(&ctx); + let attr_read_result = self.0.nullable_int_40_s(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26075,7 +27281,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt48s => { - let attr_read_result = self.0.nullable_int_48_s(&ctx); + let attr_read_result = self.0.nullable_int_48_s(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26099,7 +27305,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt56s => { - let attr_read_result = self.0.nullable_int_56_s(&ctx); + let attr_read_result = self.0.nullable_int_56_s(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26123,7 +27329,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt64s => { - let attr_read_result = self.0.nullable_int_64_s(&ctx); + let attr_read_result = self.0.nullable_int_64_s(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26147,7 +27353,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableEnum8 => { - let attr_read_result = self.0.nullable_enum_8(&ctx); + let attr_read_result = self.0.nullable_enum_8(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26171,7 +27377,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableEnum16 => { - let attr_read_result = self.0.nullable_enum_16(&ctx); + let attr_read_result = self.0.nullable_enum_16(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26195,7 +27401,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableFloatSingle => { - let attr_read_result = self.0.nullable_float_single(&ctx); + let attr_read_result = self.0.nullable_float_single(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26219,7 +27425,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableFloatDouble => { - let attr_read_result = self.0.nullable_float_double(&ctx); + let attr_read_result = self.0.nullable_float_double(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26263,23 +27469,26 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self.0.nullable_octet_string( - &ctx, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, + let attr_read_result = self + .0 + .nullable_octet_string( + &ctx, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( MetadataDebug(( - AttributeId::NullableOctetString, - false, + ctx.attr().endpoint_id, + self, + MetadataDebug(( + AttributeId::NullableOctetString, + false, + )), )), - )), - tw, - ), - tag, - )?, - ); + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26324,20 +27533,26 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self.0.nullable_char_string( - &ctx, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug((AttributeId::NullableCharString, false)), - )), - tw, - ), - tag, - )?, - ); + let attr_read_result = self + .0 + .nullable_char_string( + &ctx, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, + MetadataDebug(( + AttributeId::NullableCharString, + false, + )), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26362,7 +27577,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::complete(writer) } AttributeId::NullableEnumAttr => { - let attr_read_result = self.0.nullable_enum_attr(&ctx); + let attr_read_result = self.0.nullable_enum_attr(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26406,20 +27621,23 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self.0.nullable_struct( - &ctx, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug((AttributeId::NullableStruct, false)), - )), - tw, - ), - tag, - )?, - ); + let attr_read_result = self + .0 + .nullable_struct( + &ctx, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, + MetadataDebug((AttributeId::NullableStruct, false)), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26444,7 +27662,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::complete(writer) } AttributeId::NullableRangeRestrictedInt8u => { - let attr_read_result = self.0.nullable_range_restricted_int_8_u(&ctx); + let attr_read_result = + self.0.nullable_range_restricted_int_8_u(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26474,7 +27693,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableRangeRestrictedInt8s => { - let attr_read_result = self.0.nullable_range_restricted_int_8_s(&ctx); + let attr_read_result = + self.0.nullable_range_restricted_int_8_s(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26504,7 +27724,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableRangeRestrictedInt16u => { - let attr_read_result = self.0.nullable_range_restricted_int_16_u(&ctx); + let attr_read_result = + self.0.nullable_range_restricted_int_16_u(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26534,7 +27755,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableRangeRestrictedInt16s => { - let attr_read_result = self.0.nullable_range_restricted_int_16_s(&ctx); + let attr_read_result = + self.0.nullable_range_restricted_int_16_s(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26564,7 +27786,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::WriteOnlyInt8u => { - let attr_read_result = self.0.write_only_int_8_u(&ctx); + let attr_read_result = self.0.write_only_int_8_u(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26588,7 +27810,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::MeiInt8u => { - let attr_read_result = self.0.mei_int_8_u(&ctx); + let attr_read_result = self.0.mei_int_8_u(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26632,7 +27854,7 @@ pub mod unit_testing { } } #[allow(unreachable_code)] - fn write( + async fn write( &self, ctx: impl rs_matter_crate::dm::WriteContext, ) -> Result<(), rs_matter_crate::error::Error> { @@ -26643,7 +27865,7 @@ pub mod unit_testing { match AttributeId::try_from(ctx.attr().attr_id)? { AttributeId::Boolean => { let attr_data: bool = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_boolean(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_boolean(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -26671,7 +27893,7 @@ pub mod unit_testing { AttributeId::Bitmap8 => { let attr_data: Bitmap8MaskMap = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_bitmap_8(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_bitmap_8(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -26699,7 +27921,7 @@ pub mod unit_testing { AttributeId::Bitmap16 => { let attr_data: Bitmap16MaskMap = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_bitmap_16(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_bitmap_16(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -26727,7 +27949,7 @@ pub mod unit_testing { AttributeId::Bitmap32 => { let attr_data: Bitmap32MaskMap = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_bitmap_32(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_bitmap_32(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -26755,7 +27977,7 @@ pub mod unit_testing { AttributeId::Bitmap64 => { let attr_data: Bitmap64MaskMap = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_bitmap_64(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_bitmap_64(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -26782,7 +28004,7 @@ pub mod unit_testing { } AttributeId::Int8u => { let attr_data: u8 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_8_u(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_int_8_u(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -26809,7 +28031,7 @@ pub mod unit_testing { } AttributeId::Int16u => { let attr_data: u16 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_16_u(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_int_16_u(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -26836,7 +28058,7 @@ pub mod unit_testing { } AttributeId::Int24u => { let attr_data: u32 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_24_u(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_int_24_u(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -26863,7 +28085,7 @@ pub mod unit_testing { } AttributeId::Int32u => { let attr_data: u32 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_32_u(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_int_32_u(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -26890,7 +28112,7 @@ pub mod unit_testing { } AttributeId::Int40u => { let attr_data: u64 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_40_u(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_int_40_u(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -26917,7 +28139,7 @@ pub mod unit_testing { } AttributeId::Int48u => { let attr_data: u64 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_48_u(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_int_48_u(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -26944,7 +28166,7 @@ pub mod unit_testing { } AttributeId::Int56u => { let attr_data: u64 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_56_u(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_int_56_u(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -26971,7 +28193,7 @@ pub mod unit_testing { } AttributeId::Int64u => { let attr_data: u64 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_64_u(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_int_64_u(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -26998,7 +28220,7 @@ pub mod unit_testing { } AttributeId::Int8s => { let attr_data: i8 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_8_s(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_int_8_s(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27025,7 +28247,7 @@ pub mod unit_testing { } AttributeId::Int16s => { let attr_data: i16 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_16_s(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_int_16_s(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27052,7 +28274,7 @@ pub mod unit_testing { } AttributeId::Int24s => { let attr_data: i32 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_24_s(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_int_24_s(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27079,7 +28301,7 @@ pub mod unit_testing { } AttributeId::Int32s => { let attr_data: i32 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_32_s(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_int_32_s(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27106,7 +28328,7 @@ pub mod unit_testing { } AttributeId::Int40s => { let attr_data: i64 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_40_s(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_int_40_s(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27133,7 +28355,7 @@ pub mod unit_testing { } AttributeId::Int48s => { let attr_data: i64 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_48_s(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_int_48_s(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27160,7 +28382,7 @@ pub mod unit_testing { } AttributeId::Int56s => { let attr_data: i64 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_56_s(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_int_56_s(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27187,7 +28409,7 @@ pub mod unit_testing { } AttributeId::Int64s => { let attr_data: i64 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_64_s(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_int_64_s(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27214,7 +28436,7 @@ pub mod unit_testing { } AttributeId::Enum8 => { let attr_data: u8 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_enum_8(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_enum_8(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27241,7 +28463,7 @@ pub mod unit_testing { } AttributeId::Enum16 => { let attr_data: u16 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_enum_16(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_enum_16(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27268,7 +28490,7 @@ pub mod unit_testing { } AttributeId::FloatSingle => { let attr_data: f32 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_float_single(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_float_single(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27295,7 +28517,7 @@ pub mod unit_testing { } AttributeId::FloatDouble => { let attr_data: f64 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_float_double(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_float_double(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27323,7 +28545,7 @@ pub mod unit_testing { AttributeId::OctetString => { let attr_data: rs_matter_crate::tlv::OctetStr<'_> = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_octet_string(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_octet_string(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27353,7 +28575,7 @@ pub mod unit_testing { ctx.attr().list_index.clone(), ctx.data(), )?; - let attr_write_result = self.0.set_list_int_8_u(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_list_int_8_u(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27383,7 +28605,8 @@ pub mod unit_testing { ctx.attr().list_index.clone(), ctx.data(), )?; - let attr_write_result = self.0.set_list_octet_string(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_list_octet_string(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27413,8 +28636,10 @@ pub mod unit_testing { ctx.attr().list_index.clone(), ctx.data(), )?; - let attr_write_result = - self.0.set_list_struct_octet_string(&ctx, attr_data.clone()); + let attr_write_result = self + .0 + .set_list_struct_octet_string(&ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27442,7 +28667,8 @@ pub mod unit_testing { AttributeId::LongOctetString => { let attr_data: rs_matter_crate::tlv::OctetStr<'_> = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_long_octet_string(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_long_octet_string(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27470,7 +28696,7 @@ pub mod unit_testing { AttributeId::CharString => { let attr_data: rs_matter_crate::tlv::Utf8Str<'_> = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_char_string(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_char_string(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27498,7 +28724,8 @@ pub mod unit_testing { AttributeId::LongCharString => { let attr_data: rs_matter_crate::tlv::Utf8Str<'_> = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_long_char_string(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_long_char_string(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27525,7 +28752,7 @@ pub mod unit_testing { } AttributeId::EpochUs => { let attr_data: u64 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_epoch_us(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_epoch_us(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27552,7 +28779,7 @@ pub mod unit_testing { } AttributeId::EpochS => { let attr_data: u32 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_epoch_s(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_epoch_s(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27579,7 +28806,7 @@ pub mod unit_testing { } AttributeId::VendorId => { let attr_data: u16 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_vendor_id(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_vendor_id(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27611,7 +28838,8 @@ pub mod unit_testing { )?; let attr_write_result = self .0 - .set_list_nullables_and_optionals_struct(&ctx, attr_data.clone()); + .set_list_nullables_and_optionals_struct(&ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27639,7 +28867,7 @@ pub mod unit_testing { AttributeId::EnumAttr => { let attr_data: SimpleEnum = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_enum_attr(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_enum_attr(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27667,7 +28895,7 @@ pub mod unit_testing { AttributeId::StructAttr => { let attr_data: SimpleStruct<'_> = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_struct_attr(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_struct_attr(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27694,8 +28922,10 @@ pub mod unit_testing { } AttributeId::RangeRestrictedInt8u => { let attr_data: u8 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_range_restricted_int_8_u(&ctx, attr_data.clone()); + let attr_write_result = self + .0 + .set_range_restricted_int_8_u(&ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27722,8 +28952,10 @@ pub mod unit_testing { } AttributeId::RangeRestrictedInt8s => { let attr_data: i8 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_range_restricted_int_8_s(&ctx, attr_data.clone()); + let attr_write_result = self + .0 + .set_range_restricted_int_8_s(&ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27752,7 +28984,8 @@ pub mod unit_testing { let attr_data: u16 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; let attr_write_result = self .0 - .set_range_restricted_int_16_u(&ctx, attr_data.clone()); + .set_range_restricted_int_16_u(&ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27781,7 +29014,8 @@ pub mod unit_testing { let attr_data: i16 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; let attr_write_result = self .0 - .set_range_restricted_int_16_s(&ctx, attr_data.clone()); + .set_range_restricted_int_16_s(&ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27811,8 +29045,10 @@ pub mod unit_testing { ctx.attr().list_index.clone(), ctx.data(), )?; - let attr_write_result = - self.0.set_list_long_octet_string(&ctx, attr_data.clone()); + let attr_write_result = self + .0 + .set_list_long_octet_string(&ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27842,7 +29078,8 @@ pub mod unit_testing { ctx.attr().list_index.clone(), ctx.data(), )?; - let attr_write_result = self.0.set_list_fabric_scoped(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_list_fabric_scoped(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27869,7 +29106,10 @@ pub mod unit_testing { } AttributeId::TimedWriteBoolean => { let attr_data: bool = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_timed_write_boolean(&ctx, attr_data.clone()); + let attr_write_result = self + .0 + .set_timed_write_boolean(&ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27896,8 +29136,10 @@ pub mod unit_testing { } AttributeId::GeneralErrorBoolean => { let attr_data: bool = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_general_error_boolean(&ctx, attr_data.clone()); + let attr_write_result = self + .0 + .set_general_error_boolean(&ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27924,8 +29166,10 @@ pub mod unit_testing { } AttributeId::ClusterErrorBoolean => { let attr_data: bool = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_cluster_error_boolean(&ctx, attr_data.clone()); + let attr_write_result = self + .0 + .set_cluster_error_boolean(&ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27952,7 +29196,7 @@ pub mod unit_testing { } AttributeId::Unsupported => { let attr_data: bool = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_unsupported(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_unsupported(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -27980,7 +29224,8 @@ pub mod unit_testing { AttributeId::NullableBoolean => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_boolean(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_boolean(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28008,7 +29253,8 @@ pub mod unit_testing { AttributeId::NullableBitmap8 => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_bitmap_8(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_bitmap_8(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28036,7 +29282,8 @@ pub mod unit_testing { AttributeId::NullableBitmap16 => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_bitmap_16(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_bitmap_16(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28064,7 +29311,8 @@ pub mod unit_testing { AttributeId::NullableBitmap32 => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_bitmap_32(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_bitmap_32(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28092,7 +29340,8 @@ pub mod unit_testing { AttributeId::NullableBitmap64 => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_bitmap_64(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_bitmap_64(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28120,7 +29369,8 @@ pub mod unit_testing { AttributeId::NullableInt8u => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_int_8_u(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_int_8_u(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28148,7 +29398,8 @@ pub mod unit_testing { AttributeId::NullableInt16u => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_int_16_u(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_int_16_u(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28176,7 +29427,8 @@ pub mod unit_testing { AttributeId::NullableInt24u => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_int_24_u(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_int_24_u(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28204,7 +29456,8 @@ pub mod unit_testing { AttributeId::NullableInt32u => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_int_32_u(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_int_32_u(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28232,7 +29485,8 @@ pub mod unit_testing { AttributeId::NullableInt40u => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_int_40_u(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_int_40_u(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28260,7 +29514,8 @@ pub mod unit_testing { AttributeId::NullableInt48u => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_int_48_u(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_int_48_u(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28288,7 +29543,8 @@ pub mod unit_testing { AttributeId::NullableInt56u => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_int_56_u(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_int_56_u(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28316,7 +29572,8 @@ pub mod unit_testing { AttributeId::NullableInt64u => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_int_64_u(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_int_64_u(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28344,7 +29601,8 @@ pub mod unit_testing { AttributeId::NullableInt8s => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_int_8_s(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_int_8_s(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28372,7 +29630,8 @@ pub mod unit_testing { AttributeId::NullableInt16s => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_int_16_s(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_int_16_s(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28400,7 +29659,8 @@ pub mod unit_testing { AttributeId::NullableInt24s => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_int_24_s(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_int_24_s(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28428,7 +29688,8 @@ pub mod unit_testing { AttributeId::NullableInt32s => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_int_32_s(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_int_32_s(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28456,7 +29717,8 @@ pub mod unit_testing { AttributeId::NullableInt40s => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_int_40_s(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_int_40_s(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28484,7 +29746,8 @@ pub mod unit_testing { AttributeId::NullableInt48s => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_int_48_s(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_int_48_s(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28512,7 +29775,8 @@ pub mod unit_testing { AttributeId::NullableInt56s => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_int_56_s(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_int_56_s(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28540,7 +29804,8 @@ pub mod unit_testing { AttributeId::NullableInt64s => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_int_64_s(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_int_64_s(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28568,7 +29833,8 @@ pub mod unit_testing { AttributeId::NullableEnum8 => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_enum_8(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_enum_8(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28596,7 +29862,8 @@ pub mod unit_testing { AttributeId::NullableEnum16 => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_enum_16(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_enum_16(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28624,8 +29891,10 @@ pub mod unit_testing { AttributeId::NullableFloatSingle => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_float_single(&ctx, attr_data.clone()); + let attr_write_result = self + .0 + .set_nullable_float_single(&ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28653,8 +29922,10 @@ pub mod unit_testing { AttributeId::NullableFloatDouble => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_float_double(&ctx, attr_data.clone()); + let attr_write_result = self + .0 + .set_nullable_float_double(&ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28683,8 +29954,10 @@ pub mod unit_testing { let attr_data: rs_matter_crate::tlv::Nullable< rs_matter_crate::tlv::OctetStr<'_>, > = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_octet_string(&ctx, attr_data.clone()); + let attr_write_result = self + .0 + .set_nullable_octet_string(&ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28713,8 +29986,10 @@ pub mod unit_testing { let attr_data: rs_matter_crate::tlv::Nullable< rs_matter_crate::tlv::Utf8Str<'_>, > = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_char_string(&ctx, attr_data.clone()); + let attr_write_result = self + .0 + .set_nullable_char_string(&ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28742,7 +30017,8 @@ pub mod unit_testing { AttributeId::NullableEnumAttr => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_enum_attr(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_enum_attr(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28770,7 +30046,8 @@ pub mod unit_testing { AttributeId::NullableStruct => { let attr_data: rs_matter_crate::tlv::Nullable> = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_nullable_struct(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_nullable_struct(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28800,7 +30077,8 @@ pub mod unit_testing { rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; let attr_write_result = self .0 - .set_nullable_range_restricted_int_8_u(&ctx, attr_data.clone()); + .set_nullable_range_restricted_int_8_u(&ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28830,7 +30108,8 @@ pub mod unit_testing { rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; let attr_write_result = self .0 - .set_nullable_range_restricted_int_8_s(&ctx, attr_data.clone()); + .set_nullable_range_restricted_int_8_s(&ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28860,7 +30139,8 @@ pub mod unit_testing { rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; let attr_write_result = self .0 - .set_nullable_range_restricted_int_16_u(&ctx, attr_data.clone()); + .set_nullable_range_restricted_int_16_u(&ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28890,7 +30170,8 @@ pub mod unit_testing { rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; let attr_write_result = self .0 - .set_nullable_range_restricted_int_16_s(&ctx, attr_data.clone()); + .set_nullable_range_restricted_int_16_s(&ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28917,7 +30198,8 @@ pub mod unit_testing { } AttributeId::WriteOnlyInt8u => { let attr_data: u8 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_write_only_int_8_u(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_write_only_int_8_u(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28944,7 +30226,7 @@ pub mod unit_testing { } AttributeId::MeiInt8u => { let attr_data: u8 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_mei_int_8_u(&ctx, attr_data.clone()); + let attr_write_result = self.0.set_mei_int_8_u(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28981,14 +30263,14 @@ pub mod unit_testing { Ok(()) } #[allow(unreachable_code)] - fn invoke( + async fn invoke( &self, ctx: impl rs_matter_crate::dm::InvokeContext, reply: impl rs_matter_crate::dm::InvokeReply, ) -> Result<(), rs_matter_crate::error::Error> { match CommandId::try_from(ctx.cmd().cmd_id)? { CommandId::Test => { - let cmd_invoke_result = self.0.handle_test(&ctx); + let cmd_invoke_result = self.0.handle_test(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -29012,7 +30294,7 @@ pub mod unit_testing { cmd_invoke_result?; } CommandId::TestNotHandled => { - let cmd_invoke_result = self.0.handle_test_not_handled(&ctx); + let cmd_invoke_result = self.0.handle_test_not_handled(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -29057,20 +30339,23 @@ pub mod unit_testing { let mut writer = reply.with_command(0u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self.0.handle_test_specific( - &ctx, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.cmd().endpoint_id, - self, - MetadataDebug(CommandId::TestSpecific), - )), - tw, - ), - tag, - )?, - ); + let cmd_invoke_result = self + .0 + .handle_test_specific( + &ctx, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.cmd().endpoint_id, + self, + MetadataDebug(CommandId::TestSpecific), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -29095,7 +30380,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::complete(writer)? } CommandId::TestUnknownCommand => { - let cmd_invoke_result = self.0.handle_test_unknown_command(&ctx); + let cmd_invoke_result = self.0.handle_test_unknown_command(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -29143,21 +30428,24 @@ pub mod unit_testing { let mut writer = reply.with_command(1u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self.0.handle_test_add_arguments( - &ctx, - cmd_data, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.cmd().endpoint_id, - self, - MetadataDebug(CommandId::TestAddArguments), - )), - tw, - ), - tag, - )?, - ); + let cmd_invoke_result = self + .0 + .handle_test_add_arguments( + &ctx, + cmd_data, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.cmd().endpoint_id, + self, + MetadataDebug(CommandId::TestAddArguments), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -29206,21 +30494,24 @@ pub mod unit_testing { let mut writer = reply.with_command(2u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self.0.handle_test_simple_argument_request( - &ctx, - cmd_data, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.cmd().endpoint_id, - self, - MetadataDebug(CommandId::TestSimpleArgumentRequest), - )), - tw, - ), - tag, - )?, - ); + let cmd_invoke_result = self + .0 + .handle_test_simple_argument_request( + &ctx, + cmd_data, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.cmd().endpoint_id, + self, + MetadataDebug(CommandId::TestSimpleArgumentRequest), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -29269,21 +30560,24 @@ pub mod unit_testing { let mut writer = reply.with_command(3u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self.0.handle_test_struct_array_argument_request( - &ctx, - cmd_data, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.cmd().endpoint_id, - self, - MetadataDebug(CommandId::TestStructArrayArgumentRequest), - )), - tw, - ), - tag, - )?, - ); + let cmd_invoke_result = self + .0 + .handle_test_struct_array_argument_request( + &ctx, + cmd_data, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.cmd().endpoint_id, + self, + MetadataDebug(CommandId::TestStructArrayArgumentRequest), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -29332,21 +30626,24 @@ pub mod unit_testing { let mut writer = reply.with_command(8u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self.0.handle_test_struct_argument_request( - &ctx, - cmd_data, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.cmd().endpoint_id, - self, - MetadataDebug(CommandId::TestStructArgumentRequest), - )), - tw, - ), - tag, - )?, - ); + let cmd_invoke_result = self + .0 + .handle_test_struct_argument_request( + &ctx, + cmd_data, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.cmd().endpoint_id, + self, + MetadataDebug(CommandId::TestStructArgumentRequest), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -29395,21 +30692,24 @@ pub mod unit_testing { let mut writer = reply.with_command(8u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self.0.handle_test_nested_struct_argument_request( - &ctx, - cmd_data, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.cmd().endpoint_id, - self, - MetadataDebug(CommandId::TestNestedStructArgumentRequest), - )), - tw, - ), - tag, - )?, - ); + let cmd_invoke_result = self + .0 + .handle_test_nested_struct_argument_request( + &ctx, + cmd_data, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.cmd().endpoint_id, + self, + MetadataDebug(CommandId::TestNestedStructArgumentRequest), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -29458,21 +30758,24 @@ pub mod unit_testing { let mut writer = reply.with_command(8u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self.0.handle_test_list_struct_argument_request( - &ctx, - cmd_data, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.cmd().endpoint_id, - self, - MetadataDebug(CommandId::TestListStructArgumentRequest), - )), - tw, - ), - tag, - )?, - ); + let cmd_invoke_result = self + .0 + .handle_test_list_struct_argument_request( + &ctx, + cmd_data, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.cmd().endpoint_id, + self, + MetadataDebug(CommandId::TestListStructArgumentRequest), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -29521,21 +30824,24 @@ pub mod unit_testing { let mut writer = reply.with_command(8u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self.0.handle_test_list_int_8_u_argument_request( - &ctx, - cmd_data, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.cmd().endpoint_id, - self, - MetadataDebug(CommandId::TestListInt8UArgumentRequest), - )), - tw, - ), - tag, - )?, - ); + let cmd_invoke_result = self + .0 + .handle_test_list_int_8_u_argument_request( + &ctx, + cmd_data, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.cmd().endpoint_id, + self, + MetadataDebug(CommandId::TestListInt8UArgumentRequest), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -29584,21 +30890,26 @@ pub mod unit_testing { let mut writer = reply.with_command(8u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self.0.handle_test_nested_struct_list_argument_request( - &ctx, - cmd_data, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.cmd().endpoint_id, - self, - MetadataDebug(CommandId::TestNestedStructListArgumentRequest), - )), - tw, - ), - tag, - )?, - ); + let cmd_invoke_result = self + .0 + .handle_test_nested_struct_list_argument_request( + &ctx, + cmd_data, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.cmd().endpoint_id, + self, + MetadataDebug( + CommandId::TestNestedStructListArgumentRequest, + ), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -29647,8 +30958,9 @@ pub mod unit_testing { let mut writer = reply.with_command(8u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = - self.0.handle_test_list_nested_struct_list_argument_request( + let cmd_invoke_result = self + .0 + .handle_test_list_nested_struct_list_argument_request( &ctx, cmd_data, rs_matter_crate::tlv::TLVBuilder::new( @@ -29664,7 +30976,8 @@ pub mod unit_testing { ), tag, )?, - ); + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -29713,21 +31026,24 @@ pub mod unit_testing { let mut writer = reply.with_command(4u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self.0.handle_test_list_int_8_u_reverse_request( - &ctx, - cmd_data, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.cmd().endpoint_id, - self, - MetadataDebug(CommandId::TestListInt8UReverseRequest), - )), - tw, - ), - tag, - )?, - ); + let cmd_invoke_result = self + .0 + .handle_test_list_int_8_u_reverse_request( + &ctx, + cmd_data, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.cmd().endpoint_id, + self, + MetadataDebug(CommandId::TestListInt8UReverseRequest), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -29776,21 +31092,24 @@ pub mod unit_testing { let mut writer = reply.with_command(5u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self.0.handle_test_enums_request( - &ctx, - cmd_data, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.cmd().endpoint_id, - self, - MetadataDebug(CommandId::TestEnumsRequest), - )), - tw, - ), - tag, - )?, - ); + let cmd_invoke_result = self + .0 + .handle_test_enums_request( + &ctx, + cmd_data, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.cmd().endpoint_id, + self, + MetadataDebug(CommandId::TestEnumsRequest), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -29839,21 +31158,24 @@ pub mod unit_testing { let mut writer = reply.with_command(6u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self.0.handle_test_nullable_optional_request( - &ctx, - cmd_data, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.cmd().endpoint_id, - self, - MetadataDebug(CommandId::TestNullableOptionalRequest), - )), - tw, - ), - tag, - )?, - ); + let cmd_invoke_result = self + .0 + .handle_test_nullable_optional_request( + &ctx, + cmd_data, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.cmd().endpoint_id, + self, + MetadataDebug(CommandId::TestNullableOptionalRequest), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -29902,21 +31224,26 @@ pub mod unit_testing { let mut writer = reply.with_command(7u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self.0.handle_test_complex_nullable_optional_request( - &ctx, - cmd_data, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.cmd().endpoint_id, - self, - MetadataDebug(CommandId::TestComplexNullableOptionalRequest), - )), - tw, - ), - tag, - )?, - ); + let cmd_invoke_result = self + .0 + .handle_test_complex_nullable_optional_request( + &ctx, + cmd_data, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.cmd().endpoint_id, + self, + MetadataDebug( + CommandId::TestComplexNullableOptionalRequest, + ), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -29965,21 +31292,24 @@ pub mod unit_testing { let mut writer = reply.with_command(9u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self.0.handle_simple_struct_echo_request( - &ctx, - cmd_data, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.cmd().endpoint_id, - self, - MetadataDebug(CommandId::SimpleStructEchoRequest), - )), - tw, - ), - tag, - )?, - ); + let cmd_invoke_result = self + .0 + .handle_simple_struct_echo_request( + &ctx, + cmd_data, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.cmd().endpoint_id, + self, + MetadataDebug(CommandId::SimpleStructEchoRequest), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -30004,7 +31334,7 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::complete(writer)? } CommandId::TimedInvokeRequest => { - let cmd_invoke_result = self.0.handle_timed_invoke_request(&ctx); + let cmd_invoke_result = self.0.handle_timed_invoke_request(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -30032,7 +31362,8 @@ pub mod unit_testing { rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; let cmd_invoke_result = self .0 - .handle_test_simple_optional_argument_request(&ctx, cmd_data.clone()); + .handle_test_simple_optional_argument_request(&ctx, cmd_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -30082,21 +31413,24 @@ pub mod unit_testing { let mut writer = reply.with_command(10u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self.0.handle_test_emit_test_event_request( - &ctx, - cmd_data, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.cmd().endpoint_id, - self, - MetadataDebug(CommandId::TestEmitTestEventRequest), - )), - tw, - ), - tag, - )?, - ); + let cmd_invoke_result = self + .0 + .handle_test_emit_test_event_request( + &ctx, + cmd_data, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.cmd().endpoint_id, + self, + MetadataDebug(CommandId::TestEmitTestEventRequest), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -30145,8 +31479,9 @@ pub mod unit_testing { let mut writer = reply.with_command(11u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = - self.0.handle_test_emit_test_fabric_scoped_event_request( + let cmd_invoke_result = self + .0 + .handle_test_emit_test_fabric_scoped_event_request( &ctx, cmd_data, rs_matter_crate::tlv::TLVBuilder::new( @@ -30162,7 +31497,8 @@ pub mod unit_testing { ), tag, )?, - ); + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -30211,21 +31547,24 @@ pub mod unit_testing { let mut writer = reply.with_command(12u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self.0.handle_test_batch_helper_request( - &ctx, - cmd_data, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.cmd().endpoint_id, - self, - MetadataDebug(CommandId::TestBatchHelperRequest), - )), - tw, - ), - tag, - )?, - ); + let cmd_invoke_result = self + .0 + .handle_test_batch_helper_request( + &ctx, + cmd_data, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.cmd().endpoint_id, + self, + MetadataDebug(CommandId::TestBatchHelperRequest), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -30274,21 +31613,24 @@ pub mod unit_testing { let mut writer = reply.with_command(12u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self.0.handle_test_second_batch_helper_request( - &ctx, - cmd_data, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.cmd().endpoint_id, - self, - MetadataDebug(CommandId::TestSecondBatchHelperRequest), - )), - tw, - ), - tag, - )?, - ); + let cmd_invoke_result = self + .0 + .handle_test_second_batch_helper_request( + &ctx, + cmd_data, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.cmd().endpoint_id, + self, + MetadataDebug(CommandId::TestSecondBatchHelperRequest), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -30337,21 +31679,24 @@ pub mod unit_testing { let mut writer = reply.with_command(4294049979u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self.0.handle_test_different_vendor_mei_request( - &ctx, - cmd_data, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.cmd().endpoint_id, - self, - MetadataDebug(CommandId::TestDifferentVendorMeiRequest), - )), - tw, - ), - tag, - )?, - ); + let cmd_invoke_result = self + .0 + .handle_test_different_vendor_mei_request( + &ctx, + cmd_data, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.cmd().endpoint_id, + self, + MetadataDebug(CommandId::TestDifferentVendorMeiRequest), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -30386,6 +31731,12 @@ pub mod unit_testing { self.0.dataver_changed(); Ok(()) } + fn run( + &self, + ctx: impl rs_matter_crate::dm::HandlerContext, + ) -> impl core::future::Future> { + self.0.run(ctx) + } } impl core::fmt::Debug for MetadataDebug<(u16, &HandlerAdaptor, Q)> where @@ -30419,7 +31770,6 @@ pub mod unit_testing { ) } } - impl rs_matter_crate::dm::NonBlockingHandler for HandlerAdaptor where T: ClusterHandler {} } "#; } diff --git a/rs-matter-macros/src/idl/handler.rs b/rs-matter-macros/src/idl/handler.rs index 2642a9d1e..9c8e2385e 100644 --- a/rs-matter-macros/src/idl/handler.rs +++ b/rs-matter-macros/src/idl/handler.rs @@ -28,8 +28,8 @@ use super::IdlGenerateContext; /// Return a token stream defining the handler trait for the provided IDL cluster. /// -/// Unlike the `rs-matter` generic `Handler` / `AsyncHandler` pair of traits, the trait -/// generated here is specific to the conrete provided IDL cluster and is strongly-typed. +/// Unlike the `rs-matter` generic `AsyncHandler` pair of traits, the trait +/// generated here is specific to the concrete provided IDL cluster and is strongly-typed. /// /// Thus, it contains methods corresponding to all the attributes and commands of the /// IDL cluster. @@ -39,13 +39,11 @@ use super::IdlGenerateContext; /// in the IDL cluster, thus providing a strongly-typed interface. /// /// ## Arguments -/// - `asynch`: If true, the generated handler will be async. /// - `delegate`: If true, rather than generating a handler trait, the function will generate /// an inherent implementation of the trait over `&T`, where `T` is assumed to implement the trait. /// - `cluster`: The IDL cluster for which the handler is generated. /// - `context`: The context containing the information needed to generate the handler. pub fn handler( - asynch: bool, delegate: bool, cluster: &Cluster, globals: &Entities, @@ -53,40 +51,33 @@ pub fn handler( ) -> TokenStream { let krate = context.rs_matter_crate.clone(); - let handler_name = ident(&format!( - "Cluster{}Handler", - if asynch { "Async" } else { "" } - )); + let handler_name = ident("ClusterHandler"); let entities = &EntityContext::new(Some(&cluster.entities), globals); let handler_attribute_methods = cluster .attributes .iter() .filter(|attr| !GLOBAL_ATTR.contains(&attr.field.field.code)) - .map(|attr| handler_attribute(attr, asynch, delegate, entities, &krate)); + .map(|attr| handler_attribute(attr, delegate, entities, &krate)); let handler_attribute_write_methods = cluster .attributes .iter() .filter(|attr| !GLOBAL_ATTR.contains(&attr.field.field.code)) .filter(|attr| !attr.is_read_only) - .map(|attr| handler_attribute_write(attr, asynch, delegate, entities, &krate)); + .map(|attr| handler_attribute_write(attr, delegate, entities, &krate)); let handler_command_methods = cluster .commands .iter() - .map(|cmd| handler_command(cmd, asynch, delegate, entities, &krate)); + .map(|cmd| handler_command(cmd, delegate, entities, &krate)); if delegate { - let run = if asynch { - quote!( - fn run(&self, ctx: impl #krate::dm::HandlerContext) -> impl core::future::Future> { - (**self).run(ctx) - } - ) - } else { - quote!() - }; + let run = quote!( + fn run(&self, ctx: impl #krate::dm::HandlerContext) -> impl core::future::Future> { + (**self).run(ctx) + } + ); quote!( impl #handler_name for &T @@ -108,15 +99,11 @@ pub fn handler( } ) } else { - let run = if asynch { - quote!( - fn run(&self, _ctx: impl #krate::dm::HandlerContext) -> impl core::future::Future> { - core::future::pending::>() - } - ) - } else { - quote!() - }; + let run = quote!( + fn run(&self, _ctx: impl #krate::dm::HandlerContext) -> impl core::future::Future> { + core::future::pending::>() + } + ); quote!( #[doc = "The handler trait for the cluster."] @@ -142,18 +129,16 @@ pub fn handler( /// Return a token stream defining an adaptor struct that can adapt a type implementing the /// cluster-specific handler trait as defined by the `handler` function to the -/// generic `Handler` / `AsyncHandler` traits that `rs-matter` understands. +/// generic `AsyncHandler` traits that `rs-matter` understands. /// /// Without this adaptor, implementations of the cluster-specific handler trait would not be /// usable with `rs-matter`. /// /// # Arguments -/// - `asynch`: If true, the adaptor implements to rs-matter's `AsyncHandler` trait, rather than /// to the `Handler` trait. /// - `cluster`: The IDL cluster for which the adaptor is generated. /// - `context`: The context containing the information needed to generate the adaptor. pub fn handler_adaptor( - asynch: bool, cluster: &Cluster, globals: &Entities, context: &IdlGenerateContext, @@ -163,24 +148,18 @@ pub fn handler_adaptor( let cluster_name_str = Literal::string(&cluster.id); let cluster_code = Literal::u32_suffixed(cluster.code as _); - let handler_name = ident(&format!( - "Cluster{}Handler", - if asynch { "Async" } else { "" } - )); + let handler_name = ident("ClusterHandler"); - let handler_adaptor_name = ident(&format!( - "Handler{}Adaptor", - if asynch { "Async" } else { "" } - )); + let handler_adaptor_name = ident("HandlerAdaptor"); - let generic_handler_name = ident(&format!("{}Handler", if asynch { "Async" } else { "" })); + let generic_handler_name = ident("AsyncHandler"); let entities = &EntityContext::new(Some(&cluster.entities), globals); let handler_adaptor_attribute_match = cluster .attributes .iter() .filter(|attr| !GLOBAL_ATTR.contains(&attr.field.field.code)) - .map(|attr| handler_adaptor_attribute_match(attr, asynch, entities, &krate)) + .map(|attr| handler_adaptor_attribute_match(attr, entities, &krate)) .collect::>(); let handler_adaptor_attribute_write_match = cluster @@ -188,12 +167,12 @@ pub fn handler_adaptor( .iter() .filter(|attr| !GLOBAL_ATTR.contains(&attr.field.field.code)) .filter(|attr| !attr.is_read_only) - .map(|attr| handler_adaptor_attribute_write_match(attr, asynch, entities, &krate)); + .map(|attr| handler_adaptor_attribute_write_match(attr, entities, &krate)); let handler_adaptor_command_match = cluster .commands .iter() - .map(|cmd| handler_adaptor_command_match(cmd, asynch, entities, &krate)) + .map(|cmd| handler_adaptor_command_match(cmd, entities, &krate)) .collect::>(); let read_stream = if !handler_adaptor_attribute_match.is_empty() { @@ -272,17 +251,11 @@ pub fn handler_adaptor( ) }; - let run = if asynch { - quote!( - fn run(&self, ctx: impl #krate::dm::HandlerContext) -> impl core::future::Future> { - self.0.run(ctx) - } - ) - } else { - quote!() - }; - - let pasync = if asynch { quote!(async) } else { quote!() }; + let run = quote!( + fn run(&self, ctx: impl #krate::dm::HandlerContext) -> impl core::future::Future> { + self.0.run(ctx) + } + ); let stream = quote!( #[doc = "The handler adaptor for the cluster-specific handler. This adaptor implements the generic `rs-matter` handler trait."] @@ -295,7 +268,7 @@ pub fn handler_adaptor( T: #handler_name, { #[allow(unreachable_code)] - #pasync fn read( + async fn read( &self, ctx: impl #krate::dm::ReadContext, reply: impl #krate::dm::ReadReply, @@ -312,7 +285,7 @@ pub fn handler_adaptor( } #[allow(unreachable_code)] - #pasync fn write( + async fn write( &self, ctx: impl #krate::dm::WriteContext, ) -> Result<(), #krate::error::Error> { @@ -330,7 +303,7 @@ pub fn handler_adaptor( } #[allow(unreachable_code)] - #pasync fn invoke( + async fn invoke( &self, ctx: impl #krate::dm::InvokeContext, reply: impl #krate::dm::InvokeReply, @@ -369,32 +342,19 @@ pub fn handler_adaptor( } ); - if asynch { - stream - } else { - quote!( - #stream - - impl #krate::dm::NonBlockingHandler for #handler_adaptor_name - where - T: #handler_name, - {} - ) - } + stream } /// Return a token stream defining the handler trait method for reading the provided IDL attribute. /// /// # Arguments /// - `attr`: The IDL attribute for which the handler method is generated. -/// - `asynch`: If true, the generated handler method signature will be async. /// - `delegate`: If true, the generated handler method will have an implementation delegating /// to a `T` type (for inherent impls) /// - `cluster`: The IDL cluster for which the handler method is generated. /// - `krate`: The crate name to use for the generated code. fn handler_attribute( attr: &Attribute, - asynch: bool, delegate: bool, entities: &EntityContext, krate: &Ident, @@ -402,11 +362,6 @@ fn handler_attribute( let attr_name = ident(&idl_field_name_to_rs_name(&attr.field.field.id)); let parent = quote!(P); - let (pasync, sawait) = if asynch { - (quote!(async), quote!(.await)) - } else { - (quote!(), quote!()) - }; let (mut attr_type, builder) = field_type_builder( &attr.field.field.data_type, @@ -439,36 +394,36 @@ fn handler_attribute( if !delegate && attr.field.is_optional { quote!( - #pasync fn #attr_name(&self, ctx: impl #krate::dm::ReadContext, builder: #attr_type) -> Result { + async fn #attr_name(&self, ctx: impl #krate::dm::ReadContext, builder: #attr_type) -> Result { Err(#krate::error::ErrorCode::InvalidAction.into()) } ) } else { - let stream = quote!( - #pasync fn #attr_name(&self, ctx: impl #krate::dm::ReadContext, builder: #attr_type) -> Result - ); - if delegate { - quote!(#stream { T::#attr_name(self, ctx, builder)#sawait }) + quote!( + fn #attr_name(&self, ctx: impl #krate::dm::ReadContext, builder: #attr_type) -> impl core::future::Future> { + T::#attr_name(self, ctx, builder) + } + ) } else { - quote!(#stream;) + quote!(async fn #attr_name(&self, ctx: impl #krate::dm::ReadContext, builder: #attr_type) -> Result;) } } } else if !delegate && attr.field.is_optional { quote!( - #pasync fn #attr_name(&self, ctx: impl #krate::dm::ReadContext) -> Result<#attr_type, #krate::error::Error> { + async fn #attr_name(&self, ctx: impl #krate::dm::ReadContext) -> Result<#attr_type, #krate::error::Error> { Err(#krate::error::ErrorCode::InvalidAction.into()) } ) } else { - let stream = quote!( - #pasync fn #attr_name(&self, ctx: impl #krate::dm::ReadContext) -> Result<#attr_type, #krate::error::Error> - ); - if delegate { - quote!(#stream { T::#attr_name(self, ctx)#sawait }) + quote!( + fn #attr_name(&self, ctx: impl #krate::dm::ReadContext) -> impl core::future::Future> { + T::#attr_name(self, ctx) + } + ) } else { - quote!(#stream;) + quote!(async fn #attr_name(&self, ctx: impl #krate::dm::ReadContext) -> Result<#attr_type, #krate::error::Error>;) } } } @@ -477,14 +432,12 @@ fn handler_attribute( /// /// # Arguments /// - `attr`: The IDL attribute for which the handler method is generated. -/// - `asynch`: If true, the generated handler method signature will be async. /// - `delegate`: If true, the generated handler method will have an implementation delegating /// to a `T` type (for inherent impls) /// - `cluster`: The IDL cluster for which the handler method is generated. /// - `krate`: The crate name to use for the generated code. fn handler_attribute_write( attr: &Attribute, - asynch: bool, delegate: bool, entities: &EntityContext, krate: &Ident, @@ -494,12 +447,6 @@ fn handler_attribute_write( &idl_field_name_to_rs_name(&attr.field.field.id) )); - let (pasync, sawait) = if asynch { - (quote!(async), quote!(.await)) - } else { - (quote!(), quote!()) - }; - let mut attr_type = field_type( &attr.field.field.data_type, attr.field.is_nullable, @@ -526,17 +473,17 @@ fn handler_attribute_write( if !delegate && attr.field.is_optional { quote!( - #pasync fn #attr_name(&self, ctx: impl #krate::dm::WriteContext, value: #attr_type) -> Result<(), #krate::error::Error> { + async fn #attr_name(&self, ctx: impl #krate::dm::WriteContext, value: #attr_type) -> Result<(), #krate::error::Error> { Err(#krate::error::ErrorCode::InvalidAction.into()) } ) } else { let stream = quote!( - #pasync fn #attr_name(&self, ctx: impl #krate::dm::WriteContext, value: #attr_type) -> Result<(), #krate::error::Error> + async fn #attr_name(&self, ctx: impl #krate::dm::WriteContext, value: #attr_type) -> Result<(), #krate::error::Error> ); if delegate { - quote!(#stream { T::#attr_name(self, ctx, value)#sawait }) + quote!(#stream { T::#attr_name(self, ctx, value).await }) } else { quote!(#stream;) } @@ -547,26 +494,18 @@ fn handler_attribute_write( /// /// # Arguments /// - `cmd`: The IDL command for which the handler method is generated. -/// - `asynch`: If true, the generated handler method signature will be async. /// - `delegate`: If true, the generated handler method will have an implementation delegating /// to a `T` type (for inherent impls) /// - `cluster`: The IDL cluster for which the handler method is generated. /// - `krate`: The crate name to use for the generated code. fn handler_command( cmd: &Command, - asynch: bool, delegate: bool, entities: &EntityContext, krate: &Ident, ) -> TokenStream { let cmd_name = ident(&format!("handle_{}", &idl_field_name_to_rs_name(&cmd.id))); - let (pasync, sawait) = if asynch { - (quote!(async), quote!(.await)) - } else { - (quote!(), quote!()) - }; - let field_req = cmd.input.as_ref().map(|id| { field_type( &DataType { @@ -603,7 +542,7 @@ fn handler_command( if let Some((field_resp, field_resp_builder)) = field_resp { if field_resp_builder { let stream = quote!( - #pasync fn #cmd_name( + async fn #cmd_name( &self, ctx: impl #krate::dm::InvokeContext, request: #field_req, @@ -612,13 +551,13 @@ fn handler_command( ); if delegate { - quote!(#stream { T::#cmd_name(self, ctx, request, response)#sawait }) + quote!(#stream { T::#cmd_name(self, ctx, request, response).await }) } else { quote!(#stream;) } } else { let stream = quote!( - #pasync fn #cmd_name( + async fn #cmd_name( &self, ctx: impl #krate::dm::InvokeContext, request: #field_req, @@ -626,14 +565,14 @@ fn handler_command( ); if delegate { - quote!(#stream { T::#cmd_name(self, ctx, request)#sawait }) + quote!(#stream { T::#cmd_name(self, ctx, request).await }) } else { quote!(#stream;) } } } else { let stream = quote!( - #pasync fn #cmd_name( + async fn #cmd_name( &self, ctx: impl #krate::dm::InvokeContext, request: #field_req, @@ -641,7 +580,7 @@ fn handler_command( ); if delegate { - quote!(#stream { T::#cmd_name(self, ctx, request)#sawait }) + quote!(#stream { T::#cmd_name(self, ctx, request).await }) } else { quote!(#stream;) } @@ -649,7 +588,7 @@ fn handler_command( } else if let Some((field_resp, field_resp_builder)) = field_resp { if field_resp_builder { let stream = quote!( - #pasync fn #cmd_name( + async fn #cmd_name( &self, ctx: impl #krate::dm::InvokeContext, response: #field_resp, @@ -657,34 +596,34 @@ fn handler_command( ); if delegate { - quote!(#stream { T::#cmd_name(self, ctx, response)#sawait }) + quote!(#stream { T::#cmd_name(self, ctx, response).await }) } else { quote!(#stream;) } } else { let stream = quote!( - #pasync fn #cmd_name( + async fn #cmd_name( &self, ctx: impl #krate::dm::InvokeContext, ) -> Result<#field_resp, #krate::error::Error> ); if delegate { - quote!(#stream { T::#cmd_name(self, ctx)#sawait }) + quote!(#stream { T::#cmd_name(self, ctx).await }) } else { quote!(#stream;) } } } else { let stream = quote!( - #pasync fn #cmd_name( + async fn #cmd_name( &self, ctx: impl #krate::dm::InvokeContext, ) -> Result<(), #krate::error::Error> ); if delegate { - quote!(#stream { T::#cmd_name(self, ctx)#sawait }) + quote!(#stream { T::#cmd_name(self, ctx).await }) } else { quote!(#stream;) } @@ -696,12 +635,10 @@ fn handler_command( /// /// # Arguments /// - `attr`: The IDL attribute for which the match clause is generated. -/// - `asynch`: If true, the generated match clause will assume the cluster trait is async and will generate async code. /// - `cluster`: The IDL cluster for which the match clause is generated. /// - `krate`: The crate name to use for the generated code. fn handler_adaptor_attribute_match( attr: &Attribute, - asynch: bool, entities: &EntityContext, krate: &Ident, ) -> TokenStream { @@ -713,7 +650,6 @@ fn handler_adaptor_attribute_match( let attr_method_name = ident(&idl_field_name_to_rs_name(&attr.field.field.id)); let parent = quote!(P); - let sawait = if asynch { quote!(.await) } else { quote!() }; let (_, builder) = field_type_builder( &attr.field.field.data_type, @@ -762,7 +698,7 @@ fn handler_adaptor_attribute_match( #krate::tlv::TLVWriteParent::new(#attr_debug_id, tw), tag, )?, - )#sawait; + ).await; #attr_read_debug_build_end @@ -782,7 +718,7 @@ fn handler_adaptor_attribute_match( let attr_read_result = self.0.#attr_method_name(&ctx, #krate::tlv::TLVBuilder::new( #krate::tlv::TLVWriteParent::new(#attr_debug_id, tw), tag, - )?)#sawait; + )?).await; #attr_read_debug_build_end @@ -795,7 +731,7 @@ fn handler_adaptor_attribute_match( } else { quote!( AttributeId::#attr_name => { - let attr_read_result = self.0.#attr_method_name(&ctx)#sawait; + let attr_read_result = self.0.#attr_method_name(&ctx).await; #attr_read_debug @@ -810,11 +746,9 @@ fn handler_adaptor_attribute_match( /// /// # Arguments /// - `attr`: The IDL attribute for which the match clause is generated. -/// - `asynch`: If true, the generated match clause will assume the cluster trait is async and will generate async code. /// - `krate`: The crate name to use for the generated code. fn handler_adaptor_attribute_write_match( attr: &Attribute, - asynch: bool, entities: &EntityContext, krate: &Ident, ) -> TokenStream { @@ -836,8 +770,6 @@ fn handler_adaptor_attribute_write_match( krate, ); - let sawait = if asynch { quote!(.await) } else { quote!() }; - let attr_write_debug = quote!( #[cfg(feature = "defmt")] #krate::reexport::defmt::debug!("{:?}({:?}) -> {:?}", #attr_debug_id, attr_data, attr_write_result); @@ -850,7 +782,7 @@ fn handler_adaptor_attribute_write_match( AttributeId::#attr_name => { let attr_data = #krate::dm::ArrayAttributeWrite::new(ctx.attr().list_index.clone(), ctx.data())?; - let attr_write_result = self.0.#attr_method_name(&ctx, attr_data.clone())#sawait; + let attr_write_result = self.0.#attr_method_name(&ctx, attr_data.clone()).await; #attr_write_debug @@ -862,7 +794,7 @@ fn handler_adaptor_attribute_write_match( AttributeId::#attr_name => { let attr_data: #attr_type = #krate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.#attr_method_name(&ctx, attr_data.clone())#sawait; + let attr_write_result = self.0.#attr_method_name(&ctx, attr_data.clone()).await; #attr_write_debug @@ -877,12 +809,10 @@ fn handler_adaptor_attribute_write_match( /// /// # Arguments /// - `cmd`: The IDL command for which the match clause is generated. -/// - `asynch`: If true, the generated match clause will assume the cluster trait is async and will generate async code. /// - `cluster`: The IDL cluster for which the match clause is generated. /// - `krate`: The crate name to use for the generated code. fn handler_adaptor_command_match( cmd: &Command, - asynch: bool, entities: &EntityContext, krate: &Ident, ) -> TokenStream { @@ -892,8 +822,6 @@ fn handler_adaptor_command_match( let cmd_method_name = ident(&format!("handle_{}", &idl_field_name_to_rs_name(&cmd.id))); - let sawait = if asynch { quote!(.await) } else { quote!() }; - let cmd_invoke_debug_build_start = quote!( #[cfg(feature = "defmt")] #krate::reexport::defmt::debug!("{:?}({:?}) -> (build) +", #cmd_debug_id, cmd_data); @@ -998,7 +926,7 @@ fn handler_adaptor_command_match( #krate::tlv::TLVWriteParent::new(#cmd_debug_id, tw), tag, )? - )#sawait; + ).await; #cmd_invoke_debug_build_end @@ -1014,7 +942,7 @@ fn handler_adaptor_command_match( let writer = reply.with_command(#field_resp_cmd_code)?; - let cmd_invoke_result = self.0.#cmd_method_name(&ctx, cmd_data.clone())#sawait; + let cmd_invoke_result = self.0.#cmd_method_name(&ctx, cmd_data.clone()).await; #cmd_invoke_debug @@ -1027,7 +955,7 @@ fn handler_adaptor_command_match( CommandId::#cmd_name => { let cmd_data: #field_req = #krate::tlv::FromTLV::from_tlv(ctx.data())?; - let cmd_invoke_result = self.0.#cmd_method_name(&ctx, cmd_data.clone())#sawait; + let cmd_invoke_result = self.0.#cmd_method_name(&ctx, cmd_data.clone()).await; #cmd_invoke_debug @@ -1051,7 +979,7 @@ fn handler_adaptor_command_match( #krate::tlv::TLVWriteParent::new(#cmd_debug_id, tw), tag, )?, - )#sawait; + ).await; #cmd_invoke_debug_build_end @@ -1065,7 +993,7 @@ fn handler_adaptor_command_match( CommandId::#cmd_name => { let writer = reply.with_command(#field_resp_cmd_code)?; - let cmd_invoke_result = self.0.#cmd_method_name(&ctx)#sawait; + let cmd_invoke_result = self.0.#cmd_method_name(&ctx).await; #cmd_invoke_debug_noarg @@ -1076,7 +1004,7 @@ fn handler_adaptor_command_match( } else { quote!( CommandId::#cmd_name => { - let cmd_invoke_result = self.0.#cmd_method_name(&ctx)#sawait; + let cmd_invoke_result = self.0.#cmd_method_name(&ctx).await; #cmd_invoke_debug_noarg @@ -1180,7 +1108,7 @@ mod tests { // panic!("====\n{}\n====", &handler(false, false, cluster, &context)); assert_tokenstreams_eq!( - &handler(false, false, cluster, &idl.globals, &context), + &handler(false, cluster, &idl.globals, &context), "e!( #[doc = "The handler trait for the cluster."] pub trait ClusterHandler { @@ -1188,29 +1116,36 @@ mod tests { const CLUSTER: rs_matter_crate::dm::Cluster<'static>; fn dataver(&self) -> u32; fn dataver_changed(&self); - fn on_off( + fn run( + &self, + _ctx: impl rs_matter_crate::dm::HandlerContext, + ) -> impl core::future::Future> + { + core::future::pending::>() + } + async fn on_off( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; - fn global_scene_control( + async fn global_scene_control( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result { Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) } - fn on_time( + async fn on_time( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result { Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) } - fn off_wait_time( + async fn off_wait_time( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result { Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) } - fn start_up_on_off( + async fn start_up_on_off( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result< @@ -1219,49 +1154,49 @@ mod tests { > { Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) } - fn set_on_time( + async fn set_on_time( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, ) -> Result<(), rs_matter_crate::error::Error> { Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) } - fn set_off_wait_time( + async fn set_off_wait_time( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, ) -> Result<(), rs_matter_crate::error::Error> { Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) } - fn set_start_up_on_off( + async fn set_start_up_on_off( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) } - fn handle_off( + async fn handle_off( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> Result<(), rs_matter_crate::error::Error>; - fn handle_on( + async fn handle_on( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> Result<(), rs_matter_crate::error::Error>; - fn handle_toggle( + async fn handle_toggle( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> Result<(), rs_matter_crate::error::Error>; - fn handle_off_with_effect( + async fn handle_off_with_effect( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: OffWithEffectRequest<'_>, ) -> Result<(), rs_matter_crate::error::Error>; - fn handle_on_with_recall_global_scene( + async fn handle_on_with_recall_global_scene( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> Result<(), rs_matter_crate::error::Error>; - fn handle_on_with_timed_off( + async fn handle_on_with_timed_off( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: OnWithTimedOffRequest<'_>, @@ -1270,10 +1205,10 @@ mod tests { ) ); - // panic!("====\n{}\n====", &handler(false, true, cluster, &context)); + // panic!("====\n{}\n====", &handler(true, cluster, &idl.globals, &context)); assert_tokenstreams_eq!( - &handler(false, true, cluster, &idl.globals, &context), + &handler(true, cluster, &idl.globals, &context), "e!( impl ClusterHandler for &T where @@ -1286,97 +1221,110 @@ mod tests { fn dataver_changed(&self) { T::dataver_changed(self) } + fn run( + &self, + ctx: impl rs_matter_crate::dm::HandlerContext, + ) -> impl core::future::Future> + { + (**self).run(ctx) + } fn on_off( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::on_off(self, ctx) } fn global_scene_control( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::global_scene_control(self, ctx) } fn on_time( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::on_time(self, ctx) } fn off_wait_time( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { + ) -> impl core::future::Future> + { T::off_wait_time(self, ctx) } fn start_up_on_off( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result< - rs_matter_crate::tlv::Nullable, - rs_matter_crate::error::Error, + ) -> impl core::future::Future< + Output = Result< + rs_matter_crate::tlv::Nullable, + rs_matter_crate::error::Error, + >, > { T::start_up_on_off(self, ctx) } - fn set_on_time( + async fn set_on_time( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_on_time(self, ctx, value) + T::set_on_time(self, ctx, value).await } - fn set_off_wait_time( + async fn set_off_wait_time( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_off_wait_time(self, ctx, value) + T::set_off_wait_time(self, ctx, value).await } - fn set_start_up_on_off( + async fn set_start_up_on_off( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error> { - T::set_start_up_on_off(self, ctx, value) + T::set_start_up_on_off(self, ctx, value).await } - fn handle_off( + async fn handle_off( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> Result<(), rs_matter_crate::error::Error> { - T::handle_off(self, ctx) + T::handle_off(self, ctx).await } - fn handle_on( + async fn handle_on( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> Result<(), rs_matter_crate::error::Error> { - T::handle_on(self, ctx) + T::handle_on(self, ctx).await } - fn handle_toggle( + async fn handle_toggle( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> Result<(), rs_matter_crate::error::Error> { - T::handle_toggle(self, ctx) + T::handle_toggle(self, ctx).await } - fn handle_off_with_effect( + async fn handle_off_with_effect( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: OffWithEffectRequest<'_>, ) -> Result<(), rs_matter_crate::error::Error> { - T::handle_off_with_effect(self, ctx, request) + T::handle_off_with_effect(self, ctx, request).await } - fn handle_on_with_recall_global_scene( + async fn handle_on_with_recall_global_scene( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> Result<(), rs_matter_crate::error::Error> { - T::handle_on_with_recall_global_scene(self, ctx) + T::handle_on_with_recall_global_scene(self, ctx).await } - fn handle_on_with_timed_off( + async fn handle_on_with_timed_off( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: OnWithTimedOffRequest<'_>, ) -> Result<(), rs_matter_crate::error::Error> { - T::handle_on_with_timed_off(self, ctx, request) + T::handle_on_with_timed_off(self, ctx, request).await } } ) @@ -1390,21 +1338,21 @@ mod tests { let cluster = get_cluster_named(&idl, "OnOff").expect("Cluster exists"); let context = IdlGenerateContext::new("rs_matter_crate"); - // panic!("====\n{}\n====", &handler_adaptor(false, cluster, &context)); + // panic!("====\n{}\n====", &handler_adaptor( cluster, &idl.globals, &context)); assert_tokenstreams_eq!( - &handler_adaptor(false, cluster, &idl.globals, &context), + &handler_adaptor(cluster, &idl.globals, &context), "e!( #[doc = "The handler adaptor for the cluster-specific handler. This adaptor implements the generic `rs-matter` handler trait."] #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] #[cfg_attr(feature = "defmt", derive(rs_matter_crate::reexport::defmt::Format))] pub struct HandlerAdaptor(pub T); - impl rs_matter_crate::dm::Handler for HandlerAdaptor + impl rs_matter_crate::dm::AsyncHandler for HandlerAdaptor where T: ClusterHandler, { #[allow(unreachable_code)] - fn read( + async fn read( &self, ctx: impl rs_matter_crate::dm::ReadContext, reply: impl rs_matter_crate::dm::ReadReply, @@ -1415,7 +1363,7 @@ mod tests { } else { match AttributeId::try_from(ctx.attr().attr_id)? { AttributeId::OnOff => { - let attr_read_result = self.0.on_off(&ctx); + let attr_read_result = self.0.on_off(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -1439,7 +1387,8 @@ mod tests { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::GlobalSceneControl => { - let attr_read_result = self.0.global_scene_control(&ctx); + let attr_read_result = + self.0.global_scene_control(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -1469,7 +1418,7 @@ mod tests { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::OnTime => { - let attr_read_result = self.0.on_time(&ctx); + let attr_read_result = self.0.on_time(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -1493,7 +1442,7 @@ mod tests { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::OffWaitTime => { - let attr_read_result = self.0.off_wait_time(&ctx); + let attr_read_result = self.0.off_wait_time(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -1517,7 +1466,7 @@ mod tests { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::StartUpOnOff => { - let attr_read_result = self.0.start_up_on_off(&ctx); + let attr_read_result = self.0.start_up_on_off(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -1562,7 +1511,7 @@ mod tests { } } #[allow(unreachable_code)] - fn write( + async fn write( &self, ctx: impl rs_matter_crate::dm::WriteContext, ) -> Result<(), rs_matter_crate::error::Error> { @@ -1574,7 +1523,8 @@ mod tests { AttributeId::OnTime => { let attr_data: u16 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_on_time(&ctx, attr_data.clone()); + let attr_write_result = + self.0.set_on_time(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -1603,7 +1553,7 @@ mod tests { let attr_data: u16 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; let attr_write_result = - self.0.set_off_wait_time(&ctx, attr_data.clone()); + self.0.set_off_wait_time(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -1632,7 +1582,7 @@ mod tests { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; let attr_write_result = - self.0.set_start_up_on_off(&ctx, attr_data.clone()); + self.0.set_start_up_on_off(&ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -1677,14 +1627,14 @@ mod tests { Ok(()) } #[allow(unreachable_code)] - fn invoke( + async fn invoke( &self, ctx: impl rs_matter_crate::dm::InvokeContext, reply: impl rs_matter_crate::dm::InvokeReply, ) -> Result<(), rs_matter_crate::error::Error> { match CommandId::try_from(ctx.cmd().cmd_id)? { CommandId::Off => { - let cmd_invoke_result = self.0.handle_off(&ctx); + let cmd_invoke_result = self.0.handle_off(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -1708,7 +1658,7 @@ mod tests { cmd_invoke_result?; } CommandId::On => { - let cmd_invoke_result = self.0.handle_on(&ctx); + let cmd_invoke_result = self.0.handle_on(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -1732,7 +1682,7 @@ mod tests { cmd_invoke_result?; } CommandId::Toggle => { - let cmd_invoke_result = self.0.handle_toggle(&ctx); + let cmd_invoke_result = self.0.handle_toggle(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -1759,7 +1709,7 @@ mod tests { let cmd_data: OffWithEffectRequest<'_> = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; let cmd_invoke_result = - self.0.handle_off_with_effect(&ctx, cmd_data.clone()); + self.0.handle_off_with_effect(&ctx, cmd_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -1786,7 +1736,7 @@ mod tests { } CommandId::OnWithRecallGlobalScene => { let cmd_invoke_result = - self.0.handle_on_with_recall_global_scene(&ctx); + self.0.handle_on_with_recall_global_scene(&ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -1812,8 +1762,10 @@ mod tests { CommandId::OnWithTimedOff => { let cmd_data: OnWithTimedOffRequest<'_> = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let cmd_invoke_result = - self.0.handle_on_with_timed_off(&ctx, cmd_data.clone()); + let cmd_invoke_result = self + .0 + .handle_on_with_timed_off(&ctx, cmd_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -1857,6 +1809,13 @@ mod tests { self.0.dataver_changed(); Ok(()) } + fn run( + &self, + ctx: impl rs_matter_crate::dm::HandlerContext, + ) -> impl core::future::Future> + { + self.0.run(ctx) + } } impl core::fmt::Debug for MetadataDebug<(u16, &HandlerAdaptor, Q)> where @@ -1890,7 +1849,6 @@ mod tests { ) } } - impl rs_matter_crate::dm::NonBlockingHandler for HandlerAdaptor where T: ClusterHandler {} ) ); } diff --git a/rs-matter/src/dm/clusters/acl.rs b/rs-matter/src/dm/clusters/acl.rs index 6c7b77815..1ef952cb4 100644 --- a/rs-matter/src/dm/clusters/acl.rs +++ b/rs-matter/src/dm/clusters/acl.rs @@ -150,7 +150,7 @@ impl ClusterHandler for AclHandler { self.dataver.changed(); } - fn acl( + async fn acl( &self, ctx: impl ReadContext, builder: ArrayAttributeRead< @@ -165,19 +165,25 @@ impl ClusterHandler for AclHandler { ) } - fn subjects_per_access_control_entry(&self, _ctx: impl ReadContext) -> Result { + async fn subjects_per_access_control_entry( + &self, + _ctx: impl ReadContext, + ) -> Result { Ok(acl::MAX_SUBJECTS_PER_ACL_ENTRY as _) } - fn targets_per_access_control_entry(&self, _ctx: impl ReadContext) -> Result { + async fn targets_per_access_control_entry(&self, _ctx: impl ReadContext) -> Result { Ok(acl::MAX_TARGETS_PER_ACL_ENTRY as _) } - fn access_control_entries_per_fabric(&self, _ctx: impl ReadContext) -> Result { + async fn access_control_entries_per_fabric( + &self, + _ctx: impl ReadContext, + ) -> Result { Ok(acl::MAX_ACL_ENTRIES_PER_FABRIC as _) } - fn set_acl( + async fn set_acl( &self, ctx: impl WriteContext, value: ArrayAttributeWrite< @@ -193,7 +199,7 @@ impl ClusterHandler for AclHandler { ) } - fn handle_review_fabric_restrictions( + async fn handle_review_fabric_restrictions( &self, _ctx: impl InvokeContext, _request: ReviewFabricRestrictionsRequest<'_>, diff --git a/rs-matter/src/dm/clusters/adm_comm.rs b/rs-matter/src/dm/clusters/adm_comm.rs index e39a8a95e..a5c6f9285 100644 --- a/rs-matter/src/dm/clusters/adm_comm.rs +++ b/rs-matter/src/dm/clusters/adm_comm.rs @@ -72,7 +72,10 @@ impl ClusterHandler for AdminCommHandler { self.dataver.changed(); } - fn window_status(&self, ctx: impl ReadContext) -> Result { + async fn window_status( + &self, + ctx: impl ReadContext, + ) -> Result { let matter = ctx.exchange().matter(); let mut pase_mgr = matter.pase_mgr.borrow_mut(); let comm_window = pase_mgr.comm_window(&ctx)?; @@ -86,7 +89,7 @@ impl ClusterHandler for AdminCommHandler { }) } - fn admin_fabric_index(&self, ctx: impl ReadContext) -> Result, Error> { + async fn admin_fabric_index(&self, ctx: impl ReadContext) -> Result, Error> { let matter = ctx.exchange().matter(); let mut pase_mgr = matter.pase_mgr.borrow_mut(); let comm_window = pase_mgr.comm_window(&ctx)?; @@ -109,7 +112,7 @@ impl ClusterHandler for AdminCommHandler { Ok(Nullable::none()) } - fn admin_vendor_id(&self, ctx: impl ReadContext) -> Result, Error> { + async fn admin_vendor_id(&self, ctx: impl ReadContext) -> Result, Error> { let matter = ctx.exchange().matter(); let mut pase_mgr = matter.pase_mgr.borrow_mut(); let comm_window = pase_mgr.comm_window(&ctx)?; @@ -121,7 +124,7 @@ impl ClusterHandler for AdminCommHandler { )) } - fn handle_open_commissioning_window( + async fn handle_open_commissioning_window( &self, ctx: impl InvokeContext, request: OpenCommissioningWindowRequest<'_>, @@ -140,7 +143,7 @@ impl ClusterHandler for AdminCommHandler { ) } - fn handle_open_basic_commissioning_window( + async fn handle_open_basic_commissioning_window( &self, ctx: impl InvokeContext, request: OpenBasicCommissioningWindowRequest<'_>, @@ -157,7 +160,7 @@ impl ClusterHandler for AdminCommHandler { ) } - fn handle_revoke_commissioning(&self, ctx: impl InvokeContext) -> Result<(), Error> { + async fn handle_revoke_commissioning(&self, ctx: impl InvokeContext) -> Result<(), Error> { ctx.matter().pase_mgr.borrow_mut().close_comm_window(&ctx)?; // TODO: Send status code if no commissioning window is open? diff --git a/rs-matter/src/dm/clusters/basic_info.rs b/rs-matter/src/dm/clusters/basic_info.rs index 8d0dc6d63..27d86df44 100644 --- a/rs-matter/src/dm/clusters/basic_info.rs +++ b/rs-matter/src/dm/clusters/basic_info.rs @@ -420,15 +420,15 @@ impl ClusterHandler for BasicInfoHandler { self.0.changed(); } - fn data_model_revision(&self, ctx: impl ReadContext) -> Result { + async fn data_model_revision(&self, ctx: impl ReadContext) -> Result { Ok(Self::config(ctx.exchange()).data_model_revision) } - fn vendor_id(&self, ctx: impl ReadContext) -> Result { + async fn vendor_id(&self, ctx: impl ReadContext) -> Result { Ok(Self::config(ctx.exchange()).vid) } - fn vendor_name( + async fn vendor_name( &self, ctx: impl ReadContext, out: Utf8StrBuilder

, @@ -436,11 +436,11 @@ impl ClusterHandler for BasicInfoHandler { out.set(Self::config(ctx.exchange()).vendor_name) } - fn product_id(&self, ctx: impl ReadContext) -> Result { + async fn product_id(&self, ctx: impl ReadContext) -> Result { Ok(Self::config(ctx.exchange()).pid) } - fn product_name( + async fn product_name( &self, ctx: impl ReadContext, out: Utf8StrBuilder

, @@ -448,11 +448,11 @@ impl ClusterHandler for BasicInfoHandler { out.set(Self::config(ctx.exchange()).product_name) } - fn hardware_version(&self, ctx: impl ReadContext) -> Result { + async fn hardware_version(&self, ctx: impl ReadContext) -> Result { Ok(Self::config(ctx.exchange()).hw_ver) } - fn hardware_version_string( + async fn hardware_version_string( &self, ctx: impl ReadContext, out: Utf8StrBuilder

, @@ -460,11 +460,11 @@ impl ClusterHandler for BasicInfoHandler { out.set(Self::config(ctx.exchange()).hw_ver_str) } - fn software_version(&self, ctx: impl ReadContext) -> Result { + async fn software_version(&self, ctx: impl ReadContext) -> Result { Ok(Self::config(ctx.exchange()).sw_ver) } - fn software_version_string( + async fn software_version_string( &self, ctx: impl ReadContext, out: Utf8StrBuilder

, @@ -472,7 +472,7 @@ impl ClusterHandler for BasicInfoHandler { out.set(Self::config(ctx.exchange()).sw_ver_str) } - fn node_label( + async fn node_label( &self, ctx: impl ReadContext, out: Utf8StrBuilder

, @@ -480,7 +480,7 @@ impl ClusterHandler for BasicInfoHandler { out.set(Self::settings(ctx.exchange()).borrow().node_label.as_str()) } - fn set_node_label(&self, ctx: impl WriteContext, label: &str) -> Result<(), Error> { + async fn set_node_label(&self, ctx: impl WriteContext, label: &str) -> Result<(), Error> { if label.len() > 32 { return Err(ErrorCode::ConstraintError.into()); } @@ -499,7 +499,7 @@ impl ClusterHandler for BasicInfoHandler { Ok(()) } - fn location( + async fn location( &self, ctx: impl ReadContext, out: Utf8StrBuilder

, @@ -508,7 +508,7 @@ impl ClusterHandler for BasicInfoHandler { out.set(settings.location.as_ref().map_or("XX", |loc| loc.as_str())) } - fn set_location(&self, ctx: impl WriteContext, location: &str) -> Result<(), Error> { + async fn set_location(&self, ctx: impl WriteContext, location: &str) -> Result<(), Error> { if location.len() != 2 { return Err(ErrorCode::ConstraintError.into()); } @@ -522,7 +522,7 @@ impl ClusterHandler for BasicInfoHandler { Ok(()) } - fn capability_minima( + async fn capability_minima( &self, ctx: impl ReadContext, builder: CapabilityMinimaStructBuilder

, @@ -535,23 +535,23 @@ impl ClusterHandler for BasicInfoHandler { .end() } - fn specification_version(&self, ctx: impl ReadContext) -> Result { + async fn specification_version(&self, ctx: impl ReadContext) -> Result { Ok(Self::config(ctx.exchange()).specification_version) } - fn max_paths_per_invoke(&self, ctx: impl ReadContext) -> Result { + async fn max_paths_per_invoke(&self, ctx: impl ReadContext) -> Result { Ok(Self::config(ctx.exchange()).max_paths_per_invoke) } - fn configuration_version(&self, ctx: impl ReadContext) -> Result { + async fn configuration_version(&self, ctx: impl ReadContext) -> Result { Ok(Self::config(ctx.exchange()).configuration_version) } - fn handle_mfg_specific_ping(&self, _ctx: impl InvokeContext) -> Result<(), Error> { + async fn handle_mfg_specific_ping(&self, _ctx: impl InvokeContext) -> Result<(), Error> { Err(ErrorCode::InvalidAction.into()) } - fn manufacturing_date( + async fn manufacturing_date( &self, ctx: impl ReadContext, builder: Utf8StrBuilder

, @@ -559,7 +559,7 @@ impl ClusterHandler for BasicInfoHandler { builder.set(Self::config(ctx.exchange()).manufacturing_date) } - fn part_number( + async fn part_number( &self, ctx: impl ReadContext, builder: Utf8StrBuilder

, @@ -567,7 +567,7 @@ impl ClusterHandler for BasicInfoHandler { builder.set(Self::config(ctx.exchange()).part_number) } - fn product_url( + async fn product_url( &self, ctx: impl ReadContext, builder: Utf8StrBuilder

, @@ -575,7 +575,7 @@ impl ClusterHandler for BasicInfoHandler { builder.set(Self::config(ctx.exchange()).product_url) } - fn product_label( + async fn product_label( &self, ctx: impl ReadContext, builder: Utf8StrBuilder

, @@ -583,7 +583,7 @@ impl ClusterHandler for BasicInfoHandler { builder.set(Self::config(ctx.exchange()).product_label) } - fn serial_number( + async fn serial_number( &self, ctx: impl ReadContext, builder: Utf8StrBuilder

, @@ -591,13 +591,17 @@ impl ClusterHandler for BasicInfoHandler { builder.set(Self::config(ctx.exchange()).serial_no) } - fn local_config_disabled(&self, ctx: impl ReadContext) -> Result { + async fn local_config_disabled(&self, ctx: impl ReadContext) -> Result { Ok(Self::settings(ctx.exchange()) .borrow() .local_config_disabled) } - fn set_local_config_disabled(&self, ctx: impl WriteContext, value: bool) -> Result<(), Error> { + async fn set_local_config_disabled( + &self, + ctx: impl WriteContext, + value: bool, + ) -> Result<(), Error> { let mut settings = Self::settings(ctx.exchange()).borrow_mut(); settings.local_config_disabled = value; @@ -608,7 +612,7 @@ impl ClusterHandler for BasicInfoHandler { Ok(()) } - fn unique_id( + async fn unique_id( &self, ctx: impl ReadContext, builder: Utf8StrBuilder

, @@ -616,7 +620,7 @@ impl ClusterHandler for BasicInfoHandler { builder.set(Self::config(ctx.exchange()).unique_id) } - fn product_appearance( + async fn product_appearance( &self, ctx: impl ReadContext, builder: ProductAppearanceStructBuilder

, diff --git a/rs-matter/src/dm/clusters/desc.rs b/rs-matter/src/dm/clusters/desc.rs index 401ebd9db..0db98ddad 100644 --- a/rs-matter/src/dm/clusters/desc.rs +++ b/rs-matter/src/dm/clusters/desc.rs @@ -139,7 +139,7 @@ impl ClusterHandler for DescHandler<'_> { self.dataver.changed(); } - fn device_type_list( + async fn device_type_list( &self, ctx: impl ReadContext, builder: ArrayAttributeRead, DeviceTypeStructBuilder

>, @@ -172,7 +172,7 @@ impl ClusterHandler for DescHandler<'_> { } } - fn server_list( + async fn server_list( &self, ctx: impl ReadContext, builder: ArrayAttributeRead, ToTLVBuilder>, @@ -198,7 +198,7 @@ impl ClusterHandler for DescHandler<'_> { } } - fn client_list( + async fn client_list( &self, ctx: impl ReadContext, builder: ArrayAttributeRead, ToTLVBuilder>, @@ -213,7 +213,7 @@ impl ClusterHandler for DescHandler<'_> { } } - fn parts_list( + async fn parts_list( &self, ctx: impl ReadContext, builder: ArrayAttributeRead, ToTLVBuilder>, diff --git a/rs-matter/src/dm/clusters/eth_diag.rs b/rs-matter/src/dm/clusters/eth_diag.rs index 222061cef..9522007c1 100644 --- a/rs-matter/src/dm/clusters/eth_diag.rs +++ b/rs-matter/src/dm/clusters/eth_diag.rs @@ -53,7 +53,7 @@ impl ClusterHandler for EthDiagHandler { self.dataver.changed(); } - fn handle_reset_counts(&self, _ctx: impl InvokeContext) -> Result<(), Error> { + async fn handle_reset_counts(&self, _ctx: impl InvokeContext) -> Result<(), Error> { Err(ErrorCode::InvalidAction.into()) } } diff --git a/rs-matter/src/dm/clusters/gen_comm.rs b/rs-matter/src/dm/clusters/gen_comm.rs index de817585d..e7576fff2 100644 --- a/rs-matter/src/dm/clusters/gen_comm.rs +++ b/rs-matter/src/dm/clusters/gen_comm.rs @@ -145,11 +145,11 @@ impl ClusterHandler for GenCommHandler<'_> { self.dataver.changed(); } - fn breadcrumb(&self, ctx: impl ReadContext) -> Result { + async fn breadcrumb(&self, ctx: impl ReadContext) -> Result { Ok(ctx.exchange().matter().failsafe.borrow_mut().breadcrumb()) } - fn set_breadcrumb(&self, ctx: impl WriteContext, value: u64) -> Result<(), Error> { + async fn set_breadcrumb(&self, ctx: impl WriteContext, value: u64) -> Result<(), Error> { ctx.exchange() .matter() .failsafe @@ -158,7 +158,7 @@ impl ClusterHandler for GenCommHandler<'_> { Ok(()) } - fn basic_commissioning_info( + async fn basic_commissioning_info( &self, _ctx: impl ReadContext, builder: BasicCommissioningInfoBuilder

, @@ -169,28 +169,28 @@ impl ClusterHandler for GenCommHandler<'_> { .end() } - fn regulatory_config( + async fn regulatory_config( &self, _ctx: impl ReadContext, ) -> Result { Ok(RegulatoryLocationTypeEnum::IndoorOutdoor) } - fn location_capability( + async fn location_capability( &self, _ctx: impl ReadContext, ) -> Result { Ok(self.commissioning_policy.location_cap()) } - fn supports_concurrent_connection(&self, _ctx: impl ReadContext) -> Result { + async fn supports_concurrent_connection(&self, _ctx: impl ReadContext) -> Result { Ok(self.commissioning_policy.concurrent_connection_supported()) } - fn handle_arm_fail_safe( + async fn handle_arm_fail_safe( &self, ctx: impl InvokeContext, - request: ArmFailSafeRequest, + request: ArmFailSafeRequest<'_>, response: ArmFailSafeResponseBuilder

, ) -> Result { let mut failsafe = ctx.exchange().matter().failsafe.borrow_mut(); @@ -206,10 +206,10 @@ impl ClusterHandler for GenCommHandler<'_> { response.error_code(status)?.debug_text("")?.end() } - fn handle_set_regulatory_config( + async fn handle_set_regulatory_config( &self, ctx: impl InvokeContext, - request: SetRegulatoryConfigRequest, + request: SetRegulatoryConfigRequest<'_>, response: SetRegulatoryConfigResponseBuilder

, ) -> Result { let country_code = request.country_code()?; @@ -235,7 +235,7 @@ impl ClusterHandler for GenCommHandler<'_> { .end() } - fn handle_commissioning_complete( + async fn handle_commissioning_complete( &self, ctx: impl InvokeContext, response: CommissioningCompleteResponseBuilder

, @@ -270,10 +270,10 @@ impl ClusterHandler for GenCommHandler<'_> { response.error_code(status)?.debug_text("")?.end() } - fn handle_set_tc_acknowledgements( + async fn handle_set_tc_acknowledgements( &self, _ctx: impl InvokeContext, - _request: SetTCAcknowledgementsRequest, + _request: SetTCAcknowledgementsRequest<'_>, response: SetTCAcknowledgementsResponseBuilder

, ) -> Result { // TODO diff --git a/rs-matter/src/dm/clusters/gen_diag.rs b/rs-matter/src/dm/clusters/gen_diag.rs index 7f14e1e14..1024d2ec3 100644 --- a/rs-matter/src/dm/clusters/gen_diag.rs +++ b/rs-matter/src/dm/clusters/gen_diag.rs @@ -209,7 +209,7 @@ impl ClusterHandler for GenDiagHandler<'_> { self.dataver.changed(); } - fn network_interfaces( + async fn network_interfaces( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead, NetworkInterfaceBuilder

>, @@ -248,15 +248,15 @@ impl ClusterHandler for GenDiagHandler<'_> { } } - fn reboot_count(&self, _ctx: impl ReadContext) -> Result { + async fn reboot_count(&self, _ctx: impl ReadContext) -> Result { self.diag.reboot_count() } - fn test_event_triggers_enabled(&self, _ctx: impl ReadContext) -> Result { + async fn test_event_triggers_enabled(&self, _ctx: impl ReadContext) -> Result { self.diag.test_event_triggers_enabled() } - fn handle_test_event_trigger( + async fn handle_test_event_trigger( &self, _ctx: impl InvokeContext, request: TestEventTriggerRequest<'_>, @@ -267,7 +267,7 @@ impl ClusterHandler for GenDiagHandler<'_> { self.diag.test_event_trigger(key, trigger) } - fn handle_time_snapshot( + async fn handle_time_snapshot( &self, _ctx: impl InvokeContext, _response: TimeSnapshotResponseBuilder

, @@ -275,7 +275,7 @@ impl ClusterHandler for GenDiagHandler<'_> { Err(ErrorCode::CommandNotFound.into()) } - fn handle_payload_test_request( + async fn handle_payload_test_request( &self, _ctx: impl InvokeContext, _request: PayloadTestRequestRequest<'_>, diff --git a/rs-matter/src/dm/clusters/grp_key_mgmt.rs b/rs-matter/src/dm/clusters/grp_key_mgmt.rs index 27e609289..2a17cfc30 100644 --- a/rs-matter/src/dm/clusters/grp_key_mgmt.rs +++ b/rs-matter/src/dm/clusters/grp_key_mgmt.rs @@ -58,7 +58,7 @@ impl ClusterHandler for GrpKeyMgmtHandler { self.dataver.changed(); } - fn group_key_map( + async fn group_key_map( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead, GroupKeyMapStructBuilder

>, @@ -70,7 +70,7 @@ impl ClusterHandler for GrpKeyMgmtHandler { } } - fn group_table( + async fn group_table( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead< @@ -85,15 +85,15 @@ impl ClusterHandler for GrpKeyMgmtHandler { } } - fn max_groups_per_fabric(&self, _ctx: impl ReadContext) -> Result { + async fn max_groups_per_fabric(&self, _ctx: impl ReadContext) -> Result { Ok(1) } - fn max_group_keys_per_fabric(&self, _ctx: impl ReadContext) -> Result { + async fn max_group_keys_per_fabric(&self, _ctx: impl ReadContext) -> Result { Ok(1) } - fn set_group_key_map( + async fn set_group_key_map( &self, _ctx: impl crate::dm::WriteContext, _value: ArrayAttributeWrite< @@ -104,7 +104,7 @@ impl ClusterHandler for GrpKeyMgmtHandler { Ok(()) } - fn handle_key_set_write( + async fn handle_key_set_write( &self, _ctx: impl InvokeContext, _request: KeySetWriteRequest<'_>, @@ -112,7 +112,7 @@ impl ClusterHandler for GrpKeyMgmtHandler { Ok(()) } - fn handle_key_set_read( + async fn handle_key_set_read( &self, _ctx: impl InvokeContext, _request: KeySetReadRequest<'_>, @@ -121,7 +121,7 @@ impl ClusterHandler for GrpKeyMgmtHandler { Err(ErrorCode::NotFound.into()) } - fn handle_key_set_remove( + async fn handle_key_set_remove( &self, _ctx: impl InvokeContext, _request: KeySetRemoveRequest<'_>, @@ -129,7 +129,7 @@ impl ClusterHandler for GrpKeyMgmtHandler { Ok(()) } - fn handle_key_set_read_all_indices( + async fn handle_key_set_read_all_indices( &self, _ctx: impl InvokeContext, response: KeySetReadAllIndicesResponseBuilder

, diff --git a/rs-matter/src/dm/clusters/level_control.rs b/rs-matter/src/dm/clusters/level_control.rs index 1fc11bfca..8dc958217 100644 --- a/rs-matter/src/dm/clusters/level_control.rs +++ b/rs-matter/src/dm/clusters/level_control.rs @@ -358,8 +358,8 @@ impl<'a, H: LevelControlHooks, OH: OnOffHooks> LevelControlHandler<'a, H, OH> { } /// Adapt the handler instance to the generic `rs-matter` `Handler` trait - pub const fn adapt(self) -> HandlerAsyncAdaptor { - HandlerAsyncAdaptor(self) + pub const fn adapt(self) -> HandlerAdaptor { + HandlerAdaptor(self) } // Helper accessors for `Nullable` attributes. @@ -1210,7 +1210,7 @@ impl<'a, H: LevelControlHooks, OH: OnOffHooks> LevelControlHandler<'a, H, OH> { } } -impl ClusterAsyncHandler for LevelControlHandler<'_, H, OH> { +impl ClusterHandler for LevelControlHandler<'_, H, OH> { const CLUSTER: Cluster<'static> = H::CLUSTER; // Runs an async task manager for the cluster handler. diff --git a/rs-matter/src/dm/clusters/net_comm.rs b/rs-matter/src/dm/clusters/net_comm.rs index 06da60ef5..50cce973e 100644 --- a/rs-matter/src/dm/clusters/net_comm.rs +++ b/rs-matter/src/dm/clusters/net_comm.rs @@ -673,12 +673,12 @@ impl<'a, T> NetCommHandler<'a, T> { } /// Adapt the handler instance to the generic `rs-matter` `AsyncHandler` trait - pub const fn adapt(self) -> HandlerAsyncAdaptor { - HandlerAsyncAdaptor(self) + pub const fn adapt(self) -> HandlerAdaptor { + HandlerAdaptor(self) } } -impl ClusterAsyncHandler for NetCommHandler<'_, T> +impl ClusterHandler for NetCommHandler<'_, T> where T: NetCtl + NetCtlStatus, { diff --git a/rs-matter/src/dm/clusters/noc.rs b/rs-matter/src/dm/clusters/noc.rs index b3ede503a..a509c6ada 100644 --- a/rs-matter/src/dm/clusters/noc.rs +++ b/rs-matter/src/dm/clusters/noc.rs @@ -110,7 +110,7 @@ impl ClusterHandler for NocHandler { self.dataver.changed(); } - fn nocs( + async fn nocs( &self, ctx: impl ReadContext, builder: ArrayAttributeRead, NOCStructBuilder

>, @@ -165,7 +165,7 @@ impl ClusterHandler for NocHandler { } } - fn fabrics( + async fn fabrics( &self, ctx: impl ReadContext, builder: ArrayAttributeRead< @@ -219,15 +219,15 @@ impl ClusterHandler for NocHandler { } } - fn supported_fabrics(&self, _ctx: impl ReadContext) -> Result { + async fn supported_fabrics(&self, _ctx: impl ReadContext) -> Result { Ok(MAX_FABRICS as u8) } - fn commissioned_fabrics(&self, ctx: impl ReadContext) -> Result { + async fn commissioned_fabrics(&self, ctx: impl ReadContext) -> Result { Ok(ctx.exchange().matter().fabric_mgr.borrow().iter().count() as _) } - fn trusted_root_certificates( + async fn trusted_root_certificates( &self, ctx: impl ReadContext, builder: ArrayAttributeRead, OctetsBuilder

>, @@ -260,12 +260,12 @@ impl ClusterHandler for NocHandler { } } - fn current_fabric_index(&self, ctx: impl ReadContext) -> Result { + async fn current_fabric_index(&self, ctx: impl ReadContext) -> Result { let attr = ctx.attr(); Ok(attr.fab_idx) } - fn handle_attestation_request( + async fn handle_attestation_request( &self, ctx: impl InvokeContext, request: AttestationRequestRequest<'_>, @@ -322,7 +322,7 @@ impl ClusterHandler for NocHandler { }) } - fn handle_certificate_chain_request( + async fn handle_certificate_chain_request( &self, ctx: impl InvokeContext, request: CertificateChainRequestRequest<'_>, @@ -354,7 +354,7 @@ impl ClusterHandler for NocHandler { Ok(parent) } - fn handle_csr_request( + async fn handle_csr_request( &self, ctx: impl InvokeContext, request: CSRRequestRequest<'_>, @@ -413,7 +413,7 @@ impl ClusterHandler for NocHandler { }) } - fn handle_add_noc( + async fn handle_add_noc( &self, ctx: impl InvokeContext, request: AddNOCRequest<'_>, @@ -477,7 +477,7 @@ impl ClusterHandler for NocHandler { .end() } - fn handle_update_noc( + async fn handle_update_noc( &self, ctx: impl InvokeContext, request: UpdateNOCRequest<'_>, @@ -513,7 +513,7 @@ impl ClusterHandler for NocHandler { .end() } - fn handle_update_fabric_label( + async fn handle_update_fabric_label( &self, ctx: impl InvokeContext, request: UpdateFabricLabelRequest<'_>, @@ -551,7 +551,7 @@ impl ClusterHandler for NocHandler { .end() } - fn handle_remove_fabric( + async fn handle_remove_fabric( &self, ctx: impl InvokeContext, request: RemoveFabricRequest<'_>, @@ -615,7 +615,7 @@ impl ClusterHandler for NocHandler { .end() } - fn handle_add_trusted_root_certificate( + async fn handle_add_trusted_root_certificate( &self, ctx: impl InvokeContext, request: AddTrustedRootCertificateRequest<'_>, @@ -631,7 +631,7 @@ impl ClusterHandler for NocHandler { }) } - fn handle_set_vid_verification_statement( + async fn handle_set_vid_verification_statement( &self, _ctx: impl InvokeContext, _request: SetVIDVerificationStatementRequest<'_>, @@ -639,7 +639,7 @@ impl ClusterHandler for NocHandler { Ok(()) // TODO } - fn handle_sign_vid_verification_request( + async fn handle_sign_vid_verification_request( &self, _ctx: impl InvokeContext, _request: SignVIDVerificationRequestRequest<'_>, diff --git a/rs-matter/src/dm/clusters/on_off.rs b/rs-matter/src/dm/clusters/on_off.rs index f0b1ceb17..0e4cefc81 100644 --- a/rs-matter/src/dm/clusters/on_off.rs +++ b/rs-matter/src/dm/clusters/on_off.rs @@ -264,8 +264,8 @@ impl<'a, H: OnOffHooks, LH: LevelControlHooks> OnOffHandler<'a, H, LH> { } /// Adapt the handler instance to the generic `rs-matter` `Handler` trait - pub const fn adapt(self) -> HandlerAsyncAdaptor { - HandlerAsyncAdaptor(self) + pub const fn adapt(self) -> HandlerAdaptor { + HandlerAdaptor(self) } /// Request an out-of-band change to the OnOff state. @@ -637,7 +637,7 @@ impl<'a, H: OnOffHooks, LH: LevelControlHooks> OnOffHandler<'a, H, LH> { } } -impl ClusterAsyncHandler for OnOffHandler<'_, H, LH> { +impl ClusterHandler for OnOffHandler<'_, H, LH> { #[doc = "The cluster-metadata corresponding to this handler trait."] const CLUSTER: Cluster<'static> = H::CLUSTER; diff --git a/rs-matter/src/dm/clusters/thread_diag.rs b/rs-matter/src/dm/clusters/thread_diag.rs index 07573a1c9..eead5fbe5 100644 --- a/rs-matter/src/dm/clusters/thread_diag.rs +++ b/rs-matter/src/dm/clusters/thread_diag.rs @@ -403,15 +403,18 @@ impl ClusterHandler for ThreadDiagHandler<'_> { self.dataver.changed(); } - fn channel(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn channel(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(Nullable::new(self.diag.channel()?)) } - fn routing_role(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn routing_role( + &self, + _ctx: impl ReadContext, + ) -> Result, Error> { Ok(Nullable::new(self.diag.routing_role()?)) } - fn network_name( + async fn network_name( &self, _ctx: impl ReadContext, builder: NullableBuilder>, @@ -432,15 +435,15 @@ impl ClusterHandler for ThreadDiagHandler<'_> { Ok(unwrap!(parent)) } - fn pan_id(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn pan_id(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(Nullable::new(self.diag.pan_id()?)) } - fn extended_pan_id(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn extended_pan_id(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(Nullable::new(self.diag.extended_pan_id()?)) } - fn mesh_local_prefix( + async fn mesh_local_prefix( &self, _ctx: impl ReadContext, builder: NullableBuilder>, @@ -465,7 +468,7 @@ impl ClusterHandler for ThreadDiagHandler<'_> { Ok(unwrap!(parent)) } - fn neighbor_table( + async fn neighbor_table( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead< @@ -510,7 +513,7 @@ impl ClusterHandler for ThreadDiagHandler<'_> { } } - fn route_table( + async fn route_table( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead, RouteTableStructBuilder

>, @@ -552,27 +555,27 @@ impl ClusterHandler for ThreadDiagHandler<'_> { } } - fn partition_id(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn partition_id(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(Nullable::new(self.diag.partition_id()?)) } - fn weighting(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn weighting(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(Nullable::new(self.diag.weighting()?)) } - fn data_version(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn data_version(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(Nullable::new(self.diag.data_version()?)) } - fn stable_data_version(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn stable_data_version(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(Nullable::new(self.diag.stable_data_version()?)) } - fn leader_router_id(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn leader_router_id(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(Nullable::new(self.diag.leader_router_id()?)) } - fn security_policy( + async fn security_policy( &self, _ctx: impl ReadContext, builder: NullableBuilder>, @@ -589,7 +592,7 @@ impl ClusterHandler for ThreadDiagHandler<'_> { } } - fn channel_page_0_mask( + async fn channel_page_0_mask( &self, _ctx: impl ReadContext, builder: NullableBuilder>, @@ -610,7 +613,7 @@ impl ClusterHandler for ThreadDiagHandler<'_> { Ok(unwrap!(parent.take())) } - fn operational_dataset_components( + async fn operational_dataset_components( &self, _ctx: impl ReadContext, builder: NullableBuilder>, @@ -631,7 +634,7 @@ impl ClusterHandler for ThreadDiagHandler<'_> { Ok(unwrap!(parent)) } - fn active_network_faults_list( + async fn active_network_faults_list( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead< @@ -675,15 +678,15 @@ impl ClusterHandler for ThreadDiagHandler<'_> { ArrayAttributeRead::ReadNone(builder) => builder.end(), } } - fn ext_address(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn ext_address(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(Nullable::new(self.diag.ext_address()?)) } - fn rloc_16(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn rloc_16(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(Nullable::new(self.diag.rloc_16()?)) } - fn handle_reset_counts(&self, _ctx: impl InvokeContext) -> Result<(), Error> { + async fn handle_reset_counts(&self, _ctx: impl InvokeContext) -> Result<(), Error> { Err(ErrorCode::InvalidAction.into()) } } diff --git a/rs-matter/src/dm/clusters/unit_testing.rs b/rs-matter/src/dm/clusters/unit_testing.rs index 16817e109..b4088f7d8 100644 --- a/rs-matter/src/dm/clusters/unit_testing.rs +++ b/rs-matter/src/dm/clusters/unit_testing.rs @@ -529,107 +529,107 @@ impl ClusterHandler for UnitTestingHandler<'_> { self.dataver.changed(); } - fn boolean(&self, _ctx: impl ReadContext) -> Result { + async fn boolean(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().boolean) } - fn bitmap_8(&self, _ctx: impl ReadContext) -> Result { + async fn bitmap_8(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().bitmap_8) } - fn bitmap_16(&self, _ctx: impl ReadContext) -> Result { + async fn bitmap_16(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().bitmap_16) } - fn bitmap_32(&self, _ctx: impl ReadContext) -> Result { + async fn bitmap_32(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().bitmap_32) } - fn bitmap_64(&self, _ctx: impl ReadContext) -> Result { + async fn bitmap_64(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().bitmap_64) } - fn int_8_u(&self, _ctx: impl ReadContext) -> Result { + async fn int_8_u(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_8_u) } - fn int_16_u(&self, _ctx: impl ReadContext) -> Result { + async fn int_16_u(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_16_u) } - fn int_24_u(&self, _ctx: impl ReadContext) -> Result { + async fn int_24_u(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_24_u) } - fn int_32_u(&self, _ctx: impl ReadContext) -> Result { + async fn int_32_u(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_32_u) } - fn int_40_u(&self, _ctx: impl ReadContext) -> Result { + async fn int_40_u(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_40_u) } - fn int_48_u(&self, _ctx: impl ReadContext) -> Result { + async fn int_48_u(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_48_u) } - fn int_56_u(&self, _ctx: impl ReadContext) -> Result { + async fn int_56_u(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_56_u) } - fn int_64_u(&self, _ctx: impl ReadContext) -> Result { + async fn int_64_u(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_64_u) } - fn int_8_s(&self, _ctx: impl ReadContext) -> Result { + async fn int_8_s(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_8_s) } - fn int_16_s(&self, _ctx: impl ReadContext) -> Result { + async fn int_16_s(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_16_s) } - fn int_24_s(&self, _ctx: impl ReadContext) -> Result { + async fn int_24_s(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_24_s) } - fn int_32_s(&self, _ctx: impl ReadContext) -> Result { + async fn int_32_s(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_32_s) } - fn int_40_s(&self, _ctx: impl ReadContext) -> Result { + async fn int_40_s(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_40_s) } - fn int_48_s(&self, _ctx: impl ReadContext) -> Result { + async fn int_48_s(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_48_s) } - fn int_56_s(&self, _ctx: impl ReadContext) -> Result { + async fn int_56_s(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_56_s) } - fn int_64_s(&self, _ctx: impl ReadContext) -> Result { + async fn int_64_s(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_64_s) } - fn enum_8(&self, _ctx: impl ReadContext) -> Result { + async fn enum_8(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().enum_8) } - fn enum_16(&self, _ctx: impl ReadContext) -> Result { + async fn enum_16(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().enum_16) } - fn float_single(&self, _ctx: impl ReadContext) -> Result { + async fn float_single(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().float_single) } - fn float_double(&self, _ctx: impl ReadContext) -> Result { + async fn float_double(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().float_double) } - fn octet_string( + async fn octet_string( &self, _ctx: impl ReadContext, builder: OctetsBuilder

, @@ -637,7 +637,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { builder.set(Octets(self.data.borrow().octet_string.as_slice())) } - fn list_int_8_u( + async fn list_int_8_u( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead, ToTLVBuilder>, @@ -664,7 +664,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - fn list_octet_string( + async fn list_octet_string( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead, OctetsBuilder

>, @@ -691,7 +691,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - fn list_struct_octet_string( + async fn list_struct_octet_string( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead< @@ -730,7 +730,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - fn long_octet_string( + async fn long_octet_string( &self, _ctx: impl ReadContext, builder: OctetsBuilder

, @@ -738,7 +738,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { builder.set(Octets(self.data.borrow().long_octet_string.as_slice())) } - fn char_string( + async fn char_string( &self, _ctx: impl ReadContext, builder: Utf8StrBuilder

, @@ -746,7 +746,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { builder.set(self.data.borrow().char_string.as_str()) } - fn long_char_string( + async fn long_char_string( &self, _ctx: impl ReadContext, builder: Utf8StrBuilder

, @@ -754,19 +754,19 @@ impl ClusterHandler for UnitTestingHandler<'_> { builder.set(self.data.borrow().long_char_string.as_str()) } - fn epoch_us(&self, _ctx: impl ReadContext) -> Result { + async fn epoch_us(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().epoch_us) } - fn epoch_s(&self, _ctx: impl ReadContext) -> Result { + async fn epoch_s(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().epoch_s) } - fn vendor_id(&self, _ctx: impl ReadContext) -> Result { + async fn vendor_id(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().vendor_id) } - fn list_nullables_and_optionals_struct( + async fn list_nullables_and_optionals_struct( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead< @@ -884,11 +884,11 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - fn enum_attr(&self, _ctx: impl ReadContext) -> Result { + async fn enum_attr(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().enum_attr) } - fn struct_attr( + async fn struct_attr( &self, _ctx: impl ReadContext, builder: SimpleStructBuilder

, @@ -909,23 +909,23 @@ impl ClusterHandler for UnitTestingHandler<'_> { .end() } - fn range_restricted_int_8_u(&self, _ctx: impl ReadContext) -> Result { + async fn range_restricted_int_8_u(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().range_restricted_int_8_u) } - fn range_restricted_int_8_s(&self, _ctx: impl ReadContext) -> Result { + async fn range_restricted_int_8_s(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().range_restricted_int_8_s) } - fn range_restricted_int_16_u(&self, _ctx: impl ReadContext) -> Result { + async fn range_restricted_int_16_u(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().range_restricted_int_16_u) } - fn range_restricted_int_16_s(&self, _ctx: impl ReadContext) -> Result { + async fn range_restricted_int_16_s(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().range_restricted_int_16_s) } - fn list_long_octet_string( + async fn list_long_octet_string( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead, OctetsBuilder

>, @@ -954,7 +954,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - fn list_fabric_scoped( + async fn list_fabric_scoped( &self, ctx: impl ReadContext, builder: ArrayAttributeRead, TestFabricScopedBuilder

>, @@ -1035,128 +1035,131 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - fn timed_write_boolean(&self, _ctx: impl ReadContext) -> Result { + async fn timed_write_boolean(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().timed_write_boolean) } - fn general_error_boolean(&self, _ctx: impl ReadContext) -> Result { + async fn general_error_boolean(&self, _ctx: impl ReadContext) -> Result { Err(ErrorCode::InvalidDataType.into()) } - fn cluster_error_boolean(&self, _ctx: impl ReadContext) -> Result { + async fn cluster_error_boolean(&self, _ctx: impl ReadContext) -> Result { Err(ErrorCode::Invalid.into()) } - fn nullable_boolean(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_boolean(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_boolean.clone()) } - fn nullable_bitmap_8(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_bitmap_8( + &self, + _ctx: impl ReadContext, + ) -> Result, Error> { Ok(self.data.borrow().nullable_bitmap_8.clone()) } - fn nullable_bitmap_16( + async fn nullable_bitmap_16( &self, _ctx: impl ReadContext, ) -> Result, Error> { Ok(self.data.borrow().nullable_bitmap_16.clone()) } - fn nullable_bitmap_32( + async fn nullable_bitmap_32( &self, _ctx: impl ReadContext, ) -> Result, Error> { Ok(self.data.borrow().nullable_bitmap_32.clone()) } - fn nullable_bitmap_64( + async fn nullable_bitmap_64( &self, _ctx: impl ReadContext, ) -> Result, Error> { Ok(self.data.borrow().nullable_bitmap_64.clone()) } - fn nullable_int_8_u(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_int_8_u(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_8_u.clone()) } - fn nullable_int_16_u(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_int_16_u(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_16_u.clone()) } - fn nullable_int_24_u(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_int_24_u(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_24_u.clone()) } - fn nullable_int_32_u(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_int_32_u(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_32_u.clone()) } - fn nullable_int_40_u(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_int_40_u(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_40_u.clone()) } - fn nullable_int_48_u(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_int_48_u(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_48_u.clone()) } - fn nullable_int_56_u(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_int_56_u(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_56_u.clone()) } - fn nullable_int_64_u(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_int_64_u(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_64_u.clone()) } - fn nullable_int_8_s(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_int_8_s(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_8_s.clone()) } - fn nullable_int_16_s(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_int_16_s(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_16_s.clone()) } - fn nullable_int_24_s(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_int_24_s(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_24_s.clone()) } - fn nullable_int_32_s(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_int_32_s(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_32_s.clone()) } - fn nullable_int_40_s(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_int_40_s(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_40_s.clone()) } - fn nullable_int_48_s(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_int_48_s(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_48_s.clone()) } - fn nullable_int_56_s(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_int_56_s(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_56_s.clone()) } - fn nullable_int_64_s(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_int_64_s(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_64_s.clone()) } - fn nullable_enum_8(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_enum_8(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_enum_8.clone()) } - fn nullable_enum_16(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_enum_16(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_enum_16.clone()) } - fn nullable_float_single(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_float_single(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_float_single.clone()) } - fn nullable_float_double(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_float_double(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_float_double.clone()) } - fn nullable_octet_string( + async fn nullable_octet_string( &self, _ctx: impl ReadContext, builder: NullableBuilder>, @@ -1168,7 +1171,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - fn nullable_char_string( + async fn nullable_char_string( &self, _ctx: impl ReadContext, builder: NullableBuilder>, @@ -1180,11 +1183,14 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - fn nullable_enum_attr(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn nullable_enum_attr( + &self, + _ctx: impl ReadContext, + ) -> Result, Error> { Ok(self.data.borrow().nullable_enum_attr.clone()) } - fn nullable_struct( + async fn nullable_struct( &self, _ctx: impl ReadContext, builder: NullableBuilder>, @@ -1208,21 +1214,21 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - fn nullable_range_restricted_int_8_u( + async fn nullable_range_restricted_int_8_u( &self, _ctx: impl ReadContext, ) -> Result, Error> { Ok(self.data.borrow().nullable_range_restricted_int_8_u.clone()) } - fn nullable_range_restricted_int_8_s( + async fn nullable_range_restricted_int_8_s( &self, _ctx: impl ReadContext, ) -> Result, Error> { Ok(self.data.borrow().nullable_range_restricted_int_8_s.clone()) } - fn nullable_range_restricted_int_16_u( + async fn nullable_range_restricted_int_16_u( &self, _ctx: impl ReadContext, ) -> Result, Error> { @@ -1233,7 +1239,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { .clone()) } - fn nullable_range_restricted_int_16_s( + async fn nullable_range_restricted_int_16_s( &self, _ctx: impl ReadContext, ) -> Result, Error> { @@ -1244,11 +1250,11 @@ impl ClusterHandler for UnitTestingHandler<'_> { .clone()) } - fn global_enum(&self, _ctx: impl ReadContext) -> Result { + async fn global_enum(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().global_enum) } - fn global_struct( + async fn global_struct( &self, _ctx: impl ReadContext, builder: TestGlobalStructBuilder

, @@ -1261,14 +1267,14 @@ impl ClusterHandler for UnitTestingHandler<'_> { .end() } - fn nullable_global_enum( + async fn nullable_global_enum( &self, _ctx: impl ReadContext, ) -> Result, Error> { Ok(Nullable::some(self.data.borrow().global_enum)) } - fn nullable_global_struct( + async fn nullable_global_struct( &self, _ctx: impl ReadContext, builder: NullableBuilder>, @@ -1286,138 +1292,158 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - fn set_boolean(&self, _ctx: impl WriteContext, value: bool) -> Result<(), Error> { + async fn set_boolean(&self, _ctx: impl WriteContext, value: bool) -> Result<(), Error> { self.data.borrow_mut().boolean = value; Ok(()) } - fn set_bitmap_8(&self, _ctx: impl WriteContext, value: Bitmap8MaskMap) -> Result<(), Error> { + async fn set_bitmap_8( + &self, + _ctx: impl WriteContext, + value: Bitmap8MaskMap, + ) -> Result<(), Error> { self.data.borrow_mut().bitmap_8 = value; Ok(()) } - fn set_bitmap_16(&self, _ctx: impl WriteContext, value: Bitmap16MaskMap) -> Result<(), Error> { + async fn set_bitmap_16( + &self, + _ctx: impl WriteContext, + value: Bitmap16MaskMap, + ) -> Result<(), Error> { self.data.borrow_mut().bitmap_16 = value; Ok(()) } - fn set_bitmap_32(&self, _ctx: impl WriteContext, value: Bitmap32MaskMap) -> Result<(), Error> { + async fn set_bitmap_32( + &self, + _ctx: impl WriteContext, + value: Bitmap32MaskMap, + ) -> Result<(), Error> { self.data.borrow_mut().bitmap_32 = value; Ok(()) } - fn set_bitmap_64(&self, _ctx: impl WriteContext, value: Bitmap64MaskMap) -> Result<(), Error> { + async fn set_bitmap_64( + &self, + _ctx: impl WriteContext, + value: Bitmap64MaskMap, + ) -> Result<(), Error> { self.data.borrow_mut().bitmap_64 = value; Ok(()) } - fn set_int_8_u(&self, _ctx: impl WriteContext, value: u8) -> Result<(), Error> { + async fn set_int_8_u(&self, _ctx: impl WriteContext, value: u8) -> Result<(), Error> { self.data.borrow_mut().int_8_u = value; Ok(()) } - fn set_int_16_u(&self, _ctx: impl WriteContext, value: u16) -> Result<(), Error> { + async fn set_int_16_u(&self, _ctx: impl WriteContext, value: u16) -> Result<(), Error> { self.data.borrow_mut().int_16_u = value; Ok(()) } - fn set_int_24_u(&self, _ctx: impl WriteContext, value: u32) -> Result<(), Error> { + async fn set_int_24_u(&self, _ctx: impl WriteContext, value: u32) -> Result<(), Error> { self.data.borrow_mut().int_24_u = value; Ok(()) } - fn set_int_32_u(&self, _ctx: impl WriteContext, value: u32) -> Result<(), Error> { + async fn set_int_32_u(&self, _ctx: impl WriteContext, value: u32) -> Result<(), Error> { self.data.borrow_mut().int_32_u = value; Ok(()) } - fn set_int_40_u(&self, _ctx: impl WriteContext, value: u64) -> Result<(), Error> { + async fn set_int_40_u(&self, _ctx: impl WriteContext, value: u64) -> Result<(), Error> { self.data.borrow_mut().int_40_u = value; Ok(()) } - fn set_int_48_u(&self, _ctx: impl WriteContext, value: u64) -> Result<(), Error> { + async fn set_int_48_u(&self, _ctx: impl WriteContext, value: u64) -> Result<(), Error> { self.data.borrow_mut().int_48_u = value; Ok(()) } - fn set_int_56_u(&self, _ctx: impl WriteContext, value: u64) -> Result<(), Error> { + async fn set_int_56_u(&self, _ctx: impl WriteContext, value: u64) -> Result<(), Error> { self.data.borrow_mut().int_56_u = value; Ok(()) } - fn set_int_64_u(&self, _ctx: impl WriteContext, value: u64) -> Result<(), Error> { + async fn set_int_64_u(&self, _ctx: impl WriteContext, value: u64) -> Result<(), Error> { self.data.borrow_mut().int_64_u = value; Ok(()) } - fn set_int_8_s(&self, _ctx: impl WriteContext, value: i8) -> Result<(), Error> { + async fn set_int_8_s(&self, _ctx: impl WriteContext, value: i8) -> Result<(), Error> { self.data.borrow_mut().int_8_s = value; Ok(()) } - fn set_int_16_s(&self, _ctx: impl WriteContext, value: i16) -> Result<(), Error> { + async fn set_int_16_s(&self, _ctx: impl WriteContext, value: i16) -> Result<(), Error> { self.data.borrow_mut().int_16_s = value; Ok(()) } - fn set_int_24_s(&self, _ctx: impl WriteContext, value: i32) -> Result<(), Error> { + async fn set_int_24_s(&self, _ctx: impl WriteContext, value: i32) -> Result<(), Error> { self.data.borrow_mut().int_24_s = value; Ok(()) } - fn set_int_32_s(&self, _ctx: impl WriteContext, value: i32) -> Result<(), Error> { + async fn set_int_32_s(&self, _ctx: impl WriteContext, value: i32) -> Result<(), Error> { self.data.borrow_mut().int_32_s = value; Ok(()) } - fn set_int_40_s(&self, _ctx: impl WriteContext, value: i64) -> Result<(), Error> { + async fn set_int_40_s(&self, _ctx: impl WriteContext, value: i64) -> Result<(), Error> { self.data.borrow_mut().int_40_s = value; Ok(()) } - fn set_int_48_s(&self, _ctx: impl WriteContext, value: i64) -> Result<(), Error> { + async fn set_int_48_s(&self, _ctx: impl WriteContext, value: i64) -> Result<(), Error> { self.data.borrow_mut().int_48_s = value; Ok(()) } - fn set_int_56_s(&self, _ctx: impl WriteContext, value: i64) -> Result<(), Error> { + async fn set_int_56_s(&self, _ctx: impl WriteContext, value: i64) -> Result<(), Error> { self.data.borrow_mut().int_56_s = value; Ok(()) } - fn set_int_64_s(&self, _ctx: impl WriteContext, value: i64) -> Result<(), Error> { + async fn set_int_64_s(&self, _ctx: impl WriteContext, value: i64) -> Result<(), Error> { self.data.borrow_mut().int_64_s = value; Ok(()) } - fn set_enum_8(&self, _ctx: impl WriteContext, value: u8) -> Result<(), Error> { + async fn set_enum_8(&self, _ctx: impl WriteContext, value: u8) -> Result<(), Error> { self.data.borrow_mut().enum_8 = value; Ok(()) } - fn set_enum_16(&self, _ctx: impl WriteContext, value: u16) -> Result<(), Error> { + async fn set_enum_16(&self, _ctx: impl WriteContext, value: u16) -> Result<(), Error> { self.data.borrow_mut().enum_16 = value; Ok(()) } - fn set_float_single(&self, _ctx: impl WriteContext, value: f32) -> Result<(), Error> { + async fn set_float_single(&self, _ctx: impl WriteContext, value: f32) -> Result<(), Error> { self.data.borrow_mut().float_single = value; Ok(()) } - fn set_float_double(&self, _ctx: impl WriteContext, value: f64) -> Result<(), Error> { + async fn set_float_double(&self, _ctx: impl WriteContext, value: f64) -> Result<(), Error> { self.data.borrow_mut().float_double = value; Ok(()) } - fn set_octet_string(&self, _ctx: impl WriteContext, value: OctetStr<'_>) -> Result<(), Error> { + async fn set_octet_string( + &self, + _ctx: impl WriteContext, + value: OctetStr<'_>, + ) -> Result<(), Error> { self.data.borrow_mut().octet_string = value.0.try_into().map_err(|_| ErrorCode::ConstraintError)?; Ok(()) } - fn set_list_int_8_u( + async fn set_list_int_8_u( &self, _ctx: impl WriteContext, value: ArrayAttributeWrite, u8>, @@ -1466,7 +1492,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - fn set_list_octet_string( + async fn set_list_octet_string( &self, _ctx: impl WriteContext, value: ArrayAttributeWrite>, OctetStr<'_>>, @@ -1520,7 +1546,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - fn set_list_struct_octet_string( + async fn set_list_struct_octet_string( &self, _ctx: impl WriteContext, value: ArrayAttributeWrite>, TestListStructOctet<'_>>, @@ -1596,7 +1622,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - fn set_long_octet_string( + async fn set_long_octet_string( &self, _ctx: impl WriteContext, value: OctetStr<'_>, @@ -1606,13 +1632,17 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_char_string(&self, _ctx: impl WriteContext, value: Utf8Str<'_>) -> Result<(), Error> { + async fn set_char_string( + &self, + _ctx: impl WriteContext, + value: Utf8Str<'_>, + ) -> Result<(), Error> { self.data.borrow_mut().char_string = value.try_into().map_err(|_| ErrorCode::ConstraintError)?; Ok(()) } - fn set_long_char_string( + async fn set_long_char_string( &self, _ctx: impl WriteContext, value: Utf8Str<'_>, @@ -1622,22 +1652,22 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_epoch_us(&self, _ctx: impl WriteContext, value: u64) -> Result<(), Error> { + async fn set_epoch_us(&self, _ctx: impl WriteContext, value: u64) -> Result<(), Error> { self.data.borrow_mut().epoch_us = value; Ok(()) } - fn set_epoch_s(&self, _ctx: impl WriteContext, value: u32) -> Result<(), Error> { + async fn set_epoch_s(&self, _ctx: impl WriteContext, value: u32) -> Result<(), Error> { self.data.borrow_mut().epoch_s = value; Ok(()) } - fn set_vendor_id(&self, _ctx: impl WriteContext, value: u16) -> Result<(), Error> { + async fn set_vendor_id(&self, _ctx: impl WriteContext, value: u16) -> Result<(), Error> { self.data.borrow_mut().vendor_id = value; Ok(()) } - fn set_list_nullables_and_optionals_struct( + async fn set_list_nullables_and_optionals_struct( &self, _ctx: impl WriteContext, value: ArrayAttributeWrite< @@ -1704,12 +1734,12 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - fn set_enum_attr(&self, _ctx: impl WriteContext, value: SimpleEnum) -> Result<(), Error> { + async fn set_enum_attr(&self, _ctx: impl WriteContext, value: SimpleEnum) -> Result<(), Error> { self.data.borrow_mut().enum_attr = value; Ok(()) } - fn set_struct_attr( + async fn set_struct_attr( &self, _ctx: impl WriteContext, value: SimpleStruct<'_>, @@ -1736,7 +1766,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_range_restricted_int_8_u( + async fn set_range_restricted_int_8_u( &self, _ctx: impl WriteContext, value: u8, @@ -1752,7 +1782,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_range_restricted_int_8_s( + async fn set_range_restricted_int_8_s( &self, _ctx: impl WriteContext, value: i8, @@ -1768,7 +1798,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_range_restricted_int_16_u( + async fn set_range_restricted_int_16_u( &self, _ctx: impl WriteContext, value: u16, @@ -1784,7 +1814,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_range_restricted_int_16_s( + async fn set_range_restricted_int_16_s( &self, _ctx: impl WriteContext, value: i16, @@ -1800,7 +1830,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_list_long_octet_string( + async fn set_list_long_octet_string( &self, _ctx: impl WriteContext, value: ArrayAttributeWrite>, OctetStr<'_>>, @@ -1854,7 +1884,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - fn set_list_fabric_scoped( + async fn set_list_fabric_scoped( &self, ctx: impl WriteContext, value: ArrayAttributeWrite>, TestFabricScoped<'_>>, @@ -1918,12 +1948,16 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_timed_write_boolean(&self, _ctx: impl WriteContext, value: bool) -> Result<(), Error> { + async fn set_timed_write_boolean( + &self, + _ctx: impl WriteContext, + value: bool, + ) -> Result<(), Error> { self.data.borrow_mut().timed_write_boolean = value; Ok(()) } - fn set_general_error_boolean( + async fn set_general_error_boolean( &self, _ctx: impl WriteContext, _value: bool, @@ -1931,7 +1965,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Err(ErrorCode::InvalidDataType.into()) } - fn set_cluster_error_boolean( + async fn set_cluster_error_boolean( &self, _ctx: impl WriteContext, _value: bool, @@ -1939,7 +1973,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Err(ErrorCode::Invalid.into()) } - fn set_nullable_boolean( + async fn set_nullable_boolean( &self, _ctx: impl WriteContext, value: Nullable, @@ -1948,7 +1982,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_bitmap_8( + async fn set_nullable_bitmap_8( &self, _ctx: impl WriteContext, value: Nullable, @@ -1957,7 +1991,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_bitmap_16( + async fn set_nullable_bitmap_16( &self, _ctx: impl WriteContext, value: Nullable, @@ -1966,7 +2000,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_bitmap_32( + async fn set_nullable_bitmap_32( &self, _ctx: impl WriteContext, value: Nullable, @@ -1975,7 +2009,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_bitmap_64( + async fn set_nullable_bitmap_64( &self, _ctx: impl WriteContext, value: Nullable, @@ -1984,7 +2018,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_int_8_u( + async fn set_nullable_int_8_u( &self, _ctx: impl WriteContext, value: Nullable, @@ -1993,7 +2027,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_int_16_u( + async fn set_nullable_int_16_u( &self, _ctx: impl WriteContext, value: Nullable, @@ -2002,7 +2036,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_int_24_u( + async fn set_nullable_int_24_u( &self, _ctx: impl WriteContext, value: Nullable, @@ -2011,7 +2045,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_int_32_u( + async fn set_nullable_int_32_u( &self, _ctx: impl WriteContext, value: Nullable, @@ -2020,7 +2054,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_int_40_u( + async fn set_nullable_int_40_u( &self, _ctx: impl WriteContext, value: Nullable, @@ -2029,7 +2063,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_int_48_u( + async fn set_nullable_int_48_u( &self, _ctx: impl WriteContext, value: Nullable, @@ -2038,7 +2072,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_int_56_u( + async fn set_nullable_int_56_u( &self, _ctx: impl WriteContext, value: Nullable, @@ -2047,7 +2081,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_int_64_u( + async fn set_nullable_int_64_u( &self, _ctx: impl WriteContext, value: Nullable, @@ -2056,7 +2090,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_int_8_s( + async fn set_nullable_int_8_s( &self, _ctx: impl WriteContext, value: Nullable, @@ -2065,7 +2099,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_int_16_s( + async fn set_nullable_int_16_s( &self, _ctx: impl WriteContext, value: Nullable, @@ -2074,7 +2108,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_int_24_s( + async fn set_nullable_int_24_s( &self, _ctx: impl WriteContext, value: Nullable, @@ -2083,7 +2117,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_int_32_s( + async fn set_nullable_int_32_s( &self, _ctx: impl WriteContext, value: Nullable, @@ -2092,7 +2126,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_int_40_s( + async fn set_nullable_int_40_s( &self, _ctx: impl WriteContext, value: Nullable, @@ -2101,7 +2135,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_int_48_s( + async fn set_nullable_int_48_s( &self, _ctx: impl WriteContext, value: Nullable, @@ -2110,7 +2144,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_int_56_s( + async fn set_nullable_int_56_s( &self, _ctx: impl WriteContext, value: Nullable, @@ -2119,7 +2153,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_int_64_s( + async fn set_nullable_int_64_s( &self, _ctx: impl WriteContext, value: Nullable, @@ -2128,7 +2162,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_enum_8( + async fn set_nullable_enum_8( &self, _ctx: impl WriteContext, value: Nullable, @@ -2137,7 +2171,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_enum_16( + async fn set_nullable_enum_16( &self, _ctx: impl WriteContext, value: Nullable, @@ -2146,7 +2180,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_float_single( + async fn set_nullable_float_single( &self, _ctx: impl WriteContext, value: Nullable, @@ -2155,7 +2189,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_float_double( + async fn set_nullable_float_double( &self, _ctx: impl WriteContext, value: Nullable, @@ -2164,7 +2198,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_octet_string( + async fn set_nullable_octet_string( &self, _ctx: impl WriteContext, value: Nullable>, @@ -2179,7 +2213,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_char_string( + async fn set_nullable_char_string( &self, _ctx: impl WriteContext, value: Nullable>, @@ -2194,7 +2228,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_enum_attr( + async fn set_nullable_enum_attr( &self, _ctx: impl WriteContext, value: Nullable, @@ -2203,7 +2237,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_struct( + async fn set_nullable_struct( &self, _ctx: impl WriteContext, value: Nullable>, @@ -2233,7 +2267,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_range_restricted_int_8_u( + async fn set_nullable_range_restricted_int_8_u( &self, _ctx: impl WriteContext, value: Nullable, @@ -2256,7 +2290,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_range_restricted_int_8_s( + async fn set_nullable_range_restricted_int_8_s( &self, _ctx: impl WriteContext, value: Nullable, @@ -2279,7 +2313,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_range_restricted_int_16_u( + async fn set_nullable_range_restricted_int_16_u( &self, _ctx: impl WriteContext, value: Nullable, @@ -2302,7 +2336,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_range_restricted_int_16_s( + async fn set_nullable_range_restricted_int_16_s( &self, _ctx: impl WriteContext, value: Nullable, @@ -2325,12 +2359,16 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_global_enum(&self, _ctx: impl WriteContext, value: TestGlobalEnum) -> Result<(), Error> { + async fn set_global_enum( + &self, + _ctx: impl WriteContext, + value: TestGlobalEnum, + ) -> Result<(), Error> { self.data.borrow_mut().global_enum = value; Ok(()) } - fn set_global_struct( + async fn set_global_struct( &self, _ctx: impl WriteContext, value: TestGlobalStruct<'_>, @@ -2346,7 +2384,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_global_enum( + async fn set_nullable_global_enum( &self, _ctx: impl WriteContext, value: Nullable, @@ -2355,7 +2393,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn set_nullable_global_struct( + async fn set_nullable_global_struct( &self, _ctx: impl WriteContext, value: Nullable>, @@ -2376,15 +2414,15 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - fn handle_test(&self, _ctx: impl InvokeContext) -> Result<(), Error> { + async fn handle_test(&self, _ctx: impl InvokeContext) -> Result<(), Error> { Ok(()) } - fn handle_test_not_handled(&self, _ctx: impl InvokeContext) -> Result<(), Error> { + async fn handle_test_not_handled(&self, _ctx: impl InvokeContext) -> Result<(), Error> { Err(ErrorCode::InvalidCommand.into()) } - fn handle_test_specific( + async fn handle_test_specific( &self, _ctx: impl InvokeContext, response: TestSpecificResponseBuilder

, @@ -2392,7 +2430,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { response.return_value(7)?.end() } - fn handle_test_add_arguments( + async fn handle_test_add_arguments( &self, _ctx: impl InvokeContext, request: TestAddArgumentsRequest<'_>, @@ -2406,7 +2444,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - fn handle_test_simple_argument_request( + async fn handle_test_simple_argument_request( &self, _ctx: impl InvokeContext, request: TestSimpleArgumentRequestRequest<'_>, @@ -2415,7 +2453,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { response.return_value(request.arg_1()? as _)?.end() } - fn handle_test_struct_array_argument_request( + async fn handle_test_struct_array_argument_request( &self, _ctx: impl InvokeContext, _request: TestStructArrayArgumentRequestRequest<'_>, @@ -2424,7 +2462,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { unreachable!() } - fn handle_test_struct_argument_request( + async fn handle_test_struct_argument_request( &self, _ctx: impl InvokeContext, request: TestStructArgumentRequestRequest<'_>, @@ -2444,7 +2482,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { response.value(result)?.end() } - fn handle_test_nested_struct_argument_request( + async fn handle_test_nested_struct_argument_request( &self, _ctx: impl InvokeContext, request: TestNestedStructArgumentRequestRequest<'_>, @@ -2468,7 +2506,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { response.value(result)?.end() } - fn handle_test_list_struct_argument_request( + async fn handle_test_list_struct_argument_request( &self, _ctx: impl InvokeContext, request: TestListStructArgumentRequestRequest<'_>, @@ -2505,7 +2543,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { response.value(result)?.end() } - fn handle_test_list_int_8_u_argument_request( + async fn handle_test_list_int_8_u_argument_request( &self, _ctx: impl InvokeContext, request: TestListInt8UArgumentRequestRequest<'_>, @@ -2526,7 +2564,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { response.value(result)?.end() } - fn handle_test_nested_struct_list_argument_request( + async fn handle_test_nested_struct_list_argument_request( &self, _ctx: impl InvokeContext, request: TestNestedStructListArgumentRequestRequest<'_>, @@ -2578,7 +2616,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { response.value(result)?.end() } - fn handle_test_list_nested_struct_list_argument_request( + async fn handle_test_list_nested_struct_list_argument_request( &self, _ctx: impl InvokeContext, request: TestListNestedStructListArgumentRequestRequest<'_>, @@ -2676,7 +2714,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { response.value(result)?.end() } - fn handle_test_list_int_8_u_reverse_request( + async fn handle_test_list_int_8_u_reverse_request( &self, _ctx: impl InvokeContext, request: TestListInt8UReverseRequestRequest<'_>, @@ -2699,7 +2737,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { lo.end()?.end() } - fn handle_test_enums_request( + async fn handle_test_enums_request( &self, _ctx: impl InvokeContext, request: TestEnumsRequestRequest<'_>, @@ -2711,7 +2749,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { .end() } - fn handle_test_nullable_optional_request( + async fn handle_test_nullable_optional_request( &self, _ctx: impl InvokeContext, request: TestNullableOptionalRequestRequest<'_>, @@ -2725,7 +2763,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { .end() } - fn handle_test_complex_nullable_optional_request( + async fn handle_test_complex_nullable_optional_request( &self, _ctx: impl InvokeContext, request: TestComplexNullableOptionalRequestRequest<'_>, @@ -2858,7 +2896,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { .end() } - fn handle_simple_struct_echo_request( + async fn handle_simple_struct_echo_request( &self, _ctx: impl InvokeContext, request: SimpleStructEchoRequestRequest<'_>, @@ -2881,11 +2919,11 @@ impl ClusterHandler for UnitTestingHandler<'_> { .end() } - fn handle_timed_invoke_request(&self, _ctx: impl InvokeContext) -> Result<(), Error> { + async fn handle_timed_invoke_request(&self, _ctx: impl InvokeContext) -> Result<(), Error> { Ok(()) } - fn handle_test_simple_optional_argument_request( + async fn handle_test_simple_optional_argument_request( &self, _ctx: impl InvokeContext, request: TestSimpleOptionalArgumentRequestRequest<'_>, @@ -2897,7 +2935,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - fn handle_test_emit_test_event_request( + async fn handle_test_emit_test_event_request( &self, _ctx: impl InvokeContext, _request: TestEmitTestEventRequestRequest<'_>, @@ -2906,7 +2944,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { todo!() } - fn handle_test_emit_test_fabric_scoped_event_request( + async fn handle_test_emit_test_fabric_scoped_event_request( &self, _ctx: impl InvokeContext, _request: TestEmitTestFabricScopedEventRequestRequest<'_>, @@ -2915,11 +2953,11 @@ impl ClusterHandler for UnitTestingHandler<'_> { todo!() } - fn handle_test_unknown_command(&self, _ctx: impl InvokeContext) -> Result<(), Error> { + async fn handle_test_unknown_command(&self, _ctx: impl InvokeContext) -> Result<(), Error> { unreachable!() } - fn handle_test_batch_helper_request( + async fn handle_test_batch_helper_request( &self, _ctx: impl InvokeContext, request: TestBatchHelperRequestRequest<'_>, @@ -2943,7 +2981,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(parent) } - fn handle_test_second_batch_helper_request( + async fn handle_test_second_batch_helper_request( &self, _ctx: impl InvokeContext, request: TestSecondBatchHelperRequestRequest<'_>, @@ -2967,17 +3005,17 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(parent) } - fn mei_int_8_u(&self, _ctx: impl ReadContext) -> Result { + async fn mei_int_8_u(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().mei_int_8_u) } - fn set_mei_int_8_u(&self, _ctx: impl WriteContext, value: u8) -> Result<(), Error> { + async fn set_mei_int_8_u(&self, _ctx: impl WriteContext, value: u8) -> Result<(), Error> { self.data.borrow_mut().mei_int_8_u = value; Ok(()) } - fn handle_test_different_vendor_mei_request( + async fn handle_test_different_vendor_mei_request( &self, _ctx: impl InvokeContext, request: TestDifferentVendorMeiRequestRequest<'_>, @@ -2988,7 +3026,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { response.arg_1(arg)?.event_number(0)?.end() } - fn handle_string_echo_request( + async fn handle_string_echo_request( &self, _ctx: impl InvokeContext, request: StringEchoRequestRequest<'_>, @@ -2997,7 +3035,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { response.payload(request.payload()?)?.end() } - fn handle_global_echo_request( + async fn handle_global_echo_request( &self, _ctx: impl InvokeContext, request: GlobalEchoRequestRequest<'_>, @@ -3014,7 +3052,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { .end() } - fn handle_test_check_command_flags(&self, _ctx: impl InvokeContext) -> Result<(), Error> { + async fn handle_test_check_command_flags(&self, _ctx: impl InvokeContext) -> Result<(), Error> { todo!() } } diff --git a/rs-matter/src/dm/clusters/wifi_diag.rs b/rs-matter/src/dm/clusters/wifi_diag.rs index 156bf68dd..8ea2740f4 100644 --- a/rs-matter/src/dm/clusters/wifi_diag.rs +++ b/rs-matter/src/dm/clusters/wifi_diag.rs @@ -128,7 +128,7 @@ impl ClusterHandler for WifiDiagHandler<'_> { self.dataver.changed(); } - fn bssid( + async fn bssid( &self, _ctx: impl ReadContext, builder: NullableBuilder>, @@ -151,23 +151,29 @@ impl ClusterHandler for WifiDiagHandler<'_> { Ok(unwrap!(parent.take())) } - fn security_type(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn security_type( + &self, + _ctx: impl ReadContext, + ) -> Result, Error> { self.diag.security_type() } - fn wi_fi_version(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn wi_fi_version( + &self, + _ctx: impl ReadContext, + ) -> Result, Error> { self.diag.wi_fi_version() } - fn channel_number(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn channel_number(&self, _ctx: impl ReadContext) -> Result, Error> { self.diag.channel_number() } - fn rssi(&self, _ctx: impl ReadContext) -> Result, Error> { + async fn rssi(&self, _ctx: impl ReadContext) -> Result, Error> { self.diag.rssi() } - fn handle_reset_counts(&self, _ctx: impl InvokeContext) -> Result<(), Error> { + async fn handle_reset_counts(&self, _ctx: impl InvokeContext) -> Result<(), Error> { Err(ErrorCode::InvalidAction.into()) } } diff --git a/rs-matter/src/dm/endpoints.rs b/rs-matter/src/dm/endpoints.rs index a08309897..0575b4345 100644 --- a/rs-matter/src/dm/endpoints.rs +++ b/rs-matter/src/dm/endpoints.rs @@ -27,13 +27,13 @@ use super::clusters::gen_comm::{self, ClusterHandler as _, CommPolicy, GenCommHa use super::clusters::gen_diag::{self, ClusterHandler as _, GenDiag, GenDiagHandler, NetifDiag}; use super::clusters::grp_key_mgmt::{self, ClusterHandler as _, GrpKeyMgmtHandler}; use super::clusters::net_comm::{ - self, ClusterAsyncHandler as _, NetCommHandler, NetCtl, NetCtlStatus, NetworkType, Networks, + self, ClusterHandler as _, NetCommHandler, NetCtl, NetCtlStatus, NetworkType, Networks, }; use super::clusters::noc::{self, ClusterHandler as _, NocHandler}; use super::clusters::thread_diag::{self, ClusterHandler as _, ThreadDiag, ThreadDiagHandler}; use super::clusters::wifi_diag::{self, ClusterHandler as _, WifiDiag, WifiDiagHandler}; use super::networks::eth::{EthNetCtl, EthNetwork}; -use super::types::{Async, ChainedHandler, Dataver, Endpoint, EndptId, EpClMatcher}; +use super::types::{ChainedHandler, Dataver, Endpoint, EndptId, EpClMatcher}; /// A utility function to create a root (Endpoint 0) object using the requested operational network type. pub const fn root_endpoint(net_type: NetworkType) -> Endpoint<'static> { @@ -47,43 +47,43 @@ pub const fn root_endpoint(net_type: NetworkType) -> Endpoint<'static> { /// A type alias for the handler chain returned by `with_eth()`. pub type EthHandler<'a, H> = NetHandler< 'a, - net_comm::HandlerAsyncAdaptor>, - Async>, + net_comm::HandlerAdaptor>, + eth_diag::HandlerAdaptor, H, >; /// A type alias for the handler chain returned by `with_wifi()`. pub type WifiHandler<'a, T, H> = NetHandler< 'a, - net_comm::HandlerAsyncAdaptor>, - Async>>, + net_comm::HandlerAdaptor>, + wifi_diag::HandlerAdaptor>, H, >; /// A type alias for the handler chain returned by `with_thread()`. pub type ThreadHandler<'a, T, H> = NetHandler< 'a, - net_comm::HandlerAsyncAdaptor>, - Async>>, + net_comm::HandlerAdaptor>, + thread_diag::HandlerAdaptor>, H, >; pub type NetHandler<'a, NETCOMM, NETDIAG, H> = handler_chain_type!( EpClMatcher => NETCOMM, EpClMatcher => NETDIAG, - EpClMatcher => Async>> + EpClMatcher => gen_diag::HandlerAdaptor> | H ); /// A type alias for the handler chain returned by `with_sys()`. pub type SysHandler<'a, H> = handler_chain_type!( - EpClMatcher => Async>>, - EpClMatcher => Async>, - EpClMatcher => Async>>, - EpClMatcher => Async>, - EpClMatcher => Async>, - EpClMatcher => Async>, - EpClMatcher => Async> + EpClMatcher => desc::HandlerAdaptor>, + EpClMatcher => basic_info::HandlerAdaptor, + EpClMatcher => gen_comm::HandlerAdaptor>, + EpClMatcher => adm_comm::HandlerAdaptor, + EpClMatcher => noc::HandlerAdaptor, + EpClMatcher => acl::HandlerAdaptor, + EpClMatcher => grp_key_mgmt::HandlerAdaptor | H ); @@ -114,12 +114,12 @@ pub fn with_eth<'a, H>( ChainedHandler::new( EpClMatcher::new(Some(ROOT_ENDPOINT_ID), Some(GenDiagHandler::CLUSTER.id)), - Async(GenDiagHandler::new(Dataver::new_rand(rand), gen_diag, netif_diag).adapt()), + GenDiagHandler::new(Dataver::new_rand(rand), gen_diag, netif_diag).adapt(), handler, ) .chain( EpClMatcher::new(Some(ROOT_ENDPOINT_ID), Some(EthDiagHandler::CLUSTER.id)), - Async(EthDiagHandler::new(Dataver::new_rand(rand)).adapt()), + EthDiagHandler::new(Dataver::new_rand(rand)).adapt(), ) .chain( EpClMatcher::new( @@ -157,12 +157,12 @@ where { ChainedHandler::new( EpClMatcher::new(Some(ROOT_ENDPOINT_ID), Some(GenDiagHandler::CLUSTER.id)), - Async(GenDiagHandler::new(Dataver::new_rand(rand), gen_diag, netif_diag).adapt()), + GenDiagHandler::new(Dataver::new_rand(rand), gen_diag, netif_diag).adapt(), handler, ) .chain( EpClMatcher::new(Some(ROOT_ENDPOINT_ID), Some(WifiDiagHandler::CLUSTER.id)), - Async(WifiDiagHandler::new(Dataver::new_rand(rand), net_ctl).adapt()), + WifiDiagHandler::new(Dataver::new_rand(rand), net_ctl).adapt(), ) .chain( EpClMatcher::new( @@ -199,12 +199,12 @@ where { ChainedHandler::new( EpClMatcher::new(Some(ROOT_ENDPOINT_ID), Some(GenDiagHandler::CLUSTER.id)), - Async(GenDiagHandler::new(Dataver::new_rand(rand), gen_diag, netif_diag).adapt()), + GenDiagHandler::new(Dataver::new_rand(rand), gen_diag, netif_diag).adapt(), handler, ) .chain( EpClMatcher::new(Some(ROOT_ENDPOINT_ID), Some(ThreadDiagHandler::CLUSTER.id)), - Async(ThreadDiagHandler::new(Dataver::new_rand(rand), net_ctl).adapt()), + ThreadDiagHandler::new(Dataver::new_rand(rand), net_ctl).adapt(), ) .chain( EpClMatcher::new( @@ -229,31 +229,31 @@ where pub fn with_sys(comm_policy: &dyn CommPolicy, rand: Rand, handler: H) -> SysHandler<'_, H> { ChainedHandler::new( EpClMatcher::new(Some(ROOT_ENDPOINT_ID), Some(GrpKeyMgmtHandler::CLUSTER.id)), - Async(GrpKeyMgmtHandler::new(Dataver::new_rand(rand)).adapt()), + GrpKeyMgmtHandler::new(Dataver::new_rand(rand)).adapt(), handler, ) .chain( EpClMatcher::new(Some(ROOT_ENDPOINT_ID), Some(AclHandler::CLUSTER.id)), - Async(AclHandler::new(Dataver::new_rand(rand)).adapt()), + AclHandler::new(Dataver::new_rand(rand)).adapt(), ) .chain( EpClMatcher::new(Some(ROOT_ENDPOINT_ID), Some(NocHandler::CLUSTER.id)), - Async(NocHandler::new(Dataver::new_rand(rand)).adapt()), + NocHandler::new(Dataver::new_rand(rand)).adapt(), ) .chain( EpClMatcher::new(Some(ROOT_ENDPOINT_ID), Some(AdminCommHandler::CLUSTER.id)), - Async(AdminCommHandler::new(Dataver::new_rand(rand)).adapt()), + AdminCommHandler::new(Dataver::new_rand(rand)).adapt(), ) .chain( EpClMatcher::new(Some(ROOT_ENDPOINT_ID), Some(GenCommHandler::CLUSTER.id)), - Async(GenCommHandler::new(Dataver::new_rand(rand), comm_policy).adapt()), + GenCommHandler::new(Dataver::new_rand(rand), comm_policy).adapt(), ) .chain( EpClMatcher::new(Some(ROOT_ENDPOINT_ID), Some(BasicInfoHandler::CLUSTER.id)), - Async(BasicInfoHandler::new(Dataver::new_rand(rand)).adapt()), + BasicInfoHandler::new(Dataver::new_rand(rand)).adapt(), ) .chain( EpClMatcher::new(Some(ROOT_ENDPOINT_ID), Some(DescHandler::CLUSTER.id)), - Async(DescHandler::new(Dataver::new_rand(rand)).adapt()), + DescHandler::new(Dataver::new_rand(rand)).adapt(), ) } diff --git a/rs-matter/src/dm/types/handler.rs b/rs-matter/src/dm/types/handler.rs index bd3c7554a..95500f114 100644 --- a/rs-matter/src/dm/types/handler.rs +++ b/rs-matter/src/dm/types/handler.rs @@ -18,13 +18,12 @@ use embassy_sync::blocking_mutex::raw::NoopRawMutex; use crate::dm::IMBuffer; -use crate::error::{Error, ErrorCode}; use crate::tlv::TLVElement; use crate::transport::exchange::Exchange; use crate::utils::storage::pooled::{BufferAccess, PooledBuffers}; use crate::Matter; -use super::{AttrDetails, AttrId, ClusterId, CmdDetails, EndptId, InvokeReply, ReadReply}; +use super::{AttrDetails, AttrId, ClusterId, CmdDetails, EndptId}; pub use asynch::*; @@ -623,86 +622,6 @@ where pub trait DataModelHandler: super::AsyncMetadata + AsyncHandler {} impl DataModelHandler for T where T: super::AsyncMetadata + AsyncHandler {} -/// A version of the `AsyncHandler` trait that never awaits any operation. -/// -/// Prefer this trait when implementing handlers that are known to be non-blocking and additionally, -/// mark those with `NonBlockingHandler`. -pub trait Handler { - /// Read from the requested attribute and encode the result using the provided reply type. - fn read(&self, ctx: impl ReadContext, reply: impl ReadReply) -> Result<(), Error>; - - /// Write into the requested attribute using the provided data. - fn write(&self, _ctx: impl WriteContext) -> Result<(), Error> { - Err(ErrorCode::AttributeNotFound.into()) - } - - /// Invoke the requested command with the provided data and encode the result using the provided reply type. - fn invoke(&self, _ctx: impl InvokeContext, _reply: impl InvokeReply) -> Result<(), Error> { - Err(ErrorCode::CommandNotFound.into()) - } -} - -impl Handler for &T -where - T: Handler, -{ - fn read(&self, ctx: impl ReadContext, reply: impl ReadReply) -> Result<(), Error> { - (**self).read(ctx, reply) - } - - fn write(&self, ctx: impl WriteContext) -> Result<(), Error> { - (**self).write(ctx) - } - - fn invoke(&self, ctx: impl InvokeContext, reply: impl InvokeReply) -> Result<(), Error> { - (**self).invoke(ctx, reply) - } -} - -impl Handler for &mut T -where - T: Handler, -{ - fn read(&self, ctx: impl ReadContext, reply: impl ReadReply) -> Result<(), Error> { - (**self).read(ctx, reply) - } - - fn write(&self, ctx: impl WriteContext) -> Result<(), Error> { - (**self).write(ctx) - } - - fn invoke(&self, ctx: impl InvokeContext, reply: impl InvokeReply) -> Result<(), Error> { - (**self).invoke(ctx, reply) - } -} - -/// A marker trait that indicates that the handler is non-blocking. -// TODO: Re-assess the need for this trait. -pub trait NonBlockingHandler: Handler {} - -impl NonBlockingHandler for &T where T: NonBlockingHandler {} - -impl NonBlockingHandler for &mut T where T: NonBlockingHandler {} - -impl Handler for (M, H) -where - H: Handler, -{ - fn read(&self, ctx: impl ReadContext, reply: impl ReadReply) -> Result<(), Error> { - self.1.read(ctx, reply) - } - - fn write(&self, ctx: impl WriteContext) -> Result<(), Error> { - self.1.write(ctx) - } - - fn invoke(&self, ctx: impl InvokeContext, reply: impl InvokeReply) -> Result<(), Error> { - self.1.invoke(ctx, reply) - } -} - -impl NonBlockingHandler for (M, H) where H: NonBlockingHandler {} - /// A trait that defines a matcher for determining whether a handler - member of a handler-chain (`ChainedHandler`) /// should be invoked for a specific operation. pub trait Matcher { @@ -803,14 +722,6 @@ impl EmptyHandler { } } -impl Handler for EmptyHandler { - fn read(&self, _ctx: impl ReadContext, _reply: impl ReadReply) -> Result<(), Error> { - Err(ErrorCode::AttributeNotFound.into()) - } -} - -impl NonBlockingHandler for EmptyHandler {} - /// A handler that chains two handlers together in a composite handler. #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] @@ -856,45 +767,6 @@ impl ChainedHandler { } } -impl Handler for ChainedHandler -where - M: Matcher, - H: Handler, - T: Handler, -{ - fn read(&self, ctx: impl ReadContext, reply: impl ReadReply) -> Result<(), Error> { - if self.matcher.matches(&ctx) { - self.handler.read(ctx, reply) - } else { - self.next.read(ctx, reply) - } - } - - fn write(&self, ctx: impl WriteContext) -> Result<(), Error> { - if self.matcher.matches(&ctx) { - self.handler.write(ctx) - } else { - self.next.write(ctx) - } - } - - fn invoke(&self, ctx: impl InvokeContext, reply: impl InvokeReply) -> Result<(), Error> { - if self.matcher.matches(&ctx) { - self.handler.invoke(ctx, reply) - } else { - self.next.invoke(ctx, reply) - } - } -} - -impl NonBlockingHandler for ChainedHandler -where - M: Matcher, - H: NonBlockingHandler, - T: NonBlockingHandler, -{ -} - /// A helper macro that makes it easier to specify the full type of a `ChainedHandler` instantiation, /// which can be quite annoying in the case of long chains of handlers. /// @@ -941,10 +813,7 @@ mod asynch { use crate::error::{Error, ErrorCode}; use crate::utils::select::Coalesce; - use super::{ - ChainedHandler, EmptyHandler, Handler, InvokeContext, NonBlockingHandler, ReadContext, - WriteContext, - }; + use super::{ChainedHandler, EmptyHandler, InvokeContext, ReadContext, WriteContext}; /// A handler for processing a single IM operation: /// read an attribute, write an attribute, or invoke a command. @@ -1148,39 +1017,6 @@ mod asynch { } } - impl AsyncHandler for Async - where - T: NonBlockingHandler, - { - fn read_awaits(&self, _ctx: impl ReadContext) -> bool { - false - } - - fn write_awaits(&self, _ctx: impl WriteContext) -> bool { - false - } - - fn invoke_awaits(&self, _ctx: impl InvokeContext) -> bool { - false - } - - async fn read(&self, ctx: impl ReadContext, reply: impl ReadReply) -> Result<(), Error> { - Handler::read(&self.0, ctx, reply) - } - - async fn write(&self, ctx: impl WriteContext) -> Result<(), Error> { - Handler::write(&self.0, ctx) - } - - async fn invoke( - &self, - ctx: impl InvokeContext, - reply: impl InvokeReply, - ) -> Result<(), Error> { - Handler::invoke(&self.0, ctx, reply) - } - } - impl AsyncHandler for EmptyHandler { fn read_awaits(&self, _ctx: impl ReadContext) -> bool { false @@ -1268,30 +1104,4 @@ mod asynch { select(&mut handler, &mut next).coalesce().await } } - - /// An adaptor that adapts a `NonBlockingHandler` trait implementation to the `AsyncHandler` trait contract. - /// - /// The adaptor also implements `NonBlockingHandler` so that the adapted handler can be used in any context. - #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] - #[cfg_attr(feature = "defmt", derive(defmt::Format))] - pub struct Async(pub T); - - impl Handler for Async - where - T: Handler, - { - fn read(&self, ctx: impl ReadContext, reply: impl ReadReply) -> Result<(), Error> { - self.0.read(ctx, reply) - } - - fn write(&self, ctx: impl WriteContext) -> Result<(), Error> { - self.0.write(ctx) - } - - fn invoke(&self, ctx: impl InvokeContext, reply: impl InvokeReply) -> Result<(), Error> { - self.0.invoke(ctx, reply) - } - } - - impl NonBlockingHandler for Async where T: NonBlockingHandler {} } diff --git a/rs-matter/src/dm/types/metadata.rs b/rs-matter/src/dm/types/metadata.rs index 351d9ffa0..87fada507 100644 --- a/rs-matter/src/dm/types/metadata.rs +++ b/rs-matter/src/dm/types/metadata.rs @@ -19,8 +19,6 @@ use crate::dm::Node; pub use asynch::*; -use super::Async; - pub trait MetadataGuard { fn node(&self) -> Node<'_>; } @@ -116,26 +114,12 @@ where } } -impl Metadata for Async -where - T: Metadata, -{ - type MetadataGuard<'a> - = T::MetadataGuard<'a> - where - Self: 'a; - - fn lock(&self) -> Self::MetadataGuard<'_> { - self.0.lock() - } -} - mod asynch { use core::future::Future; - use crate::dm::{Async, Node}; + use crate::dm::Node; - use super::{Metadata, MetadataGuard}; + use super::MetadataGuard; pub trait AsyncMetadata { type MetadataGuard<'a>: MetadataGuard @@ -200,18 +184,4 @@ mod asynch { self.0.lock() } } - - impl AsyncMetadata for Async - where - T: Metadata, - { - type MetadataGuard<'a> - = T::MetadataGuard<'a> - where - Self: 'a; - - async fn lock(&self) -> Self::MetadataGuard<'_> { - self.0.lock() - } - } } diff --git a/rs-matter/tests/common/e2e/im/echo_cluster.rs b/rs-matter/tests/common/e2e/im/echo_cluster.rs index ff7ed9d10..c0a91428b 100644 --- a/rs-matter/tests/common/e2e/im/echo_cluster.rs +++ b/rs-matter/tests/common/e2e/im/echo_cluster.rs @@ -26,8 +26,8 @@ use rs_matter::utils::storage::Vec; use strum::{EnumDiscriminants, FromRepr}; use rs_matter::dm::{ - Access, ArrayAttributeWrite, Attribute, Cluster, Command, Dataver, Handler, InvokeContext, - InvokeReply, NonBlockingHandler, Quality, ReadContext, ReadReply, Reply, WriteContext, + Access, ArrayAttributeWrite, AsyncHandler, Attribute, Cluster, Command, Dataver, InvokeContext, + InvokeReply, Quality, ReadContext, ReadReply, Reply, WriteContext, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::tlv::{TLVArray, TLVElement, TLVTag, TLVWrite}; @@ -292,18 +292,16 @@ impl EchoHandler { } } -impl Handler for EchoHandler { - fn read(&self, ctx: impl ReadContext, reply: impl ReadReply) -> Result<(), Error> { +impl AsyncHandler for EchoHandler { + async fn read(&self, ctx: impl ReadContext, reply: impl ReadReply) -> Result<(), Error> { EchoHandler::read(self, ctx, reply) } - fn write(&self, ctx: impl WriteContext) -> Result<(), Error> { + async fn write(&self, ctx: impl WriteContext) -> Result<(), Error> { EchoHandler::write(self, ctx) } - fn invoke(&self, ctx: impl InvokeContext, reply: impl InvokeReply) -> Result<(), Error> { + async fn invoke(&self, ctx: impl InvokeContext, reply: impl InvokeReply) -> Result<(), Error> { EchoHandler::invoke(self, ctx, reply) } } - -impl NonBlockingHandler for EchoHandler {} diff --git a/rs-matter/tests/common/e2e/im/handler.rs b/rs-matter/tests/common/e2e/im/handler.rs index 0c685b29e..4dc8e1aa9 100644 --- a/rs-matter/tests/common/e2e/im/handler.rs +++ b/rs-matter/tests/common/e2e/im/handler.rs @@ -18,14 +18,13 @@ use rs_matter::dm::clusters::desc::{self, ClusterHandler as _, DescHandler}; use rs_matter::dm::clusters::level_control::LevelControlHooks; use rs_matter::dm::clusters::on_off::{ - self, test::TestOnOffDeviceLogic, ClusterAsyncHandler as _, NoLevelControl, OnOffHandler, - OnOffHooks, + self, test::TestOnOffDeviceLogic, ClusterHandler as _, NoLevelControl, OnOffHandler, OnOffHooks, }; use rs_matter::dm::devices::{DEV_TYPE_ON_OFF_LIGHT, DEV_TYPE_ROOT_NODE}; use rs_matter::dm::endpoints::{with_eth, with_sys, EthHandler, SysHandler, ROOT_ENDPOINT_ID}; use rs_matter::dm::{ - Async, AsyncHandler, AsyncMetadata, ChainedHandler, Dataver, EmptyHandler, Endpoint, - EpClMatcher, InvokeContext, InvokeReply, Node, ReadContext, ReadReply, WriteContext, + AsyncHandler, AsyncMetadata, ChainedHandler, Dataver, EmptyHandler, Endpoint, EpClMatcher, + InvokeContext, InvokeReply, Node, ReadContext, ReadReply, WriteContext, }; use rs_matter::error::Error; use rs_matter::Matter; @@ -38,10 +37,10 @@ use super::echo_cluster::{self, EchoHandler}; /// A sample handler for E2E IM tests. pub struct E2eTestHandler<'a, OH: OnOffHooks, LH: LevelControlHooks>( handler_chain_type!( - EpClMatcher => on_off::HandlerAsyncAdaptor>, - EpClMatcher => Async, - EpClMatcher => Async>>, - EpClMatcher => Async + EpClMatcher => on_off::HandlerAdaptor>, + EpClMatcher => EchoHandler, + EpClMatcher => desc::HandlerAdaptor>, + EpClMatcher => EchoHandler | EthHandler<'a, SysHandler<'a, EmptyHandler>>), ); @@ -76,20 +75,20 @@ impl<'a, OH: OnOffHooks, LH: LevelControlHooks> E2eTestHandler<'a, OH, LH> { let handler = ChainedHandler::new( EpClMatcher::new(Some(ROOT_ENDPOINT_ID), Some(echo_cluster::ID)), - Async(EchoHandler::new(2, Dataver::new_rand(matter.rand()))), + EchoHandler::new(2, Dataver::new_rand(matter.rand())), handler, ) .chain( EpClMatcher::new(Some(1), Some(DescHandler::CLUSTER.id)), - Async(DescHandler::new(Dataver::new_rand(matter.rand())).adapt()), + DescHandler::new(Dataver::new_rand(matter.rand())).adapt(), ) .chain( EpClMatcher::new(Some(1), Some(echo_cluster::ID)), - Async(EchoHandler::new(3, Dataver::new_rand(matter.rand()))), + EchoHandler::new(3, Dataver::new_rand(matter.rand())), ) .chain( EpClMatcher::new(Some(1), Some(TestOnOffDeviceLogic::CLUSTER.id)), - on_off::HandlerAsyncAdaptor(on_off), + on_off::HandlerAdaptor(on_off), ); Self(handler) @@ -97,8 +96,8 @@ impl<'a, OH: OnOffHooks, LH: LevelControlHooks> E2eTestHandler<'a, OH, LH> { pub fn echo_cluster(&self, endpoint: u16) -> &EchoHandler { match endpoint { - 0 => &self.0.next.next.next.handler.0, - 1 => &self.0.next.handler.0, + 0 => &self.0.next.next.next.handler, + 1 => &self.0.next.handler, _ => panic!(), } } diff --git a/rs-matter/tests/data_model/attributes.rs b/rs-matter/tests/data_model/attributes.rs index db337d356..335ee9748 100644 --- a/rs-matter/tests/data_model/attributes.rs +++ b/rs-matter/tests/data_model/attributes.rs @@ -16,7 +16,7 @@ */ use rs_matter::dm::clusters::on_off::{ - self, test::TestOnOffDeviceLogic, ClusterAsyncHandler as _, NoLevelControl, + self, test::TestOnOffDeviceLogic, ClusterHandler as _, NoLevelControl, }; use rs_matter::dm::GlobalElements; use rs_matter::im::GenericPath; diff --git a/rs-matter/tests/data_model/commands.rs b/rs-matter/tests/data_model/commands.rs index c23a9c960..2acce56a0 100644 --- a/rs-matter/tests/data_model/commands.rs +++ b/rs-matter/tests/data_model/commands.rs @@ -16,7 +16,7 @@ */ use rs_matter::dm::clusters::on_off::{ - self, test::TestOnOffDeviceLogic, ClusterAsyncHandler as _, NoLevelControl, + self, test::TestOnOffDeviceLogic, ClusterHandler as _, NoLevelControl, }; use rs_matter::im::IMStatusCode; use rs_matter::im::{CmdPath, CmdStatus}; From 03c4533ff1f58188eefb0ee0406bd4fdcae0a179 Mon Sep 17 00:00:00 2001 From: Marcos Boyington <15697303+gmarcosb@users.noreply.github.com> Date: Tue, 27 Jan 2026 12:23:53 -0700 Subject: [PATCH 2/9] Klippy --- rs-matter-macros/src/idl/handler.rs | 32 +++++++++++++---------------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/rs-matter-macros/src/idl/handler.rs b/rs-matter-macros/src/idl/handler.rs index 9c8e2385e..43b52350e 100644 --- a/rs-matter-macros/src/idl/handler.rs +++ b/rs-matter-macros/src/idl/handler.rs @@ -398,16 +398,14 @@ fn handler_attribute( Err(#krate::error::ErrorCode::InvalidAction.into()) } ) + } else if delegate { + quote!( + fn #attr_name(&self, ctx: impl #krate::dm::ReadContext, builder: #attr_type) -> impl core::future::Future> { + T::#attr_name(self, ctx, builder) + } + ) } else { - if delegate { - quote!( - fn #attr_name(&self, ctx: impl #krate::dm::ReadContext, builder: #attr_type) -> impl core::future::Future> { - T::#attr_name(self, ctx, builder) - } - ) - } else { - quote!(async fn #attr_name(&self, ctx: impl #krate::dm::ReadContext, builder: #attr_type) -> Result;) - } + quote!(async fn #attr_name(&self, ctx: impl #krate::dm::ReadContext, builder: #attr_type) -> Result;) } } else if !delegate && attr.field.is_optional { quote!( @@ -415,16 +413,14 @@ fn handler_attribute( Err(#krate::error::ErrorCode::InvalidAction.into()) } ) + } else if delegate { + quote!( + fn #attr_name(&self, ctx: impl #krate::dm::ReadContext) -> impl core::future::Future> { + T::#attr_name(self, ctx) + } + ) } else { - if delegate { - quote!( - fn #attr_name(&self, ctx: impl #krate::dm::ReadContext) -> impl core::future::Future> { - T::#attr_name(self, ctx) - } - ) - } else { - quote!(async fn #attr_name(&self, ctx: impl #krate::dm::ReadContext) -> Result<#attr_type, #krate::error::Error>;) - } + quote!(async fn #attr_name(&self, ctx: impl #krate::dm::ReadContext) -> Result<#attr_type, #krate::error::Error>;) } } From d87f23251053c9d736ac85cfa5d370ea89f32c1b Mon Sep 17 00:00:00 2001 From: Marcos Boyington <15697303+gmarcosb@users.noreply.github.com> Date: Tue, 27 Jan 2026 12:30:37 -0700 Subject: [PATCH 3/9] Fix bloat-check --- bloat-check/src/bin/bloat-check.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bloat-check/src/bin/bloat-check.rs b/bloat-check/src/bin/bloat-check.rs index 8beea639d..8ad0826e7 100644 --- a/bloat-check/src/bin/bloat-check.rs +++ b/bloat-check/src/bin/bloat-check.rs @@ -75,7 +75,7 @@ use rs_matter::dm::networks::wireless::{ use rs_matter::dm::networks::NetChangeNotif; use rs_matter::dm::subscriptions::{Subscriptions, DEFAULT_MAX_SUBSCRIPTIONS}; use rs_matter::dm::{endpoints, IMBuffer}; -use rs_matter::dm::{Async, DataModel, Dataver, EmptyHandler, Endpoint, EpClMatcher, Node}; +use rs_matter::dm::{DataModel, Dataver, EmptyHandler, Endpoint, EpClMatcher, Node}; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; @@ -198,7 +198,7 @@ type AppBtp<'a> = type AppTransport<'a> = ChainedNetwork, fn(&Address) -> bool>; type AppHandler<'a> = handler_chain_type!( EpClMatcher => on_off::HandlerAdaptor>, - EpClMatcher => Async>> + EpClMatcher => desc::HandlerAdaptor> | EmptyHandler ); type AppDmHandler<'a> = WifiHandler<'a, &'a AppNetCtl<'a>, SysHandler<'a, AppHandler<'a>>>; @@ -635,7 +635,7 @@ where EmptyHandler .chain( EpClMatcher::new(Some(1), Some(desc::DescHandler::CLUSTER.id)), - Async(desc::DescHandler::new(Dataver::new_rand(matter.rand())).adapt()), + desc::DescHandler::new(Dataver::new_rand(matter.rand())).adapt(), ) .chain( EpClMatcher::new(Some(1), Some(TestOnOffDeviceLogic::CLUSTER.id)), From 3bc8ec946febdab04f4e5149971896fd2d7f82d5 Mon Sep 17 00:00:00 2001 From: Marcos Boyington <15697303+gmarcosb@users.noreply.github.com> Date: Tue, 27 Jan 2026 13:21:11 -0700 Subject: [PATCH 4/9] Fix onoff_light_bt --- examples/src/bin/onoff_light_bt.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/src/bin/onoff_light_bt.rs b/examples/src/bin/onoff_light_bt.rs index 5cbffd14c..652d74bdf 100644 --- a/examples/src/bin/onoff_light_bt.rs +++ b/examples/src/bin/onoff_light_bt.rs @@ -51,8 +51,7 @@ use rs_matter::dm::networks::unix::UnixNetifs; use rs_matter::dm::networks::wireless::{NetCtlState, NetCtlWithStatusImpl, WifiNetworks}; use rs_matter::dm::subscriptions::DefaultSubscriptions; use rs_matter::dm::{ - Async, AsyncHandler, AsyncMetadata, DataModel, Dataver, EmptyHandler, Endpoint, EpClMatcher, - Node, + AsyncHandler, AsyncMetadata, DataModel, Dataver, EmptyHandler, Endpoint, EpClMatcher, Node, }; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -271,7 +270,7 @@ where EmptyHandler .chain( EpClMatcher::new(Some(1), Some(desc::DescHandler::CLUSTER.id)), - Async(desc::DescHandler::new(Dataver::new_rand(matter.rand())).adapt()), + desc::DescHandler::new(Dataver::new_rand(matter.rand())).adapt(), ) .chain( EpClMatcher::new(Some(1), Some(TestOnOffDeviceLogic::CLUSTER.id)), From 3f627ce63e683ce1b4c7a17916c94a3b1975b779 Mon Sep 17 00:00:00 2001 From: Marcos Boyington <15697303+gmarcosb@users.noreply.github.com> Date: Tue, 27 Jan 2026 15:21:03 -0700 Subject: [PATCH 5/9] Apply Future<> changes to all usages to see if it helps improve size delta --- rs-matter-macros/src/idl.rs | 663 ++++++++++++++-------------- rs-matter-macros/src/idl/handler.rs | 125 +++--- 2 files changed, 389 insertions(+), 399 deletions(-) diff --git a/rs-matter-macros/src/idl.rs b/rs-matter-macros/src/idl.rs index 2a507dae1..a4ea33e31 100644 --- a/rs-matter-macros/src/idl.rs +++ b/rs-matter-macros/src/idl.rs @@ -24419,819 +24419,802 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::mei_int_8_u(self, ctx) } - async fn set_boolean( + fn set_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_boolean(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_boolean(self, ctx, value) } - async fn set_bitmap_8( + fn set_bitmap_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: Bitmap8MaskMap, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_bitmap_8(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_bitmap_8(self, ctx, value) } - async fn set_bitmap_16( + fn set_bitmap_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: Bitmap16MaskMap, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_bitmap_16(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_bitmap_16(self, ctx, value) } - async fn set_bitmap_32( + fn set_bitmap_32( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: Bitmap32MaskMap, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_bitmap_32(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_bitmap_32(self, ctx, value) } - async fn set_bitmap_64( + fn set_bitmap_64( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: Bitmap64MaskMap, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_bitmap_64(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_bitmap_64(self, ctx, value) } - async fn set_int_8_u( + fn set_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_8_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_int_8_u(self, ctx, value) } - async fn set_int_16_u( + fn set_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_16_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_int_16_u(self, ctx, value) } - async fn set_int_24_u( + fn set_int_24_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u32, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_24_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_int_24_u(self, ctx, value) } - async fn set_int_32_u( + fn set_int_32_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u32, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_32_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_int_32_u(self, ctx, value) } - async fn set_int_40_u( + fn set_int_40_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_40_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_int_40_u(self, ctx, value) } - async fn set_int_48_u( + fn set_int_48_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_48_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_int_48_u(self, ctx, value) } - async fn set_int_56_u( + fn set_int_56_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_56_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_int_56_u(self, ctx, value) } - async fn set_int_64_u( + fn set_int_64_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_64_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_int_64_u(self, ctx, value) } - async fn set_int_8_s( + fn set_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i8, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_8_s(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_int_8_s(self, ctx, value) } - async fn set_int_16_s( + fn set_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i16, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_16_s(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_int_16_s(self, ctx, value) } - async fn set_int_24_s( + fn set_int_24_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i32, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_24_s(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_int_24_s(self, ctx, value) } - async fn set_int_32_s( + fn set_int_32_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i32, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_32_s(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_int_32_s(self, ctx, value) } - async fn set_int_40_s( + fn set_int_40_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i64, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_40_s(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_int_40_s(self, ctx, value) } - async fn set_int_48_s( + fn set_int_48_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i64, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_48_s(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_int_48_s(self, ctx, value) } - async fn set_int_56_s( + fn set_int_56_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i64, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_56_s(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_int_56_s(self, ctx, value) } - async fn set_int_64_s( + fn set_int_64_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i64, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_int_64_s(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_int_64_s(self, ctx, value) } - async fn set_enum_8( + fn set_enum_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_enum_8(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_enum_8(self, ctx, value) } - async fn set_enum_16( + fn set_enum_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_enum_16(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_enum_16(self, ctx, value) } - async fn set_float_single( + fn set_float_single( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: f32, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_float_single(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_float_single(self, ctx, value) } - async fn set_float_double( + fn set_float_double( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: f64, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_float_double(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_float_double(self, ctx, value) } - async fn set_octet_string( + fn set_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::OctetStr<'_>, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_octet_string(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_octet_string(self, ctx, value) } - async fn set_list_int_8_u( + fn set_list_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< rs_matter_crate::tlv::TLVArray<'_, u8>, u8, >, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_list_int_8_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_list_int_8_u(self, ctx, value) } - async fn set_list_octet_string( + fn set_list_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< rs_matter_crate::tlv::TLVArray<'_, rs_matter_crate::tlv::OctetStr<'_>>, rs_matter_crate::tlv::OctetStr<'_>, >, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_list_octet_string(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_list_octet_string(self, ctx, value) } - async fn set_list_struct_octet_string( + fn set_list_struct_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< rs_matter_crate::tlv::TLVArray<'_, TestListStructOctet<'_>>, TestListStructOctet<'_>, >, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_list_struct_octet_string(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_list_struct_octet_string(self, ctx, value) } - async fn set_long_octet_string( + fn set_long_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::OctetStr<'_>, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_long_octet_string(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_long_octet_string(self, ctx, value) } - async fn set_char_string( + fn set_char_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Utf8Str<'_>, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_char_string(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_char_string(self, ctx, value) } - async fn set_long_char_string( + fn set_long_char_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Utf8Str<'_>, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_long_char_string(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_long_char_string(self, ctx, value) } - async fn set_epoch_us( + fn set_epoch_us( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_epoch_us(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_epoch_us(self, ctx, value) } - async fn set_epoch_s( + fn set_epoch_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u32, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_epoch_s(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_epoch_s(self, ctx, value) } - async fn set_vendor_id( + fn set_vendor_id( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_vendor_id(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_vendor_id(self, ctx, value) } - async fn set_list_nullables_and_optionals_struct( + fn set_list_nullables_and_optionals_struct( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< rs_matter_crate::tlv::TLVArray<'_, NullablesAndOptionalsStruct<'_>>, NullablesAndOptionalsStruct<'_>, >, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_list_nullables_and_optionals_struct(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_list_nullables_and_optionals_struct(self, ctx, value) } - async fn set_enum_attr( + fn set_enum_attr( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: SimpleEnum, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_enum_attr(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_enum_attr(self, ctx, value) } - async fn set_struct_attr( + fn set_struct_attr( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: SimpleStruct<'_>, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_struct_attr(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_struct_attr(self, ctx, value) } - async fn set_range_restricted_int_8_u( + fn set_range_restricted_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_range_restricted_int_8_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_range_restricted_int_8_u(self, ctx, value) } - async fn set_range_restricted_int_8_s( + fn set_range_restricted_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i8, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_range_restricted_int_8_s(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_range_restricted_int_8_s(self, ctx, value) } - async fn set_range_restricted_int_16_u( + fn set_range_restricted_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_range_restricted_int_16_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_range_restricted_int_16_u(self, ctx, value) } - async fn set_range_restricted_int_16_s( + fn set_range_restricted_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i16, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_range_restricted_int_16_s(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_range_restricted_int_16_s(self, ctx, value) } - async fn set_list_long_octet_string( + fn set_list_long_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< rs_matter_crate::tlv::TLVArray<'_, rs_matter_crate::tlv::OctetStr<'_>>, rs_matter_crate::tlv::OctetStr<'_>, >, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_list_long_octet_string(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_list_long_octet_string(self, ctx, value) } - async fn set_list_fabric_scoped( + fn set_list_fabric_scoped( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< rs_matter_crate::tlv::TLVArray<'_, TestFabricScoped<'_>>, TestFabricScoped<'_>, >, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_list_fabric_scoped(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_list_fabric_scoped(self, ctx, value) } - async fn set_timed_write_boolean( + fn set_timed_write_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_timed_write_boolean(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_timed_write_boolean(self, ctx, value) } - async fn set_general_error_boolean( + fn set_general_error_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_general_error_boolean(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_general_error_boolean(self, ctx, value) } - async fn set_cluster_error_boolean( + fn set_cluster_error_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_cluster_error_boolean(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_cluster_error_boolean(self, ctx, value) } - async fn set_unsupported( + fn set_unsupported( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_unsupported(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_unsupported(self, ctx, value) } - async fn set_nullable_boolean( + fn set_nullable_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_boolean(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_boolean(self, ctx, value) } - async fn set_nullable_bitmap_8( + fn set_nullable_bitmap_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_bitmap_8(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_bitmap_8(self, ctx, value) } - async fn set_nullable_bitmap_16( + fn set_nullable_bitmap_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_bitmap_16(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_bitmap_16(self, ctx, value) } - async fn set_nullable_bitmap_32( + fn set_nullable_bitmap_32( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_bitmap_32(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_bitmap_32(self, ctx, value) } - async fn set_nullable_bitmap_64( + fn set_nullable_bitmap_64( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_bitmap_64(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_bitmap_64(self, ctx, value) } - async fn set_nullable_int_8_u( + fn set_nullable_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_8_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_int_8_u(self, ctx, value) } - async fn set_nullable_int_16_u( + fn set_nullable_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_16_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_int_16_u(self, ctx, value) } - async fn set_nullable_int_24_u( + fn set_nullable_int_24_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_24_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_int_24_u(self, ctx, value) } - async fn set_nullable_int_32_u( + fn set_nullable_int_32_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_32_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_int_32_u(self, ctx, value) } - async fn set_nullable_int_40_u( + fn set_nullable_int_40_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_40_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_int_40_u(self, ctx, value) } - async fn set_nullable_int_48_u( + fn set_nullable_int_48_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_48_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_int_48_u(self, ctx, value) } - async fn set_nullable_int_56_u( + fn set_nullable_int_56_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_56_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_int_56_u(self, ctx, value) } - async fn set_nullable_int_64_u( + fn set_nullable_int_64_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_64_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_int_64_u(self, ctx, value) } - async fn set_nullable_int_8_s( + fn set_nullable_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_8_s(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_int_8_s(self, ctx, value) } - async fn set_nullable_int_16_s( + fn set_nullable_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_16_s(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_int_16_s(self, ctx, value) } - async fn set_nullable_int_24_s( + fn set_nullable_int_24_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_24_s(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_int_24_s(self, ctx, value) } - async fn set_nullable_int_32_s( + fn set_nullable_int_32_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_32_s(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_int_32_s(self, ctx, value) } - async fn set_nullable_int_40_s( + fn set_nullable_int_40_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_40_s(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_int_40_s(self, ctx, value) } - async fn set_nullable_int_48_s( + fn set_nullable_int_48_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_48_s(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_int_48_s(self, ctx, value) } - async fn set_nullable_int_56_s( + fn set_nullable_int_56_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_56_s(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_int_56_s(self, ctx, value) } - async fn set_nullable_int_64_s( + fn set_nullable_int_64_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_int_64_s(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_int_64_s(self, ctx, value) } - async fn set_nullable_enum_8( + fn set_nullable_enum_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_enum_8(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_enum_8(self, ctx, value) } - async fn set_nullable_enum_16( + fn set_nullable_enum_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_enum_16(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_enum_16(self, ctx, value) } - async fn set_nullable_float_single( + fn set_nullable_float_single( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_float_single(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_float_single(self, ctx, value) } - async fn set_nullable_float_double( + fn set_nullable_float_double( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_float_double(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_float_double(self, ctx, value) } - async fn set_nullable_octet_string( + fn set_nullable_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable>, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_octet_string(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_octet_string(self, ctx, value) } - async fn set_nullable_char_string( + fn set_nullable_char_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable>, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_char_string(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_char_string(self, ctx, value) } - async fn set_nullable_enum_attr( + fn set_nullable_enum_attr( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_enum_attr(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_enum_attr(self, ctx, value) } - async fn set_nullable_struct( + fn set_nullable_struct( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable>, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_struct(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_struct(self, ctx, value) } - async fn set_nullable_range_restricted_int_8_u( + fn set_nullable_range_restricted_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_range_restricted_int_8_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_range_restricted_int_8_u(self, ctx, value) } - async fn set_nullable_range_restricted_int_8_s( + fn set_nullable_range_restricted_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_range_restricted_int_8_s(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_range_restricted_int_8_s(self, ctx, value) } - async fn set_nullable_range_restricted_int_16_u( + fn set_nullable_range_restricted_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_range_restricted_int_16_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_range_restricted_int_16_u(self, ctx, value) } - async fn set_nullable_range_restricted_int_16_s( + fn set_nullable_range_restricted_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_nullable_range_restricted_int_16_s(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_nullable_range_restricted_int_16_s(self, ctx, value) } - async fn set_write_only_int_8_u( + fn set_write_only_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_write_only_int_8_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_write_only_int_8_u(self, ctx, value) } - async fn set_mei_int_8_u( + fn set_mei_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_mei_int_8_u(self, ctx, value).await + ) -> impl core::future::Future> { + T::set_mei_int_8_u(self, ctx, value) } - async fn handle_test( + fn handle_test( &self, ctx: impl rs_matter_crate::dm::InvokeContext, - ) -> Result<(), rs_matter_crate::error::Error> { - T::handle_test(self, ctx).await + ) -> impl core::future::Future> { + T::handle_test(self, ctx) } - async fn handle_test_not_handled( + fn handle_test_not_handled( &self, ctx: impl rs_matter_crate::dm::InvokeContext, - ) -> Result<(), rs_matter_crate::error::Error> { - T::handle_test_not_handled(self, ctx).await + ) -> impl core::future::Future> { + T::handle_test_not_handled(self, ctx) } - async fn handle_test_specific( + fn handle_test_specific( &self, ctx: impl rs_matter_crate::dm::InvokeContext, response: TestSpecificResponseBuilder

, - ) -> Result { - T::handle_test_specific(self, ctx, response).await + ) -> impl core::future::Future> { + T::handle_test_specific(self, ctx, response) } - async fn handle_test_unknown_command( + fn handle_test_unknown_command( &self, ctx: impl rs_matter_crate::dm::InvokeContext, - ) -> Result<(), rs_matter_crate::error::Error> { - T::handle_test_unknown_command(self, ctx).await + ) -> impl core::future::Future> { + T::handle_test_unknown_command(self, ctx) } - async fn handle_test_add_arguments( + fn handle_test_add_arguments( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestAddArgumentsRequest<'_>, response: TestAddArgumentsResponseBuilder

, - ) -> Result { - T::handle_test_add_arguments(self, ctx, request, response).await + ) -> impl core::future::Future> { + T::handle_test_add_arguments(self, ctx, request, response) } - async fn handle_test_simple_argument_request( + fn handle_test_simple_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestSimpleArgumentRequestRequest<'_>, response: TestSimpleArgumentResponseBuilder

, - ) -> Result { - T::handle_test_simple_argument_request(self, ctx, request, response).await + ) -> impl core::future::Future> { + T::handle_test_simple_argument_request(self, ctx, request, response) } - async fn handle_test_struct_array_argument_request< - P: rs_matter_crate::tlv::TLVBuilderParent, - >( + fn handle_test_struct_array_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestStructArrayArgumentRequestRequest<'_>, response: TestStructArrayArgumentResponseBuilder

, - ) -> Result { - T::handle_test_struct_array_argument_request(self, ctx, request, response).await + ) -> impl core::future::Future> { + T::handle_test_struct_array_argument_request(self, ctx, request, response) } - async fn handle_test_struct_argument_request( + fn handle_test_struct_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestStructArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, - ) -> Result { - T::handle_test_struct_argument_request(self, ctx, request, response).await + ) -> impl core::future::Future> { + T::handle_test_struct_argument_request(self, ctx, request, response) } - async fn handle_test_nested_struct_argument_request< - P: rs_matter_crate::tlv::TLVBuilderParent, - >( + fn handle_test_nested_struct_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestNestedStructArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, - ) -> Result { - T::handle_test_nested_struct_argument_request(self, ctx, request, response).await + ) -> impl core::future::Future> { + T::handle_test_nested_struct_argument_request(self, ctx, request, response) } - async fn handle_test_list_struct_argument_request< - P: rs_matter_crate::tlv::TLVBuilderParent, - >( + fn handle_test_list_struct_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestListStructArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, - ) -> Result { - T::handle_test_list_struct_argument_request(self, ctx, request, response).await + ) -> impl core::future::Future> { + T::handle_test_list_struct_argument_request(self, ctx, request, response) } - async fn handle_test_list_int_8_u_argument_request< - P: rs_matter_crate::tlv::TLVBuilderParent, - >( + fn handle_test_list_int_8_u_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestListInt8UArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, - ) -> Result { - T::handle_test_list_int_8_u_argument_request(self, ctx, request, response).await + ) -> impl core::future::Future> { + T::handle_test_list_int_8_u_argument_request(self, ctx, request, response) } - async fn handle_test_nested_struct_list_argument_request< + fn handle_test_nested_struct_list_argument_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestNestedStructListArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, - ) -> Result { - T::handle_test_nested_struct_list_argument_request(self, ctx, request, response).await + ) -> impl core::future::Future> { + T::handle_test_nested_struct_list_argument_request(self, ctx, request, response) } - async fn handle_test_list_nested_struct_list_argument_request< + fn handle_test_list_nested_struct_list_argument_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestListNestedStructListArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, - ) -> Result { + ) -> impl core::future::Future> { T::handle_test_list_nested_struct_list_argument_request(self, ctx, request, response) - .await } - async fn handle_test_list_int_8_u_reverse_request< - P: rs_matter_crate::tlv::TLVBuilderParent, - >( + fn handle_test_list_int_8_u_reverse_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestListInt8UReverseRequestRequest<'_>, response: TestListInt8UReverseResponseBuilder

, - ) -> Result { - T::handle_test_list_int_8_u_reverse_request(self, ctx, request, response).await + ) -> impl core::future::Future> { + T::handle_test_list_int_8_u_reverse_request(self, ctx, request, response) } - async fn handle_test_enums_request( + fn handle_test_enums_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestEnumsRequestRequest<'_>, response: TestEnumsResponseBuilder

, - ) -> Result { - T::handle_test_enums_request(self, ctx, request, response).await + ) -> impl core::future::Future> { + T::handle_test_enums_request(self, ctx, request, response) } - async fn handle_test_nullable_optional_request< - P: rs_matter_crate::tlv::TLVBuilderParent, - >( + fn handle_test_nullable_optional_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestNullableOptionalRequestRequest<'_>, response: TestNullableOptionalResponseBuilder

, - ) -> Result { - T::handle_test_nullable_optional_request(self, ctx, request, response).await + ) -> impl core::future::Future> { + T::handle_test_nullable_optional_request(self, ctx, request, response) } - async fn handle_test_complex_nullable_optional_request< + fn handle_test_complex_nullable_optional_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestComplexNullableOptionalRequestRequest<'_>, response: TestComplexNullableOptionalResponseBuilder

, - ) -> Result { - T::handle_test_complex_nullable_optional_request(self, ctx, request, response).await + ) -> impl core::future::Future> { + T::handle_test_complex_nullable_optional_request(self, ctx, request, response) } - async fn handle_simple_struct_echo_request( + fn handle_simple_struct_echo_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: SimpleStructEchoRequestRequest<'_>, response: SimpleStructResponseBuilder

, - ) -> Result { - T::handle_simple_struct_echo_request(self, ctx, request, response).await + ) -> impl core::future::Future> { + T::handle_simple_struct_echo_request(self, ctx, request, response) } - async fn handle_timed_invoke_request( + fn handle_timed_invoke_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, - ) -> Result<(), rs_matter_crate::error::Error> { - T::handle_timed_invoke_request(self, ctx).await + ) -> impl core::future::Future> { + T::handle_timed_invoke_request(self, ctx) } - async fn handle_test_simple_optional_argument_request( + fn handle_test_simple_optional_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestSimpleOptionalArgumentRequestRequest<'_>, - ) -> Result<(), rs_matter_crate::error::Error> { - T::handle_test_simple_optional_argument_request(self, ctx, request).await + ) -> impl core::future::Future> { + T::handle_test_simple_optional_argument_request(self, ctx, request) } - async fn handle_test_emit_test_event_request( + fn handle_test_emit_test_event_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestEmitTestEventRequestRequest<'_>, response: TestEmitTestEventResponseBuilder

, - ) -> Result { - T::handle_test_emit_test_event_request(self, ctx, request, response).await + ) -> impl core::future::Future> { + T::handle_test_emit_test_event_request(self, ctx, request, response) } - async fn handle_test_emit_test_fabric_scoped_event_request< + fn handle_test_emit_test_fabric_scoped_event_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestEmitTestFabricScopedEventRequestRequest<'_>, response: TestEmitTestFabricScopedEventResponseBuilder

, - ) -> Result { - T::handle_test_emit_test_fabric_scoped_event_request(self, ctx, request, response).await + ) -> impl core::future::Future> { + T::handle_test_emit_test_fabric_scoped_event_request(self, ctx, request, response) } - async fn handle_test_batch_helper_request( + fn handle_test_batch_helper_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestBatchHelperRequestRequest<'_>, response: TestBatchHelperResponseBuilder

, - ) -> Result { - T::handle_test_batch_helper_request(self, ctx, request, response).await + ) -> impl core::future::Future> { + T::handle_test_batch_helper_request(self, ctx, request, response) } - async fn handle_test_second_batch_helper_request< - P: rs_matter_crate::tlv::TLVBuilderParent, - >( + fn handle_test_second_batch_helper_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestSecondBatchHelperRequestRequest<'_>, response: TestBatchHelperResponseBuilder

, - ) -> Result { - T::handle_test_second_batch_helper_request(self, ctx, request, response).await + ) -> impl core::future::Future> { + T::handle_test_second_batch_helper_request(self, ctx, request, response) } - async fn handle_test_different_vendor_mei_request< - P: rs_matter_crate::tlv::TLVBuilderParent, - >( + fn handle_test_different_vendor_mei_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestDifferentVendorMeiRequestRequest<'_>, response: TestDifferentVendorMeiResponseBuilder

, - ) -> Result { - T::handle_test_different_vendor_mei_request(self, ctx, request, response).await + ) -> impl core::future::Future> { + T::handle_test_different_vendor_mei_request(self, ctx, request, response) } } #[doc = "The handler adaptor for the cluster-specific handler. This adaptor implements the generic `rs-matter` handler trait."] diff --git a/rs-matter-macros/src/idl/handler.rs b/rs-matter-macros/src/idl/handler.rs index 43b52350e..aadf66bf2 100644 --- a/rs-matter-macros/src/idl/handler.rs +++ b/rs-matter-macros/src/idl/handler.rs @@ -473,16 +473,14 @@ fn handler_attribute_write( Err(#krate::error::ErrorCode::InvalidAction.into()) } ) + } else if delegate { + quote!( + fn #attr_name(&self, ctx: impl #krate::dm::WriteContext, value: #attr_type) -> impl core::future::Future> { + T::#attr_name(self, ctx, value) + } + ) } else { - let stream = quote!( - async fn #attr_name(&self, ctx: impl #krate::dm::WriteContext, value: #attr_type) -> Result<(), #krate::error::Error> - ); - - if delegate { - quote!(#stream { T::#attr_name(self, ctx, value).await }) - } else { - quote!(#stream;) - } + quote!(async fn #attr_name(&self, ctx: impl #krate::dm::WriteContext, value: #attr_type) -> Result<(), #krate::error::Error>;) } } @@ -538,90 +536,90 @@ fn handler_command( if let Some((field_resp, field_resp_builder)) = field_resp { if field_resp_builder { let stream = quote!( - async fn #cmd_name( + fn #cmd_name( &self, ctx: impl #krate::dm::InvokeContext, request: #field_req, response: #field_resp, - ) -> Result + ) ); if delegate { - quote!(#stream { T::#cmd_name(self, ctx, request, response).await }) + quote!(#stream -> impl core::future::Future> { T::#cmd_name(self, ctx, request, response) }) } else { - quote!(#stream;) + quote!(async #stream -> Result;) } } else { let stream = quote!( - async fn #cmd_name( + fn #cmd_name( &self, ctx: impl #krate::dm::InvokeContext, request: #field_req, - ) -> Result<#field_resp, #krate::error::Error> + ) ); if delegate { - quote!(#stream { T::#cmd_name(self, ctx, request).await }) + quote!(#stream -> impl core::future::Future> { T::#cmd_name(self, ctx, request) }) } else { - quote!(#stream;) + quote!(async #stream -> Result<#field_resp, #krate::error::Error>;) } } } else { let stream = quote!( - async fn #cmd_name( + fn #cmd_name( &self, ctx: impl #krate::dm::InvokeContext, request: #field_req, - ) -> Result<(), #krate::error::Error> + ) ); if delegate { - quote!(#stream { T::#cmd_name(self, ctx, request).await }) + quote!(#stream -> impl core::future::Future> { T::#cmd_name(self, ctx, request) }) } else { - quote!(#stream;) + quote!(async #stream -> Result<(), #krate::error::Error>;) } } } else if let Some((field_resp, field_resp_builder)) = field_resp { if field_resp_builder { let stream = quote!( - async fn #cmd_name( + fn #cmd_name( &self, ctx: impl #krate::dm::InvokeContext, response: #field_resp, - ) -> Result + ) ); if delegate { - quote!(#stream { T::#cmd_name(self, ctx, response).await }) + quote!(#stream -> impl core::future::Future> { T::#cmd_name(self, ctx, response) }) } else { - quote!(#stream;) + quote!(async #stream -> Result;) } } else { let stream = quote!( - async fn #cmd_name( + fn #cmd_name( &self, ctx: impl #krate::dm::InvokeContext, ) -> Result<#field_resp, #krate::error::Error> ); if delegate { - quote!(#stream { T::#cmd_name(self, ctx).await }) + quote!(#stream { T::#cmd_name(self, ctx) }) } else { - quote!(#stream;) + quote!(async #stream;) } } } else { let stream = quote!( - async fn #cmd_name( + fn #cmd_name( &self, ctx: impl #krate::dm::InvokeContext, - ) -> Result<(), #krate::error::Error> + ) ); if delegate { - quote!(#stream { T::#cmd_name(self, ctx).await }) + quote!(#stream -> impl core::future::Future> { T::#cmd_name(self, ctx) }) } else { - quote!(#stream;) + quote!(async #stream -> Result<(), #krate::error::Error>;) } } } @@ -1263,64 +1261,73 @@ mod tests { > { T::start_up_on_off(self, ctx) } - async fn set_on_time( + fn set_on_time( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_on_time(self, ctx, value).await + ) -> impl core::future::Future> + { + T::set_on_time(self, ctx, value) } - async fn set_off_wait_time( + fn set_off_wait_time( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_off_wait_time(self, ctx, value).await + ) -> impl core::future::Future> + { + T::set_off_wait_time(self, ctx, value) } - async fn set_start_up_on_off( + fn set_start_up_on_off( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - T::set_start_up_on_off(self, ctx, value).await + ) -> impl core::future::Future> + { + T::set_start_up_on_off(self, ctx, value) } - async fn handle_off( + fn handle_off( &self, ctx: impl rs_matter_crate::dm::InvokeContext, - ) -> Result<(), rs_matter_crate::error::Error> { - T::handle_off(self, ctx).await + ) -> impl core::future::Future> + { + T::handle_off(self, ctx) } - async fn handle_on( + fn handle_on( &self, ctx: impl rs_matter_crate::dm::InvokeContext, - ) -> Result<(), rs_matter_crate::error::Error> { - T::handle_on(self, ctx).await + ) -> impl core::future::Future> + { + T::handle_on(self, ctx) } - async fn handle_toggle( + fn handle_toggle( &self, ctx: impl rs_matter_crate::dm::InvokeContext, - ) -> Result<(), rs_matter_crate::error::Error> { - T::handle_toggle(self, ctx).await + ) -> impl core::future::Future> + { + T::handle_toggle(self, ctx) } - async fn handle_off_with_effect( + fn handle_off_with_effect( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: OffWithEffectRequest<'_>, - ) -> Result<(), rs_matter_crate::error::Error> { - T::handle_off_with_effect(self, ctx, request).await + ) -> impl core::future::Future> + { + T::handle_off_with_effect(self, ctx, request) } - async fn handle_on_with_recall_global_scene( + fn handle_on_with_recall_global_scene( &self, ctx: impl rs_matter_crate::dm::InvokeContext, - ) -> Result<(), rs_matter_crate::error::Error> { - T::handle_on_with_recall_global_scene(self, ctx).await + ) -> impl core::future::Future> + { + T::handle_on_with_recall_global_scene(self, ctx) } - async fn handle_on_with_timed_off( + fn handle_on_with_timed_off( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: OnWithTimedOffRequest<'_>, - ) -> Result<(), rs_matter_crate::error::Error> { - T::handle_on_with_timed_off(self, ctx, request).await + ) -> impl core::future::Future> + { + T::handle_on_with_timed_off(self, ctx, request) } } ) From 93e70a90fd424b11060e06d4626b068b1cbbed53 Mon Sep 17 00:00:00 2001 From: Marcos Boyington <15697303+gmarcosb@users.noreply.github.com> Date: Wed, 28 Jan 2026 12:37:30 -0700 Subject: [PATCH 6/9] Try inline(always) --- rs-matter-macros/src/idl.rs | 201 ++++++++++++++++++++++++++++ rs-matter-macros/src/idl/handler.rs | 65 ++++++++- 2 files changed, 259 insertions(+), 7 deletions(-) diff --git a/rs-matter-macros/src/idl.rs b/rs-matter-macros/src/idl.rs index a4ea33e31..a1c7c2325 100644 --- a/rs-matter-macros/src/idl.rs +++ b/rs-matter-macros/src/idl.rs @@ -22779,6 +22779,7 @@ pub mod unit_testing { const CLUSTER: rs_matter_crate::dm::Cluster<'static>; fn dataver(&self) -> u32; fn dataver_changed(&self); + #[inline(always)] fn run( &self, _ctx: impl rs_matter_crate::dm::HandlerContext, @@ -23002,6 +23003,7 @@ pub mod unit_testing { &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; + #[inline(always)] async fn unsupported( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23149,6 +23151,7 @@ pub mod unit_testing { &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result, rs_matter_crate::error::Error>; + #[inline(always)] async fn write_only_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23412,6 +23415,7 @@ pub mod unit_testing { ctx: impl rs_matter_crate::dm::WriteContext, value: bool, ) -> Result<(), rs_matter_crate::error::Error>; + #[inline(always)] async fn set_unsupported( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -23584,6 +23588,7 @@ pub mod unit_testing { ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> Result<(), rs_matter_crate::error::Error>; + #[inline(always)] async fn set_write_only_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -23770,12 +23775,14 @@ pub mod unit_testing { fn dataver_changed(&self) { T::dataver_changed(self) } + #[inline(always)] fn run( &self, ctx: impl rs_matter_crate::dm::HandlerContext, ) -> impl core::future::Future> { (**self).run(ctx) } + #[inline(always)] fn boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23783,6 +23790,7 @@ pub mod unit_testing { { T::boolean(self, ctx) } + #[inline(always)] fn bitmap_8( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23790,6 +23798,7 @@ pub mod unit_testing { { T::bitmap_8(self, ctx) } + #[inline(always)] fn bitmap_16( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23797,6 +23806,7 @@ pub mod unit_testing { { T::bitmap_16(self, ctx) } + #[inline(always)] fn bitmap_32( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23804,6 +23814,7 @@ pub mod unit_testing { { T::bitmap_32(self, ctx) } + #[inline(always)] fn bitmap_64( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23811,12 +23822,14 @@ pub mod unit_testing { { T::bitmap_64(self, ctx) } + #[inline(always)] fn int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { T::int_8_u(self, ctx) } + #[inline(always)] fn int_16_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23824,6 +23837,7 @@ pub mod unit_testing { { T::int_16_u(self, ctx) } + #[inline(always)] fn int_24_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23831,6 +23845,7 @@ pub mod unit_testing { { T::int_24_u(self, ctx) } + #[inline(always)] fn int_32_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23838,6 +23853,7 @@ pub mod unit_testing { { T::int_32_u(self, ctx) } + #[inline(always)] fn int_40_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23845,6 +23861,7 @@ pub mod unit_testing { { T::int_40_u(self, ctx) } + #[inline(always)] fn int_48_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23852,6 +23869,7 @@ pub mod unit_testing { { T::int_48_u(self, ctx) } + #[inline(always)] fn int_56_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23859,6 +23877,7 @@ pub mod unit_testing { { T::int_56_u(self, ctx) } + #[inline(always)] fn int_64_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23866,12 +23885,14 @@ pub mod unit_testing { { T::int_64_u(self, ctx) } + #[inline(always)] fn int_8_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { T::int_8_s(self, ctx) } + #[inline(always)] fn int_16_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23879,6 +23900,7 @@ pub mod unit_testing { { T::int_16_s(self, ctx) } + #[inline(always)] fn int_24_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23886,6 +23908,7 @@ pub mod unit_testing { { T::int_24_s(self, ctx) } + #[inline(always)] fn int_32_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23893,6 +23916,7 @@ pub mod unit_testing { { T::int_32_s(self, ctx) } + #[inline(always)] fn int_40_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23900,6 +23924,7 @@ pub mod unit_testing { { T::int_40_s(self, ctx) } + #[inline(always)] fn int_48_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23907,6 +23932,7 @@ pub mod unit_testing { { T::int_48_s(self, ctx) } + #[inline(always)] fn int_56_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23914,6 +23940,7 @@ pub mod unit_testing { { T::int_56_s(self, ctx) } + #[inline(always)] fn int_64_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23921,12 +23948,14 @@ pub mod unit_testing { { T::int_64_s(self, ctx) } + #[inline(always)] fn enum_8( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { T::enum_8(self, ctx) } + #[inline(always)] fn enum_16( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23934,6 +23963,7 @@ pub mod unit_testing { { T::enum_16(self, ctx) } + #[inline(always)] fn float_single( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23941,6 +23971,7 @@ pub mod unit_testing { { T::float_single(self, ctx) } + #[inline(always)] fn float_double( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23948,6 +23979,7 @@ pub mod unit_testing { { T::float_double(self, ctx) } + #[inline(always)] fn octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23955,6 +23987,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::octet_string(self, ctx, builder) } + #[inline(always)] fn list_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23965,6 +23998,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::list_int_8_u(self, ctx, builder) } + #[inline(always)] fn list_octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23975,6 +24009,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::list_octet_string(self, ctx, builder) } + #[inline(always)] fn list_struct_octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23985,6 +24020,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::list_struct_octet_string(self, ctx, builder) } + #[inline(always)] fn long_octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23992,6 +24028,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::long_octet_string(self, ctx, builder) } + #[inline(always)] fn char_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23999,6 +24036,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::char_string(self, ctx, builder) } + #[inline(always)] fn long_char_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24006,6 +24044,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::long_char_string(self, ctx, builder) } + #[inline(always)] fn epoch_us( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24013,6 +24052,7 @@ pub mod unit_testing { { T::epoch_us(self, ctx) } + #[inline(always)] fn epoch_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24020,6 +24060,7 @@ pub mod unit_testing { { T::epoch_s(self, ctx) } + #[inline(always)] fn vendor_id( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24027,6 +24068,7 @@ pub mod unit_testing { { T::vendor_id(self, ctx) } + #[inline(always)] fn list_nullables_and_optionals_struct( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24037,6 +24079,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::list_nullables_and_optionals_struct(self, ctx, builder) } + #[inline(always)] fn enum_attr( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24044,6 +24087,7 @@ pub mod unit_testing { { T::enum_attr(self, ctx) } + #[inline(always)] fn struct_attr( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24051,18 +24095,21 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::struct_attr(self, ctx, builder) } + #[inline(always)] fn range_restricted_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { T::range_restricted_int_8_u(self, ctx) } + #[inline(always)] fn range_restricted_int_8_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { T::range_restricted_int_8_s(self, ctx) } + #[inline(always)] fn range_restricted_int_16_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24070,6 +24117,7 @@ pub mod unit_testing { { T::range_restricted_int_16_u(self, ctx) } + #[inline(always)] fn range_restricted_int_16_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24077,6 +24125,7 @@ pub mod unit_testing { { T::range_restricted_int_16_s(self, ctx) } + #[inline(always)] fn list_long_octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24087,6 +24136,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::list_long_octet_string(self, ctx, builder) } + #[inline(always)] fn list_fabric_scoped( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24097,6 +24147,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::list_fabric_scoped(self, ctx, builder) } + #[inline(always)] fn timed_write_boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24104,6 +24155,7 @@ pub mod unit_testing { { T::timed_write_boolean(self, ctx) } + #[inline(always)] fn general_error_boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24111,6 +24163,7 @@ pub mod unit_testing { { T::general_error_boolean(self, ctx) } + #[inline(always)] fn cluster_error_boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24118,6 +24171,7 @@ pub mod unit_testing { { T::cluster_error_boolean(self, ctx) } + #[inline(always)] fn unsupported( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24125,6 +24179,7 @@ pub mod unit_testing { { T::unsupported(self, ctx) } + #[inline(always)] fn nullable_boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24133,6 +24188,7 @@ pub mod unit_testing { > { T::nullable_boolean(self, ctx) } + #[inline(always)] fn nullable_bitmap_8( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24144,6 +24200,7 @@ pub mod unit_testing { > { T::nullable_bitmap_8(self, ctx) } + #[inline(always)] fn nullable_bitmap_16( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24155,6 +24212,7 @@ pub mod unit_testing { > { T::nullable_bitmap_16(self, ctx) } + #[inline(always)] fn nullable_bitmap_32( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24166,6 +24224,7 @@ pub mod unit_testing { > { T::nullable_bitmap_32(self, ctx) } + #[inline(always)] fn nullable_bitmap_64( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24177,6 +24236,7 @@ pub mod unit_testing { > { T::nullable_bitmap_64(self, ctx) } + #[inline(always)] fn nullable_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24185,6 +24245,7 @@ pub mod unit_testing { > { T::nullable_int_8_u(self, ctx) } + #[inline(always)] fn nullable_int_16_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24193,6 +24254,7 @@ pub mod unit_testing { > { T::nullable_int_16_u(self, ctx) } + #[inline(always)] fn nullable_int_24_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24201,6 +24263,7 @@ pub mod unit_testing { > { T::nullable_int_24_u(self, ctx) } + #[inline(always)] fn nullable_int_32_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24209,6 +24272,7 @@ pub mod unit_testing { > { T::nullable_int_32_u(self, ctx) } + #[inline(always)] fn nullable_int_40_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24217,6 +24281,7 @@ pub mod unit_testing { > { T::nullable_int_40_u(self, ctx) } + #[inline(always)] fn nullable_int_48_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24225,6 +24290,7 @@ pub mod unit_testing { > { T::nullable_int_48_u(self, ctx) } + #[inline(always)] fn nullable_int_56_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24233,6 +24299,7 @@ pub mod unit_testing { > { T::nullable_int_56_u(self, ctx) } + #[inline(always)] fn nullable_int_64_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24241,6 +24308,7 @@ pub mod unit_testing { > { T::nullable_int_64_u(self, ctx) } + #[inline(always)] fn nullable_int_8_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24249,6 +24317,7 @@ pub mod unit_testing { > { T::nullable_int_8_s(self, ctx) } + #[inline(always)] fn nullable_int_16_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24257,6 +24326,7 @@ pub mod unit_testing { > { T::nullable_int_16_s(self, ctx) } + #[inline(always)] fn nullable_int_24_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24265,6 +24335,7 @@ pub mod unit_testing { > { T::nullable_int_24_s(self, ctx) } + #[inline(always)] fn nullable_int_32_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24273,6 +24344,7 @@ pub mod unit_testing { > { T::nullable_int_32_s(self, ctx) } + #[inline(always)] fn nullable_int_40_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24281,6 +24353,7 @@ pub mod unit_testing { > { T::nullable_int_40_s(self, ctx) } + #[inline(always)] fn nullable_int_48_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24289,6 +24362,7 @@ pub mod unit_testing { > { T::nullable_int_48_s(self, ctx) } + #[inline(always)] fn nullable_int_56_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24297,6 +24371,7 @@ pub mod unit_testing { > { T::nullable_int_56_s(self, ctx) } + #[inline(always)] fn nullable_int_64_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24305,6 +24380,7 @@ pub mod unit_testing { > { T::nullable_int_64_s(self, ctx) } + #[inline(always)] fn nullable_enum_8( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24313,6 +24389,7 @@ pub mod unit_testing { > { T::nullable_enum_8(self, ctx) } + #[inline(always)] fn nullable_enum_16( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24321,6 +24398,7 @@ pub mod unit_testing { > { T::nullable_enum_16(self, ctx) } + #[inline(always)] fn nullable_float_single( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24329,6 +24407,7 @@ pub mod unit_testing { > { T::nullable_float_single(self, ctx) } + #[inline(always)] fn nullable_float_double( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24337,6 +24416,7 @@ pub mod unit_testing { > { T::nullable_float_double(self, ctx) } + #[inline(always)] fn nullable_octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24347,6 +24427,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::nullable_octet_string(self, ctx, builder) } + #[inline(always)] fn nullable_char_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24357,6 +24438,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::nullable_char_string(self, ctx, builder) } + #[inline(always)] fn nullable_enum_attr( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24368,6 +24450,7 @@ pub mod unit_testing { > { T::nullable_enum_attr(self, ctx) } + #[inline(always)] fn nullable_struct( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24375,6 +24458,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::nullable_struct(self, ctx, builder) } + #[inline(always)] fn nullable_range_restricted_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24383,6 +24467,7 @@ pub mod unit_testing { > { T::nullable_range_restricted_int_8_u(self, ctx) } + #[inline(always)] fn nullable_range_restricted_int_8_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24391,6 +24476,7 @@ pub mod unit_testing { > { T::nullable_range_restricted_int_8_s(self, ctx) } + #[inline(always)] fn nullable_range_restricted_int_16_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24399,6 +24485,7 @@ pub mod unit_testing { > { T::nullable_range_restricted_int_16_u(self, ctx) } + #[inline(always)] fn nullable_range_restricted_int_16_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24407,18 +24494,21 @@ pub mod unit_testing { > { T::nullable_range_restricted_int_16_s(self, ctx) } + #[inline(always)] fn write_only_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { T::write_only_int_8_u(self, ctx) } + #[inline(always)] fn mei_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { T::mei_int_8_u(self, ctx) } + #[inline(always)] fn set_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24426,6 +24516,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_boolean(self, ctx, value) } + #[inline(always)] fn set_bitmap_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24433,6 +24524,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_bitmap_8(self, ctx, value) } + #[inline(always)] fn set_bitmap_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24440,6 +24532,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_bitmap_16(self, ctx, value) } + #[inline(always)] fn set_bitmap_32( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24447,6 +24540,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_bitmap_32(self, ctx, value) } + #[inline(always)] fn set_bitmap_64( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24454,6 +24548,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_bitmap_64(self, ctx, value) } + #[inline(always)] fn set_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24461,6 +24556,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_int_8_u(self, ctx, value) } + #[inline(always)] fn set_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24468,6 +24564,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_int_16_u(self, ctx, value) } + #[inline(always)] fn set_int_24_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24475,6 +24572,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_int_24_u(self, ctx, value) } + #[inline(always)] fn set_int_32_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24482,6 +24580,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_int_32_u(self, ctx, value) } + #[inline(always)] fn set_int_40_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24489,6 +24588,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_int_40_u(self, ctx, value) } + #[inline(always)] fn set_int_48_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24496,6 +24596,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_int_48_u(self, ctx, value) } + #[inline(always)] fn set_int_56_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24503,6 +24604,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_int_56_u(self, ctx, value) } + #[inline(always)] fn set_int_64_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24510,6 +24612,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_int_64_u(self, ctx, value) } + #[inline(always)] fn set_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24517,6 +24620,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_int_8_s(self, ctx, value) } + #[inline(always)] fn set_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24524,6 +24628,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_int_16_s(self, ctx, value) } + #[inline(always)] fn set_int_24_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24531,6 +24636,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_int_24_s(self, ctx, value) } + #[inline(always)] fn set_int_32_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24538,6 +24644,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_int_32_s(self, ctx, value) } + #[inline(always)] fn set_int_40_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24545,6 +24652,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_int_40_s(self, ctx, value) } + #[inline(always)] fn set_int_48_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24552,6 +24660,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_int_48_s(self, ctx, value) } + #[inline(always)] fn set_int_56_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24559,6 +24668,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_int_56_s(self, ctx, value) } + #[inline(always)] fn set_int_64_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24566,6 +24676,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_int_64_s(self, ctx, value) } + #[inline(always)] fn set_enum_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24573,6 +24684,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_enum_8(self, ctx, value) } + #[inline(always)] fn set_enum_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24580,6 +24692,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_enum_16(self, ctx, value) } + #[inline(always)] fn set_float_single( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24587,6 +24700,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_float_single(self, ctx, value) } + #[inline(always)] fn set_float_double( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24594,6 +24708,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_float_double(self, ctx, value) } + #[inline(always)] fn set_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24601,6 +24716,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_octet_string(self, ctx, value) } + #[inline(always)] fn set_list_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24611,6 +24727,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_list_int_8_u(self, ctx, value) } + #[inline(always)] fn set_list_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24621,6 +24738,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_list_octet_string(self, ctx, value) } + #[inline(always)] fn set_list_struct_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24631,6 +24749,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_list_struct_octet_string(self, ctx, value) } + #[inline(always)] fn set_long_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24638,6 +24757,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_long_octet_string(self, ctx, value) } + #[inline(always)] fn set_char_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24645,6 +24765,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_char_string(self, ctx, value) } + #[inline(always)] fn set_long_char_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24652,6 +24773,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_long_char_string(self, ctx, value) } + #[inline(always)] fn set_epoch_us( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24659,6 +24781,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_epoch_us(self, ctx, value) } + #[inline(always)] fn set_epoch_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24666,6 +24789,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_epoch_s(self, ctx, value) } + #[inline(always)] fn set_vendor_id( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24673,6 +24797,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_vendor_id(self, ctx, value) } + #[inline(always)] fn set_list_nullables_and_optionals_struct( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24683,6 +24808,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_list_nullables_and_optionals_struct(self, ctx, value) } + #[inline(always)] fn set_enum_attr( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24690,6 +24816,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_enum_attr(self, ctx, value) } + #[inline(always)] fn set_struct_attr( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24697,6 +24824,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_struct_attr(self, ctx, value) } + #[inline(always)] fn set_range_restricted_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24704,6 +24832,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_range_restricted_int_8_u(self, ctx, value) } + #[inline(always)] fn set_range_restricted_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24711,6 +24840,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_range_restricted_int_8_s(self, ctx, value) } + #[inline(always)] fn set_range_restricted_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24718,6 +24848,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_range_restricted_int_16_u(self, ctx, value) } + #[inline(always)] fn set_range_restricted_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24725,6 +24856,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_range_restricted_int_16_s(self, ctx, value) } + #[inline(always)] fn set_list_long_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24735,6 +24867,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_list_long_octet_string(self, ctx, value) } + #[inline(always)] fn set_list_fabric_scoped( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24745,6 +24878,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_list_fabric_scoped(self, ctx, value) } + #[inline(always)] fn set_timed_write_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24752,6 +24886,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_timed_write_boolean(self, ctx, value) } + #[inline(always)] fn set_general_error_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24759,6 +24894,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_general_error_boolean(self, ctx, value) } + #[inline(always)] fn set_cluster_error_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24766,6 +24902,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_cluster_error_boolean(self, ctx, value) } + #[inline(always)] fn set_unsupported( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24773,6 +24910,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_unsupported(self, ctx, value) } + #[inline(always)] fn set_nullable_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24780,6 +24918,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_boolean(self, ctx, value) } + #[inline(always)] fn set_nullable_bitmap_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24787,6 +24926,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_bitmap_8(self, ctx, value) } + #[inline(always)] fn set_nullable_bitmap_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24794,6 +24934,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_bitmap_16(self, ctx, value) } + #[inline(always)] fn set_nullable_bitmap_32( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24801,6 +24942,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_bitmap_32(self, ctx, value) } + #[inline(always)] fn set_nullable_bitmap_64( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24808,6 +24950,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_bitmap_64(self, ctx, value) } + #[inline(always)] fn set_nullable_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24815,6 +24958,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_int_8_u(self, ctx, value) } + #[inline(always)] fn set_nullable_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24822,6 +24966,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_int_16_u(self, ctx, value) } + #[inline(always)] fn set_nullable_int_24_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24829,6 +24974,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_int_24_u(self, ctx, value) } + #[inline(always)] fn set_nullable_int_32_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24836,6 +24982,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_int_32_u(self, ctx, value) } + #[inline(always)] fn set_nullable_int_40_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24843,6 +24990,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_int_40_u(self, ctx, value) } + #[inline(always)] fn set_nullable_int_48_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24850,6 +24998,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_int_48_u(self, ctx, value) } + #[inline(always)] fn set_nullable_int_56_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24857,6 +25006,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_int_56_u(self, ctx, value) } + #[inline(always)] fn set_nullable_int_64_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24864,6 +25014,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_int_64_u(self, ctx, value) } + #[inline(always)] fn set_nullable_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24871,6 +25022,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_int_8_s(self, ctx, value) } + #[inline(always)] fn set_nullable_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24878,6 +25030,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_int_16_s(self, ctx, value) } + #[inline(always)] fn set_nullable_int_24_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24885,6 +25038,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_int_24_s(self, ctx, value) } + #[inline(always)] fn set_nullable_int_32_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24892,6 +25046,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_int_32_s(self, ctx, value) } + #[inline(always)] fn set_nullable_int_40_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24899,6 +25054,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_int_40_s(self, ctx, value) } + #[inline(always)] fn set_nullable_int_48_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24906,6 +25062,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_int_48_s(self, ctx, value) } + #[inline(always)] fn set_nullable_int_56_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24913,6 +25070,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_int_56_s(self, ctx, value) } + #[inline(always)] fn set_nullable_int_64_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24920,6 +25078,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_int_64_s(self, ctx, value) } + #[inline(always)] fn set_nullable_enum_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24927,6 +25086,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_enum_8(self, ctx, value) } + #[inline(always)] fn set_nullable_enum_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24934,6 +25094,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_enum_16(self, ctx, value) } + #[inline(always)] fn set_nullable_float_single( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24941,6 +25102,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_float_single(self, ctx, value) } + #[inline(always)] fn set_nullable_float_double( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24948,6 +25110,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_float_double(self, ctx, value) } + #[inline(always)] fn set_nullable_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24955,6 +25118,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_octet_string(self, ctx, value) } + #[inline(always)] fn set_nullable_char_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24962,6 +25126,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_char_string(self, ctx, value) } + #[inline(always)] fn set_nullable_enum_attr( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24969,6 +25134,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_enum_attr(self, ctx, value) } + #[inline(always)] fn set_nullable_struct( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24976,6 +25142,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_struct(self, ctx, value) } + #[inline(always)] fn set_nullable_range_restricted_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24983,6 +25150,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_range_restricted_int_8_u(self, ctx, value) } + #[inline(always)] fn set_nullable_range_restricted_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24990,6 +25158,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_range_restricted_int_8_s(self, ctx, value) } + #[inline(always)] fn set_nullable_range_restricted_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24997,6 +25166,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_range_restricted_int_16_u(self, ctx, value) } + #[inline(always)] fn set_nullable_range_restricted_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -25004,6 +25174,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_nullable_range_restricted_int_16_s(self, ctx, value) } + #[inline(always)] fn set_write_only_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -25011,6 +25182,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_write_only_int_8_u(self, ctx, value) } + #[inline(always)] fn set_mei_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -25018,18 +25190,21 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::set_mei_int_8_u(self, ctx, value) } + #[inline(always)] fn handle_test( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> impl core::future::Future> { T::handle_test(self, ctx) } + #[inline(always)] fn handle_test_not_handled( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> impl core::future::Future> { T::handle_test_not_handled(self, ctx) } + #[inline(always)] fn handle_test_specific( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -25037,12 +25212,14 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::handle_test_specific(self, ctx, response) } + #[inline(always)] fn handle_test_unknown_command( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> impl core::future::Future> { T::handle_test_unknown_command(self, ctx) } + #[inline(always)] fn handle_test_add_arguments( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -25051,6 +25228,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::handle_test_add_arguments(self, ctx, request, response) } + #[inline(always)] fn handle_test_simple_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -25059,6 +25237,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::handle_test_simple_argument_request(self, ctx, request, response) } + #[inline(always)] fn handle_test_struct_array_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -25067,6 +25246,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::handle_test_struct_array_argument_request(self, ctx, request, response) } + #[inline(always)] fn handle_test_struct_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -25075,6 +25255,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::handle_test_struct_argument_request(self, ctx, request, response) } + #[inline(always)] fn handle_test_nested_struct_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -25083,6 +25264,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::handle_test_nested_struct_argument_request(self, ctx, request, response) } + #[inline(always)] fn handle_test_list_struct_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -25091,6 +25273,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::handle_test_list_struct_argument_request(self, ctx, request, response) } + #[inline(always)] fn handle_test_list_int_8_u_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -25099,6 +25282,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::handle_test_list_int_8_u_argument_request(self, ctx, request, response) } + #[inline(always)] fn handle_test_nested_struct_list_argument_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( @@ -25109,6 +25293,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::handle_test_nested_struct_list_argument_request(self, ctx, request, response) } + #[inline(always)] fn handle_test_list_nested_struct_list_argument_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( @@ -25119,6 +25304,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::handle_test_list_nested_struct_list_argument_request(self, ctx, request, response) } + #[inline(always)] fn handle_test_list_int_8_u_reverse_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -25127,6 +25313,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::handle_test_list_int_8_u_reverse_request(self, ctx, request, response) } + #[inline(always)] fn handle_test_enums_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -25135,6 +25322,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::handle_test_enums_request(self, ctx, request, response) } + #[inline(always)] fn handle_test_nullable_optional_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -25143,6 +25331,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::handle_test_nullable_optional_request(self, ctx, request, response) } + #[inline(always)] fn handle_test_complex_nullable_optional_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( @@ -25153,6 +25342,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::handle_test_complex_nullable_optional_request(self, ctx, request, response) } + #[inline(always)] fn handle_simple_struct_echo_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -25161,12 +25351,14 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::handle_simple_struct_echo_request(self, ctx, request, response) } + #[inline(always)] fn handle_timed_invoke_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> impl core::future::Future> { T::handle_timed_invoke_request(self, ctx) } + #[inline(always)] fn handle_test_simple_optional_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -25174,6 +25366,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::handle_test_simple_optional_argument_request(self, ctx, request) } + #[inline(always)] fn handle_test_emit_test_event_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -25182,6 +25375,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::handle_test_emit_test_event_request(self, ctx, request, response) } + #[inline(always)] fn handle_test_emit_test_fabric_scoped_event_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( @@ -25192,6 +25386,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::handle_test_emit_test_fabric_scoped_event_request(self, ctx, request, response) } + #[inline(always)] fn handle_test_batch_helper_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -25200,6 +25395,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::handle_test_batch_helper_request(self, ctx, request, response) } + #[inline(always)] fn handle_test_second_batch_helper_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -25208,6 +25404,7 @@ pub mod unit_testing { ) -> impl core::future::Future> { T::handle_test_second_batch_helper_request(self, ctx, request, response) } + #[inline(always)] fn handle_test_different_vendor_mei_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -25226,6 +25423,7 @@ pub mod unit_testing { T: ClusterHandler, { #[allow(unreachable_code)] + #[inline(always)] async fn read( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -27837,6 +28035,7 @@ pub mod unit_testing { } } #[allow(unreachable_code)] + #[inline(always)] async fn write( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -30246,6 +30445,7 @@ pub mod unit_testing { Ok(()) } #[allow(unreachable_code)] + #[inline(always)] async fn invoke( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -31714,6 +31914,7 @@ pub mod unit_testing { self.0.dataver_changed(); Ok(()) } + #[inline(always)] fn run( &self, ctx: impl rs_matter_crate::dm::HandlerContext, diff --git a/rs-matter-macros/src/idl/handler.rs b/rs-matter-macros/src/idl/handler.rs index aadf66bf2..4dd23e736 100644 --- a/rs-matter-macros/src/idl/handler.rs +++ b/rs-matter-macros/src/idl/handler.rs @@ -74,6 +74,7 @@ pub fn handler( if delegate { let run = quote!( + #[inline(always)] fn run(&self, ctx: impl #krate::dm::HandlerContext) -> impl core::future::Future> { (**self).run(ctx) } @@ -100,6 +101,7 @@ pub fn handler( ) } else { let run = quote!( + #[inline(always)] fn run(&self, _ctx: impl #krate::dm::HandlerContext) -> impl core::future::Future> { core::future::pending::>() } @@ -252,6 +254,7 @@ pub fn handler_adaptor( }; let run = quote!( + #[inline(always)] fn run(&self, ctx: impl #krate::dm::HandlerContext) -> impl core::future::Future> { self.0.run(ctx) } @@ -268,6 +271,7 @@ pub fn handler_adaptor( T: #handler_name, { #[allow(unreachable_code)] + #[inline(always)] async fn read( &self, ctx: impl #krate::dm::ReadContext, @@ -285,6 +289,7 @@ pub fn handler_adaptor( } #[allow(unreachable_code)] + #[inline(always)] async fn write( &self, ctx: impl #krate::dm::WriteContext, @@ -303,6 +308,7 @@ pub fn handler_adaptor( } #[allow(unreachable_code)] + #[inline(always)] async fn invoke( &self, ctx: impl #krate::dm::InvokeContext, @@ -394,12 +400,14 @@ fn handler_attribute( if !delegate && attr.field.is_optional { quote!( + #[inline(always)] async fn #attr_name(&self, ctx: impl #krate::dm::ReadContext, builder: #attr_type) -> Result { Err(#krate::error::ErrorCode::InvalidAction.into()) } ) } else if delegate { quote!( + #[inline(always)] fn #attr_name(&self, ctx: impl #krate::dm::ReadContext, builder: #attr_type) -> impl core::future::Future> { T::#attr_name(self, ctx, builder) } @@ -409,12 +417,14 @@ fn handler_attribute( } } else if !delegate && attr.field.is_optional { quote!( + #[inline(always)] async fn #attr_name(&self, ctx: impl #krate::dm::ReadContext) -> Result<#attr_type, #krate::error::Error> { Err(#krate::error::ErrorCode::InvalidAction.into()) } ) } else if delegate { quote!( + #[inline(always)] fn #attr_name(&self, ctx: impl #krate::dm::ReadContext) -> impl core::future::Future> { T::#attr_name(self, ctx) } @@ -469,12 +479,14 @@ fn handler_attribute_write( if !delegate && attr.field.is_optional { quote!( + #[inline(always)] async fn #attr_name(&self, ctx: impl #krate::dm::WriteContext, value: #attr_type) -> Result<(), #krate::error::Error> { Err(#krate::error::ErrorCode::InvalidAction.into()) } ) } else if delegate { quote!( + #[inline(always)] fn #attr_name(&self, ctx: impl #krate::dm::WriteContext, value: #attr_type) -> impl core::future::Future> { T::#attr_name(self, ctx, value) } @@ -545,7 +557,9 @@ fn handler_command( ); if delegate { - quote!(#stream -> impl core::future::Future> { T::#cmd_name(self, ctx, request, response) }) + quote!( + #[inline(always)] + #stream -> impl core::future::Future> { T::#cmd_name(self, ctx, request, response) }) } else { quote!(async #stream -> Result;) } @@ -559,7 +573,9 @@ fn handler_command( ); if delegate { - quote!(#stream -> impl core::future::Future> { T::#cmd_name(self, ctx, request) }) + quote!( + #[inline(always)] + #stream -> impl core::future::Future> { T::#cmd_name(self, ctx, request) }) } else { quote!(async #stream -> Result<#field_resp, #krate::error::Error>;) } @@ -574,7 +590,9 @@ fn handler_command( ); if delegate { - quote!(#stream -> impl core::future::Future> { T::#cmd_name(self, ctx, request) }) + quote!( + #[inline(always)] + #stream -> impl core::future::Future> { T::#cmd_name(self, ctx, request) }) } else { quote!(async #stream -> Result<(), #krate::error::Error>;) } @@ -590,7 +608,9 @@ fn handler_command( ); if delegate { - quote!(#stream -> impl core::future::Future> { T::#cmd_name(self, ctx, response) }) + quote!( + #[inline(always)] + #stream -> impl core::future::Future> { T::#cmd_name(self, ctx, response) }) } else { quote!(async #stream -> Result;) } @@ -603,7 +623,9 @@ fn handler_command( ); if delegate { - quote!(#stream { T::#cmd_name(self, ctx) }) + quote!( + #[inline(always)] + #stream { T::#cmd_name(self, ctx) }) } else { quote!(async #stream;) } @@ -617,7 +639,9 @@ fn handler_command( ); if delegate { - quote!(#stream -> impl core::future::Future> { T::#cmd_name(self, ctx) }) + quote!( + #[inline(always)] + #stream -> impl core::future::Future> { T::#cmd_name(self, ctx) }) } else { quote!(async #stream -> Result<(), #krate::error::Error>;) } @@ -1099,7 +1123,7 @@ mod tests { let cluster = get_cluster_named(&idl, "OnOff").expect("Cluster exists"); let context = IdlGenerateContext::new("rs_matter_crate"); - // panic!("====\n{}\n====", &handler(false, false, cluster, &context)); + // panic!("====\n{}\n====", &handler(false, cluster, &idl.globals, &context)); assert_tokenstreams_eq!( &handler(false, cluster, &idl.globals, &context), @@ -1110,6 +1134,7 @@ mod tests { const CLUSTER: rs_matter_crate::dm::Cluster<'static>; fn dataver(&self) -> u32; fn dataver_changed(&self); + #[inline(always)] fn run( &self, _ctx: impl rs_matter_crate::dm::HandlerContext, @@ -1121,24 +1146,28 @@ mod tests { &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result; + #[inline(always)] async fn global_scene_control( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result { Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) } + #[inline(always)] async fn on_time( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result { Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) } + #[inline(always)] async fn off_wait_time( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result { Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) } + #[inline(always)] async fn start_up_on_off( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -1148,6 +1177,7 @@ mod tests { > { Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) } + #[inline(always)] async fn set_on_time( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -1155,6 +1185,7 @@ mod tests { ) -> Result<(), rs_matter_crate::error::Error> { Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) } + #[inline(always)] async fn set_off_wait_time( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -1162,6 +1193,7 @@ mod tests { ) -> Result<(), rs_matter_crate::error::Error> { Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) } + #[inline(always)] async fn set_start_up_on_off( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -1215,6 +1247,7 @@ mod tests { fn dataver_changed(&self) { T::dataver_changed(self) } + #[inline(always)] fn run( &self, ctx: impl rs_matter_crate::dm::HandlerContext, @@ -1222,6 +1255,7 @@ mod tests { { (**self).run(ctx) } + #[inline(always)] fn on_off( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -1229,6 +1263,7 @@ mod tests { { T::on_off(self, ctx) } + #[inline(always)] fn global_scene_control( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -1236,6 +1271,7 @@ mod tests { { T::global_scene_control(self, ctx) } + #[inline(always)] fn on_time( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -1243,6 +1279,7 @@ mod tests { { T::on_time(self, ctx) } + #[inline(always)] fn off_wait_time( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -1250,6 +1287,7 @@ mod tests { { T::off_wait_time(self, ctx) } + #[inline(always)] fn start_up_on_off( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -1261,6 +1299,7 @@ mod tests { > { T::start_up_on_off(self, ctx) } + #[inline(always)] fn set_on_time( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -1269,6 +1308,7 @@ mod tests { { T::set_on_time(self, ctx, value) } + #[inline(always)] fn set_off_wait_time( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -1277,6 +1317,7 @@ mod tests { { T::set_off_wait_time(self, ctx, value) } + #[inline(always)] fn set_start_up_on_off( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -1285,6 +1326,7 @@ mod tests { { T::set_start_up_on_off(self, ctx, value) } + #[inline(always)] fn handle_off( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -1292,6 +1334,7 @@ mod tests { { T::handle_off(self, ctx) } + #[inline(always)] fn handle_on( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -1299,6 +1342,7 @@ mod tests { { T::handle_on(self, ctx) } + #[inline(always)] fn handle_toggle( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -1306,6 +1350,7 @@ mod tests { { T::handle_toggle(self, ctx) } + #[inline(always)] fn handle_off_with_effect( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -1314,6 +1359,7 @@ mod tests { { T::handle_off_with_effect(self, ctx, request) } + #[inline(always)] fn handle_on_with_recall_global_scene( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -1321,6 +1367,7 @@ mod tests { { T::handle_on_with_recall_global_scene(self, ctx) } + #[inline(always)] fn handle_on_with_timed_off( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -1355,6 +1402,7 @@ mod tests { T: ClusterHandler, { #[allow(unreachable_code)] + #[inline(always)] async fn read( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -1514,6 +1562,7 @@ mod tests { } } #[allow(unreachable_code)] + #[inline(always)] async fn write( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -1630,6 +1679,7 @@ mod tests { Ok(()) } #[allow(unreachable_code)] + #[inline(always)] async fn invoke( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -1812,6 +1862,7 @@ mod tests { self.0.dataver_changed(); Ok(()) } + #[inline(always)] fn run( &self, ctx: impl rs_matter_crate::dm::HandlerContext, From 528fe92f24a2be25db8693be0f2d1531792b26b5 Mon Sep 17 00:00:00 2001 From: Marcos Boyington <15697303+gmarcosb@users.noreply.github.com> Date: Thu, 29 Jan 2026 15:57:12 -0700 Subject: [PATCH 7/9] Go back to having a SyncHandler which has sync methods, wrapped by an AsyncClusterHandler This allows for a cluster to easily combine both sync methods + async methods, while reducing the size of the binary --- examples/src/bin/bridge.rs | 8 +- examples/src/bin/media_player.rs | 46 +- rs-matter-macros/src/idl.rs | 5345 ++++++++++++++------ rs-matter-macros/src/idl/handler.rs | 719 ++- rs-matter/src/dm/clusters/acl.rs | 20 +- rs-matter/src/dm/clusters/adm_comm.rs | 17 +- rs-matter/src/dm/clusters/basic_info.rs | 60 +- rs-matter/src/dm/clusters/desc.rs | 10 +- rs-matter/src/dm/clusters/eth_diag.rs | 4 +- rs-matter/src/dm/clusters/gen_comm.rs | 28 +- rs-matter/src/dm/clusters/gen_diag.rs | 14 +- rs-matter/src/dm/clusters/grp_key_mgmt.rs | 20 +- rs-matter/src/dm/clusters/level_control.rs | 72 +- rs-matter/src/dm/clusters/net_comm.rs | 84 +- rs-matter/src/dm/clusters/noc.rs | 34 +- rs-matter/src/dm/clusters/on_off.rs | 36 +- rs-matter/src/dm/clusters/thread_diag.rs | 45 +- rs-matter/src/dm/clusters/unit_testing.rs | 436 +- rs-matter/src/dm/clusters/wifi_diag.rs | 20 +- scripts/memory/gh_report.py | 11 +- 20 files changed, 4856 insertions(+), 2173 deletions(-) diff --git a/examples/src/bin/bridge.rs b/examples/src/bin/bridge.rs index 5790717f6..000711842 100644 --- a/examples/src/bin/bridge.rs +++ b/examples/src/bin/bridge.rs @@ -288,8 +288,10 @@ impl bridged_device_basic_information::ClusterHandler for BridgedHandler { fn dataver_changed(&self) { self.dataver.changed(); } +} - async fn reachable(&self, _ctx: impl ReadContext) -> Result { +impl bridged_device_basic_information::ClusterSyncHandler for BridgedHandler { + fn reachable(&self, _ctx: impl ReadContext) -> Result { // This is the only mandatory attribute. // // We always report that the bridged device is reachable, @@ -298,7 +300,7 @@ impl bridged_device_basic_information::ClusterHandler for BridgedHandler { Ok(true) } - async fn unique_id( + fn unique_id( &self, _ctx: impl ReadContext, _builder: Utf8StrBuilder

, @@ -306,7 +308,7 @@ impl bridged_device_basic_information::ClusterHandler for BridgedHandler { todo!() } - async fn handle_keep_active( + fn handle_keep_active( &self, _ctx: impl InvokeContext, _request: KeepActiveRequest<'_>, diff --git a/examples/src/bin/media_player.rs b/examples/src/bin/media_player.rs index 68de933b4..1ea66d40b 100644 --- a/examples/src/bin/media_player.rs +++ b/examples/src/bin/media_player.rs @@ -268,15 +268,17 @@ impl media_playback::ClusterHandler for MediaHandler { fn dataver_changed(&self) { self.dataver.changed(); } +} - async fn current_state( +impl media_playback::ClusterSyncHandler for MediaHandler { + fn current_state( &self, _ctx: impl ReadContext, ) -> Result { Ok(self.state.get()) } - async fn handle_play( + fn handle_play( &self, ctx: impl InvokeContext, response: media_playback::PlaybackResponseBuilder

, @@ -288,7 +290,7 @@ impl media_playback::ClusterHandler for MediaHandler { response.status(StatusEnum::Success)?.data(None)?.end() } - async fn handle_pause( + fn handle_pause( &self, ctx: impl InvokeContext, response: PlaybackResponseBuilder

, @@ -300,7 +302,7 @@ impl media_playback::ClusterHandler for MediaHandler { response.status(StatusEnum::Success)?.data(None)?.end() } - async fn handle_stop( + fn handle_stop( &self, ctx: impl InvokeContext, response: PlaybackResponseBuilder

, @@ -312,7 +314,7 @@ impl media_playback::ClusterHandler for MediaHandler { response.status(StatusEnum::Success)?.data(None)?.end() } - async fn handle_start_over( + fn handle_start_over( &self, _ctx: impl InvokeContext, _response: PlaybackResponseBuilder

, @@ -321,7 +323,7 @@ impl media_playback::ClusterHandler for MediaHandler { Err(ErrorCode::InvalidCommand.into()) } - async fn handle_previous( + fn handle_previous( &self, _ctx: impl InvokeContext, _response: PlaybackResponseBuilder

, @@ -330,7 +332,7 @@ impl media_playback::ClusterHandler for MediaHandler { Err(ErrorCode::InvalidCommand.into()) } - async fn handle_next( + fn handle_next( &self, _ctx: impl InvokeContext, _response: PlaybackResponseBuilder

, @@ -339,7 +341,7 @@ impl media_playback::ClusterHandler for MediaHandler { Err(ErrorCode::InvalidCommand.into()) } - async fn handle_rewind( + fn handle_rewind( &self, _ctx: impl InvokeContext, _request: RewindRequest<'_>, @@ -349,7 +351,7 @@ impl media_playback::ClusterHandler for MediaHandler { Err(ErrorCode::InvalidCommand.into()) } - async fn handle_fast_forward( + fn handle_fast_forward( &self, _ctx: impl InvokeContext, _request: FastForwardRequest<'_>, @@ -359,7 +361,7 @@ impl media_playback::ClusterHandler for MediaHandler { Err(ErrorCode::InvalidCommand.into()) } - async fn handle_skip_forward( + fn handle_skip_forward( &self, _ctx: impl InvokeContext, _request: SkipForwardRequest<'_>, @@ -369,7 +371,7 @@ impl media_playback::ClusterHandler for MediaHandler { Err(ErrorCode::InvalidCommand.into()) } - async fn handle_skip_backward( + fn handle_skip_backward( &self, _ctx: impl InvokeContext, _request: SkipBackwardRequest<'_>, @@ -379,7 +381,7 @@ impl media_playback::ClusterHandler for MediaHandler { Err(ErrorCode::InvalidCommand.into()) } - async fn handle_seek( + fn handle_seek( &self, _ctx: impl InvokeContext, _request: SeekRequest<'_>, @@ -389,7 +391,7 @@ impl media_playback::ClusterHandler for MediaHandler { Err(ErrorCode::InvalidCommand.into()) } - async fn handle_activate_audio_track( + fn handle_activate_audio_track( &self, _ctx: impl InvokeContext, _request: ActivateAudioTrackRequest<'_>, @@ -398,7 +400,7 @@ impl media_playback::ClusterHandler for MediaHandler { Err(ErrorCode::InvalidCommand.into()) } - async fn handle_activate_text_track( + fn handle_activate_text_track( &self, _ctx: impl InvokeContext, _request: ActivateTextTrackRequest<'_>, @@ -407,7 +409,7 @@ impl media_playback::ClusterHandler for MediaHandler { Err(ErrorCode::InvalidCommand.into()) } - async fn handle_deactivate_text_track(&self, _ctx: impl InvokeContext) -> Result<(), Error> { + fn handle_deactivate_text_track(&self, _ctx: impl InvokeContext) -> Result<(), Error> { // Not supported Err(ErrorCode::InvalidCommand.into()) } @@ -444,8 +446,10 @@ impl content_launcher::ClusterHandler for ContentHandler { fn dataver_changed(&self) { self.dataver.changed(); } +} - async fn accept_header( +impl content_launcher::ClusterSyncHandler for ContentHandler { + fn accept_header( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead, Utf8StrBuilder

>, @@ -488,14 +492,14 @@ impl content_launcher::ClusterHandler for ContentHandler { } } - async fn supported_streaming_protocols( + fn supported_streaming_protocols( &self, _ctx: impl ReadContext, ) -> Result { Ok(SupportedProtocolsBitmap::all()) } - async fn handle_launch_url( + fn handle_launch_url( &self, _ctx: impl InvokeContext, request: LaunchURLRequest<'_>, @@ -509,7 +513,7 @@ impl content_launcher::ClusterHandler for ContentHandler { .end() } - async fn handle_launch_content( + fn handle_launch_content( &self, _ctx: impl InvokeContext, request: LaunchContentRequest<'_>, @@ -552,8 +556,10 @@ impl keypad_input::ClusterHandler for KeypadInputHandler { fn dataver_changed(&self) { self.dataver.changed(); } +} - async fn handle_send_key( +impl keypad_input::ClusterSyncHandler for KeypadInputHandler { + fn handle_send_key( &self, _ctx: impl InvokeContext, request: SendKeyRequest<'_>, diff --git a/rs-matter-macros/src/idl.rs b/rs-matter-macros/src/idl.rs index a1c7c2325..3e9e9493e 100644 --- a/rs-matter-macros/src/idl.rs +++ b/rs-matter-macros/src/idl.rs @@ -33,6 +33,7 @@ mod parser; mod struct_in; mod struct_out; +use crate::idl::handler::HandlerType; use crate::idl::parser::Entities; pub use parser::Idl; @@ -100,8 +101,9 @@ fn cluster_internal( let command_response_id = cluster::command_response_id(entities, context); let cluster_meta = cluster::cluster(cluster, globals, context); - let handler = handler::handler(false, cluster, globals, context); - let handler_inherent_impl = handler::handler(true, cluster, globals, context); + let handler = handler::handler(HandlerType::Handler, cluster, globals, context); + let sync_handler = handler::handler(HandlerType::Sync, cluster, globals, context); + let handler_inherent_impl = handler::handler(HandlerType::Delegate, cluster, globals, context); let handler_adaptor = handler::handler_adaptor(cluster, globals, context); let quote = quote!( @@ -123,6 +125,8 @@ fn cluster_internal( #cluster_meta + #sync_handler + #handler #handler_inherent_impl @@ -22774,995 +22778,3442 @@ pub mod unit_testing { #[doc = "A helper struct to generate the cluster debug info."] struct MetadataDebug(pub T); #[doc = "The handler trait for the cluster."] - pub trait ClusterHandler { - #[doc = "The cluster-metadata corresponding to this handler trait."] - const CLUSTER: rs_matter_crate::dm::Cluster<'static>; - fn dataver(&self) -> u32; - fn dataver_changed(&self); - #[inline(always)] - fn run( - &self, - _ctx: impl rs_matter_crate::dm::HandlerContext, - ) -> impl core::future::Future> { - core::future::pending::>() - } - async fn boolean( + pub trait ClusterSyncHandler { + fn boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn bitmap_8( + ) -> Result { + const { + core :: panic ! ("You must implement fn boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn bitmap_8( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn bitmap_16( + ) -> Result { + const { + core :: panic ! ("You must implement fn bitmap_8 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn bitmap_16( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn bitmap_32( + ) -> Result { + const { + core :: panic ! ("You must implement fn bitmap_16 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn bitmap_32( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn bitmap_64( + ) -> Result { + const { + core :: panic ! ("You must implement fn bitmap_32 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn bitmap_64( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn int_8_u( + ) -> Result { + const { + core :: panic ! ("You must implement fn bitmap_64 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn int_16_u( + ) -> Result { + const { + core :: panic ! ("You must implement fn int_8_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn int_16_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn int_24_u( + ) -> Result { + const { + core :: panic ! ("You must implement fn int_16_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn int_24_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn int_32_u( + ) -> Result { + const { + core :: panic ! ("You must implement fn int_24_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn int_32_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn int_40_u( + ) -> Result { + const { + core :: panic ! ("You must implement fn int_32_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn int_40_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn int_48_u( + ) -> Result { + const { + core :: panic ! ("You must implement fn int_40_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn int_48_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn int_56_u( + ) -> Result { + const { + core :: panic ! ("You must implement fn int_48_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn int_56_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn int_64_u( + ) -> Result { + const { + core :: panic ! ("You must implement fn int_56_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn int_64_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn int_8_s( + ) -> Result { + const { + core :: panic ! ("You must implement fn int_64_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn int_8_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn int_16_s( + ) -> Result { + const { + core :: panic ! ("You must implement fn int_8_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn int_16_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn int_24_s( + ) -> Result { + const { + core :: panic ! ("You must implement fn int_16_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn int_24_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn int_32_s( + ) -> Result { + const { + core :: panic ! ("You must implement fn int_24_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn int_32_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn int_40_s( + ) -> Result { + const { + core :: panic ! ("You must implement fn int_32_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn int_40_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn int_48_s( + ) -> Result { + const { + core :: panic ! ("You must implement fn int_40_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn int_48_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn int_56_s( + ) -> Result { + const { + core :: panic ! ("You must implement fn int_48_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn int_56_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn int_64_s( + ) -> Result { + const { + core :: panic ! ("You must implement fn int_56_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn int_64_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn enum_8( + ) -> Result { + const { + core :: panic ! ("You must implement fn int_64_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn enum_8( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn enum_16( + ) -> Result { + const { + core :: panic ! ("You must implement fn enum_8 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn enum_16( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn float_single( + ) -> Result { + const { + core :: panic ! ("You must implement fn enum_16 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn float_single( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn float_double( + ) -> Result { + const { + core :: panic ! ("You must implement fn float_single (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn float_double( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn octet_string( + ) -> Result { + const { + core :: panic ! ("You must implement fn float_double (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::OctetsBuilder

, - ) -> Result; - async fn list_int_8_u( + ) -> Result { + const { + core :: panic ! ("You must implement fn octet_string < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: tlv :: OctetsBuilder < P >)"); + } + } + fn list_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::dm::ArrayAttributeRead< rs_matter_crate::tlv::ToTLVArrayBuilder, rs_matter_crate::tlv::ToTLVBuilder, >, - ) -> Result; - async fn list_octet_string( + ) -> Result { + const { + core :: panic ! ("You must implement fn list_int_8_u < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: dm :: ArrayAttributeRead < rs_matter_crate :: tlv :: ToTLVArrayBuilder < P , u8 > , rs_matter_crate :: tlv :: ToTLVBuilder < P , u8 > >)"); + } + } + fn list_octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::dm::ArrayAttributeRead< rs_matter_crate::tlv::OctetsArrayBuilder

, rs_matter_crate::tlv::OctetsBuilder

, >, - ) -> Result; - async fn list_struct_octet_string( + ) -> Result { + const { + core :: panic ! ("You must implement fn list_octet_string < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: dm :: ArrayAttributeRead < rs_matter_crate :: tlv :: OctetsArrayBuilder < P > , rs_matter_crate :: tlv :: OctetsBuilder < P > >)"); + } + } + fn list_struct_octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::dm::ArrayAttributeRead< TestListStructOctetArrayBuilder

, TestListStructOctetBuilder

, >, - ) -> Result; - async fn long_octet_string( + ) -> Result { + const { + core :: panic ! ("You must implement fn list_struct_octet_string < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: dm :: ArrayAttributeRead < TestListStructOctetArrayBuilder < P > , TestListStructOctetBuilder < P > >)"); + } + } + fn long_octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::OctetsBuilder

, - ) -> Result; - async fn char_string( + ) -> Result { + const { + core :: panic ! ("You must implement fn long_octet_string < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: tlv :: OctetsBuilder < P >)"); + } + } + fn char_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::Utf8StrBuilder

, - ) -> Result; - async fn long_char_string( + ) -> Result { + const { + core :: panic ! ("You must implement fn char_string < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: tlv :: Utf8StrBuilder < P >)"); + } + } + fn long_char_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::Utf8StrBuilder

, - ) -> Result; - async fn epoch_us( + ) -> Result { + const { + core :: panic ! ("You must implement fn long_char_string < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: tlv :: Utf8StrBuilder < P >)"); + } + } + fn epoch_us( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn epoch_s( + ) -> Result { + const { + core :: panic ! ("You must implement fn epoch_us (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn epoch_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn vendor_id( + ) -> Result { + const { + core :: panic ! ("You must implement fn epoch_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn vendor_id( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn list_nullables_and_optionals_struct( + ) -> Result { + const { + core :: panic ! ("You must implement fn vendor_id (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn list_nullables_and_optionals_struct( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::dm::ArrayAttributeRead< NullablesAndOptionalsStructArrayBuilder

, NullablesAndOptionalsStructBuilder

, >, - ) -> Result; - async fn enum_attr( + ) -> Result { + const { + core :: panic ! ("You must implement fn list_nullables_and_optionals_struct < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: dm :: ArrayAttributeRead < NullablesAndOptionalsStructArrayBuilder < P > , NullablesAndOptionalsStructBuilder < P > >)"); + } + } + fn enum_attr( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn struct_attr( + ) -> Result { + const { + core :: panic ! ("You must implement fn enum_attr (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn struct_attr( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: SimpleStructBuilder

, - ) -> Result; - async fn range_restricted_int_8_u( + ) -> Result { + const { + core :: panic ! ("You must implement fn struct_attr < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : SimpleStructBuilder < P >)"); + } + } + fn range_restricted_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn range_restricted_int_8_s( + ) -> Result { + const { + core :: panic ! ("You must implement fn range_restricted_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn range_restricted_int_8_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn range_restricted_int_16_u( + ) -> Result { + const { + core :: panic ! ("You must implement fn range_restricted_int_8_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn range_restricted_int_16_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn range_restricted_int_16_s( + ) -> Result { + const { + core :: panic ! ("You must implement fn range_restricted_int_16_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn range_restricted_int_16_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn list_long_octet_string( + ) -> Result { + const { + core :: panic ! ("You must implement fn range_restricted_int_16_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn list_long_octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::dm::ArrayAttributeRead< rs_matter_crate::tlv::OctetsArrayBuilder

, rs_matter_crate::tlv::OctetsBuilder

, >, - ) -> Result; - async fn list_fabric_scoped( + ) -> Result { + const { + core :: panic ! ("You must implement fn list_long_octet_string < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: dm :: ArrayAttributeRead < rs_matter_crate :: tlv :: OctetsArrayBuilder < P > , rs_matter_crate :: tlv :: OctetsBuilder < P > >)"); + } + } + fn list_fabric_scoped( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::dm::ArrayAttributeRead< TestFabricScopedArrayBuilder

, TestFabricScopedBuilder

, >, - ) -> Result; - async fn timed_write_boolean( + ) -> Result { + const { + core :: panic ! ("You must implement fn list_fabric_scoped < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: dm :: ArrayAttributeRead < TestFabricScopedArrayBuilder < P > , TestFabricScopedBuilder < P > >)"); + } + } + fn timed_write_boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn general_error_boolean( + ) -> Result { + const { + core :: panic ! ("You must implement fn timed_write_boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn general_error_boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn cluster_error_boolean( + ) -> Result { + const { + core :: panic ! ("You must implement fn general_error_boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn cluster_error_boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - #[inline(always)] - async fn unsupported( + ) -> Result { + const { + core :: panic ! ("You must implement fn cluster_error_boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn unsupported( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result { Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) } - async fn nullable_boolean( + fn nullable_boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_bitmap_8( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_bitmap_8( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_bitmap_16( + ) -> Result, rs_matter_crate::error::Error> + { + const { + core :: panic ! ("You must implement fn nullable_bitmap_8 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_bitmap_16( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_bitmap_32( + ) -> Result, rs_matter_crate::error::Error> + { + const { + core :: panic ! ("You must implement fn nullable_bitmap_16 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_bitmap_32( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_bitmap_64( + ) -> Result, rs_matter_crate::error::Error> + { + const { + core :: panic ! ("You must implement fn nullable_bitmap_32 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_bitmap_64( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_int_8_u( + ) -> Result, rs_matter_crate::error::Error> + { + const { + core :: panic ! ("You must implement fn nullable_bitmap_64 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_int_16_u( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_int_16_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_int_24_u( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_int_16_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_int_24_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_int_32_u( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_int_24_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_int_32_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_int_40_u( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_int_32_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_int_40_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_int_48_u( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_int_40_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_int_48_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_int_56_u( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_int_48_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_int_56_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_int_64_u( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_int_56_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_int_64_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_int_8_s( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_int_64_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_int_8_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_int_16_s( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_int_8_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_int_16_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_int_24_s( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_int_16_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_int_24_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_int_32_s( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_int_24_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_int_32_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_int_40_s( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_int_32_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_int_40_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_int_48_s( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_int_40_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_int_48_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_int_56_s( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_int_48_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_int_56_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_int_64_s( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_int_56_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_int_64_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_enum_8( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_int_64_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_enum_8( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_enum_16( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_enum_8 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_enum_16( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_float_single( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_enum_16 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_float_single( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_float_double( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_float_single (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_float_double( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_octet_string( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_float_double (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::NullableBuilder< P, rs_matter_crate::tlv::OctetsBuilder

, >, - ) -> Result; - async fn nullable_char_string( + ) -> Result { + const { + core :: panic ! ("You must implement fn nullable_octet_string < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: tlv :: NullableBuilder < P , rs_matter_crate :: tlv :: OctetsBuilder < P > >)"); + } + } + fn nullable_char_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::NullableBuilder< P, rs_matter_crate::tlv::Utf8StrBuilder

, >, - ) -> Result; - async fn nullable_enum_attr( + ) -> Result { + const { + core :: panic ! ("You must implement fn nullable_char_string < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: tlv :: NullableBuilder < P , rs_matter_crate :: tlv :: Utf8StrBuilder < P > >)"); + } + } + fn nullable_enum_attr( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_struct( + ) -> Result, rs_matter_crate::error::Error> + { + const { + core :: panic ! ("You must implement fn nullable_enum_attr (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_struct( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::NullableBuilder>, - ) -> Result; - async fn nullable_range_restricted_int_8_u( + ) -> Result { + const { + core :: panic ! ("You must implement fn nullable_struct < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: tlv :: NullableBuilder < P , SimpleStructBuilder < P > >)"); + } + } + fn nullable_range_restricted_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_range_restricted_int_8_s( - &self, + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_range_restricted_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_range_restricted_int_8_s( + &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_range_restricted_int_16_u( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_range_restricted_int_8_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_range_restricted_int_16_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - async fn nullable_range_restricted_int_16_s( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_range_restricted_int_16_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn nullable_range_restricted_int_16_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result, rs_matter_crate::error::Error>; - #[inline(always)] - async fn write_only_int_8_u( + ) -> Result, rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn nullable_range_restricted_int_16_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn write_only_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> Result { Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) } - async fn mei_int_8_u( + fn mei_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - async fn set_boolean( + ) -> Result { + const { + core :: panic ! ("You must implement fn mei_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn set_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_bitmap_8( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_boolean (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : bool)"); + } + } + fn set_bitmap_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: Bitmap8MaskMap, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_bitmap_16( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_bitmap_8 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : Bitmap8MaskMap)"); + } + } + fn set_bitmap_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: Bitmap16MaskMap, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_bitmap_32( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_bitmap_16 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : Bitmap16MaskMap)"); + } + } + fn set_bitmap_32( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: Bitmap32MaskMap, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_bitmap_64( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_bitmap_32 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : Bitmap32MaskMap)"); + } + } + fn set_bitmap_64( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: Bitmap64MaskMap, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_int_8_u( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_bitmap_64 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : Bitmap64MaskMap)"); + } + } + fn set_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_int_16_u( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u8)"); + } + } + fn set_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_int_24_u( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_int_16_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u16)"); + } + } + fn set_int_24_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u32, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_int_32_u( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_int_24_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u32)"); + } + } + fn set_int_32_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u32, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_int_40_u( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_int_32_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u32)"); + } + } + fn set_int_40_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_int_48_u( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_int_40_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u64)"); + } + } + fn set_int_48_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_int_56_u( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_int_48_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u64)"); + } + } + fn set_int_56_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_int_64_u( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_int_56_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u64)"); + } + } + fn set_int_64_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_int_8_s( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_int_64_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u64)"); + } + } + fn set_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i8, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_int_16_s( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_int_8_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : i8)"); + } + } + fn set_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i16, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_int_24_s( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_int_16_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : i16)"); + } + } + fn set_int_24_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i32, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_int_32_s( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_int_24_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : i32)"); + } + } + fn set_int_32_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i32, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_int_40_s( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_int_32_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : i32)"); + } + } + fn set_int_40_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i64, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_int_48_s( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_int_40_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : i64)"); + } + } + fn set_int_48_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i64, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_int_56_s( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_int_48_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : i64)"); + } + } + fn set_int_56_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i64, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_int_64_s( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_int_56_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : i64)"); + } + } + fn set_int_64_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i64, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_enum_8( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_int_64_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : i64)"); + } + } + fn set_enum_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_enum_16( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_enum_8 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u8)"); + } + } + fn set_enum_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_float_single( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_enum_16 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u16)"); + } + } + fn set_float_single( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: f32, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_float_double( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_float_single (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : f32)"); + } + } + fn set_float_double( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: f64, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_octet_string( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_float_double (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : f64)"); + } + } + fn set_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::OctetStr<'_>, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_list_int_8_u( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_octet_string (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: OctetStr < '_ >)"); + } + } + fn set_list_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< rs_matter_crate::tlv::TLVArray<'_, u8>, u8, >, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_list_octet_string( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_list_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: dm :: ArrayAttributeWrite < rs_matter_crate :: tlv :: TLVArray < '_ , u8 > , u8 >)"); + } + } + fn set_list_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< rs_matter_crate::tlv::TLVArray<'_, rs_matter_crate::tlv::OctetStr<'_>>, rs_matter_crate::tlv::OctetStr<'_>, >, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_list_struct_octet_string( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_list_octet_string (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: dm :: ArrayAttributeWrite < rs_matter_crate :: tlv :: TLVArray < '_ , rs_matter_crate :: tlv :: OctetStr < '_ > > , rs_matter_crate :: tlv :: OctetStr < '_ > >)"); + } + } + fn set_list_struct_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< rs_matter_crate::tlv::TLVArray<'_, TestListStructOctet<'_>>, TestListStructOctet<'_>, >, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_long_octet_string( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_list_struct_octet_string (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: dm :: ArrayAttributeWrite < rs_matter_crate :: tlv :: TLVArray < '_ , TestListStructOctet < '_ > > , TestListStructOctet < '_ > >)"); + } + } + fn set_long_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::OctetStr<'_>, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_char_string( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_long_octet_string (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: OctetStr < '_ >)"); + } + } + fn set_char_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Utf8Str<'_>, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_long_char_string( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_char_string (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Utf8Str < '_ >)"); + } + } + fn set_long_char_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Utf8Str<'_>, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_epoch_us( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_long_char_string (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Utf8Str < '_ >)"); + } + } + fn set_epoch_us( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_epoch_s( + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_epoch_us (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u64)"); + } + } + fn set_epoch_s( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: u32, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_epoch_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u32)"); + } + } + fn set_vendor_id( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: u16, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_vendor_id (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u16)"); + } + } + fn set_list_nullables_and_optionals_struct( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::dm::ArrayAttributeWrite< + rs_matter_crate::tlv::TLVArray<'_, NullablesAndOptionalsStruct<'_>>, + NullablesAndOptionalsStruct<'_>, + >, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_list_nullables_and_optionals_struct (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: dm :: ArrayAttributeWrite < rs_matter_crate :: tlv :: TLVArray < '_ , NullablesAndOptionalsStruct < '_ > > , NullablesAndOptionalsStruct < '_ > >)"); + } + } + fn set_enum_attr( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: SimpleEnum, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_enum_attr (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : SimpleEnum)"); + } + } + fn set_struct_attr( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: SimpleStruct<'_>, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_struct_attr (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : SimpleStruct < '_ >)"); + } + } + fn set_range_restricted_int_8_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: u8, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_range_restricted_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u8)"); + } + } + fn set_range_restricted_int_8_s( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: i8, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_range_restricted_int_8_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : i8)"); + } + } + fn set_range_restricted_int_16_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: u16, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_range_restricted_int_16_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u16)"); + } + } + fn set_range_restricted_int_16_s( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: i16, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_range_restricted_int_16_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : i16)"); + } + } + fn set_list_long_octet_string( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::dm::ArrayAttributeWrite< + rs_matter_crate::tlv::TLVArray<'_, rs_matter_crate::tlv::OctetStr<'_>>, + rs_matter_crate::tlv::OctetStr<'_>, + >, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_list_long_octet_string (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: dm :: ArrayAttributeWrite < rs_matter_crate :: tlv :: TLVArray < '_ , rs_matter_crate :: tlv :: OctetStr < '_ > > , rs_matter_crate :: tlv :: OctetStr < '_ > >)"); + } + } + fn set_list_fabric_scoped( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::dm::ArrayAttributeWrite< + rs_matter_crate::tlv::TLVArray<'_, TestFabricScoped<'_>>, + TestFabricScoped<'_>, + >, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_list_fabric_scoped (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: dm :: ArrayAttributeWrite < rs_matter_crate :: tlv :: TLVArray < '_ , TestFabricScoped < '_ > > , TestFabricScoped < '_ > >)"); + } + } + fn set_timed_write_boolean( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: bool, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_timed_write_boolean (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : bool)"); + } + } + fn set_general_error_boolean( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: bool, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_general_error_boolean (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : bool)"); + } + } + fn set_cluster_error_boolean( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: bool, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_cluster_error_boolean (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : bool)"); + } + } + fn set_unsupported( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: bool, + ) -> Result<(), rs_matter_crate::error::Error> { + Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) + } + fn set_nullable_boolean( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_boolean (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < bool >)"); + } + } + fn set_nullable_bitmap_8( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_bitmap_8 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < Bitmap8MaskMap >)"); + } + } + fn set_nullable_bitmap_16( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_bitmap_16 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < Bitmap16MaskMap >)"); + } + } + fn set_nullable_bitmap_32( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_bitmap_32 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < Bitmap32MaskMap >)"); + } + } + fn set_nullable_bitmap_64( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_bitmap_64 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < Bitmap64MaskMap >)"); + } + } + fn set_nullable_int_8_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u8 >)"); + } + } + fn set_nullable_int_16_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_int_16_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u16 >)"); + } + } + fn set_nullable_int_24_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_int_24_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u32 >)"); + } + } + fn set_nullable_int_32_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_int_32_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u32 >)"); + } + } + fn set_nullable_int_40_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_int_40_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u64 >)"); + } + } + fn set_nullable_int_48_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_int_48_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u64 >)"); + } + } + fn set_nullable_int_56_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_int_56_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u64 >)"); + } + } + fn set_nullable_int_64_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_int_64_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u64 >)"); + } + } + fn set_nullable_int_8_s( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_int_8_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i8 >)"); + } + } + fn set_nullable_int_16_s( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_int_16_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i16 >)"); + } + } + fn set_nullable_int_24_s( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_int_24_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i32 >)"); + } + } + fn set_nullable_int_32_s( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_int_32_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i32 >)"); + } + } + fn set_nullable_int_40_s( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_int_40_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i64 >)"); + } + } + fn set_nullable_int_48_s( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_int_48_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i64 >)"); + } + } + fn set_nullable_int_56_s( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_int_56_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i64 >)"); + } + } + fn set_nullable_int_64_s( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_int_64_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i64 >)"); + } + } + fn set_nullable_enum_8( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_enum_8 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u8 >)"); + } + } + fn set_nullable_enum_16( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_enum_16 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u16 >)"); + } + } + fn set_nullable_float_single( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_float_single (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < f32 >)"); + } + } + fn set_nullable_float_double( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_float_double (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < f64 >)"); + } + } + fn set_nullable_octet_string( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable>, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_octet_string (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: OctetStr < '_ > >)"); + } + } + fn set_nullable_char_string( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable>, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_char_string (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > >)"); + } + } + fn set_nullable_enum_attr( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_enum_attr (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < SimpleEnum >)"); + } + } + fn set_nullable_struct( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable>, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_struct (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < SimpleStruct < '_ > >)"); + } + } + fn set_nullable_range_restricted_int_8_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_range_restricted_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u8 >)"); + } + } + fn set_nullable_range_restricted_int_8_s( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_range_restricted_int_8_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i8 >)"); + } + } + fn set_nullable_range_restricted_int_16_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_range_restricted_int_16_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u16 >)"); + } + } + fn set_nullable_range_restricted_int_16_s( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_nullable_range_restricted_int_16_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i16 >)"); + } + } + fn set_write_only_int_8_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: u8, + ) -> Result<(), rs_matter_crate::error::Error> { + Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) + } + fn set_mei_int_8_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: u8, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn set_mei_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u8)"); + } + } + fn handle_test( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn handle_test (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext)"); + } + } + fn handle_test_not_handled( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn handle_test_not_handled (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext)"); + } + } + fn handle_test_specific( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + response: TestSpecificResponseBuilder

, + ) -> Result { + const { + core :: panic ! ("You must implement fn handle_test_specific < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , response : TestSpecificResponseBuilder < P > ,)"); + } + } + fn handle_test_unknown_command( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn handle_test_unknown_command (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext)"); + } + } + fn handle_test_add_arguments( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + request: TestAddArgumentsRequest<'_>, + response: TestAddArgumentsResponseBuilder

, + ) -> Result { + const { + core :: panic ! ("You must implement fn handle_test_add_arguments < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestAddArgumentsRequest < '_ > , response : TestAddArgumentsResponseBuilder < P > ,)"); + } + } + fn handle_test_simple_argument_request( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + request: TestSimpleArgumentRequestRequest<'_>, + response: TestSimpleArgumentResponseBuilder

, + ) -> Result { + const { + core :: panic ! ("You must implement fn handle_test_simple_argument_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestSimpleArgumentRequestRequest < '_ > , response : TestSimpleArgumentResponseBuilder < P > ,)"); + } + } + fn handle_test_struct_array_argument_request( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + request: TestStructArrayArgumentRequestRequest<'_>, + response: TestStructArrayArgumentResponseBuilder

, + ) -> Result { + const { + core :: panic ! ("You must implement fn handle_test_struct_array_argument_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestStructArrayArgumentRequestRequest < '_ > , response : TestStructArrayArgumentResponseBuilder < P > ,)"); + } + } + fn handle_test_struct_argument_request( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + request: TestStructArgumentRequestRequest<'_>, + response: BooleanResponseBuilder

, + ) -> Result { + const { + core :: panic ! ("You must implement fn handle_test_struct_argument_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestStructArgumentRequestRequest < '_ > , response : BooleanResponseBuilder < P > ,)"); + } + } + fn handle_test_nested_struct_argument_request( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + request: TestNestedStructArgumentRequestRequest<'_>, + response: BooleanResponseBuilder

, + ) -> Result { + const { + core :: panic ! ("You must implement fn handle_test_nested_struct_argument_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestNestedStructArgumentRequestRequest < '_ > , response : BooleanResponseBuilder < P > ,)"); + } + } + fn handle_test_list_struct_argument_request( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + request: TestListStructArgumentRequestRequest<'_>, + response: BooleanResponseBuilder

, + ) -> Result { + const { + core :: panic ! ("You must implement fn handle_test_list_struct_argument_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestListStructArgumentRequestRequest < '_ > , response : BooleanResponseBuilder < P > ,)"); + } + } + fn handle_test_list_int_8_u_argument_request( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + request: TestListInt8UArgumentRequestRequest<'_>, + response: BooleanResponseBuilder

, + ) -> Result { + const { + core :: panic ! ("You must implement fn handle_test_list_int_8_u_argument_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestListInt8UArgumentRequestRequest < '_ > , response : BooleanResponseBuilder < P > ,)"); + } + } + fn handle_test_nested_struct_list_argument_request< + P: rs_matter_crate::tlv::TLVBuilderParent, + >( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + request: TestNestedStructListArgumentRequestRequest<'_>, + response: BooleanResponseBuilder

, + ) -> Result { + const { + core :: panic ! ("You must implement fn handle_test_nested_struct_list_argument_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestNestedStructListArgumentRequestRequest < '_ > , response : BooleanResponseBuilder < P > ,)"); + } + } + fn handle_test_list_nested_struct_list_argument_request< + P: rs_matter_crate::tlv::TLVBuilderParent, + >( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + request: TestListNestedStructListArgumentRequestRequest<'_>, + response: BooleanResponseBuilder

, + ) -> Result { + const { + core :: panic ! ("You must implement fn handle_test_list_nested_struct_list_argument_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestListNestedStructListArgumentRequestRequest < '_ > , response : BooleanResponseBuilder < P > ,)"); + } + } + fn handle_test_list_int_8_u_reverse_request( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + request: TestListInt8UReverseRequestRequest<'_>, + response: TestListInt8UReverseResponseBuilder

, + ) -> Result { + const { + core :: panic ! ("You must implement fn handle_test_list_int_8_u_reverse_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestListInt8UReverseRequestRequest < '_ > , response : TestListInt8UReverseResponseBuilder < P > ,)"); + } + } + fn handle_test_enums_request( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + request: TestEnumsRequestRequest<'_>, + response: TestEnumsResponseBuilder

, + ) -> Result { + const { + core :: panic ! ("You must implement fn handle_test_enums_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestEnumsRequestRequest < '_ > , response : TestEnumsResponseBuilder < P > ,)"); + } + } + fn handle_test_nullable_optional_request( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + request: TestNullableOptionalRequestRequest<'_>, + response: TestNullableOptionalResponseBuilder

, + ) -> Result { + const { + core :: panic ! ("You must implement fn handle_test_nullable_optional_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestNullableOptionalRequestRequest < '_ > , response : TestNullableOptionalResponseBuilder < P > ,)"); + } + } + fn handle_test_complex_nullable_optional_request< + P: rs_matter_crate::tlv::TLVBuilderParent, + >( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + request: TestComplexNullableOptionalRequestRequest<'_>, + response: TestComplexNullableOptionalResponseBuilder

, + ) -> Result { + const { + core :: panic ! ("You must implement fn handle_test_complex_nullable_optional_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestComplexNullableOptionalRequestRequest < '_ > , response : TestComplexNullableOptionalResponseBuilder < P > ,)"); + } + } + fn handle_simple_struct_echo_request( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + request: SimpleStructEchoRequestRequest<'_>, + response: SimpleStructResponseBuilder

, + ) -> Result { + const { + core :: panic ! ("You must implement fn handle_simple_struct_echo_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : SimpleStructEchoRequestRequest < '_ > , response : SimpleStructResponseBuilder < P > ,)"); + } + } + fn handle_timed_invoke_request( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn handle_timed_invoke_request (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext)"); + } + } + fn handle_test_simple_optional_argument_request( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + request: TestSimpleOptionalArgumentRequestRequest<'_>, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core :: panic ! ("You must implement fn handle_test_simple_optional_argument_request (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestSimpleOptionalArgumentRequestRequest < '_ > ,)"); + } + } + fn handle_test_emit_test_event_request( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + request: TestEmitTestEventRequestRequest<'_>, + response: TestEmitTestEventResponseBuilder

, + ) -> Result { + const { + core :: panic ! ("You must implement fn handle_test_emit_test_event_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestEmitTestEventRequestRequest < '_ > , response : TestEmitTestEventResponseBuilder < P > ,)"); + } + } + fn handle_test_emit_test_fabric_scoped_event_request< + P: rs_matter_crate::tlv::TLVBuilderParent, + >( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + request: TestEmitTestFabricScopedEventRequestRequest<'_>, + response: TestEmitTestFabricScopedEventResponseBuilder

, + ) -> Result { + const { + core :: panic ! ("You must implement fn handle_test_emit_test_fabric_scoped_event_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestEmitTestFabricScopedEventRequestRequest < '_ > , response : TestEmitTestFabricScopedEventResponseBuilder < P > ,)"); + } + } + fn handle_test_batch_helper_request( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + request: TestBatchHelperRequestRequest<'_>, + response: TestBatchHelperResponseBuilder

, + ) -> Result { + const { + core :: panic ! ("You must implement fn handle_test_batch_helper_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestBatchHelperRequestRequest < '_ > , response : TestBatchHelperResponseBuilder < P > ,)"); + } + } + fn handle_test_second_batch_helper_request( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + request: TestSecondBatchHelperRequestRequest<'_>, + response: TestBatchHelperResponseBuilder

, + ) -> Result { + const { + core :: panic ! ("You must implement fn handle_test_second_batch_helper_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestSecondBatchHelperRequestRequest < '_ > , response : TestBatchHelperResponseBuilder < P > ,)"); + } + } + fn handle_test_different_vendor_mei_request( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + request: TestDifferentVendorMeiRequestRequest<'_>, + response: TestDifferentVendorMeiResponseBuilder

, + ) -> Result { + const { + core :: panic ! ("You must implement fn handle_test_different_vendor_mei_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestDifferentVendorMeiRequestRequest < '_ > , response : TestDifferentVendorMeiResponseBuilder < P > ,)"); + } + } + } + #[doc = "The handler trait for the cluster."] + pub trait ClusterHandler: ClusterSyncHandler { + #[doc = "The cluster-metadata corresponding to this handler trait."] + const CLUSTER: rs_matter_crate::dm::Cluster<'static>; + fn dataver(&self) -> u32; + fn dataver_changed(&self); + fn run( + &self, + _ctx: impl rs_matter_crate::dm::HandlerContext, + ) -> impl core::future::Future> { + core::future::pending::>() + } + fn boolean( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::boolean(self, ctx)) + } + fn bitmap_8( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::bitmap_8(self, ctx)) + } + fn bitmap_16( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::bitmap_16(self, ctx)) + } + fn bitmap_32( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::bitmap_32(self, ctx)) + } + fn bitmap_64( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::bitmap_64(self, ctx)) + } + fn int_8_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> { + core::future::ready(::int_8_u(self, ctx)) + } + fn int_16_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::int_16_u(self, ctx)) + } + fn int_24_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::int_24_u(self, ctx)) + } + fn int_32_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::int_32_u(self, ctx)) + } + fn int_40_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::int_40_u(self, ctx)) + } + fn int_48_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::int_48_u(self, ctx)) + } + fn int_56_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::int_56_u(self, ctx)) + } + fn int_64_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::int_64_u(self, ctx)) + } + fn int_8_s( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> { + core::future::ready(::int_8_s(self, ctx)) + } + fn int_16_s( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::int_16_s(self, ctx)) + } + fn int_24_s( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::int_24_s(self, ctx)) + } + fn int_32_s( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::int_32_s(self, ctx)) + } + fn int_40_s( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::int_40_s(self, ctx)) + } + fn int_48_s( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::int_48_s(self, ctx)) + } + fn int_56_s( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::int_56_s(self, ctx)) + } + fn int_64_s( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::int_64_s(self, ctx)) + } + fn enum_8( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> { + core::future::ready(::enum_8(self, ctx)) + } + fn enum_16( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::enum_16(self, ctx)) + } + fn float_single( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::float_single(self, ctx)) + } + fn float_double( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::float_double(self, ctx)) + } + fn octet_string( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + builder: rs_matter_crate::tlv::OctetsBuilder

, + ) -> impl core::future::Future> { + core::future::ready(::octet_string( + self, ctx, builder, + )) + } + fn list_int_8_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + builder: rs_matter_crate::dm::ArrayAttributeRead< + rs_matter_crate::tlv::ToTLVArrayBuilder, + rs_matter_crate::tlv::ToTLVBuilder, + >, + ) -> impl core::future::Future> { + core::future::ready(::list_int_8_u( + self, ctx, builder, + )) + } + fn list_octet_string( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + builder: rs_matter_crate::dm::ArrayAttributeRead< + rs_matter_crate::tlv::OctetsArrayBuilder

, + rs_matter_crate::tlv::OctetsBuilder

, + >, + ) -> impl core::future::Future> { + core::future::ready(::list_octet_string( + self, ctx, builder, + )) + } + fn list_struct_octet_string( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + builder: rs_matter_crate::dm::ArrayAttributeRead< + TestListStructOctetArrayBuilder

, + TestListStructOctetBuilder

, + >, + ) -> impl core::future::Future> { + core::future::ready(::list_struct_octet_string( + self, ctx, builder, + )) + } + fn long_octet_string( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + builder: rs_matter_crate::tlv::OctetsBuilder

, + ) -> impl core::future::Future> { + core::future::ready(::long_octet_string( + self, ctx, builder, + )) + } + fn char_string( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + builder: rs_matter_crate::tlv::Utf8StrBuilder

, + ) -> impl core::future::Future> { + core::future::ready(::char_string( + self, ctx, builder, + )) + } + fn long_char_string( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + builder: rs_matter_crate::tlv::Utf8StrBuilder

, + ) -> impl core::future::Future> { + core::future::ready(::long_char_string( + self, ctx, builder, + )) + } + fn epoch_us( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::epoch_us(self, ctx)) + } + fn epoch_s( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::epoch_s(self, ctx)) + } + fn vendor_id( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::vendor_id(self, ctx)) + } + fn list_nullables_and_optionals_struct( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + builder: rs_matter_crate::dm::ArrayAttributeRead< + NullablesAndOptionalsStructArrayBuilder

, + NullablesAndOptionalsStructBuilder

, + >, + ) -> impl core::future::Future> { + core::future::ready( + ::list_nullables_and_optionals_struct( + self, ctx, builder, + ), + ) + } + fn enum_attr( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::enum_attr(self, ctx)) + } + fn struct_attr( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + builder: SimpleStructBuilder

, + ) -> impl core::future::Future> { + core::future::ready(::struct_attr( + self, ctx, builder, + )) + } + fn range_restricted_int_8_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> { + core::future::ready(::range_restricted_int_8_u( + self, ctx, + )) + } + fn range_restricted_int_8_s( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> { + core::future::ready(::range_restricted_int_8_s( + self, ctx, + )) + } + fn range_restricted_int_16_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::range_restricted_int_16_u( + self, ctx, + )) + } + fn range_restricted_int_16_s( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::range_restricted_int_16_s( + self, ctx, + )) + } + fn list_long_octet_string( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + builder: rs_matter_crate::dm::ArrayAttributeRead< + rs_matter_crate::tlv::OctetsArrayBuilder

, + rs_matter_crate::tlv::OctetsBuilder

, + >, + ) -> impl core::future::Future> { + core::future::ready(::list_long_octet_string( + self, ctx, builder, + )) + } + fn list_fabric_scoped( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + builder: rs_matter_crate::dm::ArrayAttributeRead< + TestFabricScopedArrayBuilder

, + TestFabricScopedBuilder

, + >, + ) -> impl core::future::Future> { + core::future::ready(::list_fabric_scoped( + self, ctx, builder, + )) + } + fn timed_write_boolean( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::timed_write_boolean(self, ctx)) + } + fn general_error_boolean( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::general_error_boolean( + self, ctx, + )) + } + fn cluster_error_boolean( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::cluster_error_boolean( + self, ctx, + )) + } + fn unsupported( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> + { + core::future::ready(::unsupported(self, ctx)) + } + fn nullable_boolean( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready(::nullable_boolean(self, ctx)) + } + fn nullable_bitmap_8( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result< + rs_matter_crate::tlv::Nullable, + rs_matter_crate::error::Error, + >, + > { + core::future::ready(::nullable_bitmap_8(self, ctx)) + } + fn nullable_bitmap_16( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result< + rs_matter_crate::tlv::Nullable, + rs_matter_crate::error::Error, + >, + > { + core::future::ready(::nullable_bitmap_16(self, ctx)) + } + fn nullable_bitmap_32( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result< + rs_matter_crate::tlv::Nullable, + rs_matter_crate::error::Error, + >, + > { + core::future::ready(::nullable_bitmap_32(self, ctx)) + } + fn nullable_bitmap_64( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result< + rs_matter_crate::tlv::Nullable, + rs_matter_crate::error::Error, + >, + > { + core::future::ready(::nullable_bitmap_64(self, ctx)) + } + fn nullable_int_8_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready(::nullable_int_8_u(self, ctx)) + } + fn nullable_int_16_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready(::nullable_int_16_u(self, ctx)) + } + fn nullable_int_24_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready(::nullable_int_24_u(self, ctx)) + } + fn nullable_int_32_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready(::nullable_int_32_u(self, ctx)) + } + fn nullable_int_40_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready(::nullable_int_40_u(self, ctx)) + } + fn nullable_int_48_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready(::nullable_int_48_u(self, ctx)) + } + fn nullable_int_56_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready(::nullable_int_56_u(self, ctx)) + } + fn nullable_int_64_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready(::nullable_int_64_u(self, ctx)) + } + fn nullable_int_8_s( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready(::nullable_int_8_s(self, ctx)) + } + fn nullable_int_16_s( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready(::nullable_int_16_s(self, ctx)) + } + fn nullable_int_24_s( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready(::nullable_int_24_s(self, ctx)) + } + fn nullable_int_32_s( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready(::nullable_int_32_s(self, ctx)) + } + fn nullable_int_40_s( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready(::nullable_int_40_s(self, ctx)) + } + fn nullable_int_48_s( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready(::nullable_int_48_s(self, ctx)) + } + fn nullable_int_56_s( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready(::nullable_int_56_s(self, ctx)) + } + fn nullable_int_64_s( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready(::nullable_int_64_s(self, ctx)) + } + fn nullable_enum_8( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready(::nullable_enum_8(self, ctx)) + } + fn nullable_enum_16( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready(::nullable_enum_16(self, ctx)) + } + fn nullable_float_single( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready(::nullable_float_single( + self, ctx, + )) + } + fn nullable_float_double( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready(::nullable_float_double( + self, ctx, + )) + } + fn nullable_octet_string( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + builder: rs_matter_crate::tlv::NullableBuilder< + P, + rs_matter_crate::tlv::OctetsBuilder

, + >, + ) -> impl core::future::Future> { + core::future::ready(::nullable_octet_string( + self, ctx, builder, + )) + } + fn nullable_char_string( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + builder: rs_matter_crate::tlv::NullableBuilder< + P, + rs_matter_crate::tlv::Utf8StrBuilder

, + >, + ) -> impl core::future::Future> { + core::future::ready(::nullable_char_string( + self, ctx, builder, + )) + } + fn nullable_enum_attr( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result< + rs_matter_crate::tlv::Nullable, + rs_matter_crate::error::Error, + >, + > { + core::future::ready(::nullable_enum_attr(self, ctx)) + } + fn nullable_struct( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + builder: rs_matter_crate::tlv::NullableBuilder>, + ) -> impl core::future::Future> { + core::future::ready(::nullable_struct( + self, ctx, builder, + )) + } + fn nullable_range_restricted_int_8_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready( + ::nullable_range_restricted_int_8_u(self, ctx), + ) + } + fn nullable_range_restricted_int_8_s( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready( + ::nullable_range_restricted_int_8_s(self, ctx), + ) + } + fn nullable_range_restricted_int_16_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready( + ::nullable_range_restricted_int_16_u(self, ctx), + ) + } + fn nullable_range_restricted_int_16_s( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future< + Output = Result, rs_matter_crate::error::Error>, + > { + core::future::ready( + ::nullable_range_restricted_int_16_s(self, ctx), + ) + } + fn write_only_int_8_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> { + core::future::ready(::write_only_int_8_u(self, ctx)) + } + fn mei_int_8_u( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> impl core::future::Future> { + core::future::ready(::mei_int_8_u(self, ctx)) + } + fn set_boolean( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: bool, + ) -> impl core::future::Future> { + core::future::ready(::set_boolean(self, ctx, value)) + } + fn set_bitmap_8( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: Bitmap8MaskMap, + ) -> impl core::future::Future> { + core::future::ready(::set_bitmap_8(self, ctx, value)) + } + fn set_bitmap_16( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: Bitmap16MaskMap, + ) -> impl core::future::Future> { + core::future::ready(::set_bitmap_16( + self, ctx, value, + )) + } + fn set_bitmap_32( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: Bitmap32MaskMap, + ) -> impl core::future::Future> { + core::future::ready(::set_bitmap_32( + self, ctx, value, + )) + } + fn set_bitmap_64( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: Bitmap64MaskMap, + ) -> impl core::future::Future> { + core::future::ready(::set_bitmap_64( + self, ctx, value, + )) + } + fn set_int_8_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: u8, + ) -> impl core::future::Future> { + core::future::ready(::set_int_8_u(self, ctx, value)) + } + fn set_int_16_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: u16, + ) -> impl core::future::Future> { + core::future::ready(::set_int_16_u(self, ctx, value)) + } + fn set_int_24_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: u32, + ) -> impl core::future::Future> { + core::future::ready(::set_int_24_u(self, ctx, value)) + } + fn set_int_32_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: u32, + ) -> impl core::future::Future> { + core::future::ready(::set_int_32_u(self, ctx, value)) + } + fn set_int_40_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: u64, + ) -> impl core::future::Future> { + core::future::ready(::set_int_40_u(self, ctx, value)) + } + fn set_int_48_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: u64, + ) -> impl core::future::Future> { + core::future::ready(::set_int_48_u(self, ctx, value)) + } + fn set_int_56_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: u64, + ) -> impl core::future::Future> { + core::future::ready(::set_int_56_u(self, ctx, value)) + } + fn set_int_64_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: u64, + ) -> impl core::future::Future> { + core::future::ready(::set_int_64_u(self, ctx, value)) + } + fn set_int_8_s( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: i8, + ) -> impl core::future::Future> { + core::future::ready(::set_int_8_s(self, ctx, value)) + } + fn set_int_16_s( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: i16, + ) -> impl core::future::Future> { + core::future::ready(::set_int_16_s(self, ctx, value)) + } + fn set_int_24_s( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: i32, + ) -> impl core::future::Future> { + core::future::ready(::set_int_24_s(self, ctx, value)) + } + fn set_int_32_s( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: i32, + ) -> impl core::future::Future> { + core::future::ready(::set_int_32_s(self, ctx, value)) + } + fn set_int_40_s( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: i64, + ) -> impl core::future::Future> { + core::future::ready(::set_int_40_s(self, ctx, value)) + } + fn set_int_48_s( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: i64, + ) -> impl core::future::Future> { + core::future::ready(::set_int_48_s(self, ctx, value)) + } + fn set_int_56_s( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: i64, + ) -> impl core::future::Future> { + core::future::ready(::set_int_56_s(self, ctx, value)) + } + fn set_int_64_s( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: i64, + ) -> impl core::future::Future> { + core::future::ready(::set_int_64_s(self, ctx, value)) + } + fn set_enum_8( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: u8, + ) -> impl core::future::Future> { + core::future::ready(::set_enum_8(self, ctx, value)) + } + fn set_enum_16( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: u16, + ) -> impl core::future::Future> { + core::future::ready(::set_enum_16(self, ctx, value)) + } + fn set_float_single( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: f32, + ) -> impl core::future::Future> { + core::future::ready(::set_float_single( + self, ctx, value, + )) + } + fn set_float_double( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: f64, + ) -> impl core::future::Future> { + core::future::ready(::set_float_double( + self, ctx, value, + )) + } + fn set_octet_string( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::OctetStr<'_>, + ) -> impl core::future::Future> { + core::future::ready(::set_octet_string( + self, ctx, value, + )) + } + fn set_list_int_8_u( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::dm::ArrayAttributeWrite< + rs_matter_crate::tlv::TLVArray<'_, u8>, + u8, + >, + ) -> impl core::future::Future> { + core::future::ready(::set_list_int_8_u( + self, ctx, value, + )) + } + fn set_list_octet_string( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::dm::ArrayAttributeWrite< + rs_matter_crate::tlv::TLVArray<'_, rs_matter_crate::tlv::OctetStr<'_>>, + rs_matter_crate::tlv::OctetStr<'_>, + >, + ) -> impl core::future::Future> { + core::future::ready(::set_list_octet_string( + self, ctx, value, + )) + } + fn set_list_struct_octet_string( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::dm::ArrayAttributeWrite< + rs_matter_crate::tlv::TLVArray<'_, TestListStructOctet<'_>>, + TestListStructOctet<'_>, + >, + ) -> impl core::future::Future> { + core::future::ready(::set_list_struct_octet_string( + self, ctx, value, + )) + } + fn set_long_octet_string( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::OctetStr<'_>, + ) -> impl core::future::Future> { + core::future::ready(::set_long_octet_string( + self, ctx, value, + )) + } + fn set_char_string( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Utf8Str<'_>, + ) -> impl core::future::Future> { + core::future::ready(::set_char_string( + self, ctx, value, + )) + } + fn set_long_char_string( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Utf8Str<'_>, + ) -> impl core::future::Future> { + core::future::ready(::set_long_char_string( + self, ctx, value, + )) + } + fn set_epoch_us( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: u64, + ) -> impl core::future::Future> { + core::future::ready(::set_epoch_us(self, ctx, value)) + } + fn set_epoch_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u32, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_vendor_id( + ) -> impl core::future::Future> { + core::future::ready(::set_epoch_s(self, ctx, value)) + } + fn set_vendor_id( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_list_nullables_and_optionals_struct( + ) -> impl core::future::Future> { + core::future::ready(::set_vendor_id( + self, ctx, value, + )) + } + fn set_list_nullables_and_optionals_struct( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< rs_matter_crate::tlv::TLVArray<'_, NullablesAndOptionalsStruct<'_>>, NullablesAndOptionalsStruct<'_>, >, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_enum_attr( + ) -> impl core::future::Future> { + core::future::ready( + ::set_list_nullables_and_optionals_struct( + self, ctx, value, + ), + ) + } + fn set_enum_attr( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: SimpleEnum, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_struct_attr( + ) -> impl core::future::Future> { + core::future::ready(::set_enum_attr( + self, ctx, value, + )) + } + fn set_struct_attr( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: SimpleStruct<'_>, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_range_restricted_int_8_u( + ) -> impl core::future::Future> { + core::future::ready(::set_struct_attr( + self, ctx, value, + )) + } + fn set_range_restricted_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_range_restricted_int_8_s( + ) -> impl core::future::Future> { + core::future::ready(::set_range_restricted_int_8_u( + self, ctx, value, + )) + } + fn set_range_restricted_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i8, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_range_restricted_int_16_u( + ) -> impl core::future::Future> { + core::future::ready(::set_range_restricted_int_8_s( + self, ctx, value, + )) + } + fn set_range_restricted_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_range_restricted_int_16_s( + ) -> impl core::future::Future> { + core::future::ready(::set_range_restricted_int_16_u( + self, ctx, value, + )) + } + fn set_range_restricted_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i16, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_list_long_octet_string( + ) -> impl core::future::Future> { + core::future::ready(::set_range_restricted_int_16_s( + self, ctx, value, + )) + } + fn set_list_long_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< rs_matter_crate::tlv::TLVArray<'_, rs_matter_crate::tlv::OctetStr<'_>>, rs_matter_crate::tlv::OctetStr<'_>, >, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_list_fabric_scoped( + ) -> impl core::future::Future> { + core::future::ready(::set_list_long_octet_string( + self, ctx, value, + )) + } + fn set_list_fabric_scoped( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::dm::ArrayAttributeWrite< rs_matter_crate::tlv::TLVArray<'_, TestFabricScoped<'_>>, TestFabricScoped<'_>, >, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_timed_write_boolean( + ) -> impl core::future::Future> { + core::future::ready(::set_list_fabric_scoped( + self, ctx, value, + )) + } + fn set_timed_write_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_general_error_boolean( + ) -> impl core::future::Future> { + core::future::ready(::set_timed_write_boolean( + self, ctx, value, + )) + } + fn set_general_error_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_cluster_error_boolean( + ) -> impl core::future::Future> { + core::future::ready(::set_general_error_boolean( + self, ctx, value, + )) + } + fn set_cluster_error_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, - ) -> Result<(), rs_matter_crate::error::Error>; - #[inline(always)] - async fn set_unsupported( + ) -> impl core::future::Future> { + core::future::ready(::set_cluster_error_boolean( + self, ctx, value, + )) + } + fn set_unsupported( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, - ) -> Result<(), rs_matter_crate::error::Error> { - Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) + ) -> impl core::future::Future> { + core::future::ready(::set_unsupported( + self, ctx, value, + )) } - async fn set_nullable_boolean( + fn set_nullable_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_bitmap_8( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_boolean( + self, ctx, value, + )) + } + fn set_nullable_bitmap_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_bitmap_16( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_bitmap_8( + self, ctx, value, + )) + } + fn set_nullable_bitmap_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_bitmap_32( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_bitmap_16( + self, ctx, value, + )) + } + fn set_nullable_bitmap_32( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_bitmap_64( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_bitmap_32( + self, ctx, value, + )) + } + fn set_nullable_bitmap_64( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_int_8_u( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_bitmap_64( + self, ctx, value, + )) + } + fn set_nullable_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_int_16_u( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_int_8_u( + self, ctx, value, + )) + } + fn set_nullable_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_int_24_u( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_int_16_u( + self, ctx, value, + )) + } + fn set_nullable_int_24_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_int_32_u( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_int_24_u( + self, ctx, value, + )) + } + fn set_nullable_int_32_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_int_40_u( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_int_32_u( + self, ctx, value, + )) + } + fn set_nullable_int_40_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_int_48_u( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_int_40_u( + self, ctx, value, + )) + } + fn set_nullable_int_48_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_int_56_u( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_int_48_u( + self, ctx, value, + )) + } + fn set_nullable_int_56_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_int_64_u( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_int_56_u( + self, ctx, value, + )) + } + fn set_nullable_int_64_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_int_8_s( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_int_64_u( + self, ctx, value, + )) + } + fn set_nullable_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_int_16_s( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_int_8_s( + self, ctx, value, + )) + } + fn set_nullable_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_int_24_s( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_int_16_s( + self, ctx, value, + )) + } + fn set_nullable_int_24_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_int_32_s( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_int_24_s( + self, ctx, value, + )) + } + fn set_nullable_int_32_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_int_40_s( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_int_32_s( + self, ctx, value, + )) + } + fn set_nullable_int_40_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_int_48_s( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_int_40_s( + self, ctx, value, + )) + } + fn set_nullable_int_48_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_int_56_s( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_int_48_s( + self, ctx, value, + )) + } + fn set_nullable_int_56_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_int_64_s( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_int_56_s( + self, ctx, value, + )) + } + fn set_nullable_int_64_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_enum_8( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_int_64_s( + self, ctx, value, + )) + } + fn set_nullable_enum_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_enum_16( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_enum_8( + self, ctx, value, + )) + } + fn set_nullable_enum_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_float_single( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_enum_16( + self, ctx, value, + )) + } + fn set_nullable_float_single( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_float_double( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_float_single( + self, ctx, value, + )) + } + fn set_nullable_float_double( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_octet_string( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_float_double( + self, ctx, value, + )) + } + fn set_nullable_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable>, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_char_string( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_octet_string( + self, ctx, value, + )) + } + fn set_nullable_char_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable>, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_enum_attr( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_char_string( + self, ctx, value, + )) + } + fn set_nullable_enum_attr( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_struct( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_enum_attr( + self, ctx, value, + )) + } + fn set_nullable_struct( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable>, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_range_restricted_int_8_u( + ) -> impl core::future::Future> { + core::future::ready(::set_nullable_struct( + self, ctx, value, + )) + } + fn set_nullable_range_restricted_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_range_restricted_int_8_s( + ) -> impl core::future::Future> { + core::future::ready( + ::set_nullable_range_restricted_int_8_u( + self, ctx, value, + ), + ) + } + fn set_nullable_range_restricted_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_range_restricted_int_16_u( + ) -> impl core::future::Future> { + core::future::ready( + ::set_nullable_range_restricted_int_8_s( + self, ctx, value, + ), + ) + } + fn set_nullable_range_restricted_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn set_nullable_range_restricted_int_16_s( + ) -> impl core::future::Future> { + core::future::ready( + ::set_nullable_range_restricted_int_16_u( + self, ctx, value, + ), + ) + } + fn set_nullable_range_restricted_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error>; - #[inline(always)] - async fn set_write_only_int_8_u( + ) -> impl core::future::Future> { + core::future::ready( + ::set_nullable_range_restricted_int_16_s( + self, ctx, value, + ), + ) + } + fn set_write_only_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, - ) -> Result<(), rs_matter_crate::error::Error> { - Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) + ) -> impl core::future::Future> { + core::future::ready(::set_write_only_int_8_u( + self, ctx, value, + )) } - async fn set_mei_int_8_u( + fn set_mei_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn handle_test( + ) -> impl core::future::Future> { + core::future::ready(::set_mei_int_8_u( + self, ctx, value, + )) + } + fn handle_test( &self, ctx: impl rs_matter_crate::dm::InvokeContext, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn handle_test_not_handled( + ) -> impl core::future::Future> { + core::future::ready(::handle_test(self, ctx)) + } + fn handle_test_not_handled( &self, ctx: impl rs_matter_crate::dm::InvokeContext, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn handle_test_specific( + ) -> impl core::future::Future> { + core::future::ready(::handle_test_not_handled( + self, ctx, + )) + } + fn handle_test_specific( &self, ctx: impl rs_matter_crate::dm::InvokeContext, response: TestSpecificResponseBuilder

, - ) -> Result; - async fn handle_test_unknown_command( + ) -> impl core::future::Future> { + core::future::ready(::handle_test_specific( + self, ctx, response, + )) + } + fn handle_test_unknown_command( &self, ctx: impl rs_matter_crate::dm::InvokeContext, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn handle_test_add_arguments( + ) -> impl core::future::Future> { + core::future::ready(::handle_test_unknown_command( + self, ctx, + )) + } + fn handle_test_add_arguments( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestAddArgumentsRequest<'_>, response: TestAddArgumentsResponseBuilder

, - ) -> Result; - async fn handle_test_simple_argument_request( + ) -> impl core::future::Future> { + core::future::ready(::handle_test_add_arguments( + self, ctx, request, response, + )) + } + fn handle_test_simple_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestSimpleArgumentRequestRequest<'_>, response: TestSimpleArgumentResponseBuilder

, - ) -> Result; - async fn handle_test_struct_array_argument_request< - P: rs_matter_crate::tlv::TLVBuilderParent, - >( + ) -> impl core::future::Future> { + core::future::ready( + ::handle_test_simple_argument_request( + self, ctx, request, response, + ), + ) + } + fn handle_test_struct_array_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestStructArrayArgumentRequestRequest<'_>, response: TestStructArrayArgumentResponseBuilder

, - ) -> Result; - async fn handle_test_struct_argument_request( + ) -> impl core::future::Future> { + core::future::ready( + ::handle_test_struct_array_argument_request( + self, ctx, request, response, + ), + ) + } + fn handle_test_struct_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestStructArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, - ) -> Result; - async fn handle_test_nested_struct_argument_request< - P: rs_matter_crate::tlv::TLVBuilderParent, - >( + ) -> impl core::future::Future> { + core::future::ready( + ::handle_test_struct_argument_request( + self, ctx, request, response, + ), + ) + } + fn handle_test_nested_struct_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestNestedStructArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, - ) -> Result; - async fn handle_test_list_struct_argument_request< - P: rs_matter_crate::tlv::TLVBuilderParent, - >( + ) -> impl core::future::Future> { + core::future::ready( + ::handle_test_nested_struct_argument_request( + self, ctx, request, response, + ), + ) + } + fn handle_test_list_struct_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestListStructArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, - ) -> Result; - async fn handle_test_list_int_8_u_argument_request< - P: rs_matter_crate::tlv::TLVBuilderParent, - >( + ) -> impl core::future::Future> { + core::future::ready( + ::handle_test_list_struct_argument_request( + self, ctx, request, response, + ), + ) + } + fn handle_test_list_int_8_u_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestListInt8UArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, - ) -> Result; - async fn handle_test_nested_struct_list_argument_request< + ) -> impl core::future::Future> { + core::future::ready( + ::handle_test_list_int_8_u_argument_request( + self, ctx, request, response, + ), + ) + } + fn handle_test_nested_struct_list_argument_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestNestedStructListArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, - ) -> Result; - async fn handle_test_list_nested_struct_list_argument_request< + ) -> impl core::future::Future> { + core::future::ready( + ::handle_test_nested_struct_list_argument_request( + self, ctx, request, response, + ), + ) + } + fn handle_test_list_nested_struct_list_argument_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestListNestedStructListArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, - ) -> Result; - async fn handle_test_list_int_8_u_reverse_request< - P: rs_matter_crate::tlv::TLVBuilderParent, - >( + ) -> impl core::future::Future> { + core::future::ready( + ::handle_test_list_nested_struct_list_argument_request( + self, ctx, request, response, + ), + ) + } + fn handle_test_list_int_8_u_reverse_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestListInt8UReverseRequestRequest<'_>, response: TestListInt8UReverseResponseBuilder

, - ) -> Result; - async fn handle_test_enums_request( + ) -> impl core::future::Future> { + core::future::ready( + ::handle_test_list_int_8_u_reverse_request( + self, ctx, request, response, + ), + ) + } + fn handle_test_enums_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestEnumsRequestRequest<'_>, response: TestEnumsResponseBuilder

, - ) -> Result; - async fn handle_test_nullable_optional_request( + ) -> impl core::future::Future> { + core::future::ready(::handle_test_enums_request( + self, ctx, request, response, + )) + } + fn handle_test_nullable_optional_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestNullableOptionalRequestRequest<'_>, response: TestNullableOptionalResponseBuilder

, - ) -> Result; - async fn handle_test_complex_nullable_optional_request< + ) -> impl core::future::Future> { + core::future::ready( + ::handle_test_nullable_optional_request( + self, ctx, request, response, + ), + ) + } + fn handle_test_complex_nullable_optional_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestComplexNullableOptionalRequestRequest<'_>, response: TestComplexNullableOptionalResponseBuilder

, - ) -> Result; - async fn handle_simple_struct_echo_request( + ) -> impl core::future::Future> { + core::future::ready( + ::handle_test_complex_nullable_optional_request( + self, ctx, request, response, + ), + ) + } + fn handle_simple_struct_echo_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: SimpleStructEchoRequestRequest<'_>, response: SimpleStructResponseBuilder

, - ) -> Result; - async fn handle_timed_invoke_request( + ) -> impl core::future::Future> { + core::future::ready( + ::handle_simple_struct_echo_request( + self, ctx, request, response, + ), + ) + } + fn handle_timed_invoke_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn handle_test_simple_optional_argument_request( + ) -> impl core::future::Future> { + core::future::ready(::handle_timed_invoke_request( + self, ctx, + )) + } + fn handle_test_simple_optional_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestSimpleOptionalArgumentRequestRequest<'_>, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn handle_test_emit_test_event_request( + ) -> impl core::future::Future> { + core::future::ready( + ::handle_test_simple_optional_argument_request( + self, ctx, request, + ), + ) + } + fn handle_test_emit_test_event_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestEmitTestEventRequestRequest<'_>, response: TestEmitTestEventResponseBuilder

, - ) -> Result; - async fn handle_test_emit_test_fabric_scoped_event_request< + ) -> impl core::future::Future> { + core::future::ready( + ::handle_test_emit_test_event_request( + self, ctx, request, response, + ), + ) + } + fn handle_test_emit_test_fabric_scoped_event_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestEmitTestFabricScopedEventRequestRequest<'_>, response: TestEmitTestFabricScopedEventResponseBuilder

, - ) -> Result; - async fn handle_test_batch_helper_request( + ) -> impl core::future::Future> { + core::future::ready( + ::handle_test_emit_test_fabric_scoped_event_request( + self, ctx, request, response, + ), + ) + } + fn handle_test_batch_helper_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestBatchHelperRequestRequest<'_>, response: TestBatchHelperResponseBuilder

, - ) -> Result; - async fn handle_test_second_batch_helper_request< - P: rs_matter_crate::tlv::TLVBuilderParent, - >( + ) -> impl core::future::Future> { + core::future::ready( + ::handle_test_batch_helper_request( + self, ctx, request, response, + ), + ) + } + fn handle_test_second_batch_helper_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestSecondBatchHelperRequestRequest<'_>, response: TestBatchHelperResponseBuilder

, - ) -> Result; - async fn handle_test_different_vendor_mei_request< - P: rs_matter_crate::tlv::TLVBuilderParent, - >( + ) -> impl core::future::Future> { + core::future::ready( + ::handle_test_second_batch_helper_request( + self, ctx, request, response, + ), + ) + } + fn handle_test_different_vendor_mei_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestDifferentVendorMeiRequestRequest<'_>, response: TestDifferentVendorMeiResponseBuilder

, - ) -> Result; + ) -> impl core::future::Future> { + core::future::ready( + ::handle_test_different_vendor_mei_request( + self, ctx, request, response, + ), + ) + } } impl ClusterHandler for &T where @@ -23775,219 +26226,191 @@ pub mod unit_testing { fn dataver_changed(&self) { T::dataver_changed(self) } - #[inline(always)] fn run( &self, ctx: impl rs_matter_crate::dm::HandlerContext, ) -> impl core::future::Future> { (**self).run(ctx) } - #[inline(always)] fn boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::boolean(self, ctx) + ::boolean(self, ctx) } - #[inline(always)] fn bitmap_8( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::bitmap_8(self, ctx) + ::bitmap_8(self, ctx) } - #[inline(always)] fn bitmap_16( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::bitmap_16(self, ctx) + ::bitmap_16(self, ctx) } - #[inline(always)] fn bitmap_32( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::bitmap_32(self, ctx) + ::bitmap_32(self, ctx) } - #[inline(always)] fn bitmap_64( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::bitmap_64(self, ctx) + ::bitmap_64(self, ctx) } - #[inline(always)] fn int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::int_8_u(self, ctx) + ::int_8_u(self, ctx) } - #[inline(always)] fn int_16_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::int_16_u(self, ctx) + ::int_16_u(self, ctx) } - #[inline(always)] fn int_24_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::int_24_u(self, ctx) + ::int_24_u(self, ctx) } - #[inline(always)] fn int_32_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::int_32_u(self, ctx) + ::int_32_u(self, ctx) } - #[inline(always)] fn int_40_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::int_40_u(self, ctx) + ::int_40_u(self, ctx) } - #[inline(always)] fn int_48_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::int_48_u(self, ctx) + ::int_48_u(self, ctx) } - #[inline(always)] fn int_56_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::int_56_u(self, ctx) + ::int_56_u(self, ctx) } - #[inline(always)] fn int_64_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::int_64_u(self, ctx) + ::int_64_u(self, ctx) } - #[inline(always)] fn int_8_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::int_8_s(self, ctx) + ::int_8_s(self, ctx) } - #[inline(always)] fn int_16_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::int_16_s(self, ctx) + ::int_16_s(self, ctx) } - #[inline(always)] fn int_24_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::int_24_s(self, ctx) + ::int_24_s(self, ctx) } - #[inline(always)] fn int_32_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::int_32_s(self, ctx) + ::int_32_s(self, ctx) } - #[inline(always)] fn int_40_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::int_40_s(self, ctx) + ::int_40_s(self, ctx) } - #[inline(always)] fn int_48_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::int_48_s(self, ctx) + ::int_48_s(self, ctx) } - #[inline(always)] fn int_56_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::int_56_s(self, ctx) + ::int_56_s(self, ctx) } - #[inline(always)] fn int_64_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::int_64_s(self, ctx) + ::int_64_s(self, ctx) } - #[inline(always)] fn enum_8( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::enum_8(self, ctx) + ::enum_8(self, ctx) } - #[inline(always)] fn enum_16( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::enum_16(self, ctx) + ::enum_16(self, ctx) } - #[inline(always)] fn float_single( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::float_single(self, ctx) + ::float_single(self, ctx) } - #[inline(always)] fn float_double( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::float_double(self, ctx) + ::float_double(self, ctx) } - #[inline(always)] fn octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::OctetsBuilder

, ) -> impl core::future::Future> { - T::octet_string(self, ctx, builder) + ::octet_string(self, ctx, builder) } - #[inline(always)] fn list_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -23996,9 +26419,8 @@ pub mod unit_testing { rs_matter_crate::tlv::ToTLVBuilder, >, ) -> impl core::future::Future> { - T::list_int_8_u(self, ctx, builder) + ::list_int_8_u(self, ctx, builder) } - #[inline(always)] fn list_octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24007,9 +26429,8 @@ pub mod unit_testing { rs_matter_crate::tlv::OctetsBuilder

, >, ) -> impl core::future::Future> { - T::list_octet_string(self, ctx, builder) + ::list_octet_string(self, ctx, builder) } - #[inline(always)] fn list_struct_octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24018,57 +26439,50 @@ pub mod unit_testing { TestListStructOctetBuilder

, >, ) -> impl core::future::Future> { - T::list_struct_octet_string(self, ctx, builder) + ::list_struct_octet_string(self, ctx, builder) } - #[inline(always)] fn long_octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::OctetsBuilder

, ) -> impl core::future::Future> { - T::long_octet_string(self, ctx, builder) + ::long_octet_string(self, ctx, builder) } - #[inline(always)] fn char_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::Utf8StrBuilder

, ) -> impl core::future::Future> { - T::char_string(self, ctx, builder) + ::char_string(self, ctx, builder) } - #[inline(always)] fn long_char_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::Utf8StrBuilder

, ) -> impl core::future::Future> { - T::long_char_string(self, ctx, builder) + ::long_char_string(self, ctx, builder) } - #[inline(always)] fn epoch_us( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::epoch_us(self, ctx) + ::epoch_us(self, ctx) } - #[inline(always)] fn epoch_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::epoch_s(self, ctx) + ::epoch_s(self, ctx) } - #[inline(always)] fn vendor_id( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::vendor_id(self, ctx) + ::vendor_id(self, ctx) } - #[inline(always)] fn list_nullables_and_optionals_struct( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24077,55 +26491,48 @@ pub mod unit_testing { NullablesAndOptionalsStructBuilder

, >, ) -> impl core::future::Future> { - T::list_nullables_and_optionals_struct(self, ctx, builder) + ::list_nullables_and_optionals_struct(self, ctx, builder) } - #[inline(always)] fn enum_attr( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::enum_attr(self, ctx) + ::enum_attr(self, ctx) } - #[inline(always)] fn struct_attr( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: SimpleStructBuilder

, ) -> impl core::future::Future> { - T::struct_attr(self, ctx, builder) + ::struct_attr(self, ctx, builder) } - #[inline(always)] fn range_restricted_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::range_restricted_int_8_u(self, ctx) + ::range_restricted_int_8_u(self, ctx) } - #[inline(always)] fn range_restricted_int_8_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::range_restricted_int_8_s(self, ctx) + ::range_restricted_int_8_s(self, ctx) } - #[inline(always)] fn range_restricted_int_16_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::range_restricted_int_16_u(self, ctx) + ::range_restricted_int_16_u(self, ctx) } - #[inline(always)] fn range_restricted_int_16_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::range_restricted_int_16_s(self, ctx) + ::range_restricted_int_16_s(self, ctx) } - #[inline(always)] fn list_long_octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24134,9 +26541,8 @@ pub mod unit_testing { rs_matter_crate::tlv::OctetsBuilder

, >, ) -> impl core::future::Future> { - T::list_long_octet_string(self, ctx, builder) + ::list_long_octet_string(self, ctx, builder) } - #[inline(always)] fn list_fabric_scoped( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24145,50 +26551,44 @@ pub mod unit_testing { TestFabricScopedBuilder

, >, ) -> impl core::future::Future> { - T::list_fabric_scoped(self, ctx, builder) + ::list_fabric_scoped(self, ctx, builder) } - #[inline(always)] fn timed_write_boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::timed_write_boolean(self, ctx) + ::timed_write_boolean(self, ctx) } - #[inline(always)] fn general_error_boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::general_error_boolean(self, ctx) + ::general_error_boolean(self, ctx) } - #[inline(always)] fn cluster_error_boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::cluster_error_boolean(self, ctx) + ::cluster_error_boolean(self, ctx) } - #[inline(always)] fn unsupported( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::unsupported(self, ctx) + ::unsupported(self, ctx) } - #[inline(always)] fn nullable_boolean( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_boolean(self, ctx) + ::nullable_boolean(self, ctx) } - #[inline(always)] fn nullable_bitmap_8( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24198,9 +26598,8 @@ pub mod unit_testing { rs_matter_crate::error::Error, >, > { - T::nullable_bitmap_8(self, ctx) + ::nullable_bitmap_8(self, ctx) } - #[inline(always)] fn nullable_bitmap_16( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24210,9 +26609,8 @@ pub mod unit_testing { rs_matter_crate::error::Error, >, > { - T::nullable_bitmap_16(self, ctx) + ::nullable_bitmap_16(self, ctx) } - #[inline(always)] fn nullable_bitmap_32( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24222,9 +26620,8 @@ pub mod unit_testing { rs_matter_crate::error::Error, >, > { - T::nullable_bitmap_32(self, ctx) + ::nullable_bitmap_32(self, ctx) } - #[inline(always)] fn nullable_bitmap_64( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24234,189 +26631,168 @@ pub mod unit_testing { rs_matter_crate::error::Error, >, > { - T::nullable_bitmap_64(self, ctx) + ::nullable_bitmap_64(self, ctx) } - #[inline(always)] fn nullable_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_int_8_u(self, ctx) + ::nullable_int_8_u(self, ctx) } - #[inline(always)] fn nullable_int_16_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_int_16_u(self, ctx) + ::nullable_int_16_u(self, ctx) } - #[inline(always)] fn nullable_int_24_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_int_24_u(self, ctx) + ::nullable_int_24_u(self, ctx) } - #[inline(always)] fn nullable_int_32_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_int_32_u(self, ctx) + ::nullable_int_32_u(self, ctx) } - #[inline(always)] fn nullable_int_40_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_int_40_u(self, ctx) + ::nullable_int_40_u(self, ctx) } - #[inline(always)] fn nullable_int_48_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_int_48_u(self, ctx) + ::nullable_int_48_u(self, ctx) } - #[inline(always)] fn nullable_int_56_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_int_56_u(self, ctx) + ::nullable_int_56_u(self, ctx) } - #[inline(always)] fn nullable_int_64_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_int_64_u(self, ctx) + ::nullable_int_64_u(self, ctx) } - #[inline(always)] fn nullable_int_8_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_int_8_s(self, ctx) + ::nullable_int_8_s(self, ctx) } - #[inline(always)] fn nullable_int_16_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_int_16_s(self, ctx) + ::nullable_int_16_s(self, ctx) } - #[inline(always)] fn nullable_int_24_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_int_24_s(self, ctx) + ::nullable_int_24_s(self, ctx) } - #[inline(always)] fn nullable_int_32_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_int_32_s(self, ctx) + ::nullable_int_32_s(self, ctx) } - #[inline(always)] fn nullable_int_40_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_int_40_s(self, ctx) + ::nullable_int_40_s(self, ctx) } - #[inline(always)] fn nullable_int_48_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_int_48_s(self, ctx) + ::nullable_int_48_s(self, ctx) } - #[inline(always)] fn nullable_int_56_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_int_56_s(self, ctx) + ::nullable_int_56_s(self, ctx) } - #[inline(always)] fn nullable_int_64_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_int_64_s(self, ctx) + ::nullable_int_64_s(self, ctx) } - #[inline(always)] fn nullable_enum_8( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_enum_8(self, ctx) + ::nullable_enum_8(self, ctx) } - #[inline(always)] fn nullable_enum_16( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_enum_16(self, ctx) + ::nullable_enum_16(self, ctx) } - #[inline(always)] fn nullable_float_single( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_float_single(self, ctx) + ::nullable_float_single(self, ctx) } - #[inline(always)] fn nullable_float_double( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_float_double(self, ctx) + ::nullable_float_double(self, ctx) } - #[inline(always)] fn nullable_octet_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24425,9 +26801,8 @@ pub mod unit_testing { rs_matter_crate::tlv::OctetsBuilder

, >, ) -> impl core::future::Future> { - T::nullable_octet_string(self, ctx, builder) + ::nullable_octet_string(self, ctx, builder) } - #[inline(always)] fn nullable_char_string( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24436,9 +26811,8 @@ pub mod unit_testing { rs_matter_crate::tlv::Utf8StrBuilder

, >, ) -> impl core::future::Future> { - T::nullable_char_string(self, ctx, builder) + ::nullable_char_string(self, ctx, builder) } - #[inline(always)] fn nullable_enum_attr( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -24448,275 +26822,241 @@ pub mod unit_testing { rs_matter_crate::error::Error, >, > { - T::nullable_enum_attr(self, ctx) + ::nullable_enum_attr(self, ctx) } - #[inline(always)] fn nullable_struct( &self, ctx: impl rs_matter_crate::dm::ReadContext, builder: rs_matter_crate::tlv::NullableBuilder>, ) -> impl core::future::Future> { - T::nullable_struct(self, ctx, builder) + ::nullable_struct(self, ctx, builder) } - #[inline(always)] fn nullable_range_restricted_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_range_restricted_int_8_u(self, ctx) + ::nullable_range_restricted_int_8_u(self, ctx) } - #[inline(always)] fn nullable_range_restricted_int_8_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_range_restricted_int_8_s(self, ctx) + ::nullable_range_restricted_int_8_s(self, ctx) } - #[inline(always)] fn nullable_range_restricted_int_16_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_range_restricted_int_16_u(self, ctx) + ::nullable_range_restricted_int_16_u(self, ctx) } - #[inline(always)] fn nullable_range_restricted_int_16_s( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future< Output = Result, rs_matter_crate::error::Error>, > { - T::nullable_range_restricted_int_16_s(self, ctx) + ::nullable_range_restricted_int_16_s(self, ctx) } - #[inline(always)] fn write_only_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::write_only_int_8_u(self, ctx) + ::write_only_int_8_u(self, ctx) } - #[inline(always)] fn mei_int_8_u( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::mei_int_8_u(self, ctx) + ::mei_int_8_u(self, ctx) } - #[inline(always)] fn set_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, ) -> impl core::future::Future> { - T::set_boolean(self, ctx, value) + ::set_boolean(self, ctx, value) } - #[inline(always)] fn set_bitmap_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: Bitmap8MaskMap, ) -> impl core::future::Future> { - T::set_bitmap_8(self, ctx, value) + ::set_bitmap_8(self, ctx, value) } - #[inline(always)] fn set_bitmap_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: Bitmap16MaskMap, ) -> impl core::future::Future> { - T::set_bitmap_16(self, ctx, value) + ::set_bitmap_16(self, ctx, value) } - #[inline(always)] fn set_bitmap_32( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: Bitmap32MaskMap, ) -> impl core::future::Future> { - T::set_bitmap_32(self, ctx, value) + ::set_bitmap_32(self, ctx, value) } - #[inline(always)] fn set_bitmap_64( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: Bitmap64MaskMap, ) -> impl core::future::Future> { - T::set_bitmap_64(self, ctx, value) + ::set_bitmap_64(self, ctx, value) } - #[inline(always)] fn set_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, ) -> impl core::future::Future> { - T::set_int_8_u(self, ctx, value) + ::set_int_8_u(self, ctx, value) } - #[inline(always)] fn set_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, ) -> impl core::future::Future> { - T::set_int_16_u(self, ctx, value) + ::set_int_16_u(self, ctx, value) } - #[inline(always)] fn set_int_24_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u32, ) -> impl core::future::Future> { - T::set_int_24_u(self, ctx, value) + ::set_int_24_u(self, ctx, value) } - #[inline(always)] fn set_int_32_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u32, ) -> impl core::future::Future> { - T::set_int_32_u(self, ctx, value) + ::set_int_32_u(self, ctx, value) } - #[inline(always)] fn set_int_40_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, ) -> impl core::future::Future> { - T::set_int_40_u(self, ctx, value) + ::set_int_40_u(self, ctx, value) } - #[inline(always)] fn set_int_48_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, ) -> impl core::future::Future> { - T::set_int_48_u(self, ctx, value) + ::set_int_48_u(self, ctx, value) } - #[inline(always)] fn set_int_56_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, ) -> impl core::future::Future> { - T::set_int_56_u(self, ctx, value) + ::set_int_56_u(self, ctx, value) } - #[inline(always)] fn set_int_64_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, ) -> impl core::future::Future> { - T::set_int_64_u(self, ctx, value) + ::set_int_64_u(self, ctx, value) } - #[inline(always)] fn set_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i8, ) -> impl core::future::Future> { - T::set_int_8_s(self, ctx, value) + ::set_int_8_s(self, ctx, value) } - #[inline(always)] fn set_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i16, ) -> impl core::future::Future> { - T::set_int_16_s(self, ctx, value) + ::set_int_16_s(self, ctx, value) } - #[inline(always)] fn set_int_24_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i32, ) -> impl core::future::Future> { - T::set_int_24_s(self, ctx, value) + ::set_int_24_s(self, ctx, value) } - #[inline(always)] fn set_int_32_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i32, ) -> impl core::future::Future> { - T::set_int_32_s(self, ctx, value) + ::set_int_32_s(self, ctx, value) } - #[inline(always)] fn set_int_40_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i64, ) -> impl core::future::Future> { - T::set_int_40_s(self, ctx, value) + ::set_int_40_s(self, ctx, value) } - #[inline(always)] fn set_int_48_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i64, ) -> impl core::future::Future> { - T::set_int_48_s(self, ctx, value) + ::set_int_48_s(self, ctx, value) } - #[inline(always)] fn set_int_56_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i64, ) -> impl core::future::Future> { - T::set_int_56_s(self, ctx, value) + ::set_int_56_s(self, ctx, value) } - #[inline(always)] fn set_int_64_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i64, ) -> impl core::future::Future> { - T::set_int_64_s(self, ctx, value) + ::set_int_64_s(self, ctx, value) } - #[inline(always)] fn set_enum_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, ) -> impl core::future::Future> { - T::set_enum_8(self, ctx, value) + ::set_enum_8(self, ctx, value) } - #[inline(always)] fn set_enum_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, ) -> impl core::future::Future> { - T::set_enum_16(self, ctx, value) + ::set_enum_16(self, ctx, value) } - #[inline(always)] fn set_float_single( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: f32, ) -> impl core::future::Future> { - T::set_float_single(self, ctx, value) + ::set_float_single(self, ctx, value) } - #[inline(always)] fn set_float_double( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: f64, ) -> impl core::future::Future> { - T::set_float_double(self, ctx, value) + ::set_float_double(self, ctx, value) } - #[inline(always)] fn set_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::OctetStr<'_>, ) -> impl core::future::Future> { - T::set_octet_string(self, ctx, value) + ::set_octet_string(self, ctx, value) } - #[inline(always)] fn set_list_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24725,9 +27065,8 @@ pub mod unit_testing { u8, >, ) -> impl core::future::Future> { - T::set_list_int_8_u(self, ctx, value) + ::set_list_int_8_u(self, ctx, value) } - #[inline(always)] fn set_list_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24736,9 +27075,8 @@ pub mod unit_testing { rs_matter_crate::tlv::OctetStr<'_>, >, ) -> impl core::future::Future> { - T::set_list_octet_string(self, ctx, value) + ::set_list_octet_string(self, ctx, value) } - #[inline(always)] fn set_list_struct_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24747,57 +27085,50 @@ pub mod unit_testing { TestListStructOctet<'_>, >, ) -> impl core::future::Future> { - T::set_list_struct_octet_string(self, ctx, value) + ::set_list_struct_octet_string(self, ctx, value) } - #[inline(always)] fn set_long_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::OctetStr<'_>, ) -> impl core::future::Future> { - T::set_long_octet_string(self, ctx, value) + ::set_long_octet_string(self, ctx, value) } - #[inline(always)] fn set_char_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Utf8Str<'_>, ) -> impl core::future::Future> { - T::set_char_string(self, ctx, value) + ::set_char_string(self, ctx, value) } - #[inline(always)] fn set_long_char_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Utf8Str<'_>, ) -> impl core::future::Future> { - T::set_long_char_string(self, ctx, value) + ::set_long_char_string(self, ctx, value) } - #[inline(always)] fn set_epoch_us( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u64, ) -> impl core::future::Future> { - T::set_epoch_us(self, ctx, value) + ::set_epoch_us(self, ctx, value) } - #[inline(always)] fn set_epoch_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u32, ) -> impl core::future::Future> { - T::set_epoch_s(self, ctx, value) + ::set_epoch_s(self, ctx, value) } - #[inline(always)] fn set_vendor_id( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, ) -> impl core::future::Future> { - T::set_vendor_id(self, ctx, value) + ::set_vendor_id(self, ctx, value) } - #[inline(always)] fn set_list_nullables_and_optionals_struct( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24806,57 +27137,50 @@ pub mod unit_testing { NullablesAndOptionalsStruct<'_>, >, ) -> impl core::future::Future> { - T::set_list_nullables_and_optionals_struct(self, ctx, value) + ::set_list_nullables_and_optionals_struct(self, ctx, value) } - #[inline(always)] fn set_enum_attr( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: SimpleEnum, ) -> impl core::future::Future> { - T::set_enum_attr(self, ctx, value) + ::set_enum_attr(self, ctx, value) } - #[inline(always)] fn set_struct_attr( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: SimpleStruct<'_>, ) -> impl core::future::Future> { - T::set_struct_attr(self, ctx, value) + ::set_struct_attr(self, ctx, value) } - #[inline(always)] fn set_range_restricted_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, ) -> impl core::future::Future> { - T::set_range_restricted_int_8_u(self, ctx, value) + ::set_range_restricted_int_8_u(self, ctx, value) } - #[inline(always)] fn set_range_restricted_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i8, ) -> impl core::future::Future> { - T::set_range_restricted_int_8_s(self, ctx, value) + ::set_range_restricted_int_8_s(self, ctx, value) } - #[inline(always)] fn set_range_restricted_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, ) -> impl core::future::Future> { - T::set_range_restricted_int_16_u(self, ctx, value) + ::set_range_restricted_int_16_u(self, ctx, value) } - #[inline(always)] fn set_range_restricted_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: i16, ) -> impl core::future::Future> { - T::set_range_restricted_int_16_s(self, ctx, value) + ::set_range_restricted_int_16_s(self, ctx, value) } - #[inline(always)] fn set_list_long_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24865,9 +27189,8 @@ pub mod unit_testing { rs_matter_crate::tlv::OctetStr<'_>, >, ) -> impl core::future::Future> { - T::set_list_long_octet_string(self, ctx, value) + ::set_list_long_octet_string(self, ctx, value) } - #[inline(always)] fn set_list_fabric_scoped( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -24876,413 +27199,370 @@ pub mod unit_testing { TestFabricScoped<'_>, >, ) -> impl core::future::Future> { - T::set_list_fabric_scoped(self, ctx, value) + ::set_list_fabric_scoped(self, ctx, value) } - #[inline(always)] fn set_timed_write_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, ) -> impl core::future::Future> { - T::set_timed_write_boolean(self, ctx, value) + ::set_timed_write_boolean(self, ctx, value) } - #[inline(always)] fn set_general_error_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, ) -> impl core::future::Future> { - T::set_general_error_boolean(self, ctx, value) + ::set_general_error_boolean(self, ctx, value) } - #[inline(always)] fn set_cluster_error_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, ) -> impl core::future::Future> { - T::set_cluster_error_boolean(self, ctx, value) + ::set_cluster_error_boolean(self, ctx, value) } - #[inline(always)] fn set_unsupported( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: bool, ) -> impl core::future::Future> { - T::set_unsupported(self, ctx, value) + ::set_unsupported(self, ctx, value) } - #[inline(always)] fn set_nullable_boolean( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_boolean(self, ctx, value) + ::set_nullable_boolean(self, ctx, value) } - #[inline(always)] fn set_nullable_bitmap_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_bitmap_8(self, ctx, value) + ::set_nullable_bitmap_8(self, ctx, value) } - #[inline(always)] fn set_nullable_bitmap_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_bitmap_16(self, ctx, value) + ::set_nullable_bitmap_16(self, ctx, value) } - #[inline(always)] fn set_nullable_bitmap_32( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_bitmap_32(self, ctx, value) + ::set_nullable_bitmap_32(self, ctx, value) } - #[inline(always)] fn set_nullable_bitmap_64( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_bitmap_64(self, ctx, value) + ::set_nullable_bitmap_64(self, ctx, value) } - #[inline(always)] fn set_nullable_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_int_8_u(self, ctx, value) + ::set_nullable_int_8_u(self, ctx, value) } - #[inline(always)] fn set_nullable_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_int_16_u(self, ctx, value) + ::set_nullable_int_16_u(self, ctx, value) } - #[inline(always)] fn set_nullable_int_24_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_int_24_u(self, ctx, value) + ::set_nullable_int_24_u(self, ctx, value) } - #[inline(always)] fn set_nullable_int_32_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_int_32_u(self, ctx, value) + ::set_nullable_int_32_u(self, ctx, value) } - #[inline(always)] fn set_nullable_int_40_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_int_40_u(self, ctx, value) + ::set_nullable_int_40_u(self, ctx, value) } - #[inline(always)] fn set_nullable_int_48_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_int_48_u(self, ctx, value) + ::set_nullable_int_48_u(self, ctx, value) } - #[inline(always)] fn set_nullable_int_56_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_int_56_u(self, ctx, value) + ::set_nullable_int_56_u(self, ctx, value) } - #[inline(always)] fn set_nullable_int_64_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_int_64_u(self, ctx, value) + ::set_nullable_int_64_u(self, ctx, value) } - #[inline(always)] fn set_nullable_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_int_8_s(self, ctx, value) + ::set_nullable_int_8_s(self, ctx, value) } - #[inline(always)] fn set_nullable_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_int_16_s(self, ctx, value) + ::set_nullable_int_16_s(self, ctx, value) } - #[inline(always)] fn set_nullable_int_24_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_int_24_s(self, ctx, value) + ::set_nullable_int_24_s(self, ctx, value) } - #[inline(always)] fn set_nullable_int_32_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_int_32_s(self, ctx, value) + ::set_nullable_int_32_s(self, ctx, value) } - #[inline(always)] fn set_nullable_int_40_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_int_40_s(self, ctx, value) + ::set_nullable_int_40_s(self, ctx, value) } - #[inline(always)] fn set_nullable_int_48_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_int_48_s(self, ctx, value) + ::set_nullable_int_48_s(self, ctx, value) } - #[inline(always)] fn set_nullable_int_56_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_int_56_s(self, ctx, value) + ::set_nullable_int_56_s(self, ctx, value) } - #[inline(always)] fn set_nullable_int_64_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_int_64_s(self, ctx, value) + ::set_nullable_int_64_s(self, ctx, value) } - #[inline(always)] fn set_nullable_enum_8( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_enum_8(self, ctx, value) + ::set_nullable_enum_8(self, ctx, value) } - #[inline(always)] fn set_nullable_enum_16( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_enum_16(self, ctx, value) + ::set_nullable_enum_16(self, ctx, value) } - #[inline(always)] fn set_nullable_float_single( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_float_single(self, ctx, value) + ::set_nullable_float_single(self, ctx, value) } - #[inline(always)] fn set_nullable_float_double( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_float_double(self, ctx, value) + ::set_nullable_float_double(self, ctx, value) } - #[inline(always)] fn set_nullable_octet_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable>, ) -> impl core::future::Future> { - T::set_nullable_octet_string(self, ctx, value) + ::set_nullable_octet_string(self, ctx, value) } - #[inline(always)] fn set_nullable_char_string( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable>, ) -> impl core::future::Future> { - T::set_nullable_char_string(self, ctx, value) + ::set_nullable_char_string(self, ctx, value) } - #[inline(always)] fn set_nullable_enum_attr( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_enum_attr(self, ctx, value) + ::set_nullable_enum_attr(self, ctx, value) } - #[inline(always)] fn set_nullable_struct( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable>, ) -> impl core::future::Future> { - T::set_nullable_struct(self, ctx, value) + ::set_nullable_struct(self, ctx, value) } - #[inline(always)] fn set_nullable_range_restricted_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_range_restricted_int_8_u(self, ctx, value) + ::set_nullable_range_restricted_int_8_u(self, ctx, value) } - #[inline(always)] fn set_nullable_range_restricted_int_8_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_range_restricted_int_8_s(self, ctx, value) + ::set_nullable_range_restricted_int_8_s(self, ctx, value) } - #[inline(always)] fn set_nullable_range_restricted_int_16_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_range_restricted_int_16_u(self, ctx, value) + ::set_nullable_range_restricted_int_16_u(self, ctx, value) } - #[inline(always)] fn set_nullable_range_restricted_int_16_s( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_nullable_range_restricted_int_16_s(self, ctx, value) + ::set_nullable_range_restricted_int_16_s(self, ctx, value) } - #[inline(always)] fn set_write_only_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, ) -> impl core::future::Future> { - T::set_write_only_int_8_u(self, ctx, value) + ::set_write_only_int_8_u(self, ctx, value) } - #[inline(always)] fn set_mei_int_8_u( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u8, ) -> impl core::future::Future> { - T::set_mei_int_8_u(self, ctx, value) + ::set_mei_int_8_u(self, ctx, value) } - #[inline(always)] fn handle_test( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> impl core::future::Future> { - T::handle_test(self, ctx) + ::handle_test(self, ctx) } - #[inline(always)] fn handle_test_not_handled( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> impl core::future::Future> { - T::handle_test_not_handled(self, ctx) + ::handle_test_not_handled(self, ctx) } - #[inline(always)] fn handle_test_specific( &self, ctx: impl rs_matter_crate::dm::InvokeContext, response: TestSpecificResponseBuilder

, ) -> impl core::future::Future> { - T::handle_test_specific(self, ctx, response) + ::handle_test_specific(self, ctx, response) } - #[inline(always)] fn handle_test_unknown_command( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> impl core::future::Future> { - T::handle_test_unknown_command(self, ctx) + ::handle_test_unknown_command(self, ctx) } - #[inline(always)] fn handle_test_add_arguments( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestAddArgumentsRequest<'_>, response: TestAddArgumentsResponseBuilder

, ) -> impl core::future::Future> { - T::handle_test_add_arguments(self, ctx, request, response) + ::handle_test_add_arguments(self, ctx, request, response) } - #[inline(always)] fn handle_test_simple_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestSimpleArgumentRequestRequest<'_>, response: TestSimpleArgumentResponseBuilder

, ) -> impl core::future::Future> { - T::handle_test_simple_argument_request(self, ctx, request, response) + ::handle_test_simple_argument_request(self, ctx, request, response) } - #[inline(always)] fn handle_test_struct_array_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestStructArrayArgumentRequestRequest<'_>, response: TestStructArrayArgumentResponseBuilder

, ) -> impl core::future::Future> { - T::handle_test_struct_array_argument_request(self, ctx, request, response) + ::handle_test_struct_array_argument_request( + self, ctx, request, response, + ) } - #[inline(always)] fn handle_test_struct_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestStructArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, ) -> impl core::future::Future> { - T::handle_test_struct_argument_request(self, ctx, request, response) + ::handle_test_struct_argument_request(self, ctx, request, response) } - #[inline(always)] fn handle_test_nested_struct_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestNestedStructArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, ) -> impl core::future::Future> { - T::handle_test_nested_struct_argument_request(self, ctx, request, response) + ::handle_test_nested_struct_argument_request( + self, ctx, request, response, + ) } - #[inline(always)] fn handle_test_list_struct_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestListStructArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, ) -> impl core::future::Future> { - T::handle_test_list_struct_argument_request(self, ctx, request, response) + ::handle_test_list_struct_argument_request( + self, ctx, request, response, + ) } - #[inline(always)] fn handle_test_list_int_8_u_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestListInt8UArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, ) -> impl core::future::Future> { - T::handle_test_list_int_8_u_argument_request(self, ctx, request, response) + ::handle_test_list_int_8_u_argument_request( + self, ctx, request, response, + ) } - #[inline(always)] fn handle_test_nested_struct_list_argument_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( @@ -25291,9 +27571,10 @@ pub mod unit_testing { request: TestNestedStructListArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, ) -> impl core::future::Future> { - T::handle_test_nested_struct_list_argument_request(self, ctx, request, response) + ::handle_test_nested_struct_list_argument_request( + self, ctx, request, response, + ) } - #[inline(always)] fn handle_test_list_nested_struct_list_argument_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( @@ -25302,36 +27583,38 @@ pub mod unit_testing { request: TestListNestedStructListArgumentRequestRequest<'_>, response: BooleanResponseBuilder

, ) -> impl core::future::Future> { - T::handle_test_list_nested_struct_list_argument_request(self, ctx, request, response) + ::handle_test_list_nested_struct_list_argument_request( + self, ctx, request, response, + ) } - #[inline(always)] fn handle_test_list_int_8_u_reverse_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestListInt8UReverseRequestRequest<'_>, response: TestListInt8UReverseResponseBuilder

, ) -> impl core::future::Future> { - T::handle_test_list_int_8_u_reverse_request(self, ctx, request, response) + ::handle_test_list_int_8_u_reverse_request( + self, ctx, request, response, + ) } - #[inline(always)] fn handle_test_enums_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestEnumsRequestRequest<'_>, response: TestEnumsResponseBuilder

, ) -> impl core::future::Future> { - T::handle_test_enums_request(self, ctx, request, response) + ::handle_test_enums_request(self, ctx, request, response) } - #[inline(always)] fn handle_test_nullable_optional_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestNullableOptionalRequestRequest<'_>, response: TestNullableOptionalResponseBuilder

, ) -> impl core::future::Future> { - T::handle_test_nullable_optional_request(self, ctx, request, response) + ::handle_test_nullable_optional_request( + self, ctx, request, response, + ) } - #[inline(always)] fn handle_test_complex_nullable_optional_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( @@ -25340,42 +27623,39 @@ pub mod unit_testing { request: TestComplexNullableOptionalRequestRequest<'_>, response: TestComplexNullableOptionalResponseBuilder

, ) -> impl core::future::Future> { - T::handle_test_complex_nullable_optional_request(self, ctx, request, response) + ::handle_test_complex_nullable_optional_request( + self, ctx, request, response, + ) } - #[inline(always)] fn handle_simple_struct_echo_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: SimpleStructEchoRequestRequest<'_>, response: SimpleStructResponseBuilder

, ) -> impl core::future::Future> { - T::handle_simple_struct_echo_request(self, ctx, request, response) + ::handle_simple_struct_echo_request(self, ctx, request, response) } - #[inline(always)] fn handle_timed_invoke_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> impl core::future::Future> { - T::handle_timed_invoke_request(self, ctx) + ::handle_timed_invoke_request(self, ctx) } - #[inline(always)] fn handle_test_simple_optional_argument_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestSimpleOptionalArgumentRequestRequest<'_>, ) -> impl core::future::Future> { - T::handle_test_simple_optional_argument_request(self, ctx, request) + ::handle_test_simple_optional_argument_request(self, ctx, request) } - #[inline(always)] fn handle_test_emit_test_event_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestEmitTestEventRequestRequest<'_>, response: TestEmitTestEventResponseBuilder

, ) -> impl core::future::Future> { - T::handle_test_emit_test_event_request(self, ctx, request, response) + ::handle_test_emit_test_event_request(self, ctx, request, response) } - #[inline(always)] fn handle_test_emit_test_fabric_scoped_event_request< P: rs_matter_crate::tlv::TLVBuilderParent, >( @@ -25384,36 +27664,40 @@ pub mod unit_testing { request: TestEmitTestFabricScopedEventRequestRequest<'_>, response: TestEmitTestFabricScopedEventResponseBuilder

, ) -> impl core::future::Future> { - T::handle_test_emit_test_fabric_scoped_event_request(self, ctx, request, response) + ::handle_test_emit_test_fabric_scoped_event_request( + self, ctx, request, response, + ) } - #[inline(always)] fn handle_test_batch_helper_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestBatchHelperRequestRequest<'_>, response: TestBatchHelperResponseBuilder

, ) -> impl core::future::Future> { - T::handle_test_batch_helper_request(self, ctx, request, response) + ::handle_test_batch_helper_request(self, ctx, request, response) } - #[inline(always)] fn handle_test_second_batch_helper_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestSecondBatchHelperRequestRequest<'_>, response: TestBatchHelperResponseBuilder

, ) -> impl core::future::Future> { - T::handle_test_second_batch_helper_request(self, ctx, request, response) + ::handle_test_second_batch_helper_request( + self, ctx, request, response, + ) } - #[inline(always)] fn handle_test_different_vendor_mei_request( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: TestDifferentVendorMeiRequestRequest<'_>, response: TestDifferentVendorMeiResponseBuilder

, ) -> impl core::future::Future> { - T::handle_test_different_vendor_mei_request(self, ctx, request, response) + ::handle_test_different_vendor_mei_request( + self, ctx, request, response, + ) } } + impl ClusterSyncHandler for &T where T: ClusterSyncHandler {} #[doc = "The handler adaptor for the cluster-specific handler. This adaptor implements the generic `rs-matter` handler trait."] #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] #[cfg_attr(feature = "defmt", derive(rs_matter_crate::reexport::defmt::Format))] @@ -25423,7 +27707,6 @@ pub mod unit_testing { T: ClusterHandler, { #[allow(unreachable_code)] - #[inline(always)] async fn read( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -25435,7 +27718,8 @@ pub mod unit_testing { } else { match AttributeId::try_from(ctx.attr().attr_id)? { AttributeId::Boolean => { - let attr_read_result = self.0.boolean(&ctx).await; + let attr_read_result = + ::boolean(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25459,7 +27743,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Bitmap8 => { - let attr_read_result = self.0.bitmap_8(&ctx).await; + let attr_read_result = + ::bitmap_8(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25483,7 +27768,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Bitmap16 => { - let attr_read_result = self.0.bitmap_16(&ctx).await; + let attr_read_result = + ::bitmap_16(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25507,7 +27793,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Bitmap32 => { - let attr_read_result = self.0.bitmap_32(&ctx).await; + let attr_read_result = + ::bitmap_32(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25531,7 +27818,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Bitmap64 => { - let attr_read_result = self.0.bitmap_64(&ctx).await; + let attr_read_result = + ::bitmap_64(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25555,7 +27843,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int8u => { - let attr_read_result = self.0.int_8_u(&ctx).await; + let attr_read_result = + ::int_8_u(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25579,7 +27868,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int16u => { - let attr_read_result = self.0.int_16_u(&ctx).await; + let attr_read_result = + ::int_16_u(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25603,7 +27893,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int24u => { - let attr_read_result = self.0.int_24_u(&ctx).await; + let attr_read_result = + ::int_24_u(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25627,7 +27918,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int32u => { - let attr_read_result = self.0.int_32_u(&ctx).await; + let attr_read_result = + ::int_32_u(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25651,7 +27943,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int40u => { - let attr_read_result = self.0.int_40_u(&ctx).await; + let attr_read_result = + ::int_40_u(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25675,7 +27968,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int48u => { - let attr_read_result = self.0.int_48_u(&ctx).await; + let attr_read_result = + ::int_48_u(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25699,7 +27993,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int56u => { - let attr_read_result = self.0.int_56_u(&ctx).await; + let attr_read_result = + ::int_56_u(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25723,7 +28018,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int64u => { - let attr_read_result = self.0.int_64_u(&ctx).await; + let attr_read_result = + ::int_64_u(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25747,7 +28043,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int8s => { - let attr_read_result = self.0.int_8_s(&ctx).await; + let attr_read_result = + ::int_8_s(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25771,7 +28068,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int16s => { - let attr_read_result = self.0.int_16_s(&ctx).await; + let attr_read_result = + ::int_16_s(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25795,7 +28093,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int24s => { - let attr_read_result = self.0.int_24_s(&ctx).await; + let attr_read_result = + ::int_24_s(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25819,7 +28118,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int32s => { - let attr_read_result = self.0.int_32_s(&ctx).await; + let attr_read_result = + ::int_32_s(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25843,7 +28143,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int40s => { - let attr_read_result = self.0.int_40_s(&ctx).await; + let attr_read_result = + ::int_40_s(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25867,7 +28168,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int48s => { - let attr_read_result = self.0.int_48_s(&ctx).await; + let attr_read_result = + ::int_48_s(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25891,7 +28193,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int56s => { - let attr_read_result = self.0.int_56_s(&ctx).await; + let attr_read_result = + ::int_56_s(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25915,7 +28218,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Int64s => { - let attr_read_result = self.0.int_64_s(&ctx).await; + let attr_read_result = + ::int_64_s(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25939,7 +28243,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Enum8 => { - let attr_read_result = self.0.enum_8(&ctx).await; + let attr_read_result = + ::enum_8(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25963,7 +28268,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Enum16 => { - let attr_read_result = self.0.enum_16(&ctx).await; + let attr_read_result = + ::enum_16(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -25987,7 +28293,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::FloatSingle => { - let attr_read_result = self.0.float_single(&ctx).await; + let attr_read_result = + ::float_single(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26011,7 +28318,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::FloatDouble => { - let attr_read_result = self.0.float_double(&ctx).await; + let attr_read_result = + ::float_double(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26055,23 +28363,22 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self - .0 - .octet_string( - &ctx, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug((AttributeId::OctetString, false)), - )), - tw, - ), - tag, - )?, - ) - .await; + let attr_read_result = ::octet_string( + &self.0, + &ctx, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, + MetadataDebug((AttributeId::OctetString, false)), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26116,24 +28423,23 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self - .0 - .list_int_8_u( - &ctx, - rs_matter_crate::dm::ArrayAttributeRead::new( - ctx.attr().list_index.clone(), - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug((AttributeId::ListInt8u, false)), - )), - tw, - ), - tag, - )?, - ) - .await; + let attr_read_result = ::list_int_8_u( + &self.0, + &ctx, + rs_matter_crate::dm::ArrayAttributeRead::new( + ctx.attr().list_index.clone(), + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, + MetadataDebug((AttributeId::ListInt8u, false)), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26178,27 +28484,23 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self - .0 - .list_octet_string( - &ctx, - rs_matter_crate::dm::ArrayAttributeRead::new( - ctx.attr().list_index.clone(), - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug(( - AttributeId::ListOctetString, - false, - )), - )), - tw, - ), - tag, - )?, - ) - .await; + let attr_read_result = ::list_octet_string( + &self.0, + &ctx, + rs_matter_crate::dm::ArrayAttributeRead::new( + ctx.attr().list_index.clone(), + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, + MetadataDebug((AttributeId::ListOctetString, false)), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26243,27 +28545,26 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self - .0 - .list_struct_octet_string( - &ctx, - rs_matter_crate::dm::ArrayAttributeRead::new( - ctx.attr().list_index.clone(), - rs_matter_crate::tlv::TLVWriteParent::new( + let attr_read_result = ::list_struct_octet_string( + &self.0, + &ctx, + rs_matter_crate::dm::ArrayAttributeRead::new( + ctx.attr().list_index.clone(), + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug(( - AttributeId::ListStructOctetString, - false, - )), + AttributeId::ListStructOctetString, + false, )), - tw, - ), - tag, - )?, - ) - .await; + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26308,26 +28609,22 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self - .0 - .long_octet_string( - &ctx, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug(( - AttributeId::LongOctetString, - false, - )), - )), - tw, - ), - tag, - )?, - ) - .await; + let attr_read_result = ::long_octet_string( + &self.0, + &ctx, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, + MetadataDebug((AttributeId::LongOctetString, false)), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26372,23 +28669,22 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self - .0 - .char_string( - &ctx, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug((AttributeId::CharString, false)), - )), - tw, - ), - tag, - )?, - ) - .await; + let attr_read_result = ::char_string( + &self.0, + &ctx, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, + MetadataDebug((AttributeId::CharString, false)), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26433,23 +28729,22 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self - .0 - .long_char_string( - &ctx, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug((AttributeId::LongCharString, false)), - )), - tw, - ), - tag, - )?, - ) - .await; + let attr_read_result = ::long_char_string( + &self.0, + &ctx, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, + MetadataDebug((AttributeId::LongCharString, false)), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26474,7 +28769,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::complete(writer) } AttributeId::EpochUs => { - let attr_read_result = self.0.epoch_us(&ctx).await; + let attr_read_result = + ::epoch_us(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26498,7 +28794,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::EpochS => { - let attr_read_result = self.0.epoch_s(&ctx).await; + let attr_read_result = + ::epoch_s(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26522,7 +28819,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::VendorId => { - let attr_read_result = self.0.vendor_id(&ctx).await; + let attr_read_result = + ::vendor_id(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26572,9 +28870,9 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self - .0 - .list_nullables_and_optionals_struct( + let attr_read_result = + ::list_nullables_and_optionals_struct( + &self.0, &ctx, rs_matter_crate::dm::ArrayAttributeRead::new( ctx.attr().list_index.clone(), @@ -26623,7 +28921,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::complete(writer) } AttributeId::EnumAttr => { - let attr_read_result = self.0.enum_attr(&ctx).await; + let attr_read_result = + ::enum_attr(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26667,23 +28966,22 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self - .0 - .struct_attr( - &ctx, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug((AttributeId::StructAttr, false)), - )), - tw, - ), - tag, - )?, - ) - .await; + let attr_read_result = ::struct_attr( + &self.0, + &ctx, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, + MetadataDebug((AttributeId::StructAttr, false)), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26708,7 +29006,9 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::complete(writer) } AttributeId::RangeRestrictedInt8u => { - let attr_read_result = self.0.range_restricted_int_8_u(&ctx).await; + let attr_read_result = + ::range_restricted_int_8_u(&self.0, &ctx) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26732,7 +29032,9 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::RangeRestrictedInt8s => { - let attr_read_result = self.0.range_restricted_int_8_s(&ctx).await; + let attr_read_result = + ::range_restricted_int_8_s(&self.0, &ctx) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26756,7 +29058,9 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::RangeRestrictedInt16u => { - let attr_read_result = self.0.range_restricted_int_16_u(&ctx).await; + let attr_read_result = + ::range_restricted_int_16_u(&self.0, &ctx) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26780,7 +29084,9 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::RangeRestrictedInt16s => { - let attr_read_result = self.0.range_restricted_int_16_s(&ctx).await; + let attr_read_result = + ::range_restricted_int_16_s(&self.0, &ctx) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26824,27 +29130,26 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self - .0 - .list_long_octet_string( - &ctx, - rs_matter_crate::dm::ArrayAttributeRead::new( - ctx.attr().list_index.clone(), - rs_matter_crate::tlv::TLVWriteParent::new( + let attr_read_result = ::list_long_octet_string( + &self.0, + &ctx, + rs_matter_crate::dm::ArrayAttributeRead::new( + ctx.attr().list_index.clone(), + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug(( - AttributeId::ListLongOctetString, - false, - )), + AttributeId::ListLongOctetString, + false, )), - tw, - ), - tag, - )?, - ) - .await; + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26889,27 +29194,23 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self - .0 - .list_fabric_scoped( - &ctx, - rs_matter_crate::dm::ArrayAttributeRead::new( - ctx.attr().list_index.clone(), - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug(( - AttributeId::ListFabricScoped, - false, - )), - )), - tw, - ), - tag, - )?, - ) - .await; + let attr_read_result = ::list_fabric_scoped( + &self.0, + &ctx, + rs_matter_crate::dm::ArrayAttributeRead::new( + ctx.attr().list_index.clone(), + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, + MetadataDebug((AttributeId::ListFabricScoped, false)), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26934,7 +29235,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::complete(writer) } AttributeId::TimedWriteBoolean => { - let attr_read_result = self.0.timed_write_boolean(&ctx).await; + let attr_read_result = + ::timed_write_boolean(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26958,7 +29260,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::GeneralErrorBoolean => { - let attr_read_result = self.0.general_error_boolean(&ctx).await; + let attr_read_result = + ::general_error_boolean(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -26982,7 +29285,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::ClusterErrorBoolean => { - let attr_read_result = self.0.cluster_error_boolean(&ctx).await; + let attr_read_result = + ::cluster_error_boolean(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27006,7 +29310,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::Unsupported => { - let attr_read_result = self.0.unsupported(&ctx).await; + let attr_read_result = + ::unsupported(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27030,7 +29335,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableBoolean => { - let attr_read_result = self.0.nullable_boolean(&ctx).await; + let attr_read_result = + ::nullable_boolean(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27054,7 +29360,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableBitmap8 => { - let attr_read_result = self.0.nullable_bitmap_8(&ctx).await; + let attr_read_result = + ::nullable_bitmap_8(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27078,7 +29385,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableBitmap16 => { - let attr_read_result = self.0.nullable_bitmap_16(&ctx).await; + let attr_read_result = + ::nullable_bitmap_16(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27102,7 +29410,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableBitmap32 => { - let attr_read_result = self.0.nullable_bitmap_32(&ctx).await; + let attr_read_result = + ::nullable_bitmap_32(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27126,7 +29435,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableBitmap64 => { - let attr_read_result = self.0.nullable_bitmap_64(&ctx).await; + let attr_read_result = + ::nullable_bitmap_64(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27150,7 +29460,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt8u => { - let attr_read_result = self.0.nullable_int_8_u(&ctx).await; + let attr_read_result = + ::nullable_int_8_u(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27174,7 +29485,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt16u => { - let attr_read_result = self.0.nullable_int_16_u(&ctx).await; + let attr_read_result = + ::nullable_int_16_u(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27198,7 +29510,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt24u => { - let attr_read_result = self.0.nullable_int_24_u(&ctx).await; + let attr_read_result = + ::nullable_int_24_u(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27222,7 +29535,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt32u => { - let attr_read_result = self.0.nullable_int_32_u(&ctx).await; + let attr_read_result = + ::nullable_int_32_u(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27246,7 +29560,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt40u => { - let attr_read_result = self.0.nullable_int_40_u(&ctx).await; + let attr_read_result = + ::nullable_int_40_u(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27270,7 +29585,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt48u => { - let attr_read_result = self.0.nullable_int_48_u(&ctx).await; + let attr_read_result = + ::nullable_int_48_u(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27294,7 +29610,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt56u => { - let attr_read_result = self.0.nullable_int_56_u(&ctx).await; + let attr_read_result = + ::nullable_int_56_u(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27318,7 +29635,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt64u => { - let attr_read_result = self.0.nullable_int_64_u(&ctx).await; + let attr_read_result = + ::nullable_int_64_u(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27342,7 +29660,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt8s => { - let attr_read_result = self.0.nullable_int_8_s(&ctx).await; + let attr_read_result = + ::nullable_int_8_s(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27366,7 +29685,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt16s => { - let attr_read_result = self.0.nullable_int_16_s(&ctx).await; + let attr_read_result = + ::nullable_int_16_s(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27390,7 +29710,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt24s => { - let attr_read_result = self.0.nullable_int_24_s(&ctx).await; + let attr_read_result = + ::nullable_int_24_s(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27414,7 +29735,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt32s => { - let attr_read_result = self.0.nullable_int_32_s(&ctx).await; + let attr_read_result = + ::nullable_int_32_s(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27438,7 +29760,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt40s => { - let attr_read_result = self.0.nullable_int_40_s(&ctx).await; + let attr_read_result = + ::nullable_int_40_s(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27462,7 +29785,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt48s => { - let attr_read_result = self.0.nullable_int_48_s(&ctx).await; + let attr_read_result = + ::nullable_int_48_s(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27486,7 +29810,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt56s => { - let attr_read_result = self.0.nullable_int_56_s(&ctx).await; + let attr_read_result = + ::nullable_int_56_s(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27510,7 +29835,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableInt64s => { - let attr_read_result = self.0.nullable_int_64_s(&ctx).await; + let attr_read_result = + ::nullable_int_64_s(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27534,7 +29860,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableEnum8 => { - let attr_read_result = self.0.nullable_enum_8(&ctx).await; + let attr_read_result = + ::nullable_enum_8(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27558,7 +29885,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableEnum16 => { - let attr_read_result = self.0.nullable_enum_16(&ctx).await; + let attr_read_result = + ::nullable_enum_16(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27582,7 +29910,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableFloatSingle => { - let attr_read_result = self.0.nullable_float_single(&ctx).await; + let attr_read_result = + ::nullable_float_single(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27606,7 +29935,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::NullableFloatDouble => { - let attr_read_result = self.0.nullable_float_double(&ctx).await; + let attr_read_result = + ::nullable_float_double(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27648,28 +29978,27 @@ pub mod unit_testing { MetadataDebug((AttributeId::NullableOctetString, false)) )) ); - let tag = rs_matter_crate::dm::Reply::tag(&writer); - let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self - .0 - .nullable_octet_string( - &ctx, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug(( - AttributeId::NullableOctetString, - false, - )), + let tag = rs_matter_crate::dm::Reply::tag(&writer); + let tw = rs_matter_crate::dm::Reply::writer(&mut writer); + let attr_read_result = ::nullable_octet_string( + &self.0, + &ctx, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, + MetadataDebug(( + AttributeId::NullableOctetString, + false, )), - tw, - ), - tag, - )?, - ) - .await; + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27714,26 +30043,22 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self - .0 - .nullable_char_string( - &ctx, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug(( - AttributeId::NullableCharString, - false, - )), - )), - tw, - ), - tag, - )?, - ) - .await; + let attr_read_result = ::nullable_char_string( + &self.0, + &ctx, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, + MetadataDebug((AttributeId::NullableCharString, false)), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27758,7 +30083,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::complete(writer) } AttributeId::NullableEnumAttr => { - let attr_read_result = self.0.nullable_enum_attr(&ctx).await; + let attr_read_result = + ::nullable_enum_attr(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27802,23 +30128,22 @@ pub mod unit_testing { ); let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let attr_read_result = self - .0 - .nullable_struct( - &ctx, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.attr().endpoint_id, - self, - MetadataDebug((AttributeId::NullableStruct, false)), - )), - tw, - ), - tag, - )?, - ) - .await; + let attr_read_result = ::nullable_struct( + &self.0, + &ctx, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.attr().endpoint_id, + self, + MetadataDebug((AttributeId::NullableStruct, false)), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27844,7 +30169,10 @@ pub mod unit_testing { } AttributeId::NullableRangeRestrictedInt8u => { let attr_read_result = - self.0.nullable_range_restricted_int_8_u(&ctx).await; + ::nullable_range_restricted_int_8_u( + &self.0, &ctx, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27875,7 +30203,10 @@ pub mod unit_testing { } AttributeId::NullableRangeRestrictedInt8s => { let attr_read_result = - self.0.nullable_range_restricted_int_8_s(&ctx).await; + ::nullable_range_restricted_int_8_s( + &self.0, &ctx, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27906,7 +30237,10 @@ pub mod unit_testing { } AttributeId::NullableRangeRestrictedInt16u => { let attr_read_result = - self.0.nullable_range_restricted_int_16_u(&ctx).await; + ::nullable_range_restricted_int_16_u( + &self.0, &ctx, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27937,7 +30271,10 @@ pub mod unit_testing { } AttributeId::NullableRangeRestrictedInt16s => { let attr_read_result = - self.0.nullable_range_restricted_int_16_s(&ctx).await; + ::nullable_range_restricted_int_16_s( + &self.0, &ctx, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27967,7 +30304,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::WriteOnlyInt8u => { - let attr_read_result = self.0.write_only_int_8_u(&ctx).await; + let attr_read_result = + ::write_only_int_8_u(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -27991,7 +30329,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::MeiInt8u => { - let attr_read_result = self.0.mei_int_8_u(&ctx).await; + let attr_read_result = + ::mei_int_8_u(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -28035,7 +30374,6 @@ pub mod unit_testing { } } #[allow(unreachable_code)] - #[inline(always)] async fn write( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -28047,7 +30385,8 @@ pub mod unit_testing { match AttributeId::try_from(ctx.attr().attr_id)? { AttributeId::Boolean => { let attr_data: bool = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_boolean(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_boolean(&self.0, &ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28075,7 +30414,8 @@ pub mod unit_testing { AttributeId::Bitmap8 => { let attr_data: Bitmap8MaskMap = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_bitmap_8(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_bitmap_8(&self.0, &ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28103,7 +30443,9 @@ pub mod unit_testing { AttributeId::Bitmap16 => { let attr_data: Bitmap16MaskMap = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_bitmap_16(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_bitmap_16(&self.0, &ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28131,7 +30473,9 @@ pub mod unit_testing { AttributeId::Bitmap32 => { let attr_data: Bitmap32MaskMap = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_bitmap_32(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_bitmap_32(&self.0, &ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28159,7 +30503,9 @@ pub mod unit_testing { AttributeId::Bitmap64 => { let attr_data: Bitmap64MaskMap = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_bitmap_64(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_bitmap_64(&self.0, &ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28186,7 +30532,8 @@ pub mod unit_testing { } AttributeId::Int8u => { let attr_data: u8 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_8_u(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_int_8_u(&self.0, &ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28213,7 +30560,8 @@ pub mod unit_testing { } AttributeId::Int16u => { let attr_data: u16 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_16_u(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_int_16_u(&self.0, &ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28240,7 +30588,8 @@ pub mod unit_testing { } AttributeId::Int24u => { let attr_data: u32 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_24_u(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_int_24_u(&self.0, &ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28267,7 +30616,8 @@ pub mod unit_testing { } AttributeId::Int32u => { let attr_data: u32 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_32_u(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_int_32_u(&self.0, &ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28294,7 +30644,8 @@ pub mod unit_testing { } AttributeId::Int40u => { let attr_data: u64 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_40_u(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_int_40_u(&self.0, &ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28321,7 +30672,8 @@ pub mod unit_testing { } AttributeId::Int48u => { let attr_data: u64 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_48_u(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_int_48_u(&self.0, &ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28348,7 +30700,8 @@ pub mod unit_testing { } AttributeId::Int56u => { let attr_data: u64 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_56_u(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_int_56_u(&self.0, &ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28375,7 +30728,8 @@ pub mod unit_testing { } AttributeId::Int64u => { let attr_data: u64 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_64_u(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_int_64_u(&self.0, &ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28402,7 +30756,8 @@ pub mod unit_testing { } AttributeId::Int8s => { let attr_data: i8 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_8_s(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_int_8_s(&self.0, &ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28429,7 +30784,8 @@ pub mod unit_testing { } AttributeId::Int16s => { let attr_data: i16 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_16_s(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_int_16_s(&self.0, &ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28456,7 +30812,8 @@ pub mod unit_testing { } AttributeId::Int24s => { let attr_data: i32 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_24_s(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_int_24_s(&self.0, &ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28483,7 +30840,8 @@ pub mod unit_testing { } AttributeId::Int32s => { let attr_data: i32 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_32_s(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_int_32_s(&self.0, &ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28510,7 +30868,8 @@ pub mod unit_testing { } AttributeId::Int40s => { let attr_data: i64 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_40_s(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_int_40_s(&self.0, &ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28537,7 +30896,8 @@ pub mod unit_testing { } AttributeId::Int48s => { let attr_data: i64 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_48_s(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_int_48_s(&self.0, &ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28564,7 +30924,8 @@ pub mod unit_testing { } AttributeId::Int56s => { let attr_data: i64 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_56_s(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_int_56_s(&self.0, &ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28591,7 +30952,8 @@ pub mod unit_testing { } AttributeId::Int64s => { let attr_data: i64 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_int_64_s(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_int_64_s(&self.0, &ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28618,7 +30980,8 @@ pub mod unit_testing { } AttributeId::Enum8 => { let attr_data: u8 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_enum_8(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_enum_8(&self.0, &ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28645,7 +31008,8 @@ pub mod unit_testing { } AttributeId::Enum16 => { let attr_data: u16 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_enum_16(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_enum_16(&self.0, &ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28672,7 +31036,9 @@ pub mod unit_testing { } AttributeId::FloatSingle => { let attr_data: f32 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_float_single(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_float_single(&self.0, &ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28699,7 +31065,9 @@ pub mod unit_testing { } AttributeId::FloatDouble => { let attr_data: f64 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_float_double(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_float_double(&self.0, &ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28727,7 +31095,9 @@ pub mod unit_testing { AttributeId::OctetString => { let attr_data: rs_matter_crate::tlv::OctetStr<'_> = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_octet_string(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_octet_string(&self.0, &ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28757,7 +31127,9 @@ pub mod unit_testing { ctx.attr().list_index.clone(), ctx.data(), )?; - let attr_write_result = self.0.set_list_int_8_u(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_list_int_8_u(&self.0, &ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28787,8 +31159,12 @@ pub mod unit_testing { ctx.attr().list_index.clone(), ctx.data(), )?; - let attr_write_result = - self.0.set_list_octet_string(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_list_octet_string( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28818,10 +31194,12 @@ pub mod unit_testing { ctx.attr().list_index.clone(), ctx.data(), )?; - let attr_write_result = self - .0 - .set_list_struct_octet_string(&ctx, attr_data.clone()) - .await; + let attr_write_result = ::set_list_struct_octet_string( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28849,8 +31227,12 @@ pub mod unit_testing { AttributeId::LongOctetString => { let attr_data: rs_matter_crate::tlv::OctetStr<'_> = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_long_octet_string(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_long_octet_string( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28878,7 +31260,9 @@ pub mod unit_testing { AttributeId::CharString => { let attr_data: rs_matter_crate::tlv::Utf8Str<'_> = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_char_string(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_char_string(&self.0, &ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28906,8 +31290,12 @@ pub mod unit_testing { AttributeId::LongCharString => { let attr_data: rs_matter_crate::tlv::Utf8Str<'_> = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_long_char_string(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_long_char_string( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28934,7 +31322,8 @@ pub mod unit_testing { } AttributeId::EpochUs => { let attr_data: u64 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_epoch_us(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_epoch_us(&self.0, &ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28961,7 +31350,8 @@ pub mod unit_testing { } AttributeId::EpochS => { let attr_data: u32 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_epoch_s(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_epoch_s(&self.0, &ctx, attr_data.clone()).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -28988,7 +31378,9 @@ pub mod unit_testing { } AttributeId::VendorId => { let attr_data: u16 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_vendor_id(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_vendor_id(&self.0, &ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29018,9 +31410,12 @@ pub mod unit_testing { ctx.attr().list_index.clone(), ctx.data(), )?; - let attr_write_result = self - .0 - .set_list_nullables_and_optionals_struct(&ctx, attr_data.clone()) + let attr_write_result = + ::set_list_nullables_and_optionals_struct( + &self.0, + &ctx, + attr_data.clone(), + ) .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( @@ -29049,7 +31444,9 @@ pub mod unit_testing { AttributeId::EnumAttr => { let attr_data: SimpleEnum = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_enum_attr(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_enum_attr(&self.0, &ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29077,7 +31474,9 @@ pub mod unit_testing { AttributeId::StructAttr => { let attr_data: SimpleStruct<'_> = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_struct_attr(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_struct_attr(&self.0, &ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29104,10 +31503,12 @@ pub mod unit_testing { } AttributeId::RangeRestrictedInt8u => { let attr_data: u8 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self - .0 - .set_range_restricted_int_8_u(&ctx, attr_data.clone()) - .await; + let attr_write_result = ::set_range_restricted_int_8_u( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29134,10 +31535,12 @@ pub mod unit_testing { } AttributeId::RangeRestrictedInt8s => { let attr_data: i8 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self - .0 - .set_range_restricted_int_8_s(&ctx, attr_data.clone()) - .await; + let attr_write_result = ::set_range_restricted_int_8_s( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29164,10 +31567,12 @@ pub mod unit_testing { } AttributeId::RangeRestrictedInt16u => { let attr_data: u16 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self - .0 - .set_range_restricted_int_16_u(&ctx, attr_data.clone()) - .await; + let attr_write_result = ::set_range_restricted_int_16_u( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29194,10 +31599,12 @@ pub mod unit_testing { } AttributeId::RangeRestrictedInt16s => { let attr_data: i16 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self - .0 - .set_range_restricted_int_16_s(&ctx, attr_data.clone()) - .await; + let attr_write_result = ::set_range_restricted_int_16_s( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29227,10 +31634,12 @@ pub mod unit_testing { ctx.attr().list_index.clone(), ctx.data(), )?; - let attr_write_result = self - .0 - .set_list_long_octet_string(&ctx, attr_data.clone()) - .await; + let attr_write_result = ::set_list_long_octet_string( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29260,8 +31669,12 @@ pub mod unit_testing { ctx.attr().list_index.clone(), ctx.data(), )?; - let attr_write_result = - self.0.set_list_fabric_scoped(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_list_fabric_scoped( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29288,10 +31701,12 @@ pub mod unit_testing { } AttributeId::TimedWriteBoolean => { let attr_data: bool = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self - .0 - .set_timed_write_boolean(&ctx, attr_data.clone()) - .await; + let attr_write_result = ::set_timed_write_boolean( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29318,10 +31733,12 @@ pub mod unit_testing { } AttributeId::GeneralErrorBoolean => { let attr_data: bool = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self - .0 - .set_general_error_boolean(&ctx, attr_data.clone()) - .await; + let attr_write_result = ::set_general_error_boolean( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29348,10 +31765,12 @@ pub mod unit_testing { } AttributeId::ClusterErrorBoolean => { let attr_data: bool = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self - .0 - .set_cluster_error_boolean(&ctx, attr_data.clone()) - .await; + let attr_write_result = ::set_cluster_error_boolean( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29378,7 +31797,9 @@ pub mod unit_testing { } AttributeId::Unsupported => { let attr_data: bool = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_unsupported(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_unsupported(&self.0, &ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29406,8 +31827,12 @@ pub mod unit_testing { AttributeId::NullableBoolean => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_boolean(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_boolean( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29435,8 +31860,12 @@ pub mod unit_testing { AttributeId::NullableBitmap8 => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_bitmap_8(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_bitmap_8( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29464,8 +31893,12 @@ pub mod unit_testing { AttributeId::NullableBitmap16 => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_bitmap_16(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_bitmap_16( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29493,8 +31926,12 @@ pub mod unit_testing { AttributeId::NullableBitmap32 => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_bitmap_32(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_bitmap_32( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29522,8 +31959,12 @@ pub mod unit_testing { AttributeId::NullableBitmap64 => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_bitmap_64(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_bitmap_64( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29551,8 +31992,12 @@ pub mod unit_testing { AttributeId::NullableInt8u => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_int_8_u(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_int_8_u( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29580,8 +32025,12 @@ pub mod unit_testing { AttributeId::NullableInt16u => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_int_16_u(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_int_16_u( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29609,8 +32058,12 @@ pub mod unit_testing { AttributeId::NullableInt24u => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_int_24_u(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_int_24_u( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29638,8 +32091,12 @@ pub mod unit_testing { AttributeId::NullableInt32u => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_int_32_u(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_int_32_u( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29667,8 +32124,12 @@ pub mod unit_testing { AttributeId::NullableInt40u => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_int_40_u(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_int_40_u( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29696,8 +32157,12 @@ pub mod unit_testing { AttributeId::NullableInt48u => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_int_48_u(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_int_48_u( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29725,8 +32190,12 @@ pub mod unit_testing { AttributeId::NullableInt56u => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_int_56_u(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_int_56_u( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29754,8 +32223,12 @@ pub mod unit_testing { AttributeId::NullableInt64u => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_int_64_u(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_int_64_u( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29783,8 +32256,12 @@ pub mod unit_testing { AttributeId::NullableInt8s => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_int_8_s(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_int_8_s( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29812,8 +32289,12 @@ pub mod unit_testing { AttributeId::NullableInt16s => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_int_16_s(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_int_16_s( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29841,8 +32322,12 @@ pub mod unit_testing { AttributeId::NullableInt24s => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_int_24_s(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_int_24_s( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29870,8 +32355,12 @@ pub mod unit_testing { AttributeId::NullableInt32s => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_int_32_s(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_int_32_s( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29899,8 +32388,12 @@ pub mod unit_testing { AttributeId::NullableInt40s => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_int_40_s(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_int_40_s( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29928,8 +32421,12 @@ pub mod unit_testing { AttributeId::NullableInt48s => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_int_48_s(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_int_48_s( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29957,8 +32454,12 @@ pub mod unit_testing { AttributeId::NullableInt56s => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_int_56_s(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_int_56_s( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -29986,8 +32487,12 @@ pub mod unit_testing { AttributeId::NullableInt64s => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_int_64_s(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_int_64_s( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -30015,8 +32520,12 @@ pub mod unit_testing { AttributeId::NullableEnum8 => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_enum_8(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_enum_8( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -30044,8 +32553,12 @@ pub mod unit_testing { AttributeId::NullableEnum16 => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_enum_16(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_enum_16( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -30073,10 +32586,12 @@ pub mod unit_testing { AttributeId::NullableFloatSingle => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self - .0 - .set_nullable_float_single(&ctx, attr_data.clone()) - .await; + let attr_write_result = ::set_nullable_float_single( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -30104,10 +32619,12 @@ pub mod unit_testing { AttributeId::NullableFloatDouble => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self - .0 - .set_nullable_float_double(&ctx, attr_data.clone()) - .await; + let attr_write_result = ::set_nullable_float_double( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -30136,10 +32653,12 @@ pub mod unit_testing { let attr_data: rs_matter_crate::tlv::Nullable< rs_matter_crate::tlv::OctetStr<'_>, > = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self - .0 - .set_nullable_octet_string(&ctx, attr_data.clone()) - .await; + let attr_write_result = ::set_nullable_octet_string( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -30168,10 +32687,12 @@ pub mod unit_testing { let attr_data: rs_matter_crate::tlv::Nullable< rs_matter_crate::tlv::Utf8Str<'_>, > = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self - .0 - .set_nullable_char_string(&ctx, attr_data.clone()) - .await; + let attr_write_result = ::set_nullable_char_string( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -30199,8 +32720,12 @@ pub mod unit_testing { AttributeId::NullableEnumAttr => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_enum_attr(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_enum_attr( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -30228,8 +32753,12 @@ pub mod unit_testing { AttributeId::NullableStruct => { let attr_data: rs_matter_crate::tlv::Nullable> = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_nullable_struct(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_nullable_struct( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -30257,9 +32786,12 @@ pub mod unit_testing { AttributeId::NullableRangeRestrictedInt8u => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self - .0 - .set_nullable_range_restricted_int_8_u(&ctx, attr_data.clone()) + let attr_write_result = + ::set_nullable_range_restricted_int_8_u( + &self.0, + &ctx, + attr_data.clone(), + ) .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( @@ -30288,9 +32820,12 @@ pub mod unit_testing { AttributeId::NullableRangeRestrictedInt8s => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self - .0 - .set_nullable_range_restricted_int_8_s(&ctx, attr_data.clone()) + let attr_write_result = + ::set_nullable_range_restricted_int_8_s( + &self.0, + &ctx, + attr_data.clone(), + ) .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( @@ -30319,9 +32854,12 @@ pub mod unit_testing { AttributeId::NullableRangeRestrictedInt16u => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self - .0 - .set_nullable_range_restricted_int_16_u(&ctx, attr_data.clone()) + let attr_write_result = + ::set_nullable_range_restricted_int_16_u( + &self.0, + &ctx, + attr_data.clone(), + ) .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( @@ -30350,9 +32888,12 @@ pub mod unit_testing { AttributeId::NullableRangeRestrictedInt16s => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self - .0 - .set_nullable_range_restricted_int_16_s(&ctx, attr_data.clone()) + let attr_write_result = + ::set_nullable_range_restricted_int_16_s( + &self.0, + &ctx, + attr_data.clone(), + ) .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( @@ -30380,8 +32921,12 @@ pub mod unit_testing { } AttributeId::WriteOnlyInt8u => { let attr_data: u8 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_write_only_int_8_u(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_write_only_int_8_u( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -30408,7 +32953,9 @@ pub mod unit_testing { } AttributeId::MeiInt8u => { let attr_data: u8 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.set_mei_int_8_u(&ctx, attr_data.clone()).await; + let attr_write_result = + ::set_mei_int_8_u(&self.0, &ctx, attr_data.clone()) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -30445,7 +32992,6 @@ pub mod unit_testing { Ok(()) } #[allow(unreachable_code)] - #[inline(always)] async fn invoke( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -30453,7 +32999,7 @@ pub mod unit_testing { ) -> Result<(), rs_matter_crate::error::Error> { match CommandId::try_from(ctx.cmd().cmd_id)? { CommandId::Test => { - let cmd_invoke_result = self.0.handle_test(&ctx).await; + let cmd_invoke_result = ::handle_test(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -30477,7 +33023,8 @@ pub mod unit_testing { cmd_invoke_result?; } CommandId::TestNotHandled => { - let cmd_invoke_result = self.0.handle_test_not_handled(&ctx).await; + let cmd_invoke_result = + ::handle_test_not_handled(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -30522,23 +33069,22 @@ pub mod unit_testing { let mut writer = reply.with_command(0u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self - .0 - .handle_test_specific( - &ctx, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.cmd().endpoint_id, - self, - MetadataDebug(CommandId::TestSpecific), - )), - tw, - ), - tag, - )?, - ) - .await; + let cmd_invoke_result = ::handle_test_specific( + &self.0, + &ctx, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.cmd().endpoint_id, + self, + MetadataDebug(CommandId::TestSpecific), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -30563,7 +33109,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::complete(writer)? } CommandId::TestUnknownCommand => { - let cmd_invoke_result = self.0.handle_test_unknown_command(&ctx).await; + let cmd_invoke_result = + ::handle_test_unknown_command(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -30611,24 +33158,23 @@ pub mod unit_testing { let mut writer = reply.with_command(1u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self - .0 - .handle_test_add_arguments( - &ctx, - cmd_data, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.cmd().endpoint_id, - self, - MetadataDebug(CommandId::TestAddArguments), - )), - tw, - ), - tag, - )?, - ) - .await; + let cmd_invoke_result = ::handle_test_add_arguments( + &self.0, + &ctx, + cmd_data, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.cmd().endpoint_id, + self, + MetadataDebug(CommandId::TestAddArguments), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -30677,9 +33223,9 @@ pub mod unit_testing { let mut writer = reply.with_command(2u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self - .0 - .handle_test_simple_argument_request( + let cmd_invoke_result = + ::handle_test_simple_argument_request( + &self.0, &ctx, cmd_data, rs_matter_crate::tlv::TLVBuilder::new( @@ -30743,9 +33289,9 @@ pub mod unit_testing { let mut writer = reply.with_command(3u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self - .0 - .handle_test_struct_array_argument_request( + let cmd_invoke_result = + ::handle_test_struct_array_argument_request( + &self.0, &ctx, cmd_data, rs_matter_crate::tlv::TLVBuilder::new( @@ -30809,9 +33355,9 @@ pub mod unit_testing { let mut writer = reply.with_command(8u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self - .0 - .handle_test_struct_argument_request( + let cmd_invoke_result = + ::handle_test_struct_argument_request( + &self.0, &ctx, cmd_data, rs_matter_crate::tlv::TLVBuilder::new( @@ -30875,9 +33421,9 @@ pub mod unit_testing { let mut writer = reply.with_command(8u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self - .0 - .handle_test_nested_struct_argument_request( + let cmd_invoke_result = + ::handle_test_nested_struct_argument_request( + &self.0, &ctx, cmd_data, rs_matter_crate::tlv::TLVBuilder::new( @@ -30941,9 +33487,9 @@ pub mod unit_testing { let mut writer = reply.with_command(8u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self - .0 - .handle_test_list_struct_argument_request( + let cmd_invoke_result = + ::handle_test_list_struct_argument_request( + &self.0, &ctx, cmd_data, rs_matter_crate::tlv::TLVBuilder::new( @@ -31007,9 +33553,9 @@ pub mod unit_testing { let mut writer = reply.with_command(8u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self - .0 - .handle_test_list_int_8_u_argument_request( + let cmd_invoke_result = + ::handle_test_list_int_8_u_argument_request( + &self.0, &ctx, cmd_data, rs_matter_crate::tlv::TLVBuilder::new( @@ -31073,9 +33619,9 @@ pub mod unit_testing { let mut writer = reply.with_command(8u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self - .0 - .handle_test_nested_struct_list_argument_request( + let cmd_invoke_result = + ::handle_test_nested_struct_list_argument_request( + &self.0, &ctx, cmd_data, rs_matter_crate::tlv::TLVBuilder::new( @@ -31141,26 +33687,7 @@ pub mod unit_testing { let mut writer = reply.with_command(8u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self - .0 - .handle_test_list_nested_struct_list_argument_request( - &ctx, - cmd_data, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.cmd().endpoint_id, - self, - MetadataDebug( - CommandId::TestListNestedStructListArgumentRequest, - ), - )), - tw, - ), - tag, - )?, - ) - .await; + let cmd_invoke_result = < T as ClusterHandler > :: handle_test_list_nested_struct_list_argument_request (& self . 0 , & ctx , cmd_data , rs_matter_crate :: tlv :: TLVBuilder :: new (rs_matter_crate :: tlv :: TLVWriteParent :: new (MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListNestedStructListArgumentRequest))) , tw) , tag ,) ?) . await ; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -31209,9 +33736,9 @@ pub mod unit_testing { let mut writer = reply.with_command(4u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self - .0 - .handle_test_list_int_8_u_reverse_request( + let cmd_invoke_result = + ::handle_test_list_int_8_u_reverse_request( + &self.0, &ctx, cmd_data, rs_matter_crate::tlv::TLVBuilder::new( @@ -31275,24 +33802,23 @@ pub mod unit_testing { let mut writer = reply.with_command(5u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self - .0 - .handle_test_enums_request( - &ctx, - cmd_data, - rs_matter_crate::tlv::TLVBuilder::new( - rs_matter_crate::tlv::TLVWriteParent::new( - MetadataDebug(( - ctx.cmd().endpoint_id, - self, - MetadataDebug(CommandId::TestEnumsRequest), - )), - tw, - ), - tag, - )?, - ) - .await; + let cmd_invoke_result = ::handle_test_enums_request( + &self.0, + &ctx, + cmd_data, + rs_matter_crate::tlv::TLVBuilder::new( + rs_matter_crate::tlv::TLVWriteParent::new( + MetadataDebug(( + ctx.cmd().endpoint_id, + self, + MetadataDebug(CommandId::TestEnumsRequest), + )), + tw, + ), + tag, + )?, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} (end) -> {:?}", @@ -31341,9 +33867,9 @@ pub mod unit_testing { let mut writer = reply.with_command(6u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self - .0 - .handle_test_nullable_optional_request( + let cmd_invoke_result = + ::handle_test_nullable_optional_request( + &self.0, &ctx, cmd_data, rs_matter_crate::tlv::TLVBuilder::new( @@ -31407,9 +33933,9 @@ pub mod unit_testing { let mut writer = reply.with_command(7u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self - .0 - .handle_test_complex_nullable_optional_request( + let cmd_invoke_result = + ::handle_test_complex_nullable_optional_request( + &self.0, &ctx, cmd_data, rs_matter_crate::tlv::TLVBuilder::new( @@ -31475,9 +34001,9 @@ pub mod unit_testing { let mut writer = reply.with_command(9u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self - .0 - .handle_simple_struct_echo_request( + let cmd_invoke_result = + ::handle_simple_struct_echo_request( + &self.0, &ctx, cmd_data, rs_matter_crate::tlv::TLVBuilder::new( @@ -31517,7 +34043,8 @@ pub mod unit_testing { rs_matter_crate::dm::Reply::complete(writer)? } CommandId::TimedInvokeRequest => { - let cmd_invoke_result = self.0.handle_timed_invoke_request(&ctx).await; + let cmd_invoke_result = + ::handle_timed_invoke_request(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -31543,9 +34070,12 @@ pub mod unit_testing { CommandId::TestSimpleOptionalArgumentRequest => { let cmd_data: TestSimpleOptionalArgumentRequestRequest<'_> = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let cmd_invoke_result = self - .0 - .handle_test_simple_optional_argument_request(&ctx, cmd_data.clone()) + let cmd_invoke_result = + ::handle_test_simple_optional_argument_request( + &self.0, + &ctx, + cmd_data.clone(), + ) .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( @@ -31596,9 +34126,9 @@ pub mod unit_testing { let mut writer = reply.with_command(10u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self - .0 - .handle_test_emit_test_event_request( + let cmd_invoke_result = + ::handle_test_emit_test_event_request( + &self.0, &ctx, cmd_data, rs_matter_crate::tlv::TLVBuilder::new( @@ -31662,9 +34192,9 @@ pub mod unit_testing { let mut writer = reply.with_command(11u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self - .0 - .handle_test_emit_test_fabric_scoped_event_request( + let cmd_invoke_result = + ::handle_test_emit_test_fabric_scoped_event_request( + &self.0, &ctx, cmd_data, rs_matter_crate::tlv::TLVBuilder::new( @@ -31730,9 +34260,9 @@ pub mod unit_testing { let mut writer = reply.with_command(12u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self - .0 - .handle_test_batch_helper_request( + let cmd_invoke_result = + ::handle_test_batch_helper_request( + &self.0, &ctx, cmd_data, rs_matter_crate::tlv::TLVBuilder::new( @@ -31796,9 +34326,9 @@ pub mod unit_testing { let mut writer = reply.with_command(12u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self - .0 - .handle_test_second_batch_helper_request( + let cmd_invoke_result = + ::handle_test_second_batch_helper_request( + &self.0, &ctx, cmd_data, rs_matter_crate::tlv::TLVBuilder::new( @@ -31862,9 +34392,9 @@ pub mod unit_testing { let mut writer = reply.with_command(4294049979u32)?; let tag = rs_matter_crate::dm::Reply::tag(&writer); let tw = rs_matter_crate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self - .0 - .handle_test_different_vendor_mei_request( + let cmd_invoke_result = + ::handle_test_different_vendor_mei_request( + &self.0, &ctx, cmd_data, rs_matter_crate::tlv::TLVBuilder::new( @@ -31914,7 +34444,6 @@ pub mod unit_testing { self.0.dataver_changed(); Ok(()) } - #[inline(always)] fn run( &self, ctx: impl rs_matter_crate::dm::HandlerContext, diff --git a/rs-matter-macros/src/idl/handler.rs b/rs-matter-macros/src/idl/handler.rs index 4dd23e736..f20073716 100644 --- a/rs-matter-macros/src/idl/handler.rs +++ b/rs-matter-macros/src/idl/handler.rs @@ -26,6 +26,17 @@ use super::id::{ident, idl_attribute_name_to_enum_variant_name, idl_field_name_t use super::parser::{Attribute, Cluster, Command, DataType, Entities, EntityContext, StructType}; use super::IdlGenerateContext; +/// Type of handler to be generated +#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)] +pub enum HandlerType { + /// Non-async methods + Sync, + /// Standard handler + Handler, + /// An inherent implementation of the trait over `&T`, where `T` is assumed to implement the trait + Delegate, +} + /// Return a token stream defining the handler trait for the provided IDL cluster. /// /// Unlike the `rs-matter` generic `AsyncHandler` pair of traits, the trait @@ -39,51 +50,47 @@ use super::IdlGenerateContext; /// in the IDL cluster, thus providing a strongly-typed interface. /// /// ## Arguments -/// - `delegate`: If true, rather than generating a handler trait, the function will generate -/// an inherent implementation of the trait over `&T`, where `T` is assumed to implement the trait. +/// - `handler_type`: The type of handler /// - `cluster`: The IDL cluster for which the handler is generated. /// - `context`: The context containing the information needed to generate the handler. pub fn handler( - delegate: bool, + handler_type: HandlerType, cluster: &Cluster, globals: &Entities, context: &IdlGenerateContext, ) -> TokenStream { let krate = context.rs_matter_crate.clone(); - let handler_name = ident("ClusterHandler"); - let entities = &EntityContext::new(Some(&cluster.entities), globals); let handler_attribute_methods = cluster .attributes .iter() .filter(|attr| !GLOBAL_ATTR.contains(&attr.field.field.code)) - .map(|attr| handler_attribute(attr, delegate, entities, &krate)); + .map(|attr| handler_attribute(attr, handler_type, entities, &krate)); let handler_attribute_write_methods = cluster .attributes .iter() .filter(|attr| !GLOBAL_ATTR.contains(&attr.field.field.code)) .filter(|attr| !attr.is_read_only) - .map(|attr| handler_attribute_write(attr, delegate, entities, &krate)); + .map(|attr| handler_attribute_write(attr, handler_type, entities, &krate)); let handler_command_methods = cluster .commands .iter() - .map(|cmd| handler_command(cmd, delegate, entities, &krate)); + .map(|cmd| handler_command(cmd, handler_type, entities, &krate)); - if delegate { + if handler_type == HandlerType::Delegate { let run = quote!( - #[inline(always)] fn run(&self, ctx: impl #krate::dm::HandlerContext) -> impl core::future::Future> { (**self).run(ctx) } ); quote!( - impl #handler_name for &T + impl ClusterHandler for &T where - T: #handler_name + T: ClusterHandler { const CLUSTER: #krate::dm::Cluster<'static> = T::CLUSTER; @@ -98,18 +105,13 @@ pub fn handler( #(#handler_command_methods)* } + + impl ClusterSyncHandler for &T where T: ClusterSyncHandler {} ) } else { - let run = quote!( - #[inline(always)] - fn run(&self, _ctx: impl #krate::dm::HandlerContext) -> impl core::future::Future> { - core::future::pending::>() - } - ); - - quote!( - #[doc = "The handler trait for the cluster."] - pub trait #handler_name { + let (metadata, definition); + if handler_type == HandlerType::Handler { + metadata = quote!( #[doc = "The cluster-metadata corresponding to this handler trait."] const CLUSTER: #krate::dm::Cluster<'static>; @@ -117,7 +119,20 @@ pub fn handler( fn dataver_changed(&self); - #run + fn run(&self, _ctx: impl #krate::dm::HandlerContext) -> impl core::future::Future> { + core::future::pending::>() + } + ); + definition = quote!(ClusterHandler : ClusterSyncHandler); + } else { + metadata = quote!(); + definition = quote!(ClusterSyncHandler); + }; + + quote!( + #[doc = "The handler trait for the cluster."] + pub trait #definition { + #metadata #(#handler_attribute_methods)* @@ -150,12 +165,6 @@ pub fn handler_adaptor( let cluster_name_str = Literal::string(&cluster.id); let cluster_code = Literal::u32_suffixed(cluster.code as _); - let handler_name = ident("ClusterHandler"); - - let handler_adaptor_name = ident("HandlerAdaptor"); - - let generic_handler_name = ident("AsyncHandler"); - let entities = &EntityContext::new(Some(&cluster.entities), globals); let handler_adaptor_attribute_match = cluster .attributes @@ -254,7 +263,6 @@ pub fn handler_adaptor( }; let run = quote!( - #[inline(always)] fn run(&self, ctx: impl #krate::dm::HandlerContext) -> impl core::future::Future> { self.0.run(ctx) } @@ -264,14 +272,13 @@ pub fn handler_adaptor( #[doc = "The handler adaptor for the cluster-specific handler. This adaptor implements the generic `rs-matter` handler trait."] #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] #[cfg_attr(feature = "defmt", derive(#krate::reexport::defmt::Format))] - pub struct #handler_adaptor_name(pub T); + pub struct HandlerAdaptor(pub T); - impl #krate::dm::#generic_handler_name for #handler_adaptor_name + impl #krate::dm::AsyncHandler for HandlerAdaptor where - T: #handler_name, + T: ClusterHandler, { #[allow(unreachable_code)] - #[inline(always)] async fn read( &self, ctx: impl #krate::dm::ReadContext, @@ -289,7 +296,6 @@ pub fn handler_adaptor( } #[allow(unreachable_code)] - #[inline(always)] async fn write( &self, ctx: impl #krate::dm::WriteContext, @@ -308,7 +314,6 @@ pub fn handler_adaptor( } #[allow(unreachable_code)] - #[inline(always)] async fn invoke( &self, ctx: impl #krate::dm::InvokeContext, @@ -324,9 +329,9 @@ pub fn handler_adaptor( #run } - impl core::fmt::Debug for MetadataDebug<(u16, &#handler_adaptor_name, Q)> + impl core::fmt::Debug for MetadataDebug<(u16, &HandlerAdaptor, Q)> where - T: #handler_name, + T: ClusterHandler, Q: core::fmt::Debug, { #[allow(unreachable_code)] @@ -336,9 +341,9 @@ pub fn handler_adaptor( } #[cfg(feature = "defmt")] - impl #krate::reexport::defmt::Format for MetadataDebug<(u16, &#handler_adaptor_name, Q)> + impl #krate::reexport::defmt::Format for MetadataDebug<(u16, &HandlerAdaptor, Q)> where - T: #handler_name, + T: ClusterHandler, Q: #krate::reexport::defmt::Format, { #[allow(unreachable_code)] @@ -355,13 +360,12 @@ pub fn handler_adaptor( /// /// # Arguments /// - `attr`: The IDL attribute for which the handler method is generated. -/// - `delegate`: If true, the generated handler method will have an implementation delegating -/// to a `T` type (for inherent impls) +/// - `handler_type`: The type of handler /// - `cluster`: The IDL cluster for which the handler method is generated. /// - `krate`: The crate name to use for the generated code. fn handler_attribute( attr: &Attribute, - delegate: bool, + handler_type: HandlerType, entities: &EntityContext, krate: &Ident, ) -> TokenStream { @@ -379,6 +383,7 @@ fn handler_attribute( krate, ); + let (definition, result_type, builder_param); if builder { if attr.field.field.data_type.is_list { let (attr_element_type, _) = field_type_builder( @@ -398,39 +403,49 @@ fn handler_attribute( attr_type = quote!(#krate::dm::ArrayAttributeRead<#attr_type, #attr_element_type>); } - if !delegate && attr.field.is_optional { + definition = quote!( + fn #attr_name(&self, ctx: impl #krate::dm::ReadContext, builder: #attr_type) + ); + result_type = quote!(Result); + builder_param = quote!(, builder); + } else { + definition = quote!(fn #attr_name(&self, ctx: impl #krate::dm::ReadContext)); + result_type = quote!(Result<#attr_type, #krate::error::Error>); + builder_param = quote!(); + } + + let async_definition = quote!(#definition -> impl core::future::Future); + match handler_type { + HandlerType::Sync => { + let sync_definition = quote!(#definition -> #result_type); + if attr.field.is_optional { + quote!( + #sync_definition { + Err(#krate::error::ErrorCode::InvalidAction.into()) + } + ) + } else { + let error_msg = format!("You must implement {}", definition); + quote!( + #sync_definition { + const { core::panic!(#error_msg); } + }) + } + } + HandlerType::Delegate => { quote!( - #[inline(always)] - async fn #attr_name(&self, ctx: impl #krate::dm::ReadContext, builder: #attr_type) -> Result { - Err(#krate::error::ErrorCode::InvalidAction.into()) + #async_definition { + ::#attr_name(self, ctx #builder_param) } ) - } else if delegate { + } + HandlerType::Handler => { quote!( - #[inline(always)] - fn #attr_name(&self, ctx: impl #krate::dm::ReadContext, builder: #attr_type) -> impl core::future::Future> { - T::#attr_name(self, ctx, builder) + #async_definition { + core::future::ready(::#attr_name(self, ctx #builder_param)) } ) - } else { - quote!(async fn #attr_name(&self, ctx: impl #krate::dm::ReadContext, builder: #attr_type) -> Result;) } - } else if !delegate && attr.field.is_optional { - quote!( - #[inline(always)] - async fn #attr_name(&self, ctx: impl #krate::dm::ReadContext) -> Result<#attr_type, #krate::error::Error> { - Err(#krate::error::ErrorCode::InvalidAction.into()) - } - ) - } else if delegate { - quote!( - #[inline(always)] - fn #attr_name(&self, ctx: impl #krate::dm::ReadContext) -> impl core::future::Future> { - T::#attr_name(self, ctx) - } - ) - } else { - quote!(async fn #attr_name(&self, ctx: impl #krate::dm::ReadContext) -> Result<#attr_type, #krate::error::Error>;) } } @@ -438,13 +453,12 @@ fn handler_attribute( /// /// # Arguments /// - `attr`: The IDL attribute for which the handler method is generated. -/// - `delegate`: If true, the generated handler method will have an implementation delegating -/// to a `T` type (for inherent impls) +/// - `handler_type`: The type of handler /// - `cluster`: The IDL cluster for which the handler method is generated. /// - `krate`: The crate name to use for the generated code. fn handler_attribute_write( attr: &Attribute, - delegate: bool, + handler_type: HandlerType, entities: &EntityContext, krate: &Ident, ) -> TokenStream { @@ -477,22 +491,41 @@ fn handler_attribute_write( attr_type = quote!(#krate::dm::ArrayAttributeWrite<#attr_type, #attr_element_type>); } - if !delegate && attr.field.is_optional { - quote!( - #[inline(always)] - async fn #attr_name(&self, ctx: impl #krate::dm::WriteContext, value: #attr_type) -> Result<(), #krate::error::Error> { - Err(#krate::error::ErrorCode::InvalidAction.into()) - } - ) - } else if delegate { - quote!( - #[inline(always)] - fn #attr_name(&self, ctx: impl #krate::dm::WriteContext, value: #attr_type) -> impl core::future::Future> { - T::#attr_name(self, ctx, value) + let definition = + quote!(fn #attr_name(&self, ctx: impl #krate::dm::WriteContext, value: #attr_type)); + let result_type = quote!(Result<(), #krate::error::Error>); + let async_definition = quote!(#definition -> impl core::future::Future); + match handler_type { + HandlerType::Sync => { + let sync_definition = quote!(#definition -> #result_type); + if attr.field.is_optional { + quote!( + #sync_definition { + Err(#krate::error::ErrorCode::InvalidAction.into()) + } + ) + } else { + let error_msg = format!("You must implement {}", definition); + quote!( + #sync_definition { + const { core::panic!(#error_msg); } + }) } - ) - } else { - quote!(async fn #attr_name(&self, ctx: impl #krate::dm::WriteContext, value: #attr_type) -> Result<(), #krate::error::Error>;) + } + HandlerType::Delegate => { + quote!( + #async_definition { + ::#attr_name(self, ctx, value) + } + ) + } + HandlerType::Handler => { + quote!( + #async_definition { + core::future::ready(::#attr_name(self, ctx, value)) + } + ) + } } } @@ -500,13 +533,13 @@ fn handler_attribute_write( /// /// # Arguments /// - `cmd`: The IDL command for which the handler method is generated. -/// - `delegate`: If true, the generated handler method will have an implementation delegating +/// - `handler_type`: The type of handler /// to a `T` type (for inherent impls) /// - `cluster`: The IDL cluster for which the handler method is generated. /// - `krate`: The crate name to use for the generated code. fn handler_command( cmd: &Command, - delegate: bool, + handler_type: HandlerType, entities: &EntityContext, krate: &Ident, ) -> TokenStream { @@ -544,10 +577,11 @@ fn handler_command( ) }); + let (result_type, definition, request_param, response_param); if let Some(field_req) = field_req { if let Some((field_resp, field_resp_builder)) = field_resp { if field_resp_builder { - let stream = quote!( + definition = quote!( fn #cmd_name( &self, ctx: impl #krate::dm::InvokeContext, @@ -556,15 +590,11 @@ fn handler_command( ) ); - if delegate { - quote!( - #[inline(always)] - #stream -> impl core::future::Future> { T::#cmd_name(self, ctx, request, response) }) - } else { - quote!(async #stream -> Result;) - } + result_type = quote!(Result); + request_param = quote!(, request); + response_param = quote!(, response); } else { - let stream = quote!( + definition = quote!( fn #cmd_name( &self, ctx: impl #krate::dm::InvokeContext, @@ -572,16 +602,12 @@ fn handler_command( ) ); - if delegate { - quote!( - #[inline(always)] - #stream -> impl core::future::Future> { T::#cmd_name(self, ctx, request) }) - } else { - quote!(async #stream -> Result<#field_resp, #krate::error::Error>;) - } + result_type = quote!(Result<#field_resp, #krate::error::Error>); + request_param = quote!(, request); + response_param = quote!(); } } else { - let stream = quote!( + definition = quote!( fn #cmd_name( &self, ctx: impl #krate::dm::InvokeContext, @@ -589,17 +615,13 @@ fn handler_command( ) ); - if delegate { - quote!( - #[inline(always)] - #stream -> impl core::future::Future> { T::#cmd_name(self, ctx, request) }) - } else { - quote!(async #stream -> Result<(), #krate::error::Error>;) - } + result_type = quote!(Result<(), #krate::error::Error>); + request_param = quote!(, request); + response_param = quote!(); } } else if let Some((field_resp, field_resp_builder)) = field_resp { if field_resp_builder { - let stream = quote!( + definition = quote!( fn #cmd_name( &self, ctx: impl #krate::dm::InvokeContext, @@ -607,43 +629,43 @@ fn handler_command( ) ); - if delegate { - quote!( - #[inline(always)] - #stream -> impl core::future::Future> { T::#cmd_name(self, ctx, response) }) - } else { - quote!(async #stream -> Result;) - } + result_type = quote!(Result); + request_param = quote!(); + response_param = quote!(, response); } else { - let stream = quote!( - fn #cmd_name( - &self, - ctx: impl #krate::dm::InvokeContext, - ) -> Result<#field_resp, #krate::error::Error> - ); - - if delegate { - quote!( - #[inline(always)] - #stream { T::#cmd_name(self, ctx) }) - } else { - quote!(async #stream;) - } + definition = quote!(fn #cmd_name(&self, ctx: impl #krate::dm::InvokeContext)); + result_type = quote!(Result<#field_resp, #krate::error::Error>); + request_param = quote!(); + response_param = quote!(); } } else { - let stream = quote!( - fn #cmd_name( - &self, - ctx: impl #krate::dm::InvokeContext, + definition = quote!(fn #cmd_name(&self, ctx: impl #krate::dm::InvokeContext)); + result_type = quote!(Result<(), #krate::error::Error>); + request_param = quote!(); + response_param = quote!(); + } + let async_definition = quote!(#definition -> impl core::future::Future); + match handler_type { + HandlerType::Sync => { + let error_msg = format!("You must implement {}", definition); + quote!( + #definition -> #result_type { + const { core::panic!(#error_msg); } + }) + } + HandlerType::Delegate => { + quote!( + #async_definition { + ::#cmd_name(self, ctx #request_param #response_param) + } ) - ); - - if delegate { + } + HandlerType::Handler => { quote!( - #[inline(always)] - #stream -> impl core::future::Future> { T::#cmd_name(self, ctx) }) - } else { - quote!(async #stream -> Result<(), #krate::error::Error>;) + #async_definition { + core::future::ready(::#cmd_name(self, ctx #request_param #response_param)) + } + ) } } } @@ -709,7 +731,8 @@ fn handler_adaptor_attribute_match( let tag = #krate::dm::Reply::tag(&writer); let tw = #krate::dm::Reply::writer(&mut writer); - let attr_read_result = self.0.#attr_method_name( + let attr_read_result = ::#attr_method_name( + &self.0, &ctx, #krate::dm::ArrayAttributeRead::new( ctx.attr().list_index.clone(), @@ -733,7 +756,7 @@ fn handler_adaptor_attribute_match( let tag = #krate::dm::Reply::tag(&writer); let tw = #krate::dm::Reply::writer(&mut writer); - let attr_read_result = self.0.#attr_method_name(&ctx, #krate::tlv::TLVBuilder::new( + let attr_read_result = ::#attr_method_name(&self.0, &ctx, #krate::tlv::TLVBuilder::new( #krate::tlv::TLVWriteParent::new(#attr_debug_id, tw), tag, )?).await; @@ -749,7 +772,7 @@ fn handler_adaptor_attribute_match( } else { quote!( AttributeId::#attr_name => { - let attr_read_result = self.0.#attr_method_name(&ctx).await; + let attr_read_result = ::#attr_method_name(&self.0, &ctx).await; #attr_read_debug @@ -800,7 +823,7 @@ fn handler_adaptor_attribute_write_match( AttributeId::#attr_name => { let attr_data = #krate::dm::ArrayAttributeWrite::new(ctx.attr().list_index.clone(), ctx.data())?; - let attr_write_result = self.0.#attr_method_name(&ctx, attr_data.clone()).await; + let attr_write_result = ::#attr_method_name(&self.0, &ctx, attr_data.clone()).await; #attr_write_debug @@ -812,7 +835,7 @@ fn handler_adaptor_attribute_write_match( AttributeId::#attr_name => { let attr_data: #attr_type = #krate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = self.0.#attr_method_name(&ctx, attr_data.clone()).await; + let attr_write_result = ::#attr_method_name(&self.0, &ctx, attr_data.clone()).await; #attr_write_debug @@ -937,7 +960,8 @@ fn handler_adaptor_command_match( let tag = #krate::dm::Reply::tag(&writer); let tw = #krate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self.0.#cmd_method_name( + let cmd_invoke_result = ::#cmd_method_name( + &self.0, &ctx, cmd_data, #krate::tlv::TLVBuilder::new( @@ -960,7 +984,8 @@ fn handler_adaptor_command_match( let writer = reply.with_command(#field_resp_cmd_code)?; - let cmd_invoke_result = self.0.#cmd_method_name(&ctx, cmd_data.clone()).await; + let cmd_invoke_result = ::#cmd_method_name( + &self.0, &ctx, cmd_data.clone()).await; #cmd_invoke_debug @@ -973,7 +998,8 @@ fn handler_adaptor_command_match( CommandId::#cmd_name => { let cmd_data: #field_req = #krate::tlv::FromTLV::from_tlv(ctx.data())?; - let cmd_invoke_result = self.0.#cmd_method_name(&ctx, cmd_data.clone()).await; + let cmd_invoke_result = ::#cmd_method_name( + &self.0, &ctx, cmd_data.clone()).await; #cmd_invoke_debug @@ -991,7 +1017,8 @@ fn handler_adaptor_command_match( let tag = #krate::dm::Reply::tag(&writer); let tw = #krate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = self.0.#cmd_method_name( + let cmd_invoke_result = ::#cmd_method_name( + &self.0, &ctx, #krate::tlv::TLVBuilder::new( #krate::tlv::TLVWriteParent::new(#cmd_debug_id, tw), @@ -1011,7 +1038,7 @@ fn handler_adaptor_command_match( CommandId::#cmd_name => { let writer = reply.with_command(#field_resp_cmd_code)?; - let cmd_invoke_result = self.0.#cmd_method_name(&ctx).await; + let cmd_invoke_result = ::#cmd_method_name(&self.0, &ctx).await; #cmd_invoke_debug_noarg @@ -1022,7 +1049,7 @@ fn handler_adaptor_command_match( } else { quote!( CommandId::#cmd_name => { - let cmd_invoke_result = self.0.#cmd_method_name(&ctx).await; + let cmd_invoke_result = ::#cmd_method_name(&self.0, &ctx).await; #cmd_invoke_debug_noarg @@ -1034,6 +1061,7 @@ fn handler_adaptor_command_match( #[cfg(test)] mod tests { + use crate::idl::handler::HandlerType; use assert_tokenstreams_eq::assert_tokenstreams_eq; use quote::quote; @@ -1123,18 +1151,17 @@ mod tests { let cluster = get_cluster_named(&idl, "OnOff").expect("Cluster exists"); let context = IdlGenerateContext::new("rs_matter_crate"); - // panic!("====\n{}\n====", &handler(false, cluster, &idl.globals, &context)); + // panic!("====\n{}\n====", &handler(HandlerType::Handler, cluster, &idl.globals, &context)); assert_tokenstreams_eq!( - &handler(false, cluster, &idl.globals, &context), + &handler(HandlerType::Handler, cluster, &idl.globals, &context), "e!( #[doc = "The handler trait for the cluster."] - pub trait ClusterHandler { + pub trait ClusterHandler: ClusterSyncHandler { #[doc = "The cluster-metadata corresponding to this handler trait."] const CLUSTER: rs_matter_crate::dm::Cluster<'static>; fn dataver(&self) -> u32; fn dataver_changed(&self); - #[inline(always)] fn run( &self, _ctx: impl rs_matter_crate::dm::HandlerContext, @@ -1142,99 +1169,139 @@ mod tests { { core::future::pending::>() } - async fn on_off( + fn on_off( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result; - #[inline(always)] - async fn global_scene_control( + ) -> impl core::future::Future> + { + core::future::ready(::on_off(self, ctx)) + } + fn global_scene_control( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { - Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) + ) -> impl core::future::Future> + { + core::future::ready(::global_scene_control( + self, ctx, + )) } - #[inline(always)] - async fn on_time( + fn on_time( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { - Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) + ) -> impl core::future::Future> + { + core::future::ready(::on_time(self, ctx)) } - #[inline(always)] - async fn off_wait_time( + fn off_wait_time( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result { - Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) + ) -> impl core::future::Future> + { + core::future::ready(::off_wait_time(self, ctx)) } - #[inline(always)] - async fn start_up_on_off( + fn start_up_on_off( &self, ctx: impl rs_matter_crate::dm::ReadContext, - ) -> Result< - rs_matter_crate::tlv::Nullable, - rs_matter_crate::error::Error, + ) -> impl core::future::Future< + Output = Result< + rs_matter_crate::tlv::Nullable, + rs_matter_crate::error::Error, + >, > { - Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) + core::future::ready(::start_up_on_off( + self, ctx, + )) } - #[inline(always)] - async fn set_on_time( + fn set_on_time( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, - ) -> Result<(), rs_matter_crate::error::Error> { - Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) + ) -> impl core::future::Future> + { + core::future::ready(::set_on_time( + self, ctx, value, + )) } - #[inline(always)] - async fn set_off_wait_time( + fn set_off_wait_time( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, - ) -> Result<(), rs_matter_crate::error::Error> { - Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) + ) -> impl core::future::Future> + { + core::future::ready(::set_off_wait_time( + self, ctx, value, + )) } - #[inline(always)] - async fn set_start_up_on_off( + fn set_start_up_on_off( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, - ) -> Result<(), rs_matter_crate::error::Error> { - Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) + ) -> impl core::future::Future> + { + core::future::ready(::set_start_up_on_off( + self, ctx, value, + )) } - async fn handle_off( + fn handle_off( &self, ctx: impl rs_matter_crate::dm::InvokeContext, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn handle_on( + ) -> impl core::future::Future> + { + core::future::ready(::handle_off(self, ctx)) + } + fn handle_on( &self, ctx: impl rs_matter_crate::dm::InvokeContext, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn handle_toggle( + ) -> impl core::future::Future> + { + core::future::ready(::handle_on(self, ctx)) + } + fn handle_toggle( &self, ctx: impl rs_matter_crate::dm::InvokeContext, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn handle_off_with_effect( + ) -> impl core::future::Future> + { + core::future::ready(::handle_toggle(self, ctx)) + } + fn handle_off_with_effect( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: OffWithEffectRequest<'_>, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn handle_on_with_recall_global_scene( + ) -> impl core::future::Future> + { + core::future::ready(::handle_off_with_effect( + self, ctx, request, + )) + } + fn handle_on_with_recall_global_scene( &self, ctx: impl rs_matter_crate::dm::InvokeContext, - ) -> Result<(), rs_matter_crate::error::Error>; - async fn handle_on_with_timed_off( + ) -> impl core::future::Future> + { + core::future::ready( + ::handle_on_with_recall_global_scene( + self, ctx, + ), + ) + } + fn handle_on_with_timed_off( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: OnWithTimedOffRequest<'_>, - ) -> Result<(), rs_matter_crate::error::Error>; + ) -> impl core::future::Future> + { + core::future::ready(::handle_on_with_timed_off( + self, ctx, request, + )) + } } ) ); - // panic!("====\n{}\n====", &handler(true, cluster, &idl.globals, &context)); + // panic!("====\n{}\n====", &handler(HandlerType::Delegate, cluster, &idl.globals, &context)); assert_tokenstreams_eq!( - &handler(true, cluster, &idl.globals, &context), + &handler(HandlerType::Delegate, cluster, &idl.globals, &context), "e!( impl ClusterHandler for &T where @@ -1247,7 +1314,6 @@ mod tests { fn dataver_changed(&self) { T::dataver_changed(self) } - #[inline(always)] fn run( &self, ctx: impl rs_matter_crate::dm::HandlerContext, @@ -1255,39 +1321,34 @@ mod tests { { (**self).run(ctx) } - #[inline(always)] fn on_off( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::on_off(self, ctx) + ::on_off(self, ctx) } - #[inline(always)] fn global_scene_control( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::global_scene_control(self, ctx) + ::global_scene_control(self, ctx) } - #[inline(always)] fn on_time( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::on_time(self, ctx) + ::on_time(self, ctx) } - #[inline(always)] fn off_wait_time( &self, ctx: impl rs_matter_crate::dm::ReadContext, ) -> impl core::future::Future> { - T::off_wait_time(self, ctx) + ::off_wait_time(self, ctx) } - #[inline(always)] fn start_up_on_off( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -1297,84 +1358,193 @@ mod tests { rs_matter_crate::error::Error, >, > { - T::start_up_on_off(self, ctx) + ::start_up_on_off(self, ctx) } - #[inline(always)] fn set_on_time( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, ) -> impl core::future::Future> { - T::set_on_time(self, ctx, value) + ::set_on_time(self, ctx, value) } - #[inline(always)] fn set_off_wait_time( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: u16, ) -> impl core::future::Future> { - T::set_off_wait_time(self, ctx, value) + ::set_off_wait_time(self, ctx, value) } - #[inline(always)] fn set_start_up_on_off( &self, ctx: impl rs_matter_crate::dm::WriteContext, value: rs_matter_crate::tlv::Nullable, ) -> impl core::future::Future> { - T::set_start_up_on_off(self, ctx, value) + ::set_start_up_on_off(self, ctx, value) } - #[inline(always)] fn handle_off( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> impl core::future::Future> { - T::handle_off(self, ctx) + ::handle_off(self, ctx) } - #[inline(always)] fn handle_on( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> impl core::future::Future> { - T::handle_on(self, ctx) + ::handle_on(self, ctx) } - #[inline(always)] fn handle_toggle( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> impl core::future::Future> { - T::handle_toggle(self, ctx) + ::handle_toggle(self, ctx) } - #[inline(always)] fn handle_off_with_effect( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: OffWithEffectRequest<'_>, ) -> impl core::future::Future> { - T::handle_off_with_effect(self, ctx, request) + ::handle_off_with_effect(self, ctx, request) } - #[inline(always)] fn handle_on_with_recall_global_scene( &self, ctx: impl rs_matter_crate::dm::InvokeContext, ) -> impl core::future::Future> { - T::handle_on_with_recall_global_scene(self, ctx) + ::handle_on_with_recall_global_scene(self, ctx) } - #[inline(always)] fn handle_on_with_timed_off( &self, ctx: impl rs_matter_crate::dm::InvokeContext, request: OnWithTimedOffRequest<'_>, ) -> impl core::future::Future> { - T::handle_on_with_timed_off(self, ctx, request) + ::handle_on_with_timed_off(self, ctx, request) + } + } + impl ClusterSyncHandler for &T where T: ClusterSyncHandler {} + ) + ); + + // panic!("====\n{}\n====", &handler(HandlerType::Sync, cluster, &idl.globals, &context)); + + assert_tokenstreams_eq!( + &handler(HandlerType::Sync, cluster, &idl.globals, &context), + "e!( + #[doc = "The handler trait for the cluster."] + pub trait ClusterSyncHandler { + fn on_off( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> Result { + const { + core::panic!("You must implement fn on_off (& self , ctx : impl rs_matter_crate :: dm :: ReadContext)"); + } + } + fn global_scene_control( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> Result { + Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) + } + fn on_time( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> Result { + Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) + } + fn off_wait_time( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> Result { + Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) + } + fn start_up_on_off( + &self, + ctx: impl rs_matter_crate::dm::ReadContext, + ) -> Result< + rs_matter_crate::tlv::Nullable, + rs_matter_crate::error::Error, + > { + Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) + } + fn set_on_time( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: u16, + ) -> Result<(), rs_matter_crate::error::Error> { + Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) + } + fn set_off_wait_time( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: u16, + ) -> Result<(), rs_matter_crate::error::Error> { + Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) + } + fn set_start_up_on_off( + &self, + ctx: impl rs_matter_crate::dm::WriteContext, + value: rs_matter_crate::tlv::Nullable, + ) -> Result<(), rs_matter_crate::error::Error> { + Err(rs_matter_crate::error::ErrorCode::InvalidAction.into()) + } + fn handle_off( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core::panic!("You must implement fn handle_off (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext)"); + } + } + fn handle_on( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core::panic!("You must implement fn handle_on (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext)"); + } + } + fn handle_toggle( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core::panic!("You must implement fn handle_toggle (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext)"); + } + } + fn handle_off_with_effect( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + request: OffWithEffectRequest<'_>, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core::panic!("You must implement fn handle_off_with_effect (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : OffWithEffectRequest < '_ > ,)"); + } + } + fn handle_on_with_recall_global_scene( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core::panic!("You must implement fn handle_on_with_recall_global_scene (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext)"); + } + } + fn handle_on_with_timed_off( + &self, + ctx: impl rs_matter_crate::dm::InvokeContext, + request: OnWithTimedOffRequest<'_>, + ) -> Result<(), rs_matter_crate::error::Error> { + const { + core::panic!("You must implement fn handle_on_with_timed_off (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : OnWithTimedOffRequest < '_ > ,)"); + } } } ) @@ -1402,7 +1572,6 @@ mod tests { T: ClusterHandler, { #[allow(unreachable_code)] - #[inline(always)] async fn read( &self, ctx: impl rs_matter_crate::dm::ReadContext, @@ -1414,7 +1583,8 @@ mod tests { } else { match AttributeId::try_from(ctx.attr().attr_id)? { AttributeId::OnOff => { - let attr_read_result = self.0.on_off(&ctx).await; + let attr_read_result = + ::on_off(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -1439,7 +1609,10 @@ mod tests { } AttributeId::GlobalSceneControl => { let attr_read_result = - self.0.global_scene_control(&ctx).await; + ::global_scene_control( + &self.0, &ctx, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -1469,7 +1642,8 @@ mod tests { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::OnTime => { - let attr_read_result = self.0.on_time(&ctx).await; + let attr_read_result = + ::on_time(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -1493,7 +1667,9 @@ mod tests { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::OffWaitTime => { - let attr_read_result = self.0.off_wait_time(&ctx).await; + let attr_read_result = + ::off_wait_time(&self.0, &ctx) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -1517,7 +1693,9 @@ mod tests { rs_matter_crate::dm::Reply::set(writer, attr_read_result?) } AttributeId::StartUpOnOff => { - let attr_read_result = self.0.start_up_on_off(&ctx).await; + let attr_read_result = + ::start_up_on_off(&self.0, &ctx) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -1562,7 +1740,6 @@ mod tests { } } #[allow(unreachable_code)] - #[inline(always)] async fn write( &self, ctx: impl rs_matter_crate::dm::WriteContext, @@ -1575,8 +1752,12 @@ mod tests { AttributeId::OnTime => { let attr_data: u16 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_on_time(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_on_time( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -1604,8 +1785,12 @@ mod tests { AttributeId::OffWaitTime => { let attr_data: u16 = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_off_wait_time(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_off_wait_time( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -1633,8 +1818,12 @@ mod tests { AttributeId::StartUpOnOff => { let attr_data: rs_matter_crate::tlv::Nullable = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = - self.0.set_start_up_on_off(&ctx, attr_data.clone()).await; + let attr_write_result = ::set_start_up_on_off( + &self.0, + &ctx, + attr_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -1679,7 +1868,6 @@ mod tests { Ok(()) } #[allow(unreachable_code)] - #[inline(always)] async fn invoke( &self, ctx: impl rs_matter_crate::dm::InvokeContext, @@ -1687,7 +1875,8 @@ mod tests { ) -> Result<(), rs_matter_crate::error::Error> { match CommandId::try_from(ctx.cmd().cmd_id)? { CommandId::Off => { - let cmd_invoke_result = self.0.handle_off(&ctx).await; + let cmd_invoke_result = + ::handle_off(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -1711,7 +1900,8 @@ mod tests { cmd_invoke_result?; } CommandId::On => { - let cmd_invoke_result = self.0.handle_on(&ctx).await; + let cmd_invoke_result = + ::handle_on(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -1735,7 +1925,8 @@ mod tests { cmd_invoke_result?; } CommandId::Toggle => { - let cmd_invoke_result = self.0.handle_toggle(&ctx).await; + let cmd_invoke_result = + ::handle_toggle(&self.0, &ctx).await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -1762,7 +1953,12 @@ mod tests { let cmd_data: OffWithEffectRequest<'_> = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; let cmd_invoke_result = - self.0.handle_off_with_effect(&ctx, cmd_data.clone()).await; + ::handle_off_with_effect( + &self.0, + &ctx, + cmd_data.clone(), + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?}({:?}) -> {:?}", @@ -1789,7 +1985,10 @@ mod tests { } CommandId::OnWithRecallGlobalScene => { let cmd_invoke_result = - self.0.handle_on_with_recall_global_scene(&ctx).await; + ::handle_on_with_recall_global_scene( + &self.0, &ctx, + ) + .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( "{:?} -> {:?}", @@ -1815,9 +2014,12 @@ mod tests { CommandId::OnWithTimedOff => { let cmd_data: OnWithTimedOffRequest<'_> = rs_matter_crate::tlv::FromTLV::from_tlv(ctx.data())?; - let cmd_invoke_result = self - .0 - .handle_on_with_timed_off(&ctx, cmd_data.clone()) + let cmd_invoke_result = + ::handle_on_with_timed_off( + &self.0, + &ctx, + cmd_data.clone(), + ) .await; #[cfg(feature = "defmt")] rs_matter_crate::reexport::defmt::debug!( @@ -1862,7 +2064,6 @@ mod tests { self.0.dataver_changed(); Ok(()) } - #[inline(always)] fn run( &self, ctx: impl rs_matter_crate::dm::HandlerContext, diff --git a/rs-matter/src/dm/clusters/acl.rs b/rs-matter/src/dm/clusters/acl.rs index 1ef952cb4..dec533b9d 100644 --- a/rs-matter/src/dm/clusters/acl.rs +++ b/rs-matter/src/dm/clusters/acl.rs @@ -149,8 +149,10 @@ impl ClusterHandler for AclHandler { fn dataver_changed(&self) { self.dataver.changed(); } +} - async fn acl( +impl ClusterSyncHandler for AclHandler { + fn acl( &self, ctx: impl ReadContext, builder: ArrayAttributeRead< @@ -165,25 +167,19 @@ impl ClusterHandler for AclHandler { ) } - async fn subjects_per_access_control_entry( - &self, - _ctx: impl ReadContext, - ) -> Result { + fn subjects_per_access_control_entry(&self, _ctx: impl ReadContext) -> Result { Ok(acl::MAX_SUBJECTS_PER_ACL_ENTRY as _) } - async fn targets_per_access_control_entry(&self, _ctx: impl ReadContext) -> Result { + fn targets_per_access_control_entry(&self, _ctx: impl ReadContext) -> Result { Ok(acl::MAX_TARGETS_PER_ACL_ENTRY as _) } - async fn access_control_entries_per_fabric( - &self, - _ctx: impl ReadContext, - ) -> Result { + fn access_control_entries_per_fabric(&self, _ctx: impl ReadContext) -> Result { Ok(acl::MAX_ACL_ENTRIES_PER_FABRIC as _) } - async fn set_acl( + fn set_acl( &self, ctx: impl WriteContext, value: ArrayAttributeWrite< @@ -199,7 +195,7 @@ impl ClusterHandler for AclHandler { ) } - async fn handle_review_fabric_restrictions( + fn handle_review_fabric_restrictions( &self, _ctx: impl InvokeContext, _request: ReviewFabricRestrictionsRequest<'_>, diff --git a/rs-matter/src/dm/clusters/adm_comm.rs b/rs-matter/src/dm/clusters/adm_comm.rs index a5c6f9285..6d35ac51f 100644 --- a/rs-matter/src/dm/clusters/adm_comm.rs +++ b/rs-matter/src/dm/clusters/adm_comm.rs @@ -71,11 +71,10 @@ impl ClusterHandler for AdminCommHandler { fn dataver_changed(&self) { self.dataver.changed(); } +} - async fn window_status( - &self, - ctx: impl ReadContext, - ) -> Result { +impl ClusterSyncHandler for AdminCommHandler { + fn window_status(&self, ctx: impl ReadContext) -> Result { let matter = ctx.exchange().matter(); let mut pase_mgr = matter.pase_mgr.borrow_mut(); let comm_window = pase_mgr.comm_window(&ctx)?; @@ -89,7 +88,7 @@ impl ClusterHandler for AdminCommHandler { }) } - async fn admin_fabric_index(&self, ctx: impl ReadContext) -> Result, Error> { + fn admin_fabric_index(&self, ctx: impl ReadContext) -> Result, Error> { let matter = ctx.exchange().matter(); let mut pase_mgr = matter.pase_mgr.borrow_mut(); let comm_window = pase_mgr.comm_window(&ctx)?; @@ -112,7 +111,7 @@ impl ClusterHandler for AdminCommHandler { Ok(Nullable::none()) } - async fn admin_vendor_id(&self, ctx: impl ReadContext) -> Result, Error> { + fn admin_vendor_id(&self, ctx: impl ReadContext) -> Result, Error> { let matter = ctx.exchange().matter(); let mut pase_mgr = matter.pase_mgr.borrow_mut(); let comm_window = pase_mgr.comm_window(&ctx)?; @@ -124,7 +123,7 @@ impl ClusterHandler for AdminCommHandler { )) } - async fn handle_open_commissioning_window( + fn handle_open_commissioning_window( &self, ctx: impl InvokeContext, request: OpenCommissioningWindowRequest<'_>, @@ -143,7 +142,7 @@ impl ClusterHandler for AdminCommHandler { ) } - async fn handle_open_basic_commissioning_window( + fn handle_open_basic_commissioning_window( &self, ctx: impl InvokeContext, request: OpenBasicCommissioningWindowRequest<'_>, @@ -160,7 +159,7 @@ impl ClusterHandler for AdminCommHandler { ) } - async fn handle_revoke_commissioning(&self, ctx: impl InvokeContext) -> Result<(), Error> { + fn handle_revoke_commissioning(&self, ctx: impl InvokeContext) -> Result<(), Error> { ctx.matter().pase_mgr.borrow_mut().close_comm_window(&ctx)?; // TODO: Send status code if no commissioning window is open? diff --git a/rs-matter/src/dm/clusters/basic_info.rs b/rs-matter/src/dm/clusters/basic_info.rs index 27d86df44..db065fe43 100644 --- a/rs-matter/src/dm/clusters/basic_info.rs +++ b/rs-matter/src/dm/clusters/basic_info.rs @@ -419,16 +419,18 @@ impl ClusterHandler for BasicInfoHandler { fn dataver_changed(&self) { self.0.changed(); } +} - async fn data_model_revision(&self, ctx: impl ReadContext) -> Result { +impl ClusterSyncHandler for BasicInfoHandler { + fn data_model_revision(&self, ctx: impl ReadContext) -> Result { Ok(Self::config(ctx.exchange()).data_model_revision) } - async fn vendor_id(&self, ctx: impl ReadContext) -> Result { + fn vendor_id(&self, ctx: impl ReadContext) -> Result { Ok(Self::config(ctx.exchange()).vid) } - async fn vendor_name( + fn vendor_name( &self, ctx: impl ReadContext, out: Utf8StrBuilder

, @@ -436,11 +438,11 @@ impl ClusterHandler for BasicInfoHandler { out.set(Self::config(ctx.exchange()).vendor_name) } - async fn product_id(&self, ctx: impl ReadContext) -> Result { + fn product_id(&self, ctx: impl ReadContext) -> Result { Ok(Self::config(ctx.exchange()).pid) } - async fn product_name( + fn product_name( &self, ctx: impl ReadContext, out: Utf8StrBuilder

, @@ -448,11 +450,11 @@ impl ClusterHandler for BasicInfoHandler { out.set(Self::config(ctx.exchange()).product_name) } - async fn hardware_version(&self, ctx: impl ReadContext) -> Result { + fn hardware_version(&self, ctx: impl ReadContext) -> Result { Ok(Self::config(ctx.exchange()).hw_ver) } - async fn hardware_version_string( + fn hardware_version_string( &self, ctx: impl ReadContext, out: Utf8StrBuilder

, @@ -460,11 +462,11 @@ impl ClusterHandler for BasicInfoHandler { out.set(Self::config(ctx.exchange()).hw_ver_str) } - async fn software_version(&self, ctx: impl ReadContext) -> Result { + fn software_version(&self, ctx: impl ReadContext) -> Result { Ok(Self::config(ctx.exchange()).sw_ver) } - async fn software_version_string( + fn software_version_string( &self, ctx: impl ReadContext, out: Utf8StrBuilder

, @@ -472,7 +474,7 @@ impl ClusterHandler for BasicInfoHandler { out.set(Self::config(ctx.exchange()).sw_ver_str) } - async fn node_label( + fn node_label( &self, ctx: impl ReadContext, out: Utf8StrBuilder

, @@ -480,7 +482,7 @@ impl ClusterHandler for BasicInfoHandler { out.set(Self::settings(ctx.exchange()).borrow().node_label.as_str()) } - async fn set_node_label(&self, ctx: impl WriteContext, label: &str) -> Result<(), Error> { + fn set_node_label(&self, ctx: impl WriteContext, label: &str) -> Result<(), Error> { if label.len() > 32 { return Err(ErrorCode::ConstraintError.into()); } @@ -499,7 +501,7 @@ impl ClusterHandler for BasicInfoHandler { Ok(()) } - async fn location( + fn location( &self, ctx: impl ReadContext, out: Utf8StrBuilder

, @@ -508,7 +510,7 @@ impl ClusterHandler for BasicInfoHandler { out.set(settings.location.as_ref().map_or("XX", |loc| loc.as_str())) } - async fn set_location(&self, ctx: impl WriteContext, location: &str) -> Result<(), Error> { + fn set_location(&self, ctx: impl WriteContext, location: &str) -> Result<(), Error> { if location.len() != 2 { return Err(ErrorCode::ConstraintError.into()); } @@ -522,7 +524,7 @@ impl ClusterHandler for BasicInfoHandler { Ok(()) } - async fn capability_minima( + fn capability_minima( &self, ctx: impl ReadContext, builder: CapabilityMinimaStructBuilder

, @@ -535,23 +537,23 @@ impl ClusterHandler for BasicInfoHandler { .end() } - async fn specification_version(&self, ctx: impl ReadContext) -> Result { + fn specification_version(&self, ctx: impl ReadContext) -> Result { Ok(Self::config(ctx.exchange()).specification_version) } - async fn max_paths_per_invoke(&self, ctx: impl ReadContext) -> Result { + fn max_paths_per_invoke(&self, ctx: impl ReadContext) -> Result { Ok(Self::config(ctx.exchange()).max_paths_per_invoke) } - async fn configuration_version(&self, ctx: impl ReadContext) -> Result { + fn configuration_version(&self, ctx: impl ReadContext) -> Result { Ok(Self::config(ctx.exchange()).configuration_version) } - async fn handle_mfg_specific_ping(&self, _ctx: impl InvokeContext) -> Result<(), Error> { + fn handle_mfg_specific_ping(&self, _ctx: impl InvokeContext) -> Result<(), Error> { Err(ErrorCode::InvalidAction.into()) } - async fn manufacturing_date( + fn manufacturing_date( &self, ctx: impl ReadContext, builder: Utf8StrBuilder

, @@ -559,7 +561,7 @@ impl ClusterHandler for BasicInfoHandler { builder.set(Self::config(ctx.exchange()).manufacturing_date) } - async fn part_number( + fn part_number( &self, ctx: impl ReadContext, builder: Utf8StrBuilder

, @@ -567,7 +569,7 @@ impl ClusterHandler for BasicInfoHandler { builder.set(Self::config(ctx.exchange()).part_number) } - async fn product_url( + fn product_url( &self, ctx: impl ReadContext, builder: Utf8StrBuilder

, @@ -575,7 +577,7 @@ impl ClusterHandler for BasicInfoHandler { builder.set(Self::config(ctx.exchange()).product_url) } - async fn product_label( + fn product_label( &self, ctx: impl ReadContext, builder: Utf8StrBuilder

, @@ -583,7 +585,7 @@ impl ClusterHandler for BasicInfoHandler { builder.set(Self::config(ctx.exchange()).product_label) } - async fn serial_number( + fn serial_number( &self, ctx: impl ReadContext, builder: Utf8StrBuilder

, @@ -591,17 +593,13 @@ impl ClusterHandler for BasicInfoHandler { builder.set(Self::config(ctx.exchange()).serial_no) } - async fn local_config_disabled(&self, ctx: impl ReadContext) -> Result { + fn local_config_disabled(&self, ctx: impl ReadContext) -> Result { Ok(Self::settings(ctx.exchange()) .borrow() .local_config_disabled) } - async fn set_local_config_disabled( - &self, - ctx: impl WriteContext, - value: bool, - ) -> Result<(), Error> { + fn set_local_config_disabled(&self, ctx: impl WriteContext, value: bool) -> Result<(), Error> { let mut settings = Self::settings(ctx.exchange()).borrow_mut(); settings.local_config_disabled = value; @@ -612,7 +610,7 @@ impl ClusterHandler for BasicInfoHandler { Ok(()) } - async fn unique_id( + fn unique_id( &self, ctx: impl ReadContext, builder: Utf8StrBuilder

, @@ -620,7 +618,7 @@ impl ClusterHandler for BasicInfoHandler { builder.set(Self::config(ctx.exchange()).unique_id) } - async fn product_appearance( + fn product_appearance( &self, ctx: impl ReadContext, builder: ProductAppearanceStructBuilder

, diff --git a/rs-matter/src/dm/clusters/desc.rs b/rs-matter/src/dm/clusters/desc.rs index 0db98ddad..4bbc8e5c8 100644 --- a/rs-matter/src/dm/clusters/desc.rs +++ b/rs-matter/src/dm/clusters/desc.rs @@ -138,8 +138,10 @@ impl ClusterHandler for DescHandler<'_> { fn dataver_changed(&self) { self.dataver.changed(); } +} - async fn device_type_list( +impl ClusterSyncHandler for DescHandler<'_> { + fn device_type_list( &self, ctx: impl ReadContext, builder: ArrayAttributeRead, DeviceTypeStructBuilder

>, @@ -172,7 +174,7 @@ impl ClusterHandler for DescHandler<'_> { } } - async fn server_list( + fn server_list( &self, ctx: impl ReadContext, builder: ArrayAttributeRead, ToTLVBuilder>, @@ -198,7 +200,7 @@ impl ClusterHandler for DescHandler<'_> { } } - async fn client_list( + fn client_list( &self, ctx: impl ReadContext, builder: ArrayAttributeRead, ToTLVBuilder>, @@ -213,7 +215,7 @@ impl ClusterHandler for DescHandler<'_> { } } - async fn parts_list( + fn parts_list( &self, ctx: impl ReadContext, builder: ArrayAttributeRead, ToTLVBuilder>, diff --git a/rs-matter/src/dm/clusters/eth_diag.rs b/rs-matter/src/dm/clusters/eth_diag.rs index 9522007c1..0245aadf8 100644 --- a/rs-matter/src/dm/clusters/eth_diag.rs +++ b/rs-matter/src/dm/clusters/eth_diag.rs @@ -52,8 +52,10 @@ impl ClusterHandler for EthDiagHandler { fn dataver_changed(&self) { self.dataver.changed(); } +} - async fn handle_reset_counts(&self, _ctx: impl InvokeContext) -> Result<(), Error> { +impl ClusterSyncHandler for EthDiagHandler { + fn handle_reset_counts(&self, _ctx: impl InvokeContext) -> Result<(), Error> { Err(ErrorCode::InvalidAction.into()) } } diff --git a/rs-matter/src/dm/clusters/gen_comm.rs b/rs-matter/src/dm/clusters/gen_comm.rs index e7576fff2..6cbf2a2c3 100644 --- a/rs-matter/src/dm/clusters/gen_comm.rs +++ b/rs-matter/src/dm/clusters/gen_comm.rs @@ -144,12 +144,14 @@ impl ClusterHandler for GenCommHandler<'_> { fn dataver_changed(&self) { self.dataver.changed(); } +} - async fn breadcrumb(&self, ctx: impl ReadContext) -> Result { +impl ClusterSyncHandler for GenCommHandler<'_> { + fn breadcrumb(&self, ctx: impl ReadContext) -> Result { Ok(ctx.exchange().matter().failsafe.borrow_mut().breadcrumb()) } - async fn set_breadcrumb(&self, ctx: impl WriteContext, value: u64) -> Result<(), Error> { + fn set_breadcrumb(&self, ctx: impl WriteContext, value: u64) -> Result<(), Error> { ctx.exchange() .matter() .failsafe @@ -158,7 +160,7 @@ impl ClusterHandler for GenCommHandler<'_> { Ok(()) } - async fn basic_commissioning_info( + fn basic_commissioning_info( &self, _ctx: impl ReadContext, builder: BasicCommissioningInfoBuilder

, @@ -169,28 +171,28 @@ impl ClusterHandler for GenCommHandler<'_> { .end() } - async fn regulatory_config( + fn regulatory_config( &self, _ctx: impl ReadContext, ) -> Result { Ok(RegulatoryLocationTypeEnum::IndoorOutdoor) } - async fn location_capability( + fn location_capability( &self, _ctx: impl ReadContext, ) -> Result { Ok(self.commissioning_policy.location_cap()) } - async fn supports_concurrent_connection(&self, _ctx: impl ReadContext) -> Result { + fn supports_concurrent_connection(&self, _ctx: impl ReadContext) -> Result { Ok(self.commissioning_policy.concurrent_connection_supported()) } - async fn handle_arm_fail_safe( + fn handle_arm_fail_safe( &self, ctx: impl InvokeContext, - request: ArmFailSafeRequest<'_>, + request: ArmFailSafeRequest, response: ArmFailSafeResponseBuilder

, ) -> Result { let mut failsafe = ctx.exchange().matter().failsafe.borrow_mut(); @@ -206,10 +208,10 @@ impl ClusterHandler for GenCommHandler<'_> { response.error_code(status)?.debug_text("")?.end() } - async fn handle_set_regulatory_config( + fn handle_set_regulatory_config( &self, ctx: impl InvokeContext, - request: SetRegulatoryConfigRequest<'_>, + request: SetRegulatoryConfigRequest, response: SetRegulatoryConfigResponseBuilder

, ) -> Result { let country_code = request.country_code()?; @@ -235,7 +237,7 @@ impl ClusterHandler for GenCommHandler<'_> { .end() } - async fn handle_commissioning_complete( + fn handle_commissioning_complete( &self, ctx: impl InvokeContext, response: CommissioningCompleteResponseBuilder

, @@ -270,10 +272,10 @@ impl ClusterHandler for GenCommHandler<'_> { response.error_code(status)?.debug_text("")?.end() } - async fn handle_set_tc_acknowledgements( + fn handle_set_tc_acknowledgements( &self, _ctx: impl InvokeContext, - _request: SetTCAcknowledgementsRequest<'_>, + _request: SetTCAcknowledgementsRequest, response: SetTCAcknowledgementsResponseBuilder

, ) -> Result { // TODO diff --git a/rs-matter/src/dm/clusters/gen_diag.rs b/rs-matter/src/dm/clusters/gen_diag.rs index 1024d2ec3..f19c91acc 100644 --- a/rs-matter/src/dm/clusters/gen_diag.rs +++ b/rs-matter/src/dm/clusters/gen_diag.rs @@ -208,8 +208,10 @@ impl ClusterHandler for GenDiagHandler<'_> { fn dataver_changed(&self) { self.dataver.changed(); } +} - async fn network_interfaces( +impl ClusterSyncHandler for GenDiagHandler<'_> { + fn network_interfaces( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead, NetworkInterfaceBuilder

>, @@ -248,15 +250,15 @@ impl ClusterHandler for GenDiagHandler<'_> { } } - async fn reboot_count(&self, _ctx: impl ReadContext) -> Result { + fn reboot_count(&self, _ctx: impl ReadContext) -> Result { self.diag.reboot_count() } - async fn test_event_triggers_enabled(&self, _ctx: impl ReadContext) -> Result { + fn test_event_triggers_enabled(&self, _ctx: impl ReadContext) -> Result { self.diag.test_event_triggers_enabled() } - async fn handle_test_event_trigger( + fn handle_test_event_trigger( &self, _ctx: impl InvokeContext, request: TestEventTriggerRequest<'_>, @@ -267,7 +269,7 @@ impl ClusterHandler for GenDiagHandler<'_> { self.diag.test_event_trigger(key, trigger) } - async fn handle_time_snapshot( + fn handle_time_snapshot( &self, _ctx: impl InvokeContext, _response: TimeSnapshotResponseBuilder

, @@ -275,7 +277,7 @@ impl ClusterHandler for GenDiagHandler<'_> { Err(ErrorCode::CommandNotFound.into()) } - async fn handle_payload_test_request( + fn handle_payload_test_request( &self, _ctx: impl InvokeContext, _request: PayloadTestRequestRequest<'_>, diff --git a/rs-matter/src/dm/clusters/grp_key_mgmt.rs b/rs-matter/src/dm/clusters/grp_key_mgmt.rs index 2a17cfc30..3f5a8c0df 100644 --- a/rs-matter/src/dm/clusters/grp_key_mgmt.rs +++ b/rs-matter/src/dm/clusters/grp_key_mgmt.rs @@ -57,8 +57,10 @@ impl ClusterHandler for GrpKeyMgmtHandler { fn dataver_changed(&self) { self.dataver.changed(); } +} - async fn group_key_map( +impl ClusterSyncHandler for GrpKeyMgmtHandler { + fn group_key_map( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead, GroupKeyMapStructBuilder

>, @@ -70,7 +72,7 @@ impl ClusterHandler for GrpKeyMgmtHandler { } } - async fn group_table( + fn group_table( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead< @@ -85,15 +87,15 @@ impl ClusterHandler for GrpKeyMgmtHandler { } } - async fn max_groups_per_fabric(&self, _ctx: impl ReadContext) -> Result { + fn max_groups_per_fabric(&self, _ctx: impl ReadContext) -> Result { Ok(1) } - async fn max_group_keys_per_fabric(&self, _ctx: impl ReadContext) -> Result { + fn max_group_keys_per_fabric(&self, _ctx: impl ReadContext) -> Result { Ok(1) } - async fn set_group_key_map( + fn set_group_key_map( &self, _ctx: impl crate::dm::WriteContext, _value: ArrayAttributeWrite< @@ -104,7 +106,7 @@ impl ClusterHandler for GrpKeyMgmtHandler { Ok(()) } - async fn handle_key_set_write( + fn handle_key_set_write( &self, _ctx: impl InvokeContext, _request: KeySetWriteRequest<'_>, @@ -112,7 +114,7 @@ impl ClusterHandler for GrpKeyMgmtHandler { Ok(()) } - async fn handle_key_set_read( + fn handle_key_set_read( &self, _ctx: impl InvokeContext, _request: KeySetReadRequest<'_>, @@ -121,7 +123,7 @@ impl ClusterHandler for GrpKeyMgmtHandler { Err(ErrorCode::NotFound.into()) } - async fn handle_key_set_remove( + fn handle_key_set_remove( &self, _ctx: impl InvokeContext, _request: KeySetRemoveRequest<'_>, @@ -129,7 +131,7 @@ impl ClusterHandler for GrpKeyMgmtHandler { Ok(()) } - async fn handle_key_set_read_all_indices( + fn handle_key_set_read_all_indices( &self, _ctx: impl InvokeContext, response: KeySetReadAllIndicesResponseBuilder

, diff --git a/rs-matter/src/dm/clusters/level_control.rs b/rs-matter/src/dm/clusters/level_control.rs index 8dc958217..81c856610 100644 --- a/rs-matter/src/dm/clusters/level_control.rs +++ b/rs-matter/src/dm/clusters/level_control.rs @@ -1251,19 +1251,21 @@ impl ClusterHandler for LevelControlHandle fn dataver_changed(&self) { self.dataver.changed(); } +} - async fn current_level(&self, _ctx: impl ReadContext) -> Result, Error> { +impl ClusterSyncHandler for LevelControlHandler<'_, H, OH> { + fn current_level(&self, _ctx: impl ReadContext) -> Result, Error> { match self.hooks.current_level() { Some(level) => Ok(Nullable::some(level)), None => Ok(Nullable::none()), } } - async fn on_level(&self, _ctx: impl ReadContext) -> Result, Error> { + fn on_level(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.on_level()) } - async fn set_on_level(&self, ctx: impl WriteContext, value: Nullable) -> Result<(), Error> { + fn set_on_level(&self, ctx: impl WriteContext, value: Nullable) -> Result<(), Error> { if let Some(level) = value.clone().into_option() { if level > H::MAX_LEVEL || level < H::MIN_LEVEL { return Err(ErrorCode::ConstraintError.into()); @@ -1276,49 +1278,45 @@ impl ClusterHandler for LevelControlHandle Ok(()) } - async fn options(&self, _ctx: impl ReadContext) -> Result { + fn options(&self, _ctx: impl ReadContext) -> Result { Ok(self.options.get()) } - async fn set_options(&self, ctx: impl WriteContext, value: OptionsBitmap) -> Result<(), Error> { + fn set_options(&self, ctx: impl WriteContext, value: OptionsBitmap) -> Result<(), Error> { self.options.set(value); self.dataver_changed(); ctx.notify_changed(); Ok(()) } - async fn remaining_time(&self, _ctx: impl ReadContext) -> Result { + fn remaining_time(&self, _ctx: impl ReadContext) -> Result { Ok(self.remaining_time.get()) } - async fn max_level(&self, _ctx: impl ReadContext) -> Result { + fn max_level(&self, _ctx: impl ReadContext) -> Result { Ok(H::MAX_LEVEL) } - async fn min_level(&self, _ctx: impl ReadContext) -> Result { + fn min_level(&self, _ctx: impl ReadContext) -> Result { Ok(H::MIN_LEVEL) } - async fn on_off_transition_time(&self, _ctx: impl ReadContext) -> Result { + fn on_off_transition_time(&self, _ctx: impl ReadContext) -> Result { Ok(self.on_off_transition_time.get()) } - async fn set_on_off_transition_time( - &self, - ctx: impl WriteContext, - value: u16, - ) -> Result<(), Error> { + fn set_on_off_transition_time(&self, ctx: impl WriteContext, value: u16) -> Result<(), Error> { self.on_off_transition_time.set(value); self.dataver_changed(); ctx.notify_changed(); Ok(()) } - async fn on_transition_time(&self, _ctx: impl ReadContext) -> Result, Error> { + fn on_transition_time(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.on_transition_time()) } - async fn set_on_transition_time( + fn set_on_transition_time( &self, ctx: impl WriteContext, value: Nullable, @@ -1329,11 +1327,11 @@ impl ClusterHandler for LevelControlHandle Ok(()) } - async fn off_transition_time(&self, _ctx: impl ReadContext) -> Result, Error> { + fn off_transition_time(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.off_transition_time()) } - async fn set_off_transition_time( + fn set_off_transition_time( &self, ctx: impl WriteContext, value: Nullable, @@ -1344,11 +1342,11 @@ impl ClusterHandler for LevelControlHandle Ok(()) } - async fn default_move_rate(&self, _ctx: impl ReadContext) -> Result, Error> { + fn default_move_rate(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.default_move_rate()) } - async fn set_default_move_rate( + fn set_default_move_rate( &self, ctx: impl WriteContext, value: Nullable, @@ -1365,14 +1363,14 @@ impl ClusterHandler for LevelControlHandle Ok(()) } - async fn start_up_current_level(&self, _ctx: impl ReadContext) -> Result, Error> { + fn start_up_current_level(&self, _ctx: impl ReadContext) -> Result, Error> { match self.hooks.start_up_current_level()? { Some(val) => Ok(Nullable::some(val)), None => Ok(Nullable::none()), } } - async fn set_start_up_current_level( + fn set_start_up_current_level( &self, ctx: impl WriteContext, value: Nullable, @@ -1391,7 +1389,7 @@ impl ClusterHandler for LevelControlHandle Ok(()) } - async fn handle_move_to_level( + fn handle_move_to_level( &self, _ctx: impl InvokeContext, request: MoveToLevelRequest<'_>, @@ -1405,11 +1403,7 @@ impl ClusterHandler for LevelControlHandle ) } - async fn handle_move( - &self, - _ctx: impl InvokeContext, - request: MoveRequest<'_>, - ) -> Result<(), Error> { + fn handle_move(&self, _ctx: impl InvokeContext, request: MoveRequest<'_>) -> Result<(), Error> { self.move_command( false, request.move_mode()?, @@ -1419,11 +1413,7 @@ impl ClusterHandler for LevelControlHandle ) } - async fn handle_step( - &self, - _ctx: impl InvokeContext, - request: StepRequest<'_>, - ) -> Result<(), Error> { + fn handle_step(&self, _ctx: impl InvokeContext, request: StepRequest<'_>) -> Result<(), Error> { self.step( false, request.step_mode()?, @@ -1434,11 +1424,7 @@ impl ClusterHandler for LevelControlHandle ) } - async fn handle_stop( - &self, - ctx: impl InvokeContext, - request: StopRequest<'_>, - ) -> Result<(), Error> { + fn handle_stop(&self, ctx: impl InvokeContext, request: StopRequest<'_>) -> Result<(), Error> { self.stop( &ctx, false, @@ -1447,7 +1433,7 @@ impl ClusterHandler for LevelControlHandle ) } - async fn handle_move_to_level_with_on_off( + fn handle_move_to_level_with_on_off( &self, _ctx: impl InvokeContext, request: MoveToLevelWithOnOffRequest<'_>, @@ -1461,7 +1447,7 @@ impl ClusterHandler for LevelControlHandle ) } - async fn handle_move_with_on_off( + fn handle_move_with_on_off( &self, _ctx: impl InvokeContext, request: MoveWithOnOffRequest<'_>, @@ -1475,7 +1461,7 @@ impl ClusterHandler for LevelControlHandle ) } - async fn handle_step_with_on_off( + fn handle_step_with_on_off( &self, _ctx: impl InvokeContext, request: StepWithOnOffRequest<'_>, @@ -1490,7 +1476,7 @@ impl ClusterHandler for LevelControlHandle ) } - async fn handle_stop_with_on_off( + fn handle_stop_with_on_off( &self, ctx: impl InvokeContext, request: StopWithOnOffRequest<'_>, @@ -1503,7 +1489,7 @@ impl ClusterHandler for LevelControlHandle ) } - async fn handle_move_to_closest_frequency( + fn handle_move_to_closest_frequency( &self, _ctx: impl InvokeContext, _request: MoveToClosestFrequencyRequest<'_>, diff --git a/rs-matter/src/dm/clusters/net_comm.rs b/rs-matter/src/dm/clusters/net_comm.rs index 50cce973e..f34f7651c 100644 --- a/rs-matter/src/dm/clusters/net_comm.rs +++ b/rs-matter/src/dm/clusters/net_comm.rs @@ -692,18 +692,6 @@ where self.dataver.changed(); } - async fn max_networks(&self, _ctx: impl ReadContext) -> Result { - self.networks.max_networks() - } - - async fn connect_max_time_seconds(&self, _ctx: impl ReadContext) -> Result { - Ok(self.net_ctl.connect_max_time_seconds()) - } - - async fn scan_max_time_seconds(&self, _ctx: impl ReadContext) -> Result { - Ok(self.net_ctl.scan_max_time_seconds()) - } - async fn supported_wi_fi_bands( &self, _ctx: impl ReadContext, @@ -749,17 +737,6 @@ where } } - async fn supported_thread_features( - &self, - _ctx: impl ReadContext, - ) -> Result { - Ok(self.net_ctl.supported_thread_features()) - } - - async fn thread_version(&self, _ctx: impl ReadContext) -> Result { - Ok(self.net_ctl.thread_version()) - } - async fn networks( &self, _ctx: impl ReadContext, @@ -802,10 +779,6 @@ where } } - async fn interface_enabled(&self, _ctx: impl ReadContext) -> Result { - self.networks.enabled() - } - async fn last_networking_status( &self, _ctx: impl ReadContext, @@ -827,21 +800,6 @@ where }) } - async fn last_connect_error_value( - &self, - _ctx: impl ReadContext, - ) -> Result, Error> { - Ok(Nullable::new(self.net_ctl.last_connect_error_value()?)) - } - - async fn set_interface_enabled( - &self, - _ctx: impl WriteContext, - value: bool, - ) -> Result<(), Error> { - self.networks.set_enabled(value) - } - async fn handle_scan_networks( &self, _ctx: impl InvokeContext, @@ -1108,8 +1066,36 @@ where status.read_into(index, response) } +} - async fn handle_query_identity( +impl ClusterSyncHandler for NetCommHandler<'_, T> +where + T: NetCtl + NetCtlStatus, +{ + fn max_networks(&self, _ctx: impl ReadContext) -> Result { + self.networks.max_networks() + } + + fn connect_max_time_seconds(&self, _ctx: impl ReadContext) -> Result { + Ok(self.net_ctl.connect_max_time_seconds()) + } + + fn scan_max_time_seconds(&self, _ctx: impl ReadContext) -> Result { + Ok(self.net_ctl.scan_max_time_seconds()) + } + + fn supported_thread_features( + &self, + _ctx: impl ReadContext, + ) -> Result { + Ok(self.net_ctl.supported_thread_features()) + } + + fn thread_version(&self, _ctx: impl ReadContext) -> Result { + Ok(self.net_ctl.thread_version()) + } + + fn handle_query_identity( &self, _ctx: impl InvokeContext, _request: QueryIdentityRequest<'_>, @@ -1117,4 +1103,16 @@ where ) -> Result { Err(ErrorCode::InvalidAction.into()) } + + fn interface_enabled(&self, _ctx: impl ReadContext) -> Result { + self.networks.enabled() + } + + fn last_connect_error_value(&self, _ctx: impl ReadContext) -> Result, Error> { + Ok(Nullable::new(self.net_ctl.last_connect_error_value()?)) + } + + fn set_interface_enabled(&self, _ctx: impl WriteContext, value: bool) -> Result<(), Error> { + self.networks.set_enabled(value) + } } diff --git a/rs-matter/src/dm/clusters/noc.rs b/rs-matter/src/dm/clusters/noc.rs index a509c6ada..a8ca8aa5a 100644 --- a/rs-matter/src/dm/clusters/noc.rs +++ b/rs-matter/src/dm/clusters/noc.rs @@ -109,8 +109,10 @@ impl ClusterHandler for NocHandler { fn dataver_changed(&self) { self.dataver.changed(); } +} - async fn nocs( +impl ClusterSyncHandler for NocHandler { + fn nocs( &self, ctx: impl ReadContext, builder: ArrayAttributeRead, NOCStructBuilder

>, @@ -165,7 +167,7 @@ impl ClusterHandler for NocHandler { } } - async fn fabrics( + fn fabrics( &self, ctx: impl ReadContext, builder: ArrayAttributeRead< @@ -219,15 +221,15 @@ impl ClusterHandler for NocHandler { } } - async fn supported_fabrics(&self, _ctx: impl ReadContext) -> Result { + fn supported_fabrics(&self, _ctx: impl ReadContext) -> Result { Ok(MAX_FABRICS as u8) } - async fn commissioned_fabrics(&self, ctx: impl ReadContext) -> Result { + fn commissioned_fabrics(&self, ctx: impl ReadContext) -> Result { Ok(ctx.exchange().matter().fabric_mgr.borrow().iter().count() as _) } - async fn trusted_root_certificates( + fn trusted_root_certificates( &self, ctx: impl ReadContext, builder: ArrayAttributeRead, OctetsBuilder

>, @@ -260,12 +262,12 @@ impl ClusterHandler for NocHandler { } } - async fn current_fabric_index(&self, ctx: impl ReadContext) -> Result { + fn current_fabric_index(&self, ctx: impl ReadContext) -> Result { let attr = ctx.attr(); Ok(attr.fab_idx) } - async fn handle_attestation_request( + fn handle_attestation_request( &self, ctx: impl InvokeContext, request: AttestationRequestRequest<'_>, @@ -322,7 +324,7 @@ impl ClusterHandler for NocHandler { }) } - async fn handle_certificate_chain_request( + fn handle_certificate_chain_request( &self, ctx: impl InvokeContext, request: CertificateChainRequestRequest<'_>, @@ -354,7 +356,7 @@ impl ClusterHandler for NocHandler { Ok(parent) } - async fn handle_csr_request( + fn handle_csr_request( &self, ctx: impl InvokeContext, request: CSRRequestRequest<'_>, @@ -413,7 +415,7 @@ impl ClusterHandler for NocHandler { }) } - async fn handle_add_noc( + fn handle_add_noc( &self, ctx: impl InvokeContext, request: AddNOCRequest<'_>, @@ -477,7 +479,7 @@ impl ClusterHandler for NocHandler { .end() } - async fn handle_update_noc( + fn handle_update_noc( &self, ctx: impl InvokeContext, request: UpdateNOCRequest<'_>, @@ -513,7 +515,7 @@ impl ClusterHandler for NocHandler { .end() } - async fn handle_update_fabric_label( + fn handle_update_fabric_label( &self, ctx: impl InvokeContext, request: UpdateFabricLabelRequest<'_>, @@ -551,7 +553,7 @@ impl ClusterHandler for NocHandler { .end() } - async fn handle_remove_fabric( + fn handle_remove_fabric( &self, ctx: impl InvokeContext, request: RemoveFabricRequest<'_>, @@ -615,7 +617,7 @@ impl ClusterHandler for NocHandler { .end() } - async fn handle_add_trusted_root_certificate( + fn handle_add_trusted_root_certificate( &self, ctx: impl InvokeContext, request: AddTrustedRootCertificateRequest<'_>, @@ -631,7 +633,7 @@ impl ClusterHandler for NocHandler { }) } - async fn handle_set_vid_verification_statement( + fn handle_set_vid_verification_statement( &self, _ctx: impl InvokeContext, _request: SetVIDVerificationStatementRequest<'_>, @@ -639,7 +641,7 @@ impl ClusterHandler for NocHandler { Ok(()) // TODO } - async fn handle_sign_vid_verification_request( + fn handle_sign_vid_verification_request( &self, _ctx: impl InvokeContext, _request: SignVIDVerificationRequestRequest<'_>, diff --git a/rs-matter/src/dm/clusters/on_off.rs b/rs-matter/src/dm/clusters/on_off.rs index 0e4cefc81..f1d2f17b5 100644 --- a/rs-matter/src/dm/clusters/on_off.rs +++ b/rs-matter/src/dm/clusters/on_off.rs @@ -676,46 +676,45 @@ impl ClusterHandler for OnOffHandler<'_, H } } } +} +impl ClusterSyncHandler for OnOffHandler<'_, H, LH> { // Attribute accessors - async fn on_off(&self, _ctx: impl ReadContext) -> Result { + fn on_off(&self, _ctx: impl ReadContext) -> Result { Ok(self.hooks.on_off()) } - async fn global_scene_control(&self, _ctx: impl ReadContext) -> Result { + fn global_scene_control(&self, _ctx: impl ReadContext) -> Result { Ok(self.global_scene_control.get()) } - async fn on_time(&self, _ctx: impl ReadContext) -> Result { + fn on_time(&self, _ctx: impl ReadContext) -> Result { Ok(self.on_time.get()) } - async fn off_wait_time(&self, _ctx: impl ReadContext) -> Result { + fn off_wait_time(&self, _ctx: impl ReadContext) -> Result { Ok(self.off_wait_time.get()) } - async fn start_up_on_off( - &self, - _ctx: impl ReadContext, - ) -> Result, Error> { + fn start_up_on_off(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.hooks.start_up_on_off()) } - async fn set_on_time(&self, ctx: impl WriteContext, value: u16) -> Result<(), Error> { + fn set_on_time(&self, ctx: impl WriteContext, value: u16) -> Result<(), Error> { self.on_time.set(value); self.dataver_changed(); ctx.notify_changed(); Ok(()) } - async fn set_off_wait_time(&self, ctx: impl WriteContext, value: u16) -> Result<(), Error> { + fn set_off_wait_time(&self, ctx: impl WriteContext, value: u16) -> Result<(), Error> { self.off_wait_time.set(value); self.dataver_changed(); ctx.notify_changed(); Ok(()) } - async fn set_start_up_on_off( + fn set_start_up_on_off( &self, ctx: impl WriteContext, value: Nullable, @@ -727,25 +726,25 @@ impl ClusterHandler for OnOffHandler<'_, H } // Commands - async fn handle_off(&self, _ctx: impl InvokeContext) -> Result<(), Error> { + fn handle_off(&self, _ctx: impl InvokeContext) -> Result<(), Error> { self.state_change_signal.signal(OnOffCommand::Off); Ok(()) } - async fn handle_on(&self, _ctx: impl InvokeContext) -> Result<(), Error> { + fn handle_on(&self, _ctx: impl InvokeContext) -> Result<(), Error> { self.state_change_signal.signal(OnOffCommand::On); Ok(()) } - async fn handle_toggle(&self, _ctx: impl InvokeContext) -> Result<(), Error> { + fn handle_toggle(&self, _ctx: impl InvokeContext) -> Result<(), Error> { self.state_change_signal.signal(OnOffCommand::Toggle); Ok(()) } - async fn handle_off_with_effect( + fn handle_off_with_effect( &self, _ctx: impl InvokeContext, request: OffWithEffectRequest<'_>, @@ -786,10 +785,7 @@ impl ClusterHandler for OnOffHandler<'_, H Ok(()) } - async fn handle_on_with_recall_global_scene( - &self, - _ctx: impl InvokeContext, - ) -> Result<(), Error> { + fn handle_on_with_recall_global_scene(&self, _ctx: impl InvokeContext) -> Result<(), Error> { // 1.5.7.5.1. Effect on Receipt // On receipt of the OnWithRecallGlobalScene command, if the GlobalSceneControl attribute is equal // to TRUE, the server SHALL discard the command. @@ -809,7 +805,7 @@ impl ClusterHandler for OnOffHandler<'_, H Err(ErrorCode::CommandNotFound.into()) } - async fn handle_on_with_timed_off( + fn handle_on_with_timed_off( &self, ctx: impl InvokeContext, request: OnWithTimedOffRequest<'_>, diff --git a/rs-matter/src/dm/clusters/thread_diag.rs b/rs-matter/src/dm/clusters/thread_diag.rs index eead5fbe5..16892ec43 100644 --- a/rs-matter/src/dm/clusters/thread_diag.rs +++ b/rs-matter/src/dm/clusters/thread_diag.rs @@ -402,19 +402,18 @@ impl ClusterHandler for ThreadDiagHandler<'_> { fn dataver_changed(&self) { self.dataver.changed(); } +} - async fn channel(&self, _ctx: impl ReadContext) -> Result, Error> { +impl ClusterSyncHandler for ThreadDiagHandler<'_> { + fn channel(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(Nullable::new(self.diag.channel()?)) } - async fn routing_role( - &self, - _ctx: impl ReadContext, - ) -> Result, Error> { + fn routing_role(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(Nullable::new(self.diag.routing_role()?)) } - async fn network_name( + fn network_name( &self, _ctx: impl ReadContext, builder: NullableBuilder>, @@ -435,15 +434,15 @@ impl ClusterHandler for ThreadDiagHandler<'_> { Ok(unwrap!(parent)) } - async fn pan_id(&self, _ctx: impl ReadContext) -> Result, Error> { + fn pan_id(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(Nullable::new(self.diag.pan_id()?)) } - async fn extended_pan_id(&self, _ctx: impl ReadContext) -> Result, Error> { + fn extended_pan_id(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(Nullable::new(self.diag.extended_pan_id()?)) } - async fn mesh_local_prefix( + fn mesh_local_prefix( &self, _ctx: impl ReadContext, builder: NullableBuilder>, @@ -468,7 +467,7 @@ impl ClusterHandler for ThreadDiagHandler<'_> { Ok(unwrap!(parent)) } - async fn neighbor_table( + fn neighbor_table( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead< @@ -513,7 +512,7 @@ impl ClusterHandler for ThreadDiagHandler<'_> { } } - async fn route_table( + fn route_table( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead, RouteTableStructBuilder

>, @@ -555,27 +554,27 @@ impl ClusterHandler for ThreadDiagHandler<'_> { } } - async fn partition_id(&self, _ctx: impl ReadContext) -> Result, Error> { + fn partition_id(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(Nullable::new(self.diag.partition_id()?)) } - async fn weighting(&self, _ctx: impl ReadContext) -> Result, Error> { + fn weighting(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(Nullable::new(self.diag.weighting()?)) } - async fn data_version(&self, _ctx: impl ReadContext) -> Result, Error> { + fn data_version(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(Nullable::new(self.diag.data_version()?)) } - async fn stable_data_version(&self, _ctx: impl ReadContext) -> Result, Error> { + fn stable_data_version(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(Nullable::new(self.diag.stable_data_version()?)) } - async fn leader_router_id(&self, _ctx: impl ReadContext) -> Result, Error> { + fn leader_router_id(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(Nullable::new(self.diag.leader_router_id()?)) } - async fn security_policy( + fn security_policy( &self, _ctx: impl ReadContext, builder: NullableBuilder>, @@ -592,7 +591,7 @@ impl ClusterHandler for ThreadDiagHandler<'_> { } } - async fn channel_page_0_mask( + fn channel_page_0_mask( &self, _ctx: impl ReadContext, builder: NullableBuilder>, @@ -613,7 +612,7 @@ impl ClusterHandler for ThreadDiagHandler<'_> { Ok(unwrap!(parent.take())) } - async fn operational_dataset_components( + fn operational_dataset_components( &self, _ctx: impl ReadContext, builder: NullableBuilder>, @@ -634,7 +633,7 @@ impl ClusterHandler for ThreadDiagHandler<'_> { Ok(unwrap!(parent)) } - async fn active_network_faults_list( + fn active_network_faults_list( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead< @@ -678,15 +677,15 @@ impl ClusterHandler for ThreadDiagHandler<'_> { ArrayAttributeRead::ReadNone(builder) => builder.end(), } } - async fn ext_address(&self, _ctx: impl ReadContext) -> Result, Error> { + fn ext_address(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(Nullable::new(self.diag.ext_address()?)) } - async fn rloc_16(&self, _ctx: impl ReadContext) -> Result, Error> { + fn rloc_16(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(Nullable::new(self.diag.rloc_16()?)) } - async fn handle_reset_counts(&self, _ctx: impl InvokeContext) -> Result<(), Error> { + fn handle_reset_counts(&self, _ctx: impl InvokeContext) -> Result<(), Error> { Err(ErrorCode::InvalidAction.into()) } } diff --git a/rs-matter/src/dm/clusters/unit_testing.rs b/rs-matter/src/dm/clusters/unit_testing.rs index b4088f7d8..73ec4addd 100644 --- a/rs-matter/src/dm/clusters/unit_testing.rs +++ b/rs-matter/src/dm/clusters/unit_testing.rs @@ -528,108 +528,110 @@ impl ClusterHandler for UnitTestingHandler<'_> { fn dataver_changed(&self) { self.dataver.changed(); } +} - async fn boolean(&self, _ctx: impl ReadContext) -> Result { +impl ClusterSyncHandler for UnitTestingHandler<'_> { + fn boolean(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().boolean) } - async fn bitmap_8(&self, _ctx: impl ReadContext) -> Result { + fn bitmap_8(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().bitmap_8) } - async fn bitmap_16(&self, _ctx: impl ReadContext) -> Result { + fn bitmap_16(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().bitmap_16) } - async fn bitmap_32(&self, _ctx: impl ReadContext) -> Result { + fn bitmap_32(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().bitmap_32) } - async fn bitmap_64(&self, _ctx: impl ReadContext) -> Result { + fn bitmap_64(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().bitmap_64) } - async fn int_8_u(&self, _ctx: impl ReadContext) -> Result { + fn int_8_u(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_8_u) } - async fn int_16_u(&self, _ctx: impl ReadContext) -> Result { + fn int_16_u(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_16_u) } - async fn int_24_u(&self, _ctx: impl ReadContext) -> Result { + fn int_24_u(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_24_u) } - async fn int_32_u(&self, _ctx: impl ReadContext) -> Result { + fn int_32_u(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_32_u) } - async fn int_40_u(&self, _ctx: impl ReadContext) -> Result { + fn int_40_u(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_40_u) } - async fn int_48_u(&self, _ctx: impl ReadContext) -> Result { + fn int_48_u(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_48_u) } - async fn int_56_u(&self, _ctx: impl ReadContext) -> Result { + fn int_56_u(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_56_u) } - async fn int_64_u(&self, _ctx: impl ReadContext) -> Result { + fn int_64_u(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_64_u) } - async fn int_8_s(&self, _ctx: impl ReadContext) -> Result { + fn int_8_s(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_8_s) } - async fn int_16_s(&self, _ctx: impl ReadContext) -> Result { + fn int_16_s(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_16_s) } - async fn int_24_s(&self, _ctx: impl ReadContext) -> Result { + fn int_24_s(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_24_s) } - async fn int_32_s(&self, _ctx: impl ReadContext) -> Result { + fn int_32_s(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_32_s) } - async fn int_40_s(&self, _ctx: impl ReadContext) -> Result { + fn int_40_s(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_40_s) } - async fn int_48_s(&self, _ctx: impl ReadContext) -> Result { + fn int_48_s(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_48_s) } - async fn int_56_s(&self, _ctx: impl ReadContext) -> Result { + fn int_56_s(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_56_s) } - async fn int_64_s(&self, _ctx: impl ReadContext) -> Result { + fn int_64_s(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().int_64_s) } - async fn enum_8(&self, _ctx: impl ReadContext) -> Result { + fn enum_8(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().enum_8) } - async fn enum_16(&self, _ctx: impl ReadContext) -> Result { + fn enum_16(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().enum_16) } - async fn float_single(&self, _ctx: impl ReadContext) -> Result { + fn float_single(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().float_single) } - async fn float_double(&self, _ctx: impl ReadContext) -> Result { + fn float_double(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().float_double) } - async fn octet_string( + fn octet_string( &self, _ctx: impl ReadContext, builder: OctetsBuilder

, @@ -637,7 +639,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { builder.set(Octets(self.data.borrow().octet_string.as_slice())) } - async fn list_int_8_u( + fn list_int_8_u( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead, ToTLVBuilder>, @@ -664,7 +666,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - async fn list_octet_string( + fn list_octet_string( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead, OctetsBuilder

>, @@ -691,7 +693,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - async fn list_struct_octet_string( + fn list_struct_octet_string( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead< @@ -730,7 +732,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - async fn long_octet_string( + fn long_octet_string( &self, _ctx: impl ReadContext, builder: OctetsBuilder

, @@ -738,7 +740,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { builder.set(Octets(self.data.borrow().long_octet_string.as_slice())) } - async fn char_string( + fn char_string( &self, _ctx: impl ReadContext, builder: Utf8StrBuilder

, @@ -746,7 +748,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { builder.set(self.data.borrow().char_string.as_str()) } - async fn long_char_string( + fn long_char_string( &self, _ctx: impl ReadContext, builder: Utf8StrBuilder

, @@ -754,19 +756,19 @@ impl ClusterHandler for UnitTestingHandler<'_> { builder.set(self.data.borrow().long_char_string.as_str()) } - async fn epoch_us(&self, _ctx: impl ReadContext) -> Result { + fn epoch_us(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().epoch_us) } - async fn epoch_s(&self, _ctx: impl ReadContext) -> Result { + fn epoch_s(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().epoch_s) } - async fn vendor_id(&self, _ctx: impl ReadContext) -> Result { + fn vendor_id(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().vendor_id) } - async fn list_nullables_and_optionals_struct( + fn list_nullables_and_optionals_struct( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead< @@ -884,11 +886,11 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - async fn enum_attr(&self, _ctx: impl ReadContext) -> Result { + fn enum_attr(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().enum_attr) } - async fn struct_attr( + fn struct_attr( &self, _ctx: impl ReadContext, builder: SimpleStructBuilder

, @@ -909,23 +911,23 @@ impl ClusterHandler for UnitTestingHandler<'_> { .end() } - async fn range_restricted_int_8_u(&self, _ctx: impl ReadContext) -> Result { + fn range_restricted_int_8_u(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().range_restricted_int_8_u) } - async fn range_restricted_int_8_s(&self, _ctx: impl ReadContext) -> Result { + fn range_restricted_int_8_s(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().range_restricted_int_8_s) } - async fn range_restricted_int_16_u(&self, _ctx: impl ReadContext) -> Result { + fn range_restricted_int_16_u(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().range_restricted_int_16_u) } - async fn range_restricted_int_16_s(&self, _ctx: impl ReadContext) -> Result { + fn range_restricted_int_16_s(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().range_restricted_int_16_s) } - async fn list_long_octet_string( + fn list_long_octet_string( &self, _ctx: impl ReadContext, builder: ArrayAttributeRead, OctetsBuilder

>, @@ -954,7 +956,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - async fn list_fabric_scoped( + fn list_fabric_scoped( &self, ctx: impl ReadContext, builder: ArrayAttributeRead, TestFabricScopedBuilder

>, @@ -1035,131 +1037,128 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - async fn timed_write_boolean(&self, _ctx: impl ReadContext) -> Result { + fn timed_write_boolean(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().timed_write_boolean) } - async fn general_error_boolean(&self, _ctx: impl ReadContext) -> Result { + fn general_error_boolean(&self, _ctx: impl ReadContext) -> Result { Err(ErrorCode::InvalidDataType.into()) } - async fn cluster_error_boolean(&self, _ctx: impl ReadContext) -> Result { + fn cluster_error_boolean(&self, _ctx: impl ReadContext) -> Result { Err(ErrorCode::Invalid.into()) } - async fn nullable_boolean(&self, _ctx: impl ReadContext) -> Result, Error> { + fn nullable_boolean(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_boolean.clone()) } - async fn nullable_bitmap_8( - &self, - _ctx: impl ReadContext, - ) -> Result, Error> { + fn nullable_bitmap_8(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_bitmap_8.clone()) } - async fn nullable_bitmap_16( + fn nullable_bitmap_16( &self, _ctx: impl ReadContext, ) -> Result, Error> { Ok(self.data.borrow().nullable_bitmap_16.clone()) } - async fn nullable_bitmap_32( + fn nullable_bitmap_32( &self, _ctx: impl ReadContext, ) -> Result, Error> { Ok(self.data.borrow().nullable_bitmap_32.clone()) } - async fn nullable_bitmap_64( + fn nullable_bitmap_64( &self, _ctx: impl ReadContext, ) -> Result, Error> { Ok(self.data.borrow().nullable_bitmap_64.clone()) } - async fn nullable_int_8_u(&self, _ctx: impl ReadContext) -> Result, Error> { + fn nullable_int_8_u(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_8_u.clone()) } - async fn nullable_int_16_u(&self, _ctx: impl ReadContext) -> Result, Error> { + fn nullable_int_16_u(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_16_u.clone()) } - async fn nullable_int_24_u(&self, _ctx: impl ReadContext) -> Result, Error> { + fn nullable_int_24_u(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_24_u.clone()) } - async fn nullable_int_32_u(&self, _ctx: impl ReadContext) -> Result, Error> { + fn nullable_int_32_u(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_32_u.clone()) } - async fn nullable_int_40_u(&self, _ctx: impl ReadContext) -> Result, Error> { + fn nullable_int_40_u(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_40_u.clone()) } - async fn nullable_int_48_u(&self, _ctx: impl ReadContext) -> Result, Error> { + fn nullable_int_48_u(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_48_u.clone()) } - async fn nullable_int_56_u(&self, _ctx: impl ReadContext) -> Result, Error> { + fn nullable_int_56_u(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_56_u.clone()) } - async fn nullable_int_64_u(&self, _ctx: impl ReadContext) -> Result, Error> { + fn nullable_int_64_u(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_64_u.clone()) } - async fn nullable_int_8_s(&self, _ctx: impl ReadContext) -> Result, Error> { + fn nullable_int_8_s(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_8_s.clone()) } - async fn nullable_int_16_s(&self, _ctx: impl ReadContext) -> Result, Error> { + fn nullable_int_16_s(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_16_s.clone()) } - async fn nullable_int_24_s(&self, _ctx: impl ReadContext) -> Result, Error> { + fn nullable_int_24_s(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_24_s.clone()) } - async fn nullable_int_32_s(&self, _ctx: impl ReadContext) -> Result, Error> { + fn nullable_int_32_s(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_32_s.clone()) } - async fn nullable_int_40_s(&self, _ctx: impl ReadContext) -> Result, Error> { + fn nullable_int_40_s(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_40_s.clone()) } - async fn nullable_int_48_s(&self, _ctx: impl ReadContext) -> Result, Error> { + fn nullable_int_48_s(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_48_s.clone()) } - async fn nullable_int_56_s(&self, _ctx: impl ReadContext) -> Result, Error> { + fn nullable_int_56_s(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_56_s.clone()) } - async fn nullable_int_64_s(&self, _ctx: impl ReadContext) -> Result, Error> { + fn nullable_int_64_s(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_int_64_s.clone()) } - async fn nullable_enum_8(&self, _ctx: impl ReadContext) -> Result, Error> { + fn nullable_enum_8(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_enum_8.clone()) } - async fn nullable_enum_16(&self, _ctx: impl ReadContext) -> Result, Error> { + fn nullable_enum_16(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_enum_16.clone()) } - async fn nullable_float_single(&self, _ctx: impl ReadContext) -> Result, Error> { + fn nullable_float_single(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_float_single.clone()) } - async fn nullable_float_double(&self, _ctx: impl ReadContext) -> Result, Error> { + fn nullable_float_double(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_float_double.clone()) } - async fn nullable_octet_string( + fn nullable_octet_string( &self, _ctx: impl ReadContext, builder: NullableBuilder>, @@ -1171,7 +1170,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - async fn nullable_char_string( + fn nullable_char_string( &self, _ctx: impl ReadContext, builder: NullableBuilder>, @@ -1183,14 +1182,11 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - async fn nullable_enum_attr( - &self, - _ctx: impl ReadContext, - ) -> Result, Error> { + fn nullable_enum_attr(&self, _ctx: impl ReadContext) -> Result, Error> { Ok(self.data.borrow().nullable_enum_attr.clone()) } - async fn nullable_struct( + fn nullable_struct( &self, _ctx: impl ReadContext, builder: NullableBuilder>, @@ -1214,21 +1210,21 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - async fn nullable_range_restricted_int_8_u( + fn nullable_range_restricted_int_8_u( &self, _ctx: impl ReadContext, ) -> Result, Error> { Ok(self.data.borrow().nullable_range_restricted_int_8_u.clone()) } - async fn nullable_range_restricted_int_8_s( + fn nullable_range_restricted_int_8_s( &self, _ctx: impl ReadContext, ) -> Result, Error> { Ok(self.data.borrow().nullable_range_restricted_int_8_s.clone()) } - async fn nullable_range_restricted_int_16_u( + fn nullable_range_restricted_int_16_u( &self, _ctx: impl ReadContext, ) -> Result, Error> { @@ -1239,7 +1235,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { .clone()) } - async fn nullable_range_restricted_int_16_s( + fn nullable_range_restricted_int_16_s( &self, _ctx: impl ReadContext, ) -> Result, Error> { @@ -1250,11 +1246,11 @@ impl ClusterHandler for UnitTestingHandler<'_> { .clone()) } - async fn global_enum(&self, _ctx: impl ReadContext) -> Result { + fn global_enum(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().global_enum) } - async fn global_struct( + fn global_struct( &self, _ctx: impl ReadContext, builder: TestGlobalStructBuilder

, @@ -1267,14 +1263,14 @@ impl ClusterHandler for UnitTestingHandler<'_> { .end() } - async fn nullable_global_enum( + fn nullable_global_enum( &self, _ctx: impl ReadContext, ) -> Result, Error> { Ok(Nullable::some(self.data.borrow().global_enum)) } - async fn nullable_global_struct( + fn nullable_global_struct( &self, _ctx: impl ReadContext, builder: NullableBuilder>, @@ -1292,158 +1288,138 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - async fn set_boolean(&self, _ctx: impl WriteContext, value: bool) -> Result<(), Error> { + fn set_boolean(&self, _ctx: impl WriteContext, value: bool) -> Result<(), Error> { self.data.borrow_mut().boolean = value; Ok(()) } - async fn set_bitmap_8( - &self, - _ctx: impl WriteContext, - value: Bitmap8MaskMap, - ) -> Result<(), Error> { + fn set_bitmap_8(&self, _ctx: impl WriteContext, value: Bitmap8MaskMap) -> Result<(), Error> { self.data.borrow_mut().bitmap_8 = value; Ok(()) } - async fn set_bitmap_16( - &self, - _ctx: impl WriteContext, - value: Bitmap16MaskMap, - ) -> Result<(), Error> { + fn set_bitmap_16(&self, _ctx: impl WriteContext, value: Bitmap16MaskMap) -> Result<(), Error> { self.data.borrow_mut().bitmap_16 = value; Ok(()) } - async fn set_bitmap_32( - &self, - _ctx: impl WriteContext, - value: Bitmap32MaskMap, - ) -> Result<(), Error> { + fn set_bitmap_32(&self, _ctx: impl WriteContext, value: Bitmap32MaskMap) -> Result<(), Error> { self.data.borrow_mut().bitmap_32 = value; Ok(()) } - async fn set_bitmap_64( - &self, - _ctx: impl WriteContext, - value: Bitmap64MaskMap, - ) -> Result<(), Error> { + fn set_bitmap_64(&self, _ctx: impl WriteContext, value: Bitmap64MaskMap) -> Result<(), Error> { self.data.borrow_mut().bitmap_64 = value; Ok(()) } - async fn set_int_8_u(&self, _ctx: impl WriteContext, value: u8) -> Result<(), Error> { + fn set_int_8_u(&self, _ctx: impl WriteContext, value: u8) -> Result<(), Error> { self.data.borrow_mut().int_8_u = value; Ok(()) } - async fn set_int_16_u(&self, _ctx: impl WriteContext, value: u16) -> Result<(), Error> { + fn set_int_16_u(&self, _ctx: impl WriteContext, value: u16) -> Result<(), Error> { self.data.borrow_mut().int_16_u = value; Ok(()) } - async fn set_int_24_u(&self, _ctx: impl WriteContext, value: u32) -> Result<(), Error> { + fn set_int_24_u(&self, _ctx: impl WriteContext, value: u32) -> Result<(), Error> { self.data.borrow_mut().int_24_u = value; Ok(()) } - async fn set_int_32_u(&self, _ctx: impl WriteContext, value: u32) -> Result<(), Error> { + fn set_int_32_u(&self, _ctx: impl WriteContext, value: u32) -> Result<(), Error> { self.data.borrow_mut().int_32_u = value; Ok(()) } - async fn set_int_40_u(&self, _ctx: impl WriteContext, value: u64) -> Result<(), Error> { + fn set_int_40_u(&self, _ctx: impl WriteContext, value: u64) -> Result<(), Error> { self.data.borrow_mut().int_40_u = value; Ok(()) } - async fn set_int_48_u(&self, _ctx: impl WriteContext, value: u64) -> Result<(), Error> { + fn set_int_48_u(&self, _ctx: impl WriteContext, value: u64) -> Result<(), Error> { self.data.borrow_mut().int_48_u = value; Ok(()) } - async fn set_int_56_u(&self, _ctx: impl WriteContext, value: u64) -> Result<(), Error> { + fn set_int_56_u(&self, _ctx: impl WriteContext, value: u64) -> Result<(), Error> { self.data.borrow_mut().int_56_u = value; Ok(()) } - async fn set_int_64_u(&self, _ctx: impl WriteContext, value: u64) -> Result<(), Error> { + fn set_int_64_u(&self, _ctx: impl WriteContext, value: u64) -> Result<(), Error> { self.data.borrow_mut().int_64_u = value; Ok(()) } - async fn set_int_8_s(&self, _ctx: impl WriteContext, value: i8) -> Result<(), Error> { + fn set_int_8_s(&self, _ctx: impl WriteContext, value: i8) -> Result<(), Error> { self.data.borrow_mut().int_8_s = value; Ok(()) } - async fn set_int_16_s(&self, _ctx: impl WriteContext, value: i16) -> Result<(), Error> { + fn set_int_16_s(&self, _ctx: impl WriteContext, value: i16) -> Result<(), Error> { self.data.borrow_mut().int_16_s = value; Ok(()) } - async fn set_int_24_s(&self, _ctx: impl WriteContext, value: i32) -> Result<(), Error> { + fn set_int_24_s(&self, _ctx: impl WriteContext, value: i32) -> Result<(), Error> { self.data.borrow_mut().int_24_s = value; Ok(()) } - async fn set_int_32_s(&self, _ctx: impl WriteContext, value: i32) -> Result<(), Error> { + fn set_int_32_s(&self, _ctx: impl WriteContext, value: i32) -> Result<(), Error> { self.data.borrow_mut().int_32_s = value; Ok(()) } - async fn set_int_40_s(&self, _ctx: impl WriteContext, value: i64) -> Result<(), Error> { + fn set_int_40_s(&self, _ctx: impl WriteContext, value: i64) -> Result<(), Error> { self.data.borrow_mut().int_40_s = value; Ok(()) } - async fn set_int_48_s(&self, _ctx: impl WriteContext, value: i64) -> Result<(), Error> { + fn set_int_48_s(&self, _ctx: impl WriteContext, value: i64) -> Result<(), Error> { self.data.borrow_mut().int_48_s = value; Ok(()) } - async fn set_int_56_s(&self, _ctx: impl WriteContext, value: i64) -> Result<(), Error> { + fn set_int_56_s(&self, _ctx: impl WriteContext, value: i64) -> Result<(), Error> { self.data.borrow_mut().int_56_s = value; Ok(()) } - async fn set_int_64_s(&self, _ctx: impl WriteContext, value: i64) -> Result<(), Error> { + fn set_int_64_s(&self, _ctx: impl WriteContext, value: i64) -> Result<(), Error> { self.data.borrow_mut().int_64_s = value; Ok(()) } - async fn set_enum_8(&self, _ctx: impl WriteContext, value: u8) -> Result<(), Error> { + fn set_enum_8(&self, _ctx: impl WriteContext, value: u8) -> Result<(), Error> { self.data.borrow_mut().enum_8 = value; Ok(()) } - async fn set_enum_16(&self, _ctx: impl WriteContext, value: u16) -> Result<(), Error> { + fn set_enum_16(&self, _ctx: impl WriteContext, value: u16) -> Result<(), Error> { self.data.borrow_mut().enum_16 = value; Ok(()) } - async fn set_float_single(&self, _ctx: impl WriteContext, value: f32) -> Result<(), Error> { + fn set_float_single(&self, _ctx: impl WriteContext, value: f32) -> Result<(), Error> { self.data.borrow_mut().float_single = value; Ok(()) } - async fn set_float_double(&self, _ctx: impl WriteContext, value: f64) -> Result<(), Error> { + fn set_float_double(&self, _ctx: impl WriteContext, value: f64) -> Result<(), Error> { self.data.borrow_mut().float_double = value; Ok(()) } - async fn set_octet_string( - &self, - _ctx: impl WriteContext, - value: OctetStr<'_>, - ) -> Result<(), Error> { + fn set_octet_string(&self, _ctx: impl WriteContext, value: OctetStr<'_>) -> Result<(), Error> { self.data.borrow_mut().octet_string = value.0.try_into().map_err(|_| ErrorCode::ConstraintError)?; Ok(()) } - async fn set_list_int_8_u( + fn set_list_int_8_u( &self, _ctx: impl WriteContext, value: ArrayAttributeWrite, u8>, @@ -1492,7 +1468,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - async fn set_list_octet_string( + fn set_list_octet_string( &self, _ctx: impl WriteContext, value: ArrayAttributeWrite>, OctetStr<'_>>, @@ -1546,7 +1522,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - async fn set_list_struct_octet_string( + fn set_list_struct_octet_string( &self, _ctx: impl WriteContext, value: ArrayAttributeWrite>, TestListStructOctet<'_>>, @@ -1622,7 +1598,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - async fn set_long_octet_string( + fn set_long_octet_string( &self, _ctx: impl WriteContext, value: OctetStr<'_>, @@ -1632,17 +1608,13 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_char_string( - &self, - _ctx: impl WriteContext, - value: Utf8Str<'_>, - ) -> Result<(), Error> { + fn set_char_string(&self, _ctx: impl WriteContext, value: Utf8Str<'_>) -> Result<(), Error> { self.data.borrow_mut().char_string = value.try_into().map_err(|_| ErrorCode::ConstraintError)?; Ok(()) } - async fn set_long_char_string( + fn set_long_char_string( &self, _ctx: impl WriteContext, value: Utf8Str<'_>, @@ -1652,22 +1624,22 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_epoch_us(&self, _ctx: impl WriteContext, value: u64) -> Result<(), Error> { + fn set_epoch_us(&self, _ctx: impl WriteContext, value: u64) -> Result<(), Error> { self.data.borrow_mut().epoch_us = value; Ok(()) } - async fn set_epoch_s(&self, _ctx: impl WriteContext, value: u32) -> Result<(), Error> { + fn set_epoch_s(&self, _ctx: impl WriteContext, value: u32) -> Result<(), Error> { self.data.borrow_mut().epoch_s = value; Ok(()) } - async fn set_vendor_id(&self, _ctx: impl WriteContext, value: u16) -> Result<(), Error> { + fn set_vendor_id(&self, _ctx: impl WriteContext, value: u16) -> Result<(), Error> { self.data.borrow_mut().vendor_id = value; Ok(()) } - async fn set_list_nullables_and_optionals_struct( + fn set_list_nullables_and_optionals_struct( &self, _ctx: impl WriteContext, value: ArrayAttributeWrite< @@ -1734,12 +1706,12 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - async fn set_enum_attr(&self, _ctx: impl WriteContext, value: SimpleEnum) -> Result<(), Error> { + fn set_enum_attr(&self, _ctx: impl WriteContext, value: SimpleEnum) -> Result<(), Error> { self.data.borrow_mut().enum_attr = value; Ok(()) } - async fn set_struct_attr( + fn set_struct_attr( &self, _ctx: impl WriteContext, value: SimpleStruct<'_>, @@ -1766,7 +1738,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_range_restricted_int_8_u( + fn set_range_restricted_int_8_u( &self, _ctx: impl WriteContext, value: u8, @@ -1782,7 +1754,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_range_restricted_int_8_s( + fn set_range_restricted_int_8_s( &self, _ctx: impl WriteContext, value: i8, @@ -1798,7 +1770,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_range_restricted_int_16_u( + fn set_range_restricted_int_16_u( &self, _ctx: impl WriteContext, value: u16, @@ -1814,7 +1786,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_range_restricted_int_16_s( + fn set_range_restricted_int_16_s( &self, _ctx: impl WriteContext, value: i16, @@ -1830,7 +1802,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_list_long_octet_string( + fn set_list_long_octet_string( &self, _ctx: impl WriteContext, value: ArrayAttributeWrite>, OctetStr<'_>>, @@ -1884,7 +1856,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - async fn set_list_fabric_scoped( + fn set_list_fabric_scoped( &self, ctx: impl WriteContext, value: ArrayAttributeWrite>, TestFabricScoped<'_>>, @@ -1948,16 +1920,12 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_timed_write_boolean( - &self, - _ctx: impl WriteContext, - value: bool, - ) -> Result<(), Error> { + fn set_timed_write_boolean(&self, _ctx: impl WriteContext, value: bool) -> Result<(), Error> { self.data.borrow_mut().timed_write_boolean = value; Ok(()) } - async fn set_general_error_boolean( + fn set_general_error_boolean( &self, _ctx: impl WriteContext, _value: bool, @@ -1965,7 +1933,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Err(ErrorCode::InvalidDataType.into()) } - async fn set_cluster_error_boolean( + fn set_cluster_error_boolean( &self, _ctx: impl WriteContext, _value: bool, @@ -1973,7 +1941,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Err(ErrorCode::Invalid.into()) } - async fn set_nullable_boolean( + fn set_nullable_boolean( &self, _ctx: impl WriteContext, value: Nullable, @@ -1982,7 +1950,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_bitmap_8( + fn set_nullable_bitmap_8( &self, _ctx: impl WriteContext, value: Nullable, @@ -1991,7 +1959,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_bitmap_16( + fn set_nullable_bitmap_16( &self, _ctx: impl WriteContext, value: Nullable, @@ -2000,7 +1968,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_bitmap_32( + fn set_nullable_bitmap_32( &self, _ctx: impl WriteContext, value: Nullable, @@ -2009,7 +1977,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_bitmap_64( + fn set_nullable_bitmap_64( &self, _ctx: impl WriteContext, value: Nullable, @@ -2018,7 +1986,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_int_8_u( + fn set_nullable_int_8_u( &self, _ctx: impl WriteContext, value: Nullable, @@ -2027,7 +1995,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_int_16_u( + fn set_nullable_int_16_u( &self, _ctx: impl WriteContext, value: Nullable, @@ -2036,7 +2004,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_int_24_u( + fn set_nullable_int_24_u( &self, _ctx: impl WriteContext, value: Nullable, @@ -2045,7 +2013,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_int_32_u( + fn set_nullable_int_32_u( &self, _ctx: impl WriteContext, value: Nullable, @@ -2054,7 +2022,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_int_40_u( + fn set_nullable_int_40_u( &self, _ctx: impl WriteContext, value: Nullable, @@ -2063,7 +2031,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_int_48_u( + fn set_nullable_int_48_u( &self, _ctx: impl WriteContext, value: Nullable, @@ -2072,7 +2040,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_int_56_u( + fn set_nullable_int_56_u( &self, _ctx: impl WriteContext, value: Nullable, @@ -2081,7 +2049,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_int_64_u( + fn set_nullable_int_64_u( &self, _ctx: impl WriteContext, value: Nullable, @@ -2090,7 +2058,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_int_8_s( + fn set_nullable_int_8_s( &self, _ctx: impl WriteContext, value: Nullable, @@ -2099,7 +2067,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_int_16_s( + fn set_nullable_int_16_s( &self, _ctx: impl WriteContext, value: Nullable, @@ -2108,7 +2076,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_int_24_s( + fn set_nullable_int_24_s( &self, _ctx: impl WriteContext, value: Nullable, @@ -2117,7 +2085,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_int_32_s( + fn set_nullable_int_32_s( &self, _ctx: impl WriteContext, value: Nullable, @@ -2126,7 +2094,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_int_40_s( + fn set_nullable_int_40_s( &self, _ctx: impl WriteContext, value: Nullable, @@ -2135,7 +2103,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_int_48_s( + fn set_nullable_int_48_s( &self, _ctx: impl WriteContext, value: Nullable, @@ -2144,7 +2112,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_int_56_s( + fn set_nullable_int_56_s( &self, _ctx: impl WriteContext, value: Nullable, @@ -2153,7 +2121,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_int_64_s( + fn set_nullable_int_64_s( &self, _ctx: impl WriteContext, value: Nullable, @@ -2162,7 +2130,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_enum_8( + fn set_nullable_enum_8( &self, _ctx: impl WriteContext, value: Nullable, @@ -2171,7 +2139,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_enum_16( + fn set_nullable_enum_16( &self, _ctx: impl WriteContext, value: Nullable, @@ -2180,7 +2148,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_float_single( + fn set_nullable_float_single( &self, _ctx: impl WriteContext, value: Nullable, @@ -2189,7 +2157,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_float_double( + fn set_nullable_float_double( &self, _ctx: impl WriteContext, value: Nullable, @@ -2198,7 +2166,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_octet_string( + fn set_nullable_octet_string( &self, _ctx: impl WriteContext, value: Nullable>, @@ -2213,7 +2181,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_char_string( + fn set_nullable_char_string( &self, _ctx: impl WriteContext, value: Nullable>, @@ -2228,7 +2196,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_enum_attr( + fn set_nullable_enum_attr( &self, _ctx: impl WriteContext, value: Nullable, @@ -2237,7 +2205,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_struct( + fn set_nullable_struct( &self, _ctx: impl WriteContext, value: Nullable>, @@ -2267,7 +2235,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_range_restricted_int_8_u( + fn set_nullable_range_restricted_int_8_u( &self, _ctx: impl WriteContext, value: Nullable, @@ -2290,7 +2258,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_range_restricted_int_8_s( + fn set_nullable_range_restricted_int_8_s( &self, _ctx: impl WriteContext, value: Nullable, @@ -2313,7 +2281,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_range_restricted_int_16_u( + fn set_nullable_range_restricted_int_16_u( &self, _ctx: impl WriteContext, value: Nullable, @@ -2336,7 +2304,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_range_restricted_int_16_s( + fn set_nullable_range_restricted_int_16_s( &self, _ctx: impl WriteContext, value: Nullable, @@ -2359,16 +2327,12 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_global_enum( - &self, - _ctx: impl WriteContext, - value: TestGlobalEnum, - ) -> Result<(), Error> { + fn set_global_enum(&self, _ctx: impl WriteContext, value: TestGlobalEnum) -> Result<(), Error> { self.data.borrow_mut().global_enum = value; Ok(()) } - async fn set_global_struct( + fn set_global_struct( &self, _ctx: impl WriteContext, value: TestGlobalStruct<'_>, @@ -2384,7 +2348,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_global_enum( + fn set_nullable_global_enum( &self, _ctx: impl WriteContext, value: Nullable, @@ -2393,7 +2357,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn set_nullable_global_struct( + fn set_nullable_global_struct( &self, _ctx: impl WriteContext, value: Nullable>, @@ -2414,15 +2378,15 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(()) } - async fn handle_test(&self, _ctx: impl InvokeContext) -> Result<(), Error> { + fn handle_test(&self, _ctx: impl InvokeContext) -> Result<(), Error> { Ok(()) } - async fn handle_test_not_handled(&self, _ctx: impl InvokeContext) -> Result<(), Error> { + fn handle_test_not_handled(&self, _ctx: impl InvokeContext) -> Result<(), Error> { Err(ErrorCode::InvalidCommand.into()) } - async fn handle_test_specific( + fn handle_test_specific( &self, _ctx: impl InvokeContext, response: TestSpecificResponseBuilder

, @@ -2430,7 +2394,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { response.return_value(7)?.end() } - async fn handle_test_add_arguments( + fn handle_test_add_arguments( &self, _ctx: impl InvokeContext, request: TestAddArgumentsRequest<'_>, @@ -2444,7 +2408,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - async fn handle_test_simple_argument_request( + fn handle_test_simple_argument_request( &self, _ctx: impl InvokeContext, request: TestSimpleArgumentRequestRequest<'_>, @@ -2453,7 +2417,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { response.return_value(request.arg_1()? as _)?.end() } - async fn handle_test_struct_array_argument_request( + fn handle_test_struct_array_argument_request( &self, _ctx: impl InvokeContext, _request: TestStructArrayArgumentRequestRequest<'_>, @@ -2462,7 +2426,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { unreachable!() } - async fn handle_test_struct_argument_request( + fn handle_test_struct_argument_request( &self, _ctx: impl InvokeContext, request: TestStructArgumentRequestRequest<'_>, @@ -2482,7 +2446,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { response.value(result)?.end() } - async fn handle_test_nested_struct_argument_request( + fn handle_test_nested_struct_argument_request( &self, _ctx: impl InvokeContext, request: TestNestedStructArgumentRequestRequest<'_>, @@ -2506,7 +2470,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { response.value(result)?.end() } - async fn handle_test_list_struct_argument_request( + fn handle_test_list_struct_argument_request( &self, _ctx: impl InvokeContext, request: TestListStructArgumentRequestRequest<'_>, @@ -2543,7 +2507,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { response.value(result)?.end() } - async fn handle_test_list_int_8_u_argument_request( + fn handle_test_list_int_8_u_argument_request( &self, _ctx: impl InvokeContext, request: TestListInt8UArgumentRequestRequest<'_>, @@ -2564,7 +2528,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { response.value(result)?.end() } - async fn handle_test_nested_struct_list_argument_request( + fn handle_test_nested_struct_list_argument_request( &self, _ctx: impl InvokeContext, request: TestNestedStructListArgumentRequestRequest<'_>, @@ -2616,7 +2580,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { response.value(result)?.end() } - async fn handle_test_list_nested_struct_list_argument_request( + fn handle_test_list_nested_struct_list_argument_request( &self, _ctx: impl InvokeContext, request: TestListNestedStructListArgumentRequestRequest<'_>, @@ -2714,7 +2678,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { response.value(result)?.end() } - async fn handle_test_list_int_8_u_reverse_request( + fn handle_test_list_int_8_u_reverse_request( &self, _ctx: impl InvokeContext, request: TestListInt8UReverseRequestRequest<'_>, @@ -2737,7 +2701,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { lo.end()?.end() } - async fn handle_test_enums_request( + fn handle_test_enums_request( &self, _ctx: impl InvokeContext, request: TestEnumsRequestRequest<'_>, @@ -2749,7 +2713,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { .end() } - async fn handle_test_nullable_optional_request( + fn handle_test_nullable_optional_request( &self, _ctx: impl InvokeContext, request: TestNullableOptionalRequestRequest<'_>, @@ -2763,7 +2727,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { .end() } - async fn handle_test_complex_nullable_optional_request( + fn handle_test_complex_nullable_optional_request( &self, _ctx: impl InvokeContext, request: TestComplexNullableOptionalRequestRequest<'_>, @@ -2896,7 +2860,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { .end() } - async fn handle_simple_struct_echo_request( + fn handle_simple_struct_echo_request( &self, _ctx: impl InvokeContext, request: SimpleStructEchoRequestRequest<'_>, @@ -2919,11 +2883,11 @@ impl ClusterHandler for UnitTestingHandler<'_> { .end() } - async fn handle_timed_invoke_request(&self, _ctx: impl InvokeContext) -> Result<(), Error> { + fn handle_timed_invoke_request(&self, _ctx: impl InvokeContext) -> Result<(), Error> { Ok(()) } - async fn handle_test_simple_optional_argument_request( + fn handle_test_simple_optional_argument_request( &self, _ctx: impl InvokeContext, request: TestSimpleOptionalArgumentRequestRequest<'_>, @@ -2935,7 +2899,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { } } - async fn handle_test_emit_test_event_request( + fn handle_test_emit_test_event_request( &self, _ctx: impl InvokeContext, _request: TestEmitTestEventRequestRequest<'_>, @@ -2944,7 +2908,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { todo!() } - async fn handle_test_emit_test_fabric_scoped_event_request( + fn handle_test_emit_test_fabric_scoped_event_request( &self, _ctx: impl InvokeContext, _request: TestEmitTestFabricScopedEventRequestRequest<'_>, @@ -2953,11 +2917,11 @@ impl ClusterHandler for UnitTestingHandler<'_> { todo!() } - async fn handle_test_unknown_command(&self, _ctx: impl InvokeContext) -> Result<(), Error> { + fn handle_test_unknown_command(&self, _ctx: impl InvokeContext) -> Result<(), Error> { unreachable!() } - async fn handle_test_batch_helper_request( + fn handle_test_batch_helper_request( &self, _ctx: impl InvokeContext, request: TestBatchHelperRequestRequest<'_>, @@ -2981,7 +2945,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(parent) } - async fn handle_test_second_batch_helper_request( + fn handle_test_second_batch_helper_request( &self, _ctx: impl InvokeContext, request: TestSecondBatchHelperRequestRequest<'_>, @@ -3005,17 +2969,17 @@ impl ClusterHandler for UnitTestingHandler<'_> { Ok(parent) } - async fn mei_int_8_u(&self, _ctx: impl ReadContext) -> Result { + fn mei_int_8_u(&self, _ctx: impl ReadContext) -> Result { Ok(self.data.borrow().mei_int_8_u) } - async fn set_mei_int_8_u(&self, _ctx: impl WriteContext, value: u8) -> Result<(), Error> { + fn set_mei_int_8_u(&self, _ctx: impl WriteContext, value: u8) -> Result<(), Error> { self.data.borrow_mut().mei_int_8_u = value; Ok(()) } - async fn handle_test_different_vendor_mei_request( + fn handle_test_different_vendor_mei_request( &self, _ctx: impl InvokeContext, request: TestDifferentVendorMeiRequestRequest<'_>, @@ -3026,7 +2990,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { response.arg_1(arg)?.event_number(0)?.end() } - async fn handle_string_echo_request( + fn handle_string_echo_request( &self, _ctx: impl InvokeContext, request: StringEchoRequestRequest<'_>, @@ -3035,7 +2999,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { response.payload(request.payload()?)?.end() } - async fn handle_global_echo_request( + fn handle_global_echo_request( &self, _ctx: impl InvokeContext, request: GlobalEchoRequestRequest<'_>, @@ -3052,7 +3016,7 @@ impl ClusterHandler for UnitTestingHandler<'_> { .end() } - async fn handle_test_check_command_flags(&self, _ctx: impl InvokeContext) -> Result<(), Error> { + fn handle_test_check_command_flags(&self, _ctx: impl InvokeContext) -> Result<(), Error> { todo!() } } diff --git a/rs-matter/src/dm/clusters/wifi_diag.rs b/rs-matter/src/dm/clusters/wifi_diag.rs index 8ea2740f4..a05a66f92 100644 --- a/rs-matter/src/dm/clusters/wifi_diag.rs +++ b/rs-matter/src/dm/clusters/wifi_diag.rs @@ -127,8 +127,10 @@ impl ClusterHandler for WifiDiagHandler<'_> { fn dataver_changed(&self) { self.dataver.changed(); } +} - async fn bssid( +impl ClusterSyncHandler for WifiDiagHandler<'_> { + fn bssid( &self, _ctx: impl ReadContext, builder: NullableBuilder>, @@ -151,29 +153,23 @@ impl ClusterHandler for WifiDiagHandler<'_> { Ok(unwrap!(parent.take())) } - async fn security_type( - &self, - _ctx: impl ReadContext, - ) -> Result, Error> { + fn security_type(&self, _ctx: impl ReadContext) -> Result, Error> { self.diag.security_type() } - async fn wi_fi_version( - &self, - _ctx: impl ReadContext, - ) -> Result, Error> { + fn wi_fi_version(&self, _ctx: impl ReadContext) -> Result, Error> { self.diag.wi_fi_version() } - async fn channel_number(&self, _ctx: impl ReadContext) -> Result, Error> { + fn channel_number(&self, _ctx: impl ReadContext) -> Result, Error> { self.diag.channel_number() } - async fn rssi(&self, _ctx: impl ReadContext) -> Result, Error> { + fn rssi(&self, _ctx: impl ReadContext) -> Result, Error> { self.diag.rssi() } - async fn handle_reset_counts(&self, _ctx: impl InvokeContext) -> Result<(), Error> { + fn handle_reset_counts(&self, _ctx: impl InvokeContext) -> Result<(), Error> { Err(ErrorCode::InvalidAction.into()) } } diff --git a/scripts/memory/gh_report.py b/scripts/memory/gh_report.py index 715a59ff2..202f81f9e 100644 --- a/scripts/memory/gh_report.py +++ b/scripts/memory/gh_report.py @@ -140,7 +140,7 @@ def add_sizes_from_github(self): # Determine required size artifacts. artifact_limit = self.config['github.limit-artifacts'] - required_artifact_ids: set[int] = set() + required_artifacts: Dict[int, str] = {} for group, group_reports in size_artifacts.items(): logging.debug('ASG: group %s', group) for report in group_reports.values(): @@ -149,25 +149,26 @@ def add_sizes_from_github(self): logging.debug('ASN: No match for %s', report.name) continue if (artifact_limit - and len(required_artifact_ids) >= artifact_limit): + and len(required_artifacts) >= artifact_limit): continue # We have size information for both this report and its # parent, so ensure that both artifacts are downloaded. parent = group_reports[report.parent] - required_artifact_ids.add(report.id) - required_artifact_ids.add(parent.id) + required_artifacts[report.id] = f"{parent.pr}: {parent.name}" + required_artifacts[parent.id] = f"{parent.pr}: {parent.name}" logging.debug('ASM: Match %s', report.parent) logging.debug('ASR: %s %s', report.id, report.name) logging.debug('ASP: %s %s', parent.id, parent.name) # Download and add required artifacts. - for i in required_artifact_ids: + for i, name in required_artifacts.items(): blob = self.gh.download_artifact(i) if blob: try: self.db.add_sizes_from_zipfile(io.BytesIO(blob), {'artifact': i}) except Exception: + logging.error('Failed to process file: %s', name) # Report in case the zipfile is invalid, however do not fail # all the rest (behave as if artifact download has failed) traceback.print_exc() From 11ab6a1219848812f48d7d6ad818baec2d77280f Mon Sep 17 00:00:00 2001 From: Marcos Boyington <15697303+gmarcosb@users.noreply.github.com> Date: Wed, 4 Feb 2026 11:06:40 -0700 Subject: [PATCH 8/9] (Failed) attempt at optimizing by using compile-time matching to optimize away Ready futures --- rs-matter-macros/src/idl/handler.rs | 36 ++++++++--------- rs-matter/src/dm/types/handler.rs | 60 +++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 18 deletions(-) diff --git a/rs-matter-macros/src/idl/handler.rs b/rs-matter-macros/src/idl/handler.rs index f20073716..0829e8d51 100644 --- a/rs-matter-macros/src/idl/handler.rs +++ b/rs-matter-macros/src/idl/handler.rs @@ -731,7 +731,7 @@ fn handler_adaptor_attribute_match( let tag = #krate::dm::Reply::tag(&writer); let tw = #krate::dm::Reply::writer(&mut writer); - let attr_read_result = ::#attr_method_name( + let attr_read_result = #krate::process_maybe_async!(::#attr_method_name( &self.0, &ctx, #krate::dm::ArrayAttributeRead::new( @@ -739,7 +739,7 @@ fn handler_adaptor_attribute_match( #krate::tlv::TLVWriteParent::new(#attr_debug_id, tw), tag, )?, - ).await; + )); #attr_read_debug_build_end @@ -756,10 +756,10 @@ fn handler_adaptor_attribute_match( let tag = #krate::dm::Reply::tag(&writer); let tw = #krate::dm::Reply::writer(&mut writer); - let attr_read_result = ::#attr_method_name(&self.0, &ctx, #krate::tlv::TLVBuilder::new( + let attr_read_result = #krate::process_maybe_async!(::#attr_method_name(&self.0, &ctx, #krate::tlv::TLVBuilder::new( #krate::tlv::TLVWriteParent::new(#attr_debug_id, tw), tag, - )?).await; + )?)); #attr_read_debug_build_end @@ -772,7 +772,7 @@ fn handler_adaptor_attribute_match( } else { quote!( AttributeId::#attr_name => { - let attr_read_result = ::#attr_method_name(&self.0, &ctx).await; + let attr_read_result = #krate::process_maybe_async!(::#attr_method_name(&self.0, &ctx)); #attr_read_debug @@ -823,7 +823,7 @@ fn handler_adaptor_attribute_write_match( AttributeId::#attr_name => { let attr_data = #krate::dm::ArrayAttributeWrite::new(ctx.attr().list_index.clone(), ctx.data())?; - let attr_write_result = ::#attr_method_name(&self.0, &ctx, attr_data.clone()).await; + let attr_write_result = #krate::process_maybe_async!(::#attr_method_name(&self.0, &ctx, attr_data.clone())); #attr_write_debug @@ -835,7 +835,7 @@ fn handler_adaptor_attribute_write_match( AttributeId::#attr_name => { let attr_data: #attr_type = #krate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = ::#attr_method_name(&self.0, &ctx, attr_data.clone()).await; + let attr_write_result = #krate::process_maybe_async!(::#attr_method_name(&self.0, &ctx, attr_data.clone())); #attr_write_debug @@ -960,7 +960,7 @@ fn handler_adaptor_command_match( let tag = #krate::dm::Reply::tag(&writer); let tw = #krate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = ::#cmd_method_name( + let cmd_invoke_result = #krate::process_maybe_async!(::#cmd_method_name( &self.0, &ctx, cmd_data, @@ -968,7 +968,7 @@ fn handler_adaptor_command_match( #krate::tlv::TLVWriteParent::new(#cmd_debug_id, tw), tag, )? - ).await; + )); #cmd_invoke_debug_build_end @@ -984,8 +984,8 @@ fn handler_adaptor_command_match( let writer = reply.with_command(#field_resp_cmd_code)?; - let cmd_invoke_result = ::#cmd_method_name( - &self.0, &ctx, cmd_data.clone()).await; + let cmd_invoke_result = #krate::process_maybe_async!(::#cmd_method_name( + &self.0, &ctx, cmd_data.clone())); #cmd_invoke_debug @@ -998,8 +998,8 @@ fn handler_adaptor_command_match( CommandId::#cmd_name => { let cmd_data: #field_req = #krate::tlv::FromTLV::from_tlv(ctx.data())?; - let cmd_invoke_result = ::#cmd_method_name( - &self.0, &ctx, cmd_data.clone()).await; + let cmd_invoke_result = #krate::process_maybe_async!(::#cmd_method_name( + &self.0, &ctx, cmd_data.clone())); #cmd_invoke_debug @@ -1017,14 +1017,14 @@ fn handler_adaptor_command_match( let tag = #krate::dm::Reply::tag(&writer); let tw = #krate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = ::#cmd_method_name( + let cmd_invoke_result = #krate::process_maybe_async!(::#cmd_method_name( &self.0, &ctx, #krate::tlv::TLVBuilder::new( #krate::tlv::TLVWriteParent::new(#cmd_debug_id, tw), tag, )?, - ).await; + )); #cmd_invoke_debug_build_end @@ -1038,7 +1038,7 @@ fn handler_adaptor_command_match( CommandId::#cmd_name => { let writer = reply.with_command(#field_resp_cmd_code)?; - let cmd_invoke_result = ::#cmd_method_name(&self.0, &ctx).await; + let cmd_invoke_result = #krate::process_maybe_async!(::#cmd_method_name(&self.0, &ctx)); #cmd_invoke_debug_noarg @@ -1049,7 +1049,7 @@ fn handler_adaptor_command_match( } else { quote!( CommandId::#cmd_name => { - let cmd_invoke_result = ::#cmd_method_name(&self.0, &ctx).await; + let cmd_invoke_result = #krate::process_maybe_async!(::#cmd_method_name(&self.0, &ctx)); #cmd_invoke_debug_noarg @@ -2107,4 +2107,4 @@ mod tests { ) ); } -} +} \ No newline at end of file diff --git a/rs-matter/src/dm/types/handler.rs b/rs-matter/src/dm/types/handler.rs index 95500f114..1c49dd921 100644 --- a/rs-matter/src/dm/types/handler.rs +++ b/rs-matter/src/dm/types/handler.rs @@ -1105,3 +1105,63 @@ mod asynch { } } } + +#[inline(always)] +pub const fn extract_ready_check(_: ReadyCheck) -> bool { + B +} + +#[macro_export] +macro_rules! process_maybe_async { + ($source:expr) => { + match $source { + fut => { + #[allow(unused_imports)] + use $crate::dm::{MaybeReady, IsReady, IsNotReady, NotReadyFallback}; + // If we run this code with const_ready, the binary size is smaller, i.e. future state machine better optimized + // const is_ready : bool = $crate::dm::extract_ready_check($crate::dm::ReadyCheck::); + let is_ready : bool = $crate::dm::extract_ready_check((&&fut).get_check()); + if is_ready { + $crate::dm::MaybeReady(fut).get_ready() + } else { + fut.await + } + } + } + }; +} +pub struct ReadyCheck; + +pub struct MaybeReady(pub T); + +// Case 1: The specific type (Ready) +impl MaybeReady> { + #[inline(always)] + pub fn get_ready(self) -> T { + self.0.into_inner() + } +} + +// Case 2: The fallback (Anything else that is a Future) +// We use a trait to provide the fallback to avoid naming conflicts +pub trait NotReadyFallback { + fn get_ready(self) -> T; +} + +impl> NotReadyFallback for MaybeReady { + #[inline(always)] + fn get_ready(self) -> T { + unimplemented!() + } +} + +pub trait IsReady { + #[inline(always)] + fn get_check(&self) -> ReadyCheck { ReadyCheck } +} +impl IsReady for &&core::future::Ready {} + +pub trait IsNotReady { + fn get_check(&self) -> ReadyCheck { ReadyCheck } +} +impl> IsNotReady for &F {} From c505ffd0ff601de592f84ec6c77eb69ffef6c1a8 Mon Sep 17 00:00:00 2001 From: Marcos Boyington <15697303+gmarcosb@users.noreply.github.com> Date: Wed, 4 Feb 2026 14:50:32 -0700 Subject: [PATCH 9/9] Revert failed optimization attempt, as size report confirms this makes things worse rather than better This reverts commit 11ab6a1219848812f48d7d6ad818baec2d77280f. --- rs-matter-macros/src/idl/handler.rs | 36 ++++++++--------- rs-matter/src/dm/types/handler.rs | 60 ----------------------------- 2 files changed, 18 insertions(+), 78 deletions(-) diff --git a/rs-matter-macros/src/idl/handler.rs b/rs-matter-macros/src/idl/handler.rs index 0829e8d51..f20073716 100644 --- a/rs-matter-macros/src/idl/handler.rs +++ b/rs-matter-macros/src/idl/handler.rs @@ -731,7 +731,7 @@ fn handler_adaptor_attribute_match( let tag = #krate::dm::Reply::tag(&writer); let tw = #krate::dm::Reply::writer(&mut writer); - let attr_read_result = #krate::process_maybe_async!(::#attr_method_name( + let attr_read_result = ::#attr_method_name( &self.0, &ctx, #krate::dm::ArrayAttributeRead::new( @@ -739,7 +739,7 @@ fn handler_adaptor_attribute_match( #krate::tlv::TLVWriteParent::new(#attr_debug_id, tw), tag, )?, - )); + ).await; #attr_read_debug_build_end @@ -756,10 +756,10 @@ fn handler_adaptor_attribute_match( let tag = #krate::dm::Reply::tag(&writer); let tw = #krate::dm::Reply::writer(&mut writer); - let attr_read_result = #krate::process_maybe_async!(::#attr_method_name(&self.0, &ctx, #krate::tlv::TLVBuilder::new( + let attr_read_result = ::#attr_method_name(&self.0, &ctx, #krate::tlv::TLVBuilder::new( #krate::tlv::TLVWriteParent::new(#attr_debug_id, tw), tag, - )?)); + )?).await; #attr_read_debug_build_end @@ -772,7 +772,7 @@ fn handler_adaptor_attribute_match( } else { quote!( AttributeId::#attr_name => { - let attr_read_result = #krate::process_maybe_async!(::#attr_method_name(&self.0, &ctx)); + let attr_read_result = ::#attr_method_name(&self.0, &ctx).await; #attr_read_debug @@ -823,7 +823,7 @@ fn handler_adaptor_attribute_write_match( AttributeId::#attr_name => { let attr_data = #krate::dm::ArrayAttributeWrite::new(ctx.attr().list_index.clone(), ctx.data())?; - let attr_write_result = #krate::process_maybe_async!(::#attr_method_name(&self.0, &ctx, attr_data.clone())); + let attr_write_result = ::#attr_method_name(&self.0, &ctx, attr_data.clone()).await; #attr_write_debug @@ -835,7 +835,7 @@ fn handler_adaptor_attribute_write_match( AttributeId::#attr_name => { let attr_data: #attr_type = #krate::tlv::FromTLV::from_tlv(ctx.data())?; - let attr_write_result = #krate::process_maybe_async!(::#attr_method_name(&self.0, &ctx, attr_data.clone())); + let attr_write_result = ::#attr_method_name(&self.0, &ctx, attr_data.clone()).await; #attr_write_debug @@ -960,7 +960,7 @@ fn handler_adaptor_command_match( let tag = #krate::dm::Reply::tag(&writer); let tw = #krate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = #krate::process_maybe_async!(::#cmd_method_name( + let cmd_invoke_result = ::#cmd_method_name( &self.0, &ctx, cmd_data, @@ -968,7 +968,7 @@ fn handler_adaptor_command_match( #krate::tlv::TLVWriteParent::new(#cmd_debug_id, tw), tag, )? - )); + ).await; #cmd_invoke_debug_build_end @@ -984,8 +984,8 @@ fn handler_adaptor_command_match( let writer = reply.with_command(#field_resp_cmd_code)?; - let cmd_invoke_result = #krate::process_maybe_async!(::#cmd_method_name( - &self.0, &ctx, cmd_data.clone())); + let cmd_invoke_result = ::#cmd_method_name( + &self.0, &ctx, cmd_data.clone()).await; #cmd_invoke_debug @@ -998,8 +998,8 @@ fn handler_adaptor_command_match( CommandId::#cmd_name => { let cmd_data: #field_req = #krate::tlv::FromTLV::from_tlv(ctx.data())?; - let cmd_invoke_result = #krate::process_maybe_async!(::#cmd_method_name( - &self.0, &ctx, cmd_data.clone())); + let cmd_invoke_result = ::#cmd_method_name( + &self.0, &ctx, cmd_data.clone()).await; #cmd_invoke_debug @@ -1017,14 +1017,14 @@ fn handler_adaptor_command_match( let tag = #krate::dm::Reply::tag(&writer); let tw = #krate::dm::Reply::writer(&mut writer); - let cmd_invoke_result = #krate::process_maybe_async!(::#cmd_method_name( + let cmd_invoke_result = ::#cmd_method_name( &self.0, &ctx, #krate::tlv::TLVBuilder::new( #krate::tlv::TLVWriteParent::new(#cmd_debug_id, tw), tag, )?, - )); + ).await; #cmd_invoke_debug_build_end @@ -1038,7 +1038,7 @@ fn handler_adaptor_command_match( CommandId::#cmd_name => { let writer = reply.with_command(#field_resp_cmd_code)?; - let cmd_invoke_result = #krate::process_maybe_async!(::#cmd_method_name(&self.0, &ctx)); + let cmd_invoke_result = ::#cmd_method_name(&self.0, &ctx).await; #cmd_invoke_debug_noarg @@ -1049,7 +1049,7 @@ fn handler_adaptor_command_match( } else { quote!( CommandId::#cmd_name => { - let cmd_invoke_result = #krate::process_maybe_async!(::#cmd_method_name(&self.0, &ctx)); + let cmd_invoke_result = ::#cmd_method_name(&self.0, &ctx).await; #cmd_invoke_debug_noarg @@ -2107,4 +2107,4 @@ mod tests { ) ); } -} \ No newline at end of file +} diff --git a/rs-matter/src/dm/types/handler.rs b/rs-matter/src/dm/types/handler.rs index 1c49dd921..95500f114 100644 --- a/rs-matter/src/dm/types/handler.rs +++ b/rs-matter/src/dm/types/handler.rs @@ -1105,63 +1105,3 @@ mod asynch { } } } - -#[inline(always)] -pub const fn extract_ready_check(_: ReadyCheck) -> bool { - B -} - -#[macro_export] -macro_rules! process_maybe_async { - ($source:expr) => { - match $source { - fut => { - #[allow(unused_imports)] - use $crate::dm::{MaybeReady, IsReady, IsNotReady, NotReadyFallback}; - // If we run this code with const_ready, the binary size is smaller, i.e. future state machine better optimized - // const is_ready : bool = $crate::dm::extract_ready_check($crate::dm::ReadyCheck::); - let is_ready : bool = $crate::dm::extract_ready_check((&&fut).get_check()); - if is_ready { - $crate::dm::MaybeReady(fut).get_ready() - } else { - fut.await - } - } - } - }; -} -pub struct ReadyCheck; - -pub struct MaybeReady(pub T); - -// Case 1: The specific type (Ready) -impl MaybeReady> { - #[inline(always)] - pub fn get_ready(self) -> T { - self.0.into_inner() - } -} - -// Case 2: The fallback (Anything else that is a Future) -// We use a trait to provide the fallback to avoid naming conflicts -pub trait NotReadyFallback { - fn get_ready(self) -> T; -} - -impl> NotReadyFallback for MaybeReady { - #[inline(always)] - fn get_ready(self) -> T { - unimplemented!() - } -} - -pub trait IsReady { - #[inline(always)] - fn get_check(&self) -> ReadyCheck { ReadyCheck } -} -impl IsReady for &&core::future::Ready {} - -pub trait IsNotReady { - fn get_check(&self) -> ReadyCheck { ReadyCheck } -} -impl> IsNotReady for &F {}