From ef05e28097dd990ace919f971ca8ddc333adfb8f Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Wed, 17 Jun 2026 13:22:36 +0000 Subject: [PATCH 01/14] DataModelState --- bloat-check/src/bin/bloat-check.rs | 38 +-- examples/src/bin/bridge.rs | 21 +- examples/src/bin/camera_tests.rs | 25 +- examples/src/bin/dimmable_light.rs | 69 +---- examples/src/bin/light_tests.rs | 40 +-- examples/src/bin/media_player.rs | 19 +- examples/src/bin/onoff_light.rs | 67 +---- examples/src/bin/onoff_light_bt.rs | 28 +- examples/src/bin/onoff_light_switch.rs | 59 ++--- examples/src/bin/onoff_light_work_stealing.rs | 42 +-- examples/src/bin/ota_requestor.rs | 49 ++-- examples/src/bin/scenes_tests.rs | 41 +-- examples/src/bin/speaker.rs | 21 +- examples/src/bin/system_tests.rs | 40 +-- examples/src/bin/webrtc_camera.rs | 26 +- rs-matter/src/dm.rs | 240 +++++++++++++----- rs-matter/src/respond.rs | 4 +- rs-matter/tests/commissioning.rs | 28 +- rs-matter/tests/common/e2e.rs | 16 +- rs-matter/tests/data_model/events.rs | 6 +- 20 files changed, 361 insertions(+), 518 deletions(-) diff --git a/bloat-check/src/bin/bloat-check.rs b/bloat-check/src/bin/bloat-check.rs index 48431e30e..c72b8037e 100644 --- a/bloat-check/src/bin/bloat-check.rs +++ b/bloat-check/src/bin/bloat-check.rs @@ -69,14 +69,16 @@ use rs_matter::dm::clusters::wifi_diag::{ use rs_matter::dm::devices::test::{DAC_PRIVKEY, TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; use rs_matter::dm::devices::DEV_TYPE_ON_OFF_LIGHT; use rs_matter::dm::endpoints::WifiSysHandler; -use rs_matter::dm::events::{Events, DEFAULT_MAX_EVENTS_BUF_SIZE}; +use rs_matter::dm::events::DEFAULT_MAX_EVENTS_BUF_SIZE; use rs_matter::dm::networks::wireless::{ NetCtlState, NetCtlStateMutex, NetCtlWithStatusImpl, WifiNetworks, WirelessMgr, MAX_CREDS_SIZE, }; use rs_matter::dm::networks::NetChangeNotif; -use rs_matter::dm::subscriptions::{Subscriptions, DEFAULT_MAX_SUBSCRIPTIONS}; +use rs_matter::dm::subscriptions::DEFAULT_MAX_SUBSCRIPTIONS; use rs_matter::dm::{endpoints, IMBuffer}; -use rs_matter::dm::{Async, DataModel, Dataver, Endpoint, EpClMatcher, Node}; +use rs_matter::dm::{ + Async, DataModel, Dataver, Endpoint, EpClMatcher, Node, WirelessDataModelState, +}; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; @@ -155,9 +157,9 @@ macro_rules! unwrap { struct MatterStack<'a> { matter: Matter<'a>, buffers: PooledBuffers<10, IMBuffer>, - subscriptions: Subscriptions, - events: Events, - networks: SharedNetworks>, + // The data model's consolidated state: subscriptions table, events queue and + // the (Wifi) network store, all behind `DataModelState`. + state: WirelessDataModelState>, net_ctl_state: NetCtlStateMutex, btp: Btp, wireless_mgr_buffer: MaybeUninit<[u8; MAX_CREDS_SIZE]>, @@ -176,9 +178,7 @@ impl<'a> MatterStack<'a> { MATTER_PORT, ), buffers <- PooledBuffers::init(0), - subscriptions <- Subscriptions::init(), - events <- Events::init(), - networks <- SharedNetworks::init(WifiNetworks::init()), + state <- WirelessDataModelState::init(WifiNetworks::init()), net_ctl_state <- NetCtlState::init_with_mutex(), btp <- Btp::init(), wireless_mgr_buffer: MaybeUninit::zeroed(), @@ -208,7 +208,7 @@ type AppDataModel<'a> = DataModel< PooledBuffers<10, IMBuffer>, (Node<'a>, &'a AppDmHandler<'a>), SharedKvBlobStore, - &'a AppNetworks, + WifiNetworks<3>, >; type AppResponder<'d, 'a> = DefaultResponder< 'd, @@ -219,7 +219,7 @@ type AppResponder<'d, 'a> = DefaultResponder< PooledBuffers<10, IMBuffer>, (Node<'a>, &'a AppDmHandler<'a>), SharedKvBlobStore, - &'a AppNetworks, + WifiNetworks<3>, >; #[cfg_attr(target_os = "none", main)] @@ -272,11 +272,15 @@ fn main() -> ! { report_size("Buffers", size_of_val(&stack.buffers), &mut stack_total); report_size( "Subscriptions", - size_of_val(&stack.subscriptions), + size_of_val(stack.state.subscriptions()), + &mut stack_total, + ); + report_size("Events", size_of_val(stack.state.events()), &mut stack_total); + report_size( + "Networks", + size_of_val(stack.state.networks()), &mut stack_total, ); - report_size("Events", size_of_val(&stack.events), &mut stack_total); - report_size("Networks", size_of_val(&stack.networks), &mut stack_total); report_size( "NetCtl state", size_of_val(&stack.net_ctl_state), @@ -313,7 +317,7 @@ fn main() -> ! { // Wifi network manager (cycle registered networks, auto-reconnect) let wifi_mgr = mk_static!( AppWirelessMgr, - WirelessMgr::new(&stack.networks, net_ctl, unsafe { + WirelessMgr::new(stack.state.networks(), net_ctl, unsafe { stack.wireless_mgr_buffer.assume_init_mut() },) ); @@ -354,11 +358,9 @@ fn main() -> ! { &stack.matter, crypto, &stack.buffers, - &stack.subscriptions, - &stack.events, (NODE, handler), kv, - &stack.networks, + &stack.state, ) ); diff --git a/examples/src/bin/bridge.rs b/examples/src/bin/bridge.rs index ed569be07..525f4e388 100644 --- a/examples/src/bin/bridge.rs +++ b/examples/src/bin/bridge.rs @@ -32,17 +32,14 @@ use rs_matter::dm::clusters::app::level_control::LevelControlHooks; use rs_matter::dm::clusters::app::on_off::{self, test::TestOnOffDeviceLogic, OnOffHooks}; use rs_matter::dm::clusters::desc::{self, ClusterHandler as _}; use rs_matter::dm::clusters::groups::{self, ClusterHandler as _}; -use rs_matter::dm::clusters::net_comm::SharedNetworks; use rs_matter::dm::devices::test::{DAC_PRIVKEY, TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; use rs_matter::dm::devices::{DEV_TYPE_AGGREGATOR, DEV_TYPE_BRIDGED_NODE, DEV_TYPE_ON_OFF_LIGHT}; use rs_matter::dm::endpoints; -use rs_matter::dm::events::Events; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::subscriptions::Subscriptions; use rs_matter::dm::{ - Async, Cluster, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, InvokeContext, - Node, ReadContext, + Async, Cluster, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, + InvokeContext, Node, ReadContext, }; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -71,20 +68,18 @@ fn main() -> Result<(), Error> { // Create the Matter object let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); - // Create the events - let mut events: Events = Events::new(); - // Persistence let mut kv_buf = [0; 4096]; let mut kv = DirKvBlobStore::new_default(); futures_lite::future::block_on(matter.load_persist(&mut kv, &mut kv_buf))?; - futures_lite::future::block_on(events.load_persist(&mut kv, &mut kv_buf))?; // Create the transport buffers let buffers = PooledBuffers::<10, _>::new(0); - // Create the subscriptions - let subscriptions: Subscriptions = Subscriptions::new(); + // Create the data model state (subscriptions, events, network store) and load + // the persisted event counter. + let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); + futures_lite::future::block_on(state.load_persist(&mut kv, &mut kv_buf))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -108,11 +103,9 @@ fn main() -> Result<(), Error> { &matter, &crypto, &buffers, - &subscriptions, - &events, dm_handler(rand, &on_off_handler_ep2, &on_off_handler_ep3), SharedKvBlobStore::new(kv, kv_buf.as_mut_slice()), - SharedNetworks::new(EthNetwork::new_default()), + &state, ); // Create a default responder capable of handling up to 3 subscriptions diff --git a/examples/src/bin/camera_tests.rs b/examples/src/bin/camera_tests.rs index 1e30c0347..18b588ed4 100644 --- a/examples/src/bin/camera_tests.rs +++ b/examples/src/bin/camera_tests.rs @@ -35,8 +35,6 @@ use embassy_futures::select::select3; use futures_lite::StreamExt; -use log::info; - use rand::RngCore; use rs_matter::crypto::{default_crypto, Crypto}; @@ -70,16 +68,13 @@ use rs_matter::dm::clusters::decl::globals::ICECandidateStruct; use rs_matter::dm::clusters::decl::globals::WebRTCEndReasonEnum; use rs_matter::dm::clusters::desc::{self, ClusterHandler as _}; use rs_matter::dm::clusters::groups::{self, ClusterHandler as _}; -use rs_matter::dm::clusters::net_comm::SharedNetworks; use rs_matter::dm::devices::test::{DAC_PRIVKEY, TEST_DEV_ATT, TEST_DEV_DET}; -use rs_matter::dm::events::NoEvents; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::subscriptions::Subscriptions; use rs_matter::dm::{endpoints, DataModel}; use rs_matter::dm::{ ArrayAttributeRead, Async, DataModelHandler, Dataver, DeviceType, Endpoint, EpClMatcher, - InvokeContext, Node, ReadContext, WriteContext, + EthDataModelState, InvokeContext, Node, ReadContext, WriteContext, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::im::FabricIndex; @@ -376,7 +371,6 @@ type WebRtc = WebRtcProvHandler = StaticCell::new(); static BUFFERS: StaticCell> = StaticCell::new(); -static SUBSCRIPTIONS: StaticCell = StaticCell::new(); static KV_BUF: StaticCell<[u8; 4096]> = StaticCell::new(); static WEBRTC: StaticCell = StaticCell::new(); static CAM_AV: StaticCell = StaticCell::new(); @@ -416,7 +410,11 @@ fn main() -> Result<(), Error> { futures_lite::future::block_on(matter.load_persist(&mut kv, kv_buf))?; let buffers = BUFFERS.uninit().init_with(PooledBuffers::init(0)); - let subscriptions = SUBSCRIPTIONS.uninit().init_with(Subscriptions::init()); + + // Create the data model state (subscriptions, events, network store) and load + // the persisted event counter. + let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); + futures_lite::future::block_on(state.load_persist(&mut kv, kv_buf))?; let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); let mut rand = crypto.rand()?; @@ -561,19 +559,10 @@ fn main() -> Result<(), Error> { let chime = ChimeHandler::new(Dataver::new_rand(&mut rand)); - info!( - "Matter memory: Matter (BSS)={}B, IM Buffers (BSS)={}B", - core::mem::size_of::(), - core::mem::size_of::>(), - ); - - let events = NoEvents::new(); let dm = DataModel::new( matter, &crypto, buffers, - subscriptions, - &events, dm_handler( rand, webrtc, @@ -584,7 +573,7 @@ fn main() -> Result<(), Error> { chime, ), SharedKvBlobStore::new(kv, kv_buf), - SharedNetworks::new(EthNetwork::new_default()), + &state, ); let responder = DefaultResponder::new(&dm); diff --git a/examples/src/bin/dimmable_light.rs b/examples/src/bin/dimmable_light.rs index 5716f87e3..b566579ce 100644 --- a/examples/src/bin/dimmable_light.rs +++ b/examples/src/bin/dimmable_light.rs @@ -43,17 +43,15 @@ use rs_matter::dm::clusters::decl::level_control::{ use rs_matter::dm::clusters::decl::on_off as on_off_cluster; use rs_matter::dm::clusters::desc::{self, ClusterHandler as _}; use rs_matter::dm::clusters::groups::{self, ClusterHandler as _}; -use rs_matter::dm::clusters::net_comm::SharedNetworks; use rs_matter::dm::devices::test::{DAC_PRIVKEY, TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; use rs_matter::dm::devices::DEV_TYPE_DIMMABLE_LIGHT; use rs_matter::dm::endpoints; -use rs_matter::dm::events::Events; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::subscriptions::Subscriptions; use rs_matter::dm::IMBuffer; use rs_matter::dm::{ - Async, Cluster, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, Node, + Async, Cluster, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, + Node, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::pairing::qr::QrTextType; @@ -63,58 +61,32 @@ use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::tlv::Nullable; use rs_matter::transport::MATTER_SOCKET_BIND_ADDR; -use rs_matter::utils::init::InitMaybeUninit; use rs_matter::utils::select::Coalesce; use rs_matter::utils::storage::pooled::PooledBuffers; use rs_matter::{clusters, devices, root_endpoint, with, Matter, MATTER_PORT}; -use static_cell::StaticCell; - #[path = "../common/mdns.rs"] mod mdns; -// Statically allocate in BSS the bigger objects -// `rs-matter` supports efficient initialization of BSS objects (with `init`) -// as well as just allocating the objects on-stack or on the heap. -static MATTER: StaticCell = StaticCell::new(); -static BUFFERS: StaticCell> = StaticCell::new(); -static SUBSCRIPTIONS: StaticCell = StaticCell::new(); -static EVENTS: StaticCell = StaticCell::new(); -static KV_BUF: StaticCell<[u8; 4096]> = StaticCell::new(); - fn main() -> Result<(), Error> { env_logger::init_from_env( env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"), ); - info!( - "Matter memory: Matter (BSS)={}B, IM Buffers (BSS)={}B, Subscriptions (BSS)={}B", - core::mem::size_of::(), - core::mem::size_of::>(), - core::mem::size_of::() - ); - - let matter = MATTER.uninit().init_with(Matter::init( - &TEST_DEV_DET, - TEST_DEV_COMM, - &TEST_DEV_ATT, - MATTER_PORT, - )); - - // Create the event queue - let events = EVENTS.uninit().init_with(Events::init()); + let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); // Persistence - let kv_buf = KV_BUF.uninit().init_zeroed().as_mut_slice(); + let mut kv_buf = [0u8; 4096]; let mut kv = rs_matter::persist::DirKvBlobStore::new_default(); - futures_lite::future::block_on(matter.load_persist(&mut kv, kv_buf))?; - futures_lite::future::block_on(events.load_persist(&mut kv, kv_buf))?; + futures_lite::future::block_on(matter.load_persist(&mut kv, &mut kv_buf))?; // Create the transport buffers - let buffers = BUFFERS.uninit().init_with(PooledBuffers::init(0)); + let buffers = PooledBuffers::<10, IMBuffer>::new(0); - // Create the subscriptions - let subscriptions = SUBSCRIPTIONS.uninit().init_with(Subscriptions::init()); + // Create the data model state (subscriptions, events, network store) and load + // the persisted event counter. + let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); + futures_lite::future::block_on(state.load_persist(&mut kv, &mut kv_buf))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -143,24 +115,17 @@ fn main() -> Result<(), Error> { // Create the Data Model instance let dm = DataModel::new( - matter, + &matter, &crypto, - buffers, - subscriptions, - events, + &buffers, dm_handler(rand, &on_off_handler, &level_control_handler), SharedKvBlobStore::new(kv, kv_buf), - SharedNetworks::new(EthNetwork::new_default()), + &state, ); // Create a default responder capable of handling up to 3 subscriptions // All other subscription requests will be turned down with "resource exhausted" let responder = DefaultResponder::new(&dm); - info!( - "Responder memory: Responder (stack)={}B, Runner fut (stack)={}B", - core::mem::size_of_val(&responder), - core::mem::size_of_val(&responder.run::<4, 4>()) - ); // Run the responder with up to 4 handlers (i.e. 4 exchanges can be handled simultaneously) // Clients trying to open more exchanges than the ones currently running will get "I'm busy, please try again later" @@ -171,14 +136,8 @@ fn main() -> Result<(), Error> { let socket = async_io::Async::::bind(MATTER_SOCKET_BIND_ADDR)?; - info!( - "Transport memory: Transport fut (stack)={}B, mDNS fut (stack)={}B", - core::mem::size_of_val(&matter.run(&crypto, &socket, &socket, &socket)), - core::mem::size_of_val(&mdns::run_mdns(matter, &crypto)) - ); - // Run the Matter and mDNS transports - let mut mdns = pin!(mdns::run_mdns(matter, &crypto)); + let mut mdns = pin!(mdns::run_mdns(&matter, &crypto)); let mut transport = pin!(matter.run(&crypto, &socket, &socket, &socket)); // We need to always print the QR text, because the test runner expects it to be printed diff --git a/examples/src/bin/light_tests.rs b/examples/src/bin/light_tests.rs index f1afa0537..11c3cc0cd 100644 --- a/examples/src/bin/light_tests.rs +++ b/examples/src/bin/light_tests.rs @@ -46,17 +46,15 @@ use rs_matter::dm::clusters::decl::level_control::{ use rs_matter::dm::clusters::decl::on_off as on_off_cluster; use rs_matter::dm::clusters::desc::{self, ClusterHandler as _}; use rs_matter::dm::clusters::groups::{self, ClusterHandler as _}; -use rs_matter::dm::clusters::net_comm::SharedNetworks; use rs_matter::dm::devices::test::{DAC_PRIVKEY, TEST_DEV_ATT, TEST_DEV_DET}; use rs_matter::dm::devices::DEV_TYPE_EXTENDED_COLOR_LIGHT; use rs_matter::dm::endpoints; -use rs_matter::dm::events::Events; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::subscriptions::Subscriptions; use rs_matter::dm::IMBuffer; use rs_matter::dm::{ - Async, Cluster, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, Node, + Async, Cluster, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, + Node, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::pairing::qr::QrTextType; @@ -80,8 +78,7 @@ mod args; static MATTER: StaticCell = StaticCell::new(); static BUFFERS: StaticCell> = StaticCell::new(); -static SUBSCRIPTIONS: StaticCell = StaticCell::new(); -static EVENTS: StaticCell = StaticCell::new(); +static STATE: StaticCell = StaticCell::new(); static KV_BUF: StaticCell<[u8; 4096]> = StaticCell::new(); fn main() -> Result<(), Error> { @@ -102,13 +99,6 @@ fn run() -> Result<(), Error> { .filter_level(::log::LevelFilter::Debug) .init(); - info!( - "Matter memory: Matter (BSS)={}B, IM Buffers (BSS)={}B, Subscriptions (BSS)={}B", - core::mem::size_of::(), - core::mem::size_of::>(), - core::mem::size_of::() - ); - let matter = MATTER.uninit().init_with(Matter::init( &TEST_DEV_DET, args::comm_overrides(), @@ -116,15 +106,16 @@ fn run() -> Result<(), Error> { args::port_override(), )); - let events = EVENTS.uninit().init_with(Events::init()); - let kv_buf = KV_BUF.uninit().init_zeroed().as_mut_slice(); let mut kv = args::file_kv_store(); futures_lite::future::block_on(matter.load_persist(&mut kv, kv_buf))?; - futures_lite::future::block_on(events.load_persist(&mut kv, kv_buf))?; let buffers = BUFFERS.uninit().init_with(PooledBuffers::init(0)); - let subscriptions = SUBSCRIPTIONS.uninit().init_with(Subscriptions::init()); + + // Create the data model state (subscriptions, events, network store) and load + // the persisted event counter. + let state = STATE.init(EthDataModelState::new(EthNetwork::new_default())); + futures_lite::future::block_on(state.load_persist(&mut kv, kv_buf))?; let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); let mut rand = crypto.rand()?; @@ -163,8 +154,6 @@ fn run() -> Result<(), Error> { matter, &crypto, buffers, - subscriptions, - events, dm_handler( rand, &on_off_handler, @@ -172,27 +161,16 @@ fn run() -> Result<(), Error> { &color_control_handler, ), SharedKvBlobStore::new(kv, kv_buf), - SharedNetworks::new(EthNetwork::new_default()), + state, ); let responder = DefaultResponder::new(&dm); - info!( - "Responder memory: Responder (stack)={}B, Runner fut (stack)={}B", - core::mem::size_of_val(&responder), - core::mem::size_of_val(&responder.run::<4, 4>()) - ); let mut respond = pin!(responder.run::<4, 4>()); let mut dm_job = pin!(dm.run()); let socket = async_io::Async::::bind(args::bind_addr())?; - info!( - "Transport memory: Transport fut (stack)={}B, mDNS fut (stack)={}B", - core::mem::size_of_val(&matter.run(&crypto, &socket, &socket, &socket)), - core::mem::size_of_val(&mdns::run_mdns(matter, &crypto)) - ); - let mut mdns = pin!(mdns::run_mdns(matter, &crypto)); let mut transport = pin!(matter.run(&crypto, &socket, &socket, &socket)); diff --git a/examples/src/bin/media_player.rs b/examples/src/bin/media_player.rs index a4a706311..921932f43 100644 --- a/examples/src/bin/media_player.rs +++ b/examples/src/bin/media_player.rs @@ -52,17 +52,14 @@ use rs_matter::dm::clusters::decl::media_playback::{ SkipBackwardRequest, SkipForwardRequest, StatusEnum, }; use rs_matter::dm::clusters::desc::{self, ClusterHandler as _}; -use rs_matter::dm::clusters::net_comm::SharedNetworks; use rs_matter::dm::devices::test::{DAC_PRIVKEY, TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; use rs_matter::dm::devices::DEV_TYPE_CASTING_VIDEO_PLAYER; use rs_matter::dm::endpoints; -use rs_matter::dm::events::Events; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::subscriptions::Subscriptions; use rs_matter::dm::{ ArrayAttributeRead, Async, Cluster, DataModel, DataModelHandler, Dataver, Endpoint, - EpClMatcher, InvokeContext, Node, ReadContext, + EpClMatcher, EthDataModelState, InvokeContext, Node, ReadContext, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::pairing::qr::QrTextType; @@ -87,20 +84,18 @@ fn main() -> Result<(), Error> { // Create the Matter object let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); - // Create the event queue - let mut events: Events = Events::new(); - // Persistence let mut kv_buf = [0; 4096]; let mut kv = DirKvBlobStore::new_default(); futures_lite::future::block_on(matter.load_persist(&mut kv, &mut kv_buf))?; - futures_lite::future::block_on(events.load_persist(&mut kv, &mut kv_buf))?; // Create the transport buffers let buffers = PooledBuffers::<10, _>::new(0); - // Create the subscriptions - let subscriptions: Subscriptions = Subscriptions::new(); + // Create the data model state (subscriptions, events, network store) and load + // the persisted event counter. + let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); + futures_lite::future::block_on(state.load_persist(&mut kv, &mut kv_buf))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -119,11 +114,9 @@ fn main() -> Result<(), Error> { &matter, &crypto, &buffers, - &subscriptions, - &events, dm_handler(rand, &on_off_handler), SharedKvBlobStore::new(kv, kv_buf.as_mut_slice()), - SharedNetworks::new(EthNetwork::new_default()), + &state, ); // Create a default responder capable of handling up to 3 subscriptions diff --git a/examples/src/bin/onoff_light.rs b/examples/src/bin/onoff_light.rs index dba82e327..63c4cb24e 100644 --- a/examples/src/bin/onoff_light.rs +++ b/examples/src/bin/onoff_light.rs @@ -23,8 +23,6 @@ use std::net::UdpSocket; use embassy_futures::select::select4; -use log::info; - use rand::RngCore; use rs_matter::crypto::{default_crypto, Crypto}; @@ -32,16 +30,15 @@ use rs_matter::dm::clusters::app::level_control::LevelControlHooks; use rs_matter::dm::clusters::app::on_off::{self, test::TestOnOffDeviceLogic, OnOffHooks}; use rs_matter::dm::clusters::desc::{self, ClusterHandler as _}; use rs_matter::dm::clusters::groups::{self, ClusterHandler as _}; -use rs_matter::dm::clusters::net_comm::SharedNetworks; use rs_matter::dm::devices::test::{DAC_PRIVKEY, TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; use rs_matter::dm::devices::DEV_TYPE_ON_OFF_LIGHT; use rs_matter::dm::endpoints; -use rs_matter::dm::events::NoEvents; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::subscriptions::Subscriptions; use rs_matter::dm::IMBuffer; -use rs_matter::dm::{Async, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, Node}; +use rs_matter::dm::{ + Async, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, Node, +}; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; @@ -49,53 +46,30 @@ use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::transport::MATTER_SOCKET_BIND_ADDR; -use rs_matter::utils::init::InitMaybeUninit; use rs_matter::utils::select::Coalesce; use rs_matter::utils::storage::pooled::PooledBuffers; use rs_matter::{clusters, devices, root_endpoint, Matter, MATTER_PORT}; -use static_cell::StaticCell; - #[path = "../common/mdns.rs"] mod mdns; -// Statically allocate in BSS the bigger objects -// `rs-matter` supports efficient initialization of BSS objects (with `init`) -// as well as just allocating the objects on-stack or on the heap. -static MATTER: StaticCell = StaticCell::new(); -static BUFFERS: StaticCell> = StaticCell::new(); -static SUBSCRIPTIONS: StaticCell = StaticCell::new(); -static KV_BUF: StaticCell<[u8; 4096]> = StaticCell::new(); - fn main() -> Result<(), Error> { env_logger::init_from_env( env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"), ); - info!( - "Matter memory: Matter (BSS)={}B, IM Buffers (BSS)={}B, Subscriptions (BSS)={}B", - core::mem::size_of::(), - core::mem::size_of::>(), - core::mem::size_of::() - ); - - let matter = MATTER.uninit().init_with(Matter::init( - &TEST_DEV_DET, - TEST_DEV_COMM, - &TEST_DEV_ATT, - MATTER_PORT, - )); + let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); // Persistence - let kv_buf = KV_BUF.uninit().init_zeroed().as_mut_slice(); + let mut kv_buf = [0u8; 4096]; let mut kv = DirKvBlobStore::new_default(); - futures_lite::future::block_on(matter.load_persist(&mut kv, kv_buf))?; + futures_lite::future::block_on(matter.load_persist(&mut kv, &mut kv_buf))?; // Create the transport buffers - let buffers = BUFFERS.uninit().init_with(PooledBuffers::init(0)); + let buffers = PooledBuffers::<10, IMBuffer>::new(0); - // Create the subscriptions - let subscriptions = SUBSCRIPTIONS.uninit().init_with(Subscriptions::init()); + // Create the data model state (subscriptions table, events queue, network store) + let state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -109,28 +83,19 @@ fn main() -> Result<(), Error> { TestOnOffDeviceLogic::new(true), ); - let events = NoEvents::new(); - // Create the Data Model instance let dm = DataModel::new( - matter, + &matter, &crypto, - buffers, - subscriptions, - &events, + &buffers, dm_handler(rand, &on_off_handler), SharedKvBlobStore::new(kv, kv_buf), - SharedNetworks::new(EthNetwork::new_default()), + &state, ); // Create a default responder capable of handling up to 3 subscriptions // All other subscription requests will be turned down with "resource exhausted" let responder = DefaultResponder::new(&dm); - info!( - "Responder memory: Responder (stack)={}B, Runner fut (stack)={}B", - core::mem::size_of_val(&responder), - core::mem::size_of_val(&responder.run::<4, 4>()) - ); // Run the responder with up to 4 handlers (i.e. 4 exchanges can be handled simultaneously) // Clients trying to open more exchanges than the ones currently running will get "I'm busy, please try again later" @@ -142,14 +107,8 @@ fn main() -> Result<(), Error> { // Create, load and run the persister let socket = async_io::Async::::bind(MATTER_SOCKET_BIND_ADDR)?; - info!( - "Transport memory: Transport fut (stack)={}B, mDNS fut (stack)={}B", - core::mem::size_of_val(&matter.run(&crypto, &socket, &socket, &socket)), - core::mem::size_of_val(&mdns::run_mdns(matter, &crypto)) - ); - // Run the Matter and mDNS transports - let mut mdns = pin!(mdns::run_mdns(matter, &crypto)); + let mut mdns = pin!(mdns::run_mdns(&matter, &crypto)); let mut transport = pin!(matter.run(&crypto, &socket, &socket, &socket)); if !matter.is_commissioned() { diff --git a/examples/src/bin/onoff_light_bt.rs b/examples/src/bin/onoff_light_bt.rs index 80ca7e95d..a4c4a5ff3 100644 --- a/examples/src/bin/onoff_light_bt.rs +++ b/examples/src/bin/onoff_light_bt.rs @@ -45,16 +45,17 @@ use rs_matter::dm::clusters::app::level_control::LevelControlHooks; use rs_matter::dm::clusters::app::on_off::{self, test::TestOnOffDeviceLogic, OnOffHooks}; use rs_matter::dm::clusters::desc::{self, ClusterHandler as _}; use rs_matter::dm::clusters::groups::{self, ClusterHandler as _}; -use rs_matter::dm::clusters::net_comm::{NetCtl, NetCtlStatus, SharedNetworks}; +use rs_matter::dm::clusters::net_comm::{NetCtl, NetCtlStatus}; use rs_matter::dm::clusters::wifi_diag::WifiDiag; use rs_matter::dm::devices::test::{DAC_PRIVKEY, TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; use rs_matter::dm::devices::DEV_TYPE_ON_OFF_LIGHT; use rs_matter::dm::endpoints; -use rs_matter::dm::events::Events; use rs_matter::dm::networks::unix::UnixNetifs; use rs_matter::dm::networks::wireless::{NetCtlState, NetCtlWithStatusImpl, WifiNetworks}; -use rs_matter::dm::subscriptions::Subscriptions; -use rs_matter::dm::{Async, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, Node}; +use rs_matter::dm::{ + Async, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, Node, + WirelessDataModelState, +}; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; @@ -121,26 +122,23 @@ fn run(connection: &Connection, net_ctl: N) -> Result<(), // Create the Matter object let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); - // A storage for the Wifi networks + // A storage for the Wifi networks, re-hydrated from persistence. let mut networks = WifiNetworks::<3>::new(); - // Create the event queue - let mut events: Events = Events::new(); - // Persistence let mut kv_buf = [0; 4096]; let mut kv = DirKvBlobStore::new_default(); futures_lite::future::block_on(matter.load_persist(&mut kv, &mut kv_buf))?; futures_lite::future::block_on(networks.load_persist(&mut kv, &mut kv_buf))?; - futures_lite::future::block_on(events.load_persist(&mut kv, &mut kv_buf))?; - - let networks = SharedNetworks::new(networks); // Create the transport buffers let buffers = PooledBuffers::<10, _>::new(0); - // Create the subscriptions - let subscriptions: Subscriptions = Subscriptions::new(); + // Create the data model state (subscriptions, events, the Wifi network store) + // and load the persisted event counter. The (raw) network store was loaded + // above, before being moved into the state. + let mut state: WirelessDataModelState> = WirelessDataModelState::new(networks); + futures_lite::future::block_on(state.load_persist(&mut kv, &mut kv_buf))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -164,11 +162,9 @@ fn run(connection: &Connection, net_ctl: N) -> Result<(), &matter, &crypto, &buffers, - &subscriptions, - &events, dm_handler(rand, &on_off_handler, &net_ctl, &net_ctl), SharedKvBlobStore::new(kv, kv_buf.as_mut_slice()), - &networks, + &state, ); // Create a default responder capable of handling up to 3 subscriptions diff --git a/examples/src/bin/onoff_light_switch.rs b/examples/src/bin/onoff_light_switch.rs index 012babd68..3eafb54a2 100644 --- a/examples/src/bin/onoff_light_switch.rs +++ b/examples/src/bin/onoff_light_switch.rs @@ -54,17 +54,15 @@ use rs_matter::dm::clusters::decl::switch::{ self, ClusterHandler as _, Feature as SwitchFeature, InitialPress, ShortRelease, }; use rs_matter::dm::clusters::desc::{self, ClusterHandler as _}; -use rs_matter::dm::clusters::net_comm::SharedNetworks; use rs_matter::dm::devices::test::{DAC_PRIVKEY, TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; use rs_matter::dm::devices::{DEV_TYPE_GENERIC_SWITCH, DEV_TYPE_ON_OFF_LIGHT_SWITCH}; use rs_matter::dm::endpoints; -use rs_matter::dm::events::Events; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::subscriptions::Subscriptions; use rs_matter::dm::IMBuffer; use rs_matter::dm::{ - Async, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, EventEmitter, Node, + Async, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, + EventEmitter, Node, }; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -73,7 +71,6 @@ use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::transport::exchange::Exchange; use rs_matter::transport::MATTER_SOCKET_BIND_ADDR; -use rs_matter::utils::init::InitMaybeUninit; use rs_matter::utils::select::Coalesce; use rs_matter::utils::storage::pooled::PooledBuffers; use rs_matter::{clusters, devices, root_endpoint, Matter, MATTER_PORT}; @@ -81,8 +78,6 @@ use rs_matter::{clusters, devices, root_endpoint, Matter, MATTER_PORT}; // `OnOffClient` brings the `.on_off()` IM-client method into scope on `Exchange`. use rs_matter::dm::clusters::app::on_off::OnOffClient as _; -use static_cell::StaticCell; - #[path = "../common/mdns.rs"] mod mdns; @@ -98,53 +93,41 @@ const GENERIC_SWITCH_ENDPOINT: u16 = 2; /// How many binding entries the device can hold (across all fabrics/endpoints). const MAX_BINDINGS: usize = 16; -static MATTER: StaticCell = StaticCell::new(); -static BUFFERS: StaticCell> = StaticCell::new(); -static SUBSCRIPTIONS: StaticCell = StaticCell::new(); -static KV_BUF: StaticCell<[u8; 4096]> = StaticCell::new(); -static BINDINGS: StaticCell> = StaticCell::new(); - fn main() -> Result<(), Error> { env_logger::init_from_env( env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"), ); - let matter = MATTER.uninit().init_with(Matter::init( - &TEST_DEV_DET, - TEST_DEV_COMM, - &TEST_DEV_ATT, - MATTER_PORT, - )); + let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); // Persistence - let kv_buf = KV_BUF.uninit().init_zeroed().as_mut_slice(); + let mut kv_buf = [0u8; 4096]; let mut kv = DirKvBlobStore::new_default(); - futures_lite::future::block_on(matter.load_persist(&mut kv, kv_buf))?; + futures_lite::future::block_on(matter.load_persist(&mut kv, &mut kv_buf))?; // The Binding registry (the switch's address book), loaded from persistence. - let bindings = BINDINGS.uninit().init_with(Bindings::init()); - futures_lite::future::block_on(bindings.load_persist(&mut kv, kv_buf))?; + let bindings = Bindings::::new(); + futures_lite::future::block_on(bindings.load_persist(&mut kv, &mut kv_buf))?; - let buffers = BUFFERS.uninit().init_with(PooledBuffers::init(0)); - let subscriptions = SUBSCRIPTIONS.uninit().init_with(Subscriptions::init()); + let buffers = PooledBuffers::<10, IMBuffer>::new(0); + + // Create the data model state. This device EMITS events (the Generic Switch + // press events), so - unlike the examples that use `NoEvents` - the default + // state carries a real (non-zero) event queue that holds them until + // subscribers read them. + let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); + futures_lite::future::block_on(state.load_persist(&mut kv, &mut kv_buf))?; let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); let rand = crypto.rand()?; - // A real (non-zero) event queue: this device EMITS events (the Generic - // Switch press events), so - unlike the other examples that use `NoEvents` - - // we need actual buffers to hold them until subscribers read them. - let events = Events::<256>::new(); - let dm = DataModel::new( - matter, + &matter, &crypto, - buffers, - subscriptions, - &events, - dm_handler(rand, bindings), + &buffers, + dm_handler(rand, &bindings), SharedKvBlobStore::new(kv, kv_buf), - SharedNetworks::new(EthNetwork::new_default()), + &state, ); let responder = rs_matter::respond::DefaultResponder::new(&dm); @@ -154,7 +137,7 @@ fn main() -> Result<(), Error> { let socket = async_io::Async::::bind(MATTER_SOCKET_BIND_ADDR)?; - let mut mdns = pin!(mdns::run_mdns(matter, &crypto)); + let mut mdns = pin!(mdns::run_mdns(&matter, &crypto)); let mut transport = pin!(matter.run(&crypto, &socket, &socket, &socket)); if !matter.is_commissioned() { @@ -166,7 +149,7 @@ fn main() -> Result<(), Error> { // The switch task: on each Enter, emit Generic Switch press events and // toggle every bound light. `&dm` is the `EventEmitter` used to publish the // Generic Switch events. - let mut switch = pin!(run_switch(matter, &crypto, bindings, &dm)); + let mut switch = pin!(run_switch(&matter, &crypto, &bindings, &dm)); // Combine the core Matter tasks, then add the switch task alongside. let mut core = pin!(select4(&mut transport, &mut mdns, &mut respond, &mut dm_job,).coalesce()); diff --git a/examples/src/bin/onoff_light_work_stealing.rs b/examples/src/bin/onoff_light_work_stealing.rs index 27b72459c..39e41388e 100644 --- a/examples/src/bin/onoff_light_work_stealing.rs +++ b/examples/src/bin/onoff_light_work_stealing.rs @@ -23,8 +23,6 @@ use std::net::UdpSocket; -use log::info; - use rand::{CryptoRng, RngCore}; use rs_matter::crypto::backend::rustcrypto::RustCrypto; @@ -32,16 +30,13 @@ use rs_matter::crypto::Crypto; use rs_matter::dm::clusters::app::on_off::NoLevelControl; use rs_matter::dm::clusters::app::on_off::{self, test::TestOnOffDeviceLogic, OnOffHooks}; use rs_matter::dm::clusters::desc::{self, ClusterHandler as _, DescHandler}; -use rs_matter::dm::clusters::net_comm::SharedNetworks; use rs_matter::dm::devices::test::{DAC_PRIVKEY, TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; use rs_matter::dm::devices::DEV_TYPE_ON_OFF_LIGHT; use rs_matter::dm::endpoints::{self, EthSysHandler}; -use rs_matter::dm::events::Events; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::subscriptions::Subscriptions; use rs_matter::dm::IMBuffer; -use rs_matter::dm::{Async, DataModel, Dataver, Endpoint, EpClMatcher, Node}; +use rs_matter::dm::{Async, DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, Node}; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; @@ -69,8 +64,7 @@ type AppDmHandler<'a> = handler_chain_type!( // as well as just allocating the objects on-stack or on the heap. static MATTER: StaticCell = StaticCell::new(); static BUFFERS: StaticCell> = StaticCell::new(); -static SUBSCRIPTIONS: StaticCell = StaticCell::new(); -static EVENTS: StaticCell = StaticCell::new(); +static STATE: StaticCell = StaticCell::new(); static CRYPTO: StaticCell> = StaticCell::new(); static KV_BUF: StaticCell<[u8; 4096]> = StaticCell::new(); @@ -79,13 +73,6 @@ fn main() -> Result<(), Error> { env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"), ); - info!( - "Matter memory: Matter (BSS)={}B, IM Buffers (BSS)={}B, Subscriptions (BSS)={}B", - core::mem::size_of::(), - core::mem::size_of::>(), - core::mem::size_of::() - ); - let matter = MATTER.uninit().init_with(Matter::init( &TEST_DEV_DET, TEST_DEV_COMM, @@ -93,20 +80,18 @@ fn main() -> Result<(), Error> { MATTER_PORT, )); - // Create the events - let events = EVENTS.uninit().init_with(Events::init()); - // Persistence let kv_buf = KV_BUF.uninit().init_zeroed().as_mut_slice(); let mut kv = DirKvBlobStore::new_default(); futures_lite::future::block_on(matter.load_persist(&mut kv, kv_buf))?; - futures_lite::future::block_on(events.load_persist(&mut kv, kv_buf))?; // Create the transport buffers let buffers = &*BUFFERS.uninit().init_with(PooledBuffers::init(0)); - // Create the subscriptions - let subscriptions = &*SUBSCRIPTIONS.uninit().init_with(Subscriptions::init()); + // Create the data model state (subscriptions, events, network store) and load + // the persisted event counter. + let state = STATE.init(EthDataModelState::new(EthNetwork::new_default())); + futures_lite::future::block_on(state.load_persist(&mut kv, kv_buf))?; // Create the crypto instance let crypto = &*CRYPTO.init(RustCrypto::new(FakeRng, DAC_PRIVKEY)); @@ -125,21 +110,14 @@ fn main() -> Result<(), Error> { matter, crypto, buffers, - subscriptions, - events, (NODE, dm_handler(rand, on_off_handler)), SharedKvBlobStore::new(kv, kv_buf), - SharedNetworks::new(EthNetwork::new_default()), + state, ); // Create a default responder capable of handling up to 3 subscriptions // All other subscription requests will be turned down with "resource exhausted" let responder = DefaultResponder::new(&dm); - info!( - "Responder memory: Responder (stack)={}B, Runner fut (stack)={}B", - core::mem::size_of_val(&responder), - core::mem::size_of_val(&responder.run::<4, 4>()) - ); // Run the responder with up to 4 handlers (i.e. 4 exchanges can be handled simultaneously) // Clients trying to open more exchanges than the ones currently running will get "I'm busy, please try again later" @@ -153,12 +131,6 @@ fn main() -> Result<(), Error> { // Create, load and run the persister let socket = async_io::Async::::bind(MATTER_SOCKET_BIND_ADDR)?; - info!( - "Transport memory: Transport fut (stack)={}B, mDNS fut (stack)={}B", - core::mem::size_of_val(&matter.run(crypto, &socket, &socket, &socket)), - core::mem::size_of_val(&mdns::run_mdns(matter, crypto)) - ); - // Run the Matter and mDNS transports #[allow(unused)] let mdns = mdns::run_mdns(matter, crypto); diff --git a/examples/src/bin/ota_requestor.rs b/examples/src/bin/ota_requestor.rs index 1806f59ad..5545c7448 100644 --- a/examples/src/bin/ota_requestor.rs +++ b/examples/src/bin/ota_requestor.rs @@ -41,7 +41,6 @@ use rand::RngCore; use rs_matter::bdx::BdxDownloadInitiator; use rs_matter::crypto::{default_crypto, Crypto}; use rs_matter::dm::clusters::desc::{self, ClusterHandler as _}; -use rs_matter::dm::clusters::net_comm::SharedNetworks; use rs_matter::dm::clusters::ota_prov::{DownloadProtocolEnum, OtaApplyOutcome, StatusEnum}; use rs_matter::dm::clusters::ota_req::{ parse_bdx_url, ClusterHandler as _, OtaRequestorHandler, OtaState, Provider, Providers, @@ -49,13 +48,12 @@ use rs_matter::dm::clusters::ota_req::{ use rs_matter::dm::devices::test::{DAC_PRIVKEY, TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; use rs_matter::dm::devices::DEV_TYPE_OTA_REQUESTOR; use rs_matter::dm::endpoints; -use rs_matter::dm::events::NoEvents; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::subscriptions::Subscriptions; use rs_matter::dm::IMBuffer; use rs_matter::dm::{ - Async, AttrChangeNotifier, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, Node, + Async, AttrChangeNotifier, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, + EthDataModelState, Node, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::pairing::qr::QrTextType; @@ -65,13 +63,10 @@ use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::transport::exchange::Exchange; use rs_matter::transport::MATTER_SOCKET_BIND_ADDR; -use rs_matter::utils::init::InitMaybeUninit; use rs_matter::utils::select::Coalesce; use rs_matter::utils::storage::pooled::PooledBuffers; use rs_matter::{clusters, devices, root_endpoint, Matter, MATTER_PORT}; -use static_cell::StaticCell; - #[path = "../common/mdns.rs"] mod mdns; @@ -87,55 +82,45 @@ const POLL_INTERVAL: Duration = Duration::from_secs(3600); /// The download protocols this requestor supports (BDX only, here). const PROTOCOLS: &[DownloadProtocolEnum] = &[DownloadProtocolEnum::BDXSynchronous]; -static MATTER: StaticCell = StaticCell::new(); -static BUFFERS: StaticCell> = StaticCell::new(); -static SUBSCRIPTIONS: StaticCell = StaticCell::new(); -static KV_BUF: StaticCell<[u8; 4096]> = StaticCell::new(); - fn main() -> Result<(), Error> { env_logger::init_from_env( env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "debug"), ); - let matter = MATTER.uninit().init_with(Matter::init( - &TEST_DEV_DET, - TEST_DEV_COMM, - &TEST_DEV_ATT, - MATTER_PORT, - )); + let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); // Persistence - let kv_buf = KV_BUF.uninit().init_zeroed().as_mut_slice(); + let mut kv_buf = [0u8; 4096]; let mut kv = DirKvBlobStore::new_default(); - futures_lite::future::block_on(matter.load_persist(&mut kv, kv_buf))?; + futures_lite::future::block_on(matter.load_persist(&mut kv, &mut kv_buf))?; // The OTA Requestor's persistent provider list, re-hydrated from storage. let providers = Providers::new(); - futures_lite::future::block_on(providers.load_persist(&mut kv, kv_buf))?; + futures_lite::future::block_on(providers.load_persist(&mut kv, &mut kv_buf))?; // The OTA Requestor's transient, reported update state, for the cluster on // endpoint 1 (see `NODE`). State changes are pushed to subscribers via the // data model's change-notifier (the `DataModel`, passed to the OTA loop below). let ota_state = OtaState::new(1); - let buffers = BUFFERS.uninit().init_with(PooledBuffers::init(0)); - let subscriptions = SUBSCRIPTIONS.uninit().init_with(Subscriptions::init()); + let buffers = PooledBuffers::<10, IMBuffer>::new(0); + + // Create the data model state (subscriptions, events, network store) and load + // the persisted event counter. + let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); + futures_lite::future::block_on(state.load_persist(&mut kv, &mut kv_buf))?; let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); let rand = crypto.rand()?; - let events = NoEvents::new(); - let dm = DataModel::new( - matter, + &matter, &crypto, - buffers, - subscriptions, - &events, + &buffers, dm_handler(rand, &providers, &ota_state), SharedKvBlobStore::new(kv, kv_buf), - SharedNetworks::new(EthNetwork::new_default()), + &state, ); let responder = DefaultResponder::new(&dm); @@ -144,13 +129,13 @@ fn main() -> Result<(), Error> { let socket = async_io::Async::::bind(MATTER_SOCKET_BIND_ADDR)?; - let mut mdns = pin!(mdns::run_mdns(matter, &crypto)); + let mut mdns = pin!(mdns::run_mdns(&matter, &crypto)); let mut transport = pin!(matter.run(&crypto, &socket, &socket, &socket)); // The application's OTA update loop, built from the cluster's building blocks. // The OTA loop shares the same crypto by reference (`&T: Crypto`), initiating // its own CASE exchanges to the provider. - let ota_job = pin!(run_ota(matter, &crypto, &providers, &ota_state, &dm)); + let ota_job = pin!(run_ota(&matter, &crypto, &providers, &ota_state, &dm)); if !matter.is_commissioned() { matter.print_standard_qr_text(DiscoveryCapabilities::IP)?; diff --git a/examples/src/bin/scenes_tests.rs b/examples/src/bin/scenes_tests.rs index e8fc1fb23..73b2ce1a7 100644 --- a/examples/src/bin/scenes_tests.rs +++ b/examples/src/bin/scenes_tests.rs @@ -47,7 +47,6 @@ use rs_matter::dm::clusters::decl::on_off as on_off_cluster; use rs_matter::dm::clusters::decl::scenes_management::FULL_CLUSTER as SCENES_FULL_CLUSTER; use rs_matter::dm::clusters::desc::{self, ClusterHandler as _}; use rs_matter::dm::clusters::groups::{self, ClusterHandler as _}; -use rs_matter::dm::clusters::net_comm::SharedNetworks; use rs_matter::dm::clusters::scenes::{ScenesHandler, ScenesState}; use rs_matter::dm::clusters::unit_testing::{ ClusterHandler as _, UnitTestingHandler, UnitTestingHandlerData, @@ -55,13 +54,12 @@ use rs_matter::dm::clusters::unit_testing::{ use rs_matter::dm::devices::test::{DAC_PRIVKEY, TEST_DEV_ATT, TEST_DEV_DET}; use rs_matter::dm::devices::DEV_TYPE_DIMMABLE_LIGHT; use rs_matter::dm::endpoints; -use rs_matter::dm::events::Events; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::subscriptions::Subscriptions; use rs_matter::dm::IMBuffer; use rs_matter::dm::{ - Async, Cluster, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, Node, + Async, Cluster, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, + Node, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::pairing::qr::QrTextType; @@ -89,8 +87,7 @@ mod args; // as well as just allocating the objects on-stack or on the heap. static MATTER: StaticCell = StaticCell::new(); static BUFFERS: StaticCell> = StaticCell::new(); -static SUBSCRIPTIONS: StaticCell = StaticCell::new(); -static EVENTS: StaticCell = StaticCell::new(); +static STATE: StaticCell = StaticCell::new(); static KV_BUF: StaticCell<[u8; 4096]> = StaticCell::new(); const SCENES_CAPACITY: usize = 16; @@ -126,13 +123,6 @@ fn run() -> Result<(), Error> { .filter_level(::log::LevelFilter::Debug) .init(); - info!( - "Matter memory: Matter (BSS)={}B, IM Buffers (BSS)={}B, Subscriptions (BSS)={}B", - core::mem::size_of::(), - core::mem::size_of::>(), - core::mem::size_of::() - ); - let matter = MATTER.uninit().init_with(Matter::init( &TEST_DEV_DET, args::comm_overrides(), @@ -140,20 +130,18 @@ fn run() -> Result<(), Error> { args::port_override(), )); - // Create the event queue - let events = EVENTS.uninit().init_with(Events::init()); - // Persistence let kv_buf = KV_BUF.uninit().init_zeroed().as_mut_slice(); let mut kv = args::file_kv_store(); futures_lite::future::block_on(matter.load_persist(&mut kv, kv_buf))?; - futures_lite::future::block_on(events.load_persist(&mut kv, kv_buf))?; // Create the transport buffers let buffers = BUFFERS.uninit().init_with(PooledBuffers::init(0)); - // Create the subscriptions - let subscriptions = SUBSCRIPTIONS.uninit().init_with(Subscriptions::init()); + // Create the data model state (subscriptions, events, network store) and load + // the persisted event counter. + let state = STATE.init(EthDataModelState::new(EthNetwork::new_default())); + futures_lite::future::block_on(state.load_persist(&mut kv, kv_buf))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -203,8 +191,6 @@ fn run() -> Result<(), Error> { matter, &crypto, buffers, - subscriptions, - events, dm_handler( rand, &on_off_handler, @@ -213,17 +199,12 @@ fn run() -> Result<(), Error> { unit_testing_data, ), SharedKvBlobStore::new(kv, kv_buf), - SharedNetworks::new(EthNetwork::new_default()), + state, ); // Create a default responder capable of handling up to 3 subscriptions // All other subscription requests will be turned down with "resource exhausted" let responder = DefaultResponder::new(&dm); - info!( - "Responder memory: Responder (stack)={}B, Runner fut (stack)={}B", - core::mem::size_of_val(&responder), - core::mem::size_of_val(&responder.run::<4, 4>()) - ); // Run the responder with up to 4 handlers (i.e. 4 exchanges can be handled simultaneously) // Clients trying to open more exchanges than the ones currently running will get "I'm busy, please try again later" @@ -234,12 +215,6 @@ fn run() -> Result<(), Error> { let socket = async_io::Async::::bind(args::bind_addr())?; - info!( - "Transport memory: Transport fut (stack)={}B, mDNS fut (stack)={}B", - core::mem::size_of_val(&matter.run(&crypto, &socket, &socket, &socket)), - core::mem::size_of_val(&mdns::run_mdns(matter, &crypto)) - ); - // Run the Matter and mDNS transports let mut mdns = pin!(mdns::run_mdns(matter, &crypto)); let mut transport = pin!(matter.run(&crypto, &socket, &socket, &socket)); diff --git a/examples/src/bin/speaker.rs b/examples/src/bin/speaker.rs index b07c3b459..d53a34d64 100644 --- a/examples/src/bin/speaker.rs +++ b/examples/src/bin/speaker.rs @@ -34,15 +34,14 @@ use rs_matter::dm::clusters::app::on_off::{ self, test::TestOnOffDeviceLogic, OnOffHandler, OnOffHooks, }; use rs_matter::dm::clusters::desc::{self, ClusterHandler as _}; -use rs_matter::dm::clusters::net_comm::SharedNetworks; use rs_matter::dm::devices::test::{DAC_PRIVKEY, TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; use rs_matter::dm::devices::DEV_TYPE_SMART_SPEAKER; use rs_matter::dm::endpoints; -use rs_matter::dm::events::Events; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::subscriptions::Subscriptions; -use rs_matter::dm::{Async, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, Node}; +use rs_matter::dm::{ + Async, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, Node, +}; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; @@ -66,20 +65,18 @@ fn main() -> Result<(), Error> { // Create the Matter object let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); - // Create the event queue - let mut events: Events = Events::new(); - // Persistence let mut kv_buf = [0; 4096]; let mut kv = DirKvBlobStore::new_default(); futures_lite::future::block_on(matter.load_persist(&mut kv, &mut kv_buf))?; - futures_lite::future::block_on(events.load_persist(&mut kv, &mut kv_buf))?; // Create the transport buffers let buffers = PooledBuffers::<10, _>::new(0); - // Create the subscriptions - let subscriptions: Subscriptions = Subscriptions::new(); + // Create the data model state (subscriptions, events, network store) and load + // the persisted event counter. + let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); + futures_lite::future::block_on(state.load_persist(&mut kv, &mut kv_buf))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -117,11 +114,9 @@ fn main() -> Result<(), Error> { &matter, &crypto, &buffers, - &subscriptions, - &events, dm_handler(rand, &on_off_handler, &level_control_handler), SharedKvBlobStore::new(kv, kv_buf.as_mut_slice()), - SharedNetworks::new(EthNetwork::new_default()), + &state, ); // Create a default responder capable of handling up to 3 subscriptions diff --git a/examples/src/bin/system_tests.rs b/examples/src/bin/system_tests.rs index 04c4b9814..bae0e5e5f 100644 --- a/examples/src/bin/system_tests.rs +++ b/examples/src/bin/system_tests.rs @@ -57,7 +57,7 @@ use rs_matter::dm::clusters::gen_diag::{self, ClusterHandler as _, GenDiag}; use rs_matter::dm::clusters::groups::{self, ClusterHandler as _}; use rs_matter::dm::clusters::grp_key_mgmt::{self, ClusterHandler as _}; use rs_matter::dm::clusters::identify::{self, IdentifyHandler}; -use rs_matter::dm::clusters::net_comm::{self, SharedNetworks}; +use rs_matter::dm::clusters::net_comm; use rs_matter::dm::clusters::noc::{self, ClusterHandler as _}; use rs_matter::dm::clusters::ota_prov::{ BdxBuffer, ClusterAsyncHandler, DownloadProtocolEnum, OtaBdxHandler, OtaImageMeta, OtaImages, @@ -74,13 +74,11 @@ use rs_matter::dm::clusters::user_label::{self, UserLabelHandler, UserLabels}; use rs_matter::dm::devices::test::{DAC_PRIVKEY, TEST_DEV_ATT, TEST_DEV_DET}; use rs_matter::dm::devices::{DEV_TYPE_ON_OFF_LIGHT, DEV_TYPE_ROOT_NODE}; use rs_matter::dm::endpoints::{self, ROOT_ENDPOINT_ID}; -use rs_matter::dm::events::Events; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::subscriptions::Subscriptions; use rs_matter::dm::{ Async, AttrChangeNotifier, Cluster, DataModel, DataModelHandler, Dataver, Endpoint, - EpClMatcher, Node, + EpClMatcher, EthDataModelState, Node, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::im::PROTO_ID_INTERACTION_MODEL; @@ -111,8 +109,6 @@ mod args; // as well as just allocating the objects on-stack or on the heap. static MATTER: StaticCell = StaticCell::new(); static BUFFERS: StaticCell> = StaticCell::new(); -static SUBSCRIPTIONS: StaticCell = StaticCell::new(); -static EVENTS: StaticCell = StaticCell::new(); static KV_BUF: StaticCell<[u8; 4096]> = StaticCell::new(); static UNIT_TESTING_DATA: StaticCell> = StaticCell::new(); static GEN_DIAG: StaticCell = StaticCell::new(); @@ -153,13 +149,6 @@ fn main() -> Result<(), Error> { .filter_level(::log::LevelFilter::Debug) .init(); - info!( - "Matter memory: Matter (BSS)={}B, IM Buffers (BSS)={}B, Subscriptions (BSS)={}B", - core::mem::size_of::(), - core::mem::size_of::>(), - core::mem::size_of::() - ); - // Optional `--discriminator ` / `--passcode ` overrides for the // hardcoded `TEST_DEV_COMM` defaults. Used by tests like TC-SC-7.1 that // assert the device is *not* using the spec-default `3840`/`20202021`. @@ -181,20 +170,18 @@ fn main() -> Result<(), Error> { .uninit() .init_with(Matter::init(&BASIC_INFO, comm_data, &TEST_DEV_ATT, port)); - // Create the event queue - let events = EVENTS.uninit().init_with(Events::init()); - // Persistence let kv_buf = KV_BUF.uninit().init_zeroed().as_mut_slice(); let mut kv = args::file_kv_store(); futures_lite::future::block_on(matter.load_persist(&mut kv, kv_buf))?; - futures_lite::future::block_on(events.load_persist(&mut kv, kv_buf))?; // Create the transport buffers let buffers = BUFFERS.uninit().init_with(PooledBuffers::init(0)); - // Create the subscriptions - let subscriptions = SUBSCRIPTIONS.uninit().init_with(Subscriptions::init()); + // Create the data model state (subscriptions, events, network store) and load + // the persisted event counter. + let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); + futures_lite::future::block_on(state.load_persist(&mut kv, kv_buf))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -295,8 +282,6 @@ fn main() -> Result<(), Error> { matter, &crypto, buffers, - subscriptions, - events, dm_handler( node, gen_diag, @@ -314,7 +299,7 @@ fn main() -> Result<(), Error> { log_provider, ), SharedKvBlobStore::new(kv, kv_buf), - SharedNetworks::new(EthNetwork::new_default()), + &state, ); // Responder = the default IM + Secure Channel handler chain, plus a BDX @@ -388,17 +373,6 @@ fn main() -> Result<(), Error> { (net_send, net_recv, net_multicast) }; - info!( - "Transport memory: Transport fut (stack)={}B, mDNS fut (stack)={}B", - core::mem::size_of_val(&matter.run( - &crypto, - &mut net_send, - &mut net_recv, - &mut net_multicast - )), - core::mem::size_of_val(&mdns::run_mdns(matter, &crypto)) - ); - // Run the Matter and mDNS transports let mut mdns = pin!(mdns::run_mdns(matter, &crypto)); let mut transport = pin!(matter.run(&crypto, &mut net_send, &mut net_recv, &mut net_multicast)); diff --git a/examples/src/bin/webrtc_camera.rs b/examples/src/bin/webrtc_camera.rs index 6dcf89a7d..7c64072db 100644 --- a/examples/src/bin/webrtc_camera.rs +++ b/examples/src/bin/webrtc_camera.rs @@ -104,17 +104,14 @@ use rs_matter::dm::clusters::basic_info::BasicInfoConfig; use rs_matter::dm::clusters::decl::globals::{ICECandidateStruct, WebRTCEndReasonEnum}; use rs_matter::dm::clusters::desc::{self, ClusterHandler as _}; use rs_matter::dm::clusters::groups::{self, ClusterHandler as _}; -use rs_matter::dm::clusters::net_comm::SharedNetworks; use rs_matter::dm::devices::test::{DAC_PRIVKEY, TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; use rs_matter::dm::endpoints; -use rs_matter::dm::events::NoEvents; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::unix::UnixNetifs; -use rs_matter::dm::subscriptions::Subscriptions; use rs_matter::dm::DataModel; use rs_matter::dm::DeviceType; use rs_matter::dm::IMBuffer; -use rs_matter::dm::{DataModelHandler, Dataver, Endpoint, EpClMatcher, Node}; +use rs_matter::dm::{DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, Node}; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; @@ -1104,7 +1101,7 @@ impl WebRtcHooks for Str0mHooks { static MATTER: StaticCell = StaticCell::new(); static BUFFERS: StaticCell> = StaticCell::new(); -static SUBSCRIPTIONS: StaticCell = StaticCell::new(); +static STATE: StaticCell = StaticCell::new(); static KV_BUF: StaticCell<[u8; 4096]> = StaticCell::new(); static WEBRTC: StaticCell = StaticCell::new(); static CAM_AV: StaticCell> = @@ -1154,14 +1151,6 @@ fn main() -> Result<(), Error> { .with_ansi(false) .init(); - info!( - "Matter memory: Matter (BSS)={}B, IM Buffers (BSS)={}B, Subscriptions (BSS)={}B, WebRtc (BSS)={}B", - core::mem::size_of::(), - core::mem::size_of::>(), - core::mem::size_of::(), - core::mem::size_of::(), - ); - let matter = MATTER.uninit().init_with(Matter::init( &BASIC_INFO, TEST_DEV_COMM, @@ -1174,7 +1163,11 @@ fn main() -> Result<(), Error> { futures_lite::future::block_on(matter.load_persist(&mut kv, kv_buf))?; let buffers = BUFFERS.uninit().init_with(PooledBuffers::init(0)); - let subscriptions = SUBSCRIPTIONS.uninit().init_with(Subscriptions::init()); + + // Create the data model state (subscriptions, events, network store) and load + // the persisted event counter. + let state = STATE.init(EthDataModelState::new(EthNetwork::new_default())); + futures_lite::future::block_on(state.load_persist(&mut kv, kv_buf))?; let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); let mut rand = crypto.rand()?; @@ -1300,16 +1293,13 @@ fn main() -> Result<(), Error> { DemoZoneHooks, )); - let events = NoEvents::new(); let dm = DataModel::new( matter, &crypto, buffers, - subscriptions, - &events, dm_handler(rand, webrtc, cam_av, cam_av_settings, zone_mgmt), SharedKvBlobStore::new(kv, kv_buf), - SharedNetworks::new(EthNetwork::new_default()), + state, ); let responder = DefaultResponder::new(&dm); diff --git a/rs-matter/src/dm.rs b/rs-matter/src/dm.rs index 8c498d5c1..5d2c206b1 100644 --- a/rs-matter/src/dm.rs +++ b/rs-matter/src/dm.rs @@ -23,8 +23,9 @@ use embassy_time::{Instant, Timer}; use crate::acl::Accessor; use crate::crypto::Crypto; -use crate::dm::clusters::net_comm::NetworksAccess; +use crate::dm::clusters::net_comm::{Networks, NetworksAccess, SharedNetworks}; use crate::dm::events::EventTLVWrite; +use crate::dm::networks::eth::EthNetwork; use crate::dm::subscriptions::SubscriptionsBuffers; use crate::error::{Error, ErrorCode}; use crate::im::{ @@ -32,7 +33,7 @@ use crate::im::{ ReadReq, ReportDataReq, ReportDataRespTag, StatusResp, SubscribeReq, SubscribeResp, TimedReq, WriteReq, WriteRespTag, IM_REVISION, PROTO_ID_INTERACTION_MODEL, }; -use crate::persist::KvBlobStoreAccess; +use crate::persist::{KvBlobStore, KvBlobStoreAccess}; use crate::respond::ExchangeHandler; use crate::tlv::{get_root_node_struct, FromTLV, Nullable, TLVElement, TLVTag, TLVWrite, ToTLV}; use crate::transport::exchange::{ @@ -43,8 +44,10 @@ use crate::utils::storage::pooled::BufferAccess; use crate::utils::storage::WriteBuf; use crate::Matter; -use events::Events; -use subscriptions::{ReportContext, Subscriptions}; +use crate::utils::init::{init, Init}; + +use events::{Events, DEFAULT_MAX_EVENTS_BUF_SIZE}; +use subscriptions::{ReportContext, Subscriptions, DEFAULT_MAX_SUBSCRIPTIONS}; pub use types::*; @@ -60,6 +63,79 @@ mod types; pub type IMBuffer = crate::utils::storage::Vec; /// An `ExchangeHandler` implementation capable of handling responder exchanges for the Interaction Model protocol. +/// The mutable, owned-together state a [`DataModel`] operates on: the +/// subscriptions table, the events queue and the network store. +/// +/// Allocating these as a single value (rather than three separate locals wired +/// up by hand at every call site) is the whole point: construct one +/// `DataModelState`, then hand a reference to it to [`DataModel::new`]. Each of +/// the three pieces keeps its own lock internally (the proven multi-lock model); +/// folding them behind a single mutex is a possible later refinement. +/// +/// `N` is the (raw) [`Networks`] implementation — e.g. +/// [`EthNetwork`](crate::dm::networks::eth::EthNetwork) or +/// [`WirelessNetworks`](crate::dm::networks::wireless::WirelessNetworks); it is +/// wrapped internally in a [`SharedNetworks`] so the data model and (later) the +/// wireless manager can share it. `NS`/`NE` bound the subscription table and the +/// event-buffer size and default to [`DEFAULT_MAX_SUBSCRIPTIONS`] / +/// [`DEFAULT_MAX_EVENTS_BUF_SIZE`]. +pub struct DataModelState< + N, + const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, + const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, +> { + subscriptions: Subscriptions, + events: Events, + networks: SharedNetworks, +} + +impl DataModelState { + /// Create a new state instance backed by the given (raw) [`Networks`] store. + pub const fn new(networks: N) -> Self { + Self { + subscriptions: Subscriptions::new(), + events: Events::new(), + networks: SharedNetworks::new(networks), + } + } + + /// Return an in-place initializer for the state (for large `NE`, to avoid a + /// big temporary on the stack). + pub fn init(networks: impl Init) -> impl Init { + init!(Self { + subscriptions <- Subscriptions::init(), + events <- Events::init(), + networks <- SharedNetworks::init(networks), + }) + } + + /// Re-hydrate the events queue's persisted state (the event-number epoch) so + /// event numbers are not reused across reboots. Call once at startup, before + /// the state is shared with a [`DataModel`]. The (raw) network store is loaded + /// separately, before this state is constructed. + pub async fn load_persist(&mut self, kv: S, buf: &mut [u8]) -> Result<(), Error> + where + S: KvBlobStore, + { + self.events.load_persist(kv, buf).await + } + + /// The subscriptions table. + pub const fn subscriptions(&self) -> &Subscriptions { + &self.subscriptions + } + + /// The events queue. + pub const fn events(&self) -> &Events { + &self.events + } + + /// The network store (wrapped for shared, change-notifying access). + pub const fn networks(&self) -> &SharedNetworks { + &self.networks + } +} + /// The implementation needs a `DataModelHandler` instance to interact with the underlying clusters of the data model. pub struct DataModel<'a, const NS: usize, const NE: usize, C, B, T, S, N> where @@ -69,58 +145,77 @@ where crypto: C, buffers: &'a B, kv: S, - subscriptions: &'a Subscriptions, subscriptions_buffers: SubscriptionsBuffers<'a, B, NS>, - events: &'a Events, - networks: N, + state: &'a DataModelState, handler: T, } +/// A [`DataModelState`] for an Ethernet device: its network store is a fixed +/// [`EthNetwork`], so call sites need only the (defaulted) subscription/event +/// sizes. Pairs with [`EthDataModel`]. +pub type EthDataModelState< + const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, + const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, +> = DataModelState, NS, NE>; + +/// A [`DataModel`] for an Ethernet device (network store fixed to [`EthNetwork`]), +/// so the `N` generic disappears from call sites. Pairs with [`EthDataModelState`]. +pub type EthDataModel<'a, const NS: usize, const NE: usize, C, B, T, S> = + DataModel<'a, NS, NE, C, B, T, S, EthNetwork<'static>>; + +/// A [`DataModelState`] for a wireless device, parameterized by the concrete +/// wireless network store `N` (e.g. `WifiNetworks<3>` or a Thread store). Pairs +/// with [`WirelessDataModel`]. +pub type WirelessDataModelState< + N, + const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, + const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, +> = DataModelState; + +/// A [`DataModel`] for a wireless device (network store `N`). Pairs with +/// [`WirelessDataModelState`]. +pub type WirelessDataModel<'a, const NS: usize, const NE: usize, C, B, T, S, N> = + DataModel<'a, NS, NE, C, B, T, S, N>; + impl<'a, const NS: usize, const NE: usize, C, B, T, S, N> DataModel<'a, NS, NE, C, B, T, S, N> where C: Crypto, B: BufferAccess, T: DataModelHandler, S: KvBlobStoreAccess, - N: NetworksAccess, + N: Networks, { /// Create the data model. /// /// # Arguments /// - `matter` - a reference to the `Matter` instance /// - `buffers` - a reference to an implementation of `BufferAccess` which is used for allocating RX and TX buffers on the fly, when necessary - /// - `subscriptions` - a reference to a `Subscriptions` struct which is used for managing subscriptions. `N` designates the maximum - /// number of subscriptions that can be managed by this handler. - /// - `events` - a reference to an `Events` struct which is used for managing events in the data model. `N` designates the maximum number of events that can be buffered in the event management system. /// - `handler` - an instance of type `T` which implements the `DataModelHandler` trait. This instance is used for interacting with the underlying /// clusters of the data model. Note that the expectations is for the user to provide a handler that handles the Matter system clusters /// as well (Endpoint 0), possibly by decorating her own clusters with the `rs_matter::dm::root_endpoint::with_` methods /// - `kv` - an instance of type `S` which implements the `KvBlobStoreAccess` trait. This instance is used for interacting with the key-value blob store. - /// - `networks` - an instance of type `N` which implements the `NetworksAccess` trait. This instance is used for interacting with the network management cluster. + /// - `state` - a reference to the [`DataModelState`] holding the subscriptions table, the + /// events queue and the network store (the latter parameterized by the `Networks` + /// implementation `N`). #[inline(always)] - #[allow(clippy::too_many_arguments)] pub fn new( matter: &'a Matter<'a>, crypto: C, buffers: &'a B, - subscriptions: &'a Subscriptions, - events: &'a Events, handler: T, kv: S, - networks: N, + state: &'a DataModelState, ) -> Self { - subscriptions.clear(); + state.subscriptions.clear(); Self { matter, crypto, buffers, - subscriptions, + kv, subscriptions_buffers: SubscriptionsBuffers::new(), - events, + state, handler, - kv, - networks, } } @@ -228,7 +323,7 @@ where state.failsafe.check_failsafe_timeout( &mut state.fabrics, &mut state.sessions, - &self.networks, + &self.state.networks, &self.kv, expire_sess_id, &mut notify_mdns, @@ -337,7 +432,7 @@ where None, HandlerInvoker::new(exchange, self), EventReader::new(0, u64::MAX, fabric_filtered), - self.events, + &self.state.events, ); resp.respond(&mut wb, true, true, &self.handler, |_, _, _| true) @@ -511,7 +606,8 @@ where })?; if !req.keep_subs()? { - self.subscriptions + self.state + .subscriptions .remove(&self.subscriptions_buffers, |sub| { (sub.ids().fab_idx == fab_idx && sub.ids().peer_node_id == peer_node_id) .then_some("new subscription request") @@ -523,14 +619,14 @@ where let now = Instant::now(); - let Some(mut rctx) = self.subscriptions.add( + let Some(mut rctx) = self.state.subscriptions.add( now, fab_idx, peer_node_id, exchange.id().session_id(), min_int_secs, max_int_secs, - self.events.watermark(), + self.state.events.watermark(), rx, &self.subscriptions_buffers, ) else { @@ -555,7 +651,7 @@ where // runs on `Drop`) and then wake the reporter so it can account for // the new subscription's deadline. drop(rctx); - self.subscriptions.notification.notify(); + self.state.subscriptions.notification.notify(); } Ok(()) @@ -626,15 +722,16 @@ where // down session, or a newly accepted subscription (the accept path // notifies) all wake the loop early. With no subscription there is // no deadline, so just wait to be notified. - let mut notification = pin!(self.subscriptions.notification.wait()); + let mut notification = pin!(self.state.subscriptions.notification.wait()); let mut session_removed = pin!(matter.transport().wait_session_removed()); // With no subscription (or none primed) the deadline is `Instant::MAX`, // so the timer effectively never fires and the loop just waits to be // notified. let deadline = self + .state .subscriptions - .next_report_at(self.events.watermark(), &self.subscriptions_buffers); + .next_report_at(self.state.events.watermark(), &self.subscriptions_buffers); let mut timeout = pin!(Timer::at(deadline)); select3(&mut notification, &mut timeout, &mut session_removed).await; @@ -644,33 +741,34 @@ where // First remove all expired or no-longer valid subscriptions loop { - let removed_any = self - .subscriptions - .remove(&self.subscriptions_buffers, |sub| { - if sub.is_expired(now) { - return Some("expired"); - } - - matter.with_state(|state| { - if state.fabrics.get(sub.ids().fab_idx).is_none() { - return Some("fabric removed"); + let removed_any = + self.state + .subscriptions + .remove(&self.subscriptions_buffers, |sub| { + if sub.is_expired(now) { + return Some("expired"); } - // The session the subscription was accepted on was - // torn down (eviction, explicit close, peer-side - // CASE re-handshake, ...). Per Matter spec - // subscriptions are scoped to the session they - // were established on, and the publisher can no - // longer route reports to the subscriber. Drop - // immediately rather than waiting for `max_int` - // to expire and time-out the send. - if state.sessions.get(sub.session_id()).is_none() { - return Some("session removed"); - } + matter.with_state(|state| { + if state.fabrics.get(sub.ids().fab_idx).is_none() { + return Some("fabric removed"); + } + + // The session the subscription was accepted on was + // torn down (eviction, explicit close, peer-side + // CASE re-handshake, ...). Per Matter spec + // subscriptions are scoped to the session they + // were established on, and the publisher can no + // longer route reports to the subscriber. Drop + // immediately rather than waiting for `max_int` + // to expire and time-out the send. + if state.sessions.get(sub.session_id()).is_none() { + return Some("session removed"); + } - None - }) - }); + None + }) + }); if !removed_any { break; @@ -679,10 +777,10 @@ where // Now report while there are subscriptions which are due for reporting - let event_numbers_watermark = self.events.watermark(); + let event_numbers_watermark = self.state.events.watermark(); loop { - let Some(mut rctx) = self.subscriptions.report( + let Some(mut rctx) = self.state.subscriptions.report( now, event_numbers_watermark, &self.subscriptions_buffers, @@ -705,7 +803,7 @@ where // Periodically trim changed-attr entries that have been reported by every // subscription, so the table does not accumulate stale promoted wildcards. - self.subscriptions.purge_reported_changes(); + self.state.subscriptions.purge_reported_changes(); } } @@ -836,7 +934,7 @@ where rctx.next_max_seen_event_number(), fabric_filtered, ), - self.events, + &self.state.events, ); let sub_valid = resp @@ -973,7 +1071,7 @@ where B: BufferAccess, T: DataModelHandler, S: KvBlobStoreAccess, - N: NetworksAccess, + N: Networks, { async fn handle(&self, mut exchange: Exchange<'_>) -> Result<(), Error> { DataModel::handle(self, &mut exchange).await @@ -987,7 +1085,7 @@ where B: BufferAccess, T: DataModelHandler, S: KvBlobStoreAccess, - N: NetworksAccess, + N: Networks, { fn matter(&self) -> &Matter<'_> { self.matter @@ -1002,7 +1100,7 @@ where } fn networks(&self) -> impl NetworksAccess + '_ { - &self.networks + &self.state.networks } fn metadata(&self) -> impl Metadata + '_ { @@ -1025,14 +1123,15 @@ where B: BufferAccess, T: DataModelHandler, S: KvBlobStoreAccess, - N: NetworksAccess, + N: Networks, { fn notify_attr_changed(&self, endpoint_id: EndptId, cluster_id: ClusterId, attr_id: AttrId) { self.handler.bump_dataver(MatchContextInstance::new( Some(endpoint_id), Some(cluster_id), )); - self.subscriptions + self.state + .subscriptions .notify_attr_changed(endpoint_id, cluster_id, attr_id); } @@ -1041,20 +1140,23 @@ where Some(endpoint_id), Some(cluster_id), )); - self.subscriptions + self.state + .subscriptions .notify_cluster_changed(endpoint_id, cluster_id); } fn notify_endpoint_changed(&self, endpoint_id: EndptId) { self.handler .bump_dataver(MatchContextInstance::new(Some(endpoint_id), None)); - self.subscriptions.notify_endpoint_changed(endpoint_id) + self.state + .subscriptions + .notify_endpoint_changed(endpoint_id) } fn notify_all_changed(&self) { self.handler .bump_dataver(MatchContextInstance::new(None, None)); - self.subscriptions.notify_all_changed() + self.state.subscriptions.notify_all_changed() } } @@ -1065,7 +1167,7 @@ where B: BufferAccess, T: DataModelHandler, S: KvBlobStoreAccess, - N: NetworksAccess, + N: Networks, { fn emit_event( &self, @@ -1079,10 +1181,12 @@ where F: FnOnce(EventTLVWrite<'_>) -> Result<(), Error>, { let event_number = - self.events + self.state + .events .push(endpoint_id, cluster_id, event_id, priority, &self.kv, f)?; - self.subscriptions + self.state + .subscriptions .notify_event_emitted(endpoint_id, cluster_id, event_id); Ok(event_number) diff --git a/rs-matter/src/respond.rs b/rs-matter/src/respond.rs index 283754e58..ebcb0d7a0 100644 --- a/rs-matter/src/respond.rs +++ b/rs-matter/src/respond.rs @@ -277,7 +277,7 @@ where C: Crypto, T: DataModelHandler, S: KvBlobStoreAccess, - N: net_comm::NetworksAccess, + N: net_comm::Networks, { Self::new( "Responder", @@ -333,7 +333,7 @@ where B: BufferAccess, T: DataModelHandler, S: KvBlobStoreAccess, - N: net_comm::NetworksAccess, + N: net_comm::Networks, { /// Creates the responder composition. #[inline(always)] diff --git a/rs-matter/tests/commissioning.rs b/rs-matter/tests/commissioning.rs index c783fb0aa..93a362d0f 100644 --- a/rs-matter/tests/commissioning.rs +++ b/rs-matter/tests/commissioning.rs @@ -57,14 +57,14 @@ use rs_matter::crypto::{ use rs_matter::dm::clusters::app::level_control::LevelControlHooks; use rs_matter::dm::clusters::app::on_off::{self, test::TestOnOffDeviceLogic, OnOffHooks}; use rs_matter::dm::clusters::desc::{self, ClusterHandler as _}; -use rs_matter::dm::clusters::net_comm::DummyNetworkAccess; +use rs_matter::dm::clusters::net_comm::DummyNetworks; use rs_matter::dm::devices::test::{TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; use rs_matter::dm::devices::DEV_TYPE_ON_OFF_LIGHT; -use rs_matter::dm::events::NoEvents; use rs_matter::dm::networks::unix::UnixNetifs; -use rs_matter::dm::subscriptions::Subscriptions; +use rs_matter::dm::subscriptions::DEFAULT_MAX_SUBSCRIPTIONS; use rs_matter::dm::{ - endpoints, Async, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, IMBuffer, Node, + endpoints, Async, DataModel, DataModelHandler, DataModelState, Dataver, Endpoint, EpClMatcher, + IMBuffer, Node, }; use rs_matter::error::Error; use rs_matter::im::IMStatusCode; @@ -97,15 +97,19 @@ const TEST_PASSCODE: u32 = 20202021; const IM_TIMEOUT_SECS: u64 = 10; +/// The device's data model state: a dummy (no-op) network store, default +/// subscription count, no events. +type DeviceDmState = DataModelState; + static DEVICE_MATTER: StaticCell = StaticCell::new(); static DEVICE_BUFFERS: StaticCell> = StaticCell::new(); -static DEVICE_SUBSCRIPTIONS: StaticCell = StaticCell::new(); +static DEVICE_STATE: StaticCell = StaticCell::new(); static CTRL_MATTER: StaticCell = StaticCell::new(); // Separate statics for the TCP variant (StaticCell is one-shot) static TCP_DEVICE_MATTER: StaticCell = StaticCell::new(); static TCP_DEVICE_BUFFERS: StaticCell> = StaticCell::new(); -static TCP_DEVICE_SUBSCRIPTIONS: StaticCell = StaticCell::new(); +static TCP_DEVICE_STATE: StaticCell = StaticCell::new(); static TCP_CTRL_MATTER: StaticCell = StaticCell::new(); // ============================================================================ @@ -184,7 +188,7 @@ macro_rules! commissioning_test { let mut rand = device_crypto.rand()?; let device_buffers = $dev_buffers.uninit().init_with(PooledBuffers::init(0)); - let device_subscriptions = $dev_subs.uninit().init_with(Subscriptions::init()); + let device_state = $dev_subs.init(DataModelState::new(DummyNetworks)); let on_off_handler = on_off::OnOffHandler::new_standalone( Dataver::new_rand(&mut rand), @@ -192,17 +196,13 @@ macro_rules! commissioning_test { TestOnOffDeviceLogic::new(false), ); - let events = NoEvents::new(); - let dm = DataModel::new( device_matter, &device_crypto, device_buffers, - device_subscriptions, - &events, dm_handler(rand, &on_off_handler), DummyKvBlobStoreAccess, - DummyNetworkAccess, + device_state, ); // Open commissioning window before starting the mDNS responder so the @@ -263,7 +263,7 @@ commissioning_test! { run_name: run_test_udp, device_matter: DEVICE_MATTER, device_buffers: DEVICE_BUFFERS, - device_subscriptions: DEVICE_SUBSCRIPTIONS, + device_subscriptions: DEVICE_STATE, ctrl_matter: CTRL_MATTER, use_tcp: false, device_transport: async_io::Async::::bind(MATTER_SOCKET_BIND_ADDR)?, @@ -275,7 +275,7 @@ commissioning_test! { run_name: run_test_tcp, device_matter: TCP_DEVICE_MATTER, device_buffers: TCP_DEVICE_BUFFERS, - device_subscriptions: TCP_DEVICE_SUBSCRIPTIONS, + device_subscriptions: TCP_DEVICE_STATE, ctrl_matter: TCP_CTRL_MATTER, use_tcp: true, device_transport: TcpNetwork::<8>::new( diff --git a/rs-matter/tests/common/e2e.rs b/rs-matter/tests/common/e2e.rs index 8b1eb7e12..ee2d5a3cb 100644 --- a/rs-matter/tests/common/e2e.rs +++ b/rs-matter/tests/common/e2e.rs @@ -24,11 +24,9 @@ use embassy_sync::zerocopy_channel::{Channel, Receiver, Sender}; use rs_matter::acl::{AclEntry, AuthMode}; use rs_matter::crypto::{test_only_crypto, Crypto}; -use rs_matter::dm::clusters::net_comm::DummyNetworkAccess; +use rs_matter::dm::clusters::net_comm::DummyNetworks; use rs_matter::dm::devices::test::{TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; -use rs_matter::dm::events::Events; -use rs_matter::dm::subscriptions::Subscriptions; -use rs_matter::dm::{DataModel, DataModelHandler, IMBuffer, Privilege}; +use rs_matter::dm::{DataModel, DataModelHandler, DataModelState, IMBuffer, Privilege}; use rs_matter::error::Error; use rs_matter::persist::DummyKvBlobStoreAccess; use rs_matter::respond::{ExchangeHandler, Responder}; @@ -78,8 +76,7 @@ pub struct E2eRunner { matter_client: Matter<'static>, crypto: C, buffers: PooledBuffers<10, IMBuffer>, - pub subscriptions: Subscriptions<3>, - pub events: Events, + pub state: DataModelState, cat_ids: NocCatIds, } @@ -99,8 +96,7 @@ impl E2eRunner { matter_client: Self::new_matter(), crypto, buffers: PooledBuffers::new(0), - subscriptions: Subscriptions::new(), - events: Events::new(), + state: DataModelState::new(DummyNetworks), cat_ids, } } @@ -184,11 +180,9 @@ impl E2eRunner { &self.matter, &self.crypto, &self.buffers, - &self.subscriptions, - &self.events, handler, DummyKvBlobStoreAccess, - DummyNetworkAccess, + &self.state, ); let responder = Responder::new_default(&dm); diff --git a/rs-matter/tests/data_model/events.rs b/rs-matter/tests/data_model/events.rs index 0702e38cd..a9e646871 100644 --- a/rs-matter/tests/data_model/events.rs +++ b/rs-matter/tests/data_model/events.rs @@ -276,7 +276,8 @@ fn test_subscribe_events() { Some(&0x42u8) )], ); - im.subscriptions + im.state + .subscriptions() .notify_event_emitted(0, echo_cluster::ID, 2); Ok(()) }, @@ -365,7 +366,8 @@ where C: rs_matter::crypto::Crypto, { for ev in events { - im.events + im.state + .events() .push( ev.path.endpoint.unwrap(), ev.path.cluster.unwrap(), From f661d80b8365c374c275332527d0dae950602da9 Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Wed, 17 Jun 2026 21:31:37 +0000 Subject: [PATCH 02/14] Also push the networks inside the DataModelState struct --- bloat-check/src/bin/bloat-check.rs | 58 ++++--------- examples/src/bin/onoff_light_bt.rs | 13 ++- rs-matter/src/dm.rs | 134 +++++++++++++++++++++++++---- rs-matter/src/respond.rs | 25 +++--- 4 files changed, 156 insertions(+), 74 deletions(-) diff --git a/bloat-check/src/bin/bloat-check.rs b/bloat-check/src/bin/bloat-check.rs index c72b8037e..ca37e0487 100644 --- a/bloat-check/src/bin/bloat-check.rs +++ b/bloat-check/src/bin/bloat-check.rs @@ -61,7 +61,7 @@ use rs_matter::dm::clusters::app::on_off::NoLevelControl; use rs_matter::dm::clusters::app::on_off::{self, test::TestOnOffDeviceLogic, OnOffHooks}; use rs_matter::dm::clusters::desc::{self, ClusterHandler as _, DescHandler}; use rs_matter::dm::clusters::net_comm::{ - NetCtl, NetCtlError, NetworkScanInfo, NetworkType, SharedNetworks, WirelessCreds, + NetCtl, NetCtlError, NetworkScanInfo, NetworkType, WirelessCreds, }; use rs_matter::dm::clusters::wifi_diag::{ SecurityTypeEnum, WiFiVersionEnum, WifiDiag, WirelessDiag, @@ -71,7 +71,7 @@ use rs_matter::dm::devices::DEV_TYPE_ON_OFF_LIGHT; use rs_matter::dm::endpoints::WifiSysHandler; use rs_matter::dm::events::DEFAULT_MAX_EVENTS_BUF_SIZE; use rs_matter::dm::networks::wireless::{ - NetCtlState, NetCtlStateMutex, NetCtlWithStatusImpl, WifiNetworks, WirelessMgr, MAX_CREDS_SIZE, + NetCtlState, NetCtlStateMutex, NetCtlWithStatusImpl, WifiNetworks, }; use rs_matter::dm::networks::NetChangeNotif; use rs_matter::dm::subscriptions::DEFAULT_MAX_SUBSCRIPTIONS; @@ -162,7 +162,6 @@ struct MatterStack<'a> { state: WirelessDataModelState>, net_ctl_state: NetCtlStateMutex, btp: Btp, - wireless_mgr_buffer: MaybeUninit<[u8; MAX_CREDS_SIZE]>, // We don't run a persistence task, but emulate its typical memory consumnption psm_buffer: MaybeUninit<[u8; 4096]>, } @@ -181,7 +180,6 @@ impl<'a> MatterStack<'a> { state <- WirelessDataModelState::init(WifiNetworks::init()), net_ctl_state <- NetCtlState::init_with_mutex(), btp <- Btp::init(), - wireless_mgr_buffer: MaybeUninit::zeroed(), psm_buffer: MaybeUninit::zeroed(), }) } @@ -190,9 +188,7 @@ impl<'a> MatterStack<'a> { // Fully spelled-out types for everything which is passed down as arguments to `embassy-executor` tasks // Necessary, because `embassy-executor` doesn't grok generics -type AppNetworks = SharedNetworks>; type AppNetCtl<'a> = NetCtlWithStatusImpl<'a, FakeWifi>; -type AppWirelessMgr<'a> = WirelessMgr<'a, &'a AppNetworks, &'a AppNetCtl<'a>>; type AppTransport<'a> = ChainedNetwork bool>; type AppDmHandler<'a> = handler_chain_type!( EpClMatcher => on_off::HandlerAsyncAdaptor>, @@ -209,6 +205,7 @@ type AppDataModel<'a> = DataModel< (Node<'a>, &'a AppDmHandler<'a>), SharedKvBlobStore, WifiNetworks<3>, + &'a AppNetCtl<'a>, >; type AppResponder<'d, 'a> = DefaultResponder< 'd, @@ -220,6 +217,7 @@ type AppResponder<'d, 'a> = DefaultResponder< (Node<'a>, &'a AppDmHandler<'a>), SharedKvBlobStore, WifiNetworks<3>, + &'a AppNetCtl<'a>, >; #[cfg_attr(target_os = "none", main)] @@ -275,7 +273,11 @@ fn main() -> ! { size_of_val(stack.state.subscriptions()), &mut stack_total, ); - report_size("Events", size_of_val(stack.state.events()), &mut stack_total); + report_size( + "Events", + size_of_val(stack.state.events()), + &mut stack_total, + ); report_size( "Networks", size_of_val(stack.state.networks()), @@ -287,11 +289,6 @@ fn main() -> ! { &mut stack_total, ); report_size("BTP", size_of_val(&stack.btp), &mut stack_total); - report_size( - "Wireless mgr buffer", - size_of_val(&stack.wireless_mgr_buffer), - &mut stack_total, - ); report_size( "Persister buffer", size_of_val(&stack.psm_buffer), @@ -314,15 +311,9 @@ fn main() -> ! { report_size("Network controller", size_of_val(net_ctl), &mut aux_total); - // Wifi network manager (cycle registered networks, auto-reconnect) - let wifi_mgr = mk_static!( - AppWirelessMgr, - WirelessMgr::new(stack.state.networks(), net_ctl, unsafe { - stack.wireless_mgr_buffer.assume_init_mut() - },) - ); - - report_size("Wireless manager", size_of_val(&*wifi_mgr), &mut aux_total); + // The operational Wifi connection manager is now driven from inside + // `DataModel::run` (no separate task); its footprint shows up under the data + // model future below. let crypto = &*mk_static!( AppCrypto, @@ -351,15 +342,17 @@ fn main() -> ! { report_size("DM Handler size", size_of_val(&*handler), &mut aux_total); - // Data Model + // Data Model. `net_ctl` is wired in so the data model's `run` drives the + // operational Wifi connection manager itself (no separate manager task). let dm = &*mk_static!( AppDataModel, - DataModel::new( + DataModel::new_with_net_ctl( &stack.matter, crypto, &stack.buffers, (NODE, handler), kv, + net_ctl, &stack.state, ) ); @@ -431,11 +424,6 @@ fn main() -> ! { size_of_val(&btp_task_fut(&stack.btp)), &mut fut_total, ); - report_size( - "Wifi task", - size_of_val(&wifi_task_fut(wifi_mgr)), - &mut fut_total, - ); report_size( "Transport task", size_of_val(&transport_task_fut( @@ -479,7 +467,6 @@ fn main() -> ! { spawner.spawn(unwrap!(dm_task(dm))); spawner.spawn(unwrap!(mdns_task(mdns, &stack.matter, crypto))); spawner.spawn(unwrap!(btp_task(&stack.btp))); - spawner.spawn(unwrap!(wifi_task(wifi_mgr))); spawner.spawn(unwrap!(transport_task( &stack.matter, crypto, @@ -570,19 +557,6 @@ async fn btp_task(btp: &'static Btp) { unwrap!(btp_task_fut(btp).await); } -#[inline(always)] -fn wifi_task_fut<'a>( - wifi_mgr: &'a mut AppWirelessMgr<'static>, -) -> impl Future> + 'a { - wifi_mgr.run() -} - -#[embassy_executor::task] -async fn wifi_task(wifi_mgr: &'static mut AppWirelessMgr<'static>) { - info!("Starting Wifi task..."); - unwrap!(wifi_task_fut(wifi_mgr).await); -} - #[inline(always)] fn transport_task_fut<'a>( matter: &'a Matter<'a>, diff --git a/examples/src/bin/onoff_light_bt.rs b/examples/src/bin/onoff_light_bt.rs index a4c4a5ff3..f5fea70df 100644 --- a/examples/src/bin/onoff_light_bt.rs +++ b/examples/src/bin/onoff_light_bt.rs @@ -52,6 +52,7 @@ use rs_matter::dm::devices::DEV_TYPE_ON_OFF_LIGHT; use rs_matter::dm::endpoints; use rs_matter::dm::networks::unix::UnixNetifs; use rs_matter::dm::networks::wireless::{NetCtlState, NetCtlWithStatusImpl, WifiNetworks}; +use rs_matter::dm::networks::NetChangeNotif; use rs_matter::dm::{ Async, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, Node, WirelessDataModelState, @@ -118,7 +119,10 @@ fn main() -> Result<(), Error> { } } -fn run(connection: &Connection, net_ctl: N) -> Result<(), Error> { +fn run( + connection: &Connection, + net_ctl: N, +) -> Result<(), Error> { // Create the Matter object let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); @@ -157,13 +161,16 @@ fn run(connection: &Connection, net_ctl: N) -> Result<(), let net_ctl = NetCtlWithStatusImpl::new(&net_ctl_state, net_ctl); - // Create the Data Model instance - let dm = DataModel::new( + // Create the Data Model instance. The same `net_ctl` is wired both into the + // `NetworkCommissioning` handler (above) and into the data model, which drives + // the operational Wifi connection manager from `DataModel::run`. + let dm = DataModel::new_with_net_ctl( &matter, &crypto, &buffers, dm_handler(rand, &on_off_handler, &net_ctl, &net_ctl), SharedKvBlobStore::new(kv, kv_buf.as_mut_slice()), + &net_ctl, &state, ); diff --git a/rs-matter/src/dm.rs b/rs-matter/src/dm.rs index 5d2c206b1..3ceef8182 100644 --- a/rs-matter/src/dm.rs +++ b/rs-matter/src/dm.rs @@ -18,14 +18,19 @@ use core::num::NonZeroU8; use core::pin::pin; -use embassy_futures::select::select3; +use embassy_futures::select::{select3, select4}; use embassy_time::{Instant, Timer}; use crate::acl::Accessor; use crate::crypto::Crypto; -use crate::dm::clusters::net_comm::{Networks, NetworksAccess, SharedNetworks}; +use crate::dm::clusters::net_comm::{ + NetCtl, NetworkType, Networks, NetworksAccess, SharedNetworks, +}; +use crate::dm::clusters::wifi_diag::WirelessDiag; use crate::dm::events::EventTLVWrite; use crate::dm::networks::eth::EthNetwork; +use crate::dm::networks::wireless::{NoopWirelessNetCtl, WirelessMgr, MAX_CREDS_SIZE}; +use crate::dm::networks::NetChangeNotif; use crate::dm::subscriptions::SubscriptionsBuffers; use crate::error::{Error, ErrorCode}; use crate::im::{ @@ -137,7 +142,13 @@ impl DataModelState { } /// The implementation needs a `DataModelHandler` instance to interact with the underlying clusters of the data model. -pub struct DataModel<'a, const NS: usize, const NE: usize, C, B, T, S, N> +/// +/// `NC` is the network controller type driving the (optional) wireless connection +/// manager from [`DataModel::run`]. It defaults to [`NoopWirelessNetCtl`], which is +/// the right choice for Ethernet (and what the convenience [`DataModel::new`] +/// constructor wires up); wireless devices pass a real controller via +/// [`DataModel::new_with_net_ctl`]. +pub struct DataModel<'a, const NS: usize, const NE: usize, C, B, T, S, N, NC = NoopWirelessNetCtl> where B: BufferAccess, { @@ -145,6 +156,7 @@ where crypto: C, buffers: &'a B, kv: S, + net_ctl: NC, subscriptions_buffers: SubscriptionsBuffers<'a, B, NS>, state: &'a DataModelState, handler: T, @@ -172,10 +184,10 @@ pub type WirelessDataModelState< const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, > = DataModelState; -/// A [`DataModel`] for a wireless device (network store `N`). Pairs with -/// [`WirelessDataModelState`]. -pub type WirelessDataModel<'a, const NS: usize, const NE: usize, C, B, T, S, N> = - DataModel<'a, NS, NE, C, B, T, S, N>; +/// A [`DataModel`] for a wireless device (network store `N`, network controller +/// `NC`). Pairs with [`WirelessDataModelState`]. +pub type WirelessDataModel<'a, const NS: usize, const NE: usize, C, B, T, S, N, NC> = + DataModel<'a, NS, NE, C, B, T, S, N, NC>; impl<'a, const NS: usize, const NE: usize, C, B, T, S, N> DataModel<'a, NS, NE, C, B, T, S, N> where @@ -185,7 +197,12 @@ where S: KvBlobStoreAccess, N: Networks, { - /// Create the data model. + /// Create the data model for a device that does not need an operational + /// wireless connection manager (typically an Ethernet device). + /// + /// This is a convenience wrapper around [`DataModel::new_with_net_ctl`] that + /// fixes the network controller to an inert [`NoopWirelessNetCtl`], so + /// [`DataModel::run`]'s connection-management branch stays dormant. /// /// # Arguments /// - `matter` - a reference to the `Matter` instance @@ -205,6 +222,56 @@ where handler: T, kv: S, state: &'a DataModelState, + ) -> Self { + Self::new_with_net_ctl( + matter, + crypto, + buffers, + handler, + kv, + NoopWirelessNetCtl::new(NetworkType::Ethernet), + state, + ) + } +} + +impl<'a, const NS: usize, const NE: usize, C, B, T, S, N, NC> + DataModel<'a, NS, NE, C, B, T, S, N, NC> +where + C: Crypto, + B: BufferAccess, + T: DataModelHandler, + S: KvBlobStoreAccess, + N: Networks, +{ + /// Create the data model with an explicit network controller `net_ctl`. + /// + /// Use this for wireless devices: `net_ctl` drives the operational connection + /// manager run from [`DataModel::run`] (and is typically the same controller + /// instance also wired into the `NetworkCommissioning` cluster handler). For + /// Ethernet devices prefer the [`DataModel::new`] convenience constructor. + /// + /// # Arguments + /// - `matter` - a reference to the `Matter` instance + /// - `buffers` - a reference to an implementation of `BufferAccess` which is used for allocating RX and TX buffers on the fly, when necessary + /// - `handler` - an instance of type `T` which implements the `DataModelHandler` trait. This instance is used for interacting with the underlying + /// clusters of the data model. Note that the expectations is for the user to provide a handler that handles the Matter system clusters + /// as well (Endpoint 0), possibly by decorating her own clusters with the `rs_matter::dm::root_endpoint::with_` methods + /// - `kv` - an instance of type `S` which implements the `KvBlobStoreAccess` trait. This instance is used for interacting with the key-value blob store. + /// - `net_ctl` - the network controller (`NetCtl` + `WirelessDiag` + `NetChangeNotif`) used by + /// the operational wireless connection manager driven from [`DataModel::run`]. + /// - `state` - a reference to the [`DataModelState`] holding the subscriptions table, the + /// events queue and the network store (the latter parameterized by the `Networks` + /// implementation `N`). + #[inline(always)] + pub fn new_with_net_ctl( + matter: &'a Matter<'a>, + crypto: C, + buffers: &'a B, + handler: T, + kv: S, + net_ctl: NC, + state: &'a DataModelState, ) -> Self { state.subscriptions.clear(); @@ -213,6 +280,7 @@ where crypto, buffers, kv, + net_ctl, subscriptions_buffers: SubscriptionsBuffers::new(), state, handler, @@ -286,16 +354,46 @@ where } /// Run the Data Model instance. - pub async fn run(&self) -> Result<(), Error> { + /// + /// This drives the IM timeout checks, the data-model handler's own background + /// job, the subscriptions reporting loop, and - for wireless devices - the + /// operational connection manager (inert for Ethernet, where `net_ctl` is a + /// [`NoopWirelessNetCtl`]). + pub async fn run(&self) -> Result<(), Error> + where + NC: NetCtl + WirelessDiag + NetChangeNotif, + { let mut timeouts = pin!(self.run_timeout_checks()); let mut handler = pin!(self.handler.run(self)); let mut subs = pin!(self.process_subscriptions(self.matter)); + let mut net = pin!(self.run_net_mgr()); - select3(&mut timeouts, &mut handler, &mut subs) + select4(&mut timeouts, &mut handler, &mut subs, &mut net) .coalesce() .await } + /// Drive the operational wireless connection manager. + /// + /// For Ethernet devices (`net_ctl.net_type() == NetworkType::Ethernet`) there + /// is nothing to manage, so this future simply pends forever. For wireless + /// devices it runs a [`WirelessMgr`] over the network store, cycling through + /// the registered networks and (re)connecting as needed once commissioned. + async fn run_net_mgr(&self) -> Result<(), Error> + where + NC: NetCtl + WirelessDiag + NetChangeNotif, + { + if self.net_ctl.net_type() == NetworkType::Ethernet { + // Nothing to manage for a wired device - just pend forever. + return core::future::pending().await; + } + + let mut buf = [0u8; MAX_CREDS_SIZE]; + let mut mgr = WirelessMgr::new(self.state.networks(), &self.net_ctl, &mut buf); + + mgr.run().await + } + async fn run_timeout_checks(&self) -> Result<(), Error> { const CHECK_INTERVAL_SECS: u64 = 1; @@ -1064,8 +1162,8 @@ where } } -impl ExchangeHandler - for DataModel<'_, NS, NE, C, B, T, S, N> +impl ExchangeHandler + for DataModel<'_, NS, NE, C, B, T, S, N, NC> where C: Crypto, B: BufferAccess, @@ -1078,8 +1176,8 @@ where } } -impl HandlerContext - for DataModel<'_, NS, NE, C, B, T, S, N> +impl HandlerContext + for DataModel<'_, NS, NE, C, B, T, S, N, NC> where C: Crypto, B: BufferAccess, @@ -1116,8 +1214,8 @@ where } } -impl AttrChangeNotifier - for DataModel<'_, NS, NE, C, B, T, S, N> +impl AttrChangeNotifier + for DataModel<'_, NS, NE, C, B, T, S, N, NC> where C: Crypto, B: BufferAccess, @@ -1160,8 +1258,8 @@ where } } -impl EventEmitter - for DataModel<'_, NS, NE, C, B, T, S, N> +impl EventEmitter + for DataModel<'_, NS, NE, C, B, T, S, N, NC> where C: Crypto, B: BufferAccess, diff --git a/rs-matter/src/respond.rs b/rs-matter/src/respond.rs index ebcb0d7a0..86480e0b2 100644 --- a/rs-matter/src/respond.rs +++ b/rs-matter/src/respond.rs @@ -261,18 +261,18 @@ where } /// A type alias for the "default" responder handler, which is a chained handler of the `DataModel` and `SecureChannel` handlers. -pub type DefaultExchangeHandler<'d, 'a, const NS: usize, const NE: usize, C, B, T, S, N> = - ChainedExchangeHandler<&'d DataModel<'a, NS, NE, C, B, T, S, N>, SecureChannel<'d, &'d C>>; +pub type DefaultExchangeHandler<'d, 'a, const NS: usize, const NE: usize, C, B, T, S, N, NC> = + ChainedExchangeHandler<&'d DataModel<'a, NS, NE, C, B, T, S, N, NC>, SecureChannel<'d, &'d C>>; -impl<'d, 'a, const NS: usize, const NE: usize, C, B, T, S, N> - Responder<'a, DefaultExchangeHandler<'d, 'a, NS, NE, C, B, T, S, N>> +impl<'d, 'a, const NS: usize, const NE: usize, C, B, T, S, N, NC> + Responder<'a, DefaultExchangeHandler<'d, 'a, NS, NE, C, B, T, S, N, NC>> where B: BufferAccess, { /// Creates a "default" responder. This is a responder that composes and uses the `rs-matter`-provided `ExchangeHandler` implementations /// (`SecureChannel` and `DataModel`) for handling the Secure Channel protocol and the Interaction Model protocol. #[inline(always)] - pub const fn new_default(data_model: &'d DataModel<'a, NS, NE, C, B, T, S, N>) -> Self + pub const fn new_default(data_model: &'d DataModel<'a, NS, NE, C, B, T, S, N, NC>) -> Self where C: Crypto, T: DataModelHandler, @@ -318,16 +318,16 @@ impl<'a> Responder<'a, BusyExchangeHandler> { } /// A composition of the `Responder::new_default` and `Responder::new_busy` responders. -pub struct DefaultResponder<'d, 'a, const NS: usize, const NE: usize, C, B, T, S, N> +pub struct DefaultResponder<'d, 'a, const NS: usize, const NE: usize, C, B, T, S, N, NC> where B: BufferAccess, { - responder: Responder<'a, DefaultExchangeHandler<'d, 'a, NS, NE, C, B, T, S, N>>, + responder: Responder<'a, DefaultExchangeHandler<'d, 'a, NS, NE, C, B, T, S, N, NC>>, busy_responder: Responder<'a, BusyExchangeHandler>, } -impl<'d, 'a, const NS: usize, const NE: usize, C, B, T, S, N> - DefaultResponder<'d, 'a, NS, NE, C, B, T, S, N> +impl<'d, 'a, const NS: usize, const NE: usize, C, B, T, S, N, NC> + DefaultResponder<'d, 'a, NS, NE, C, B, T, S, N, NC> where C: Crypto, B: BufferAccess, @@ -337,7 +337,7 @@ where { /// Creates the responder composition. #[inline(always)] - pub const fn new(data_model: &'d DataModel<'a, NS, NE, C, B, T, S, N>) -> Self { + pub const fn new(data_model: &'d DataModel<'a, NS, NE, C, B, T, S, N, NC>) -> Self { Self { responder: Responder::new_default(data_model), busy_responder: Responder::new_busy(data_model.matter(), RESPOND_BUSY_MS), @@ -360,7 +360,10 @@ where &self, ) -> &Responder< 'a, - ChainedExchangeHandler<&'d DataModel<'a, NS, NE, C, B, T, S, N>, SecureChannel<'d, &'d C>>, + ChainedExchangeHandler< + &'d DataModel<'a, NS, NE, C, B, T, S, N, NC>, + SecureChannel<'d, &'d C>, + >, > { &self.responder } From 31226051d34dd82e073acb6c2a0463ecb7ee1e5e Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Thu, 18 Jun 2026 09:22:57 +0000 Subject: [PATCH 03/14] Push the KV buffer into DataModelState --- bloat-check/src/bin/bloat-check.rs | 33 ++- examples/src/bin/bridge.rs | 15 +- examples/src/bin/camera_tests.rs | 16 +- examples/src/bin/dimmable_light.rs | 15 +- examples/src/bin/light_tests.rs | 16 +- examples/src/bin/media_player.rs | 15 +- examples/src/bin/onoff_light.rs | 14 +- examples/src/bin/onoff_light_bt.rs | 23 +- examples/src/bin/onoff_light_switch.rs | 20 +- examples/src/bin/onoff_light_work_stealing.rs | 16 +- examples/src/bin/ota_requestor.rs | 22 +- examples/src/bin/scenes_tests.rs | 18 +- examples/src/bin/speaker.rs | 15 +- examples/src/bin/system_tests.rs | 20 +- examples/src/bin/webrtc_camera.rs | 16 +- rs-matter/src/dm.rs | 220 ++++++++++++++---- rs-matter/src/persist.rs | 51 ++-- rs-matter/src/respond.rs | 60 +++-- rs-matter/tests/commissioning.rs | 4 +- rs-matter/tests/common/e2e.rs | 4 +- 20 files changed, 396 insertions(+), 217 deletions(-) diff --git a/bloat-check/src/bin/bloat-check.rs b/bloat-check/src/bin/bloat-check.rs index ca37e0487..9267ff05e 100644 --- a/bloat-check/src/bin/bloat-check.rs +++ b/bloat-check/src/bin/bloat-check.rs @@ -41,7 +41,9 @@ #![recursion_limit = "256"] use core::future::Future; -use core::mem::{size_of_val, MaybeUninit}; +use core::mem::size_of_val; +#[cfg(target_os = "none")] +use core::mem::MaybeUninit; // Logging - `defmt` for embedded targets, `log` for others #[cfg(target_os = "none")] @@ -69,12 +71,10 @@ use rs_matter::dm::clusters::wifi_diag::{ use rs_matter::dm::devices::test::{DAC_PRIVKEY, TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; use rs_matter::dm::devices::DEV_TYPE_ON_OFF_LIGHT; use rs_matter::dm::endpoints::WifiSysHandler; -use rs_matter::dm::events::DEFAULT_MAX_EVENTS_BUF_SIZE; use rs_matter::dm::networks::wireless::{ NetCtlState, NetCtlStateMutex, NetCtlWithStatusImpl, WifiNetworks, }; use rs_matter::dm::networks::NetChangeNotif; -use rs_matter::dm::subscriptions::DEFAULT_MAX_SUBSCRIPTIONS; use rs_matter::dm::{endpoints, IMBuffer}; use rs_matter::dm::{ Async, DataModel, Dataver, Endpoint, EpClMatcher, Node, WirelessDataModelState, @@ -82,7 +82,7 @@ use rs_matter::dm::{ use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; -use rs_matter::persist::{DummyKvBlobStore, SharedKvBlobStore}; +use rs_matter::persist::{DummyKvBlobStore, SharedKvBlobStore, DEFAULT_KV_BUF_SIZE}; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::tlv::Nullable; @@ -162,8 +162,6 @@ struct MatterStack<'a> { state: WirelessDataModelState>, net_ctl_state: NetCtlStateMutex, btp: Btp, - // We don't run a persistence task, but emulate its typical memory consumnption - psm_buffer: MaybeUninit<[u8; 4096]>, } impl<'a> MatterStack<'a> { @@ -180,7 +178,6 @@ impl<'a> MatterStack<'a> { state <- WirelessDataModelState::init(WifiNetworks::init()), net_ctl_state <- NetCtlState::init_with_mutex(), btp <- Btp::init(), - psm_buffer: MaybeUninit::zeroed(), }) } } @@ -198,24 +195,20 @@ type AppDmHandler<'a> = handler_chain_type!( type AppCrypto = RustCrypto<'static, WeakTestOnlyRand>; type AppDataModel<'a> = DataModel< 'a, - DEFAULT_MAX_SUBSCRIPTIONS, - DEFAULT_MAX_EVENTS_BUF_SIZE, &'a AppCrypto, PooledBuffers<10, IMBuffer>, (Node<'a>, &'a AppDmHandler<'a>), - SharedKvBlobStore, + DummyKvBlobStore, WifiNetworks<3>, &'a AppNetCtl<'a>, >; type AppResponder<'d, 'a> = DefaultResponder< 'd, 'a, - DEFAULT_MAX_SUBSCRIPTIONS, - DEFAULT_MAX_EVENTS_BUF_SIZE, &'a AppCrypto, PooledBuffers<10, IMBuffer>, (Node<'a>, &'a AppDmHandler<'a>), - SharedKvBlobStore, + DummyKvBlobStore, WifiNetworks<3>, &'a AppNetCtl<'a>, >; @@ -289,11 +282,10 @@ fn main() -> ! { &mut stack_total, ); report_size("BTP", size_of_val(&stack.btp), &mut stack_total); - report_size( - "Persister buffer", - size_of_val(&stack.psm_buffer), - &mut stack_total, - ); + // The KV/persister scratch buffer now lives inside `DataModelState` (behind a + // blocking mutex) rather than in the `SharedKvBlobStore`. It is not visible + // through the per-component accessors above, so account for it explicitly. + report_size("KV scratch buffer", DEFAULT_KV_BUF_SIZE, &mut stack_total); report_subtotal_size("TOTAL MATTER STACK ", stack_total); @@ -322,8 +314,9 @@ fn main() -> ! { let mut rand = unwrap!(crypto.weak_rand()); - let kv_buf = unsafe { stack.psm_buffer.assume_init_mut() }.as_mut_slice(); - let kv = SharedKvBlobStore::new(DummyKvBlobStore, kv_buf); + // The KV scratch buffer now lives inside `DataModelState` (see the "KV scratch + // buffer" line in the memory report); the store itself is buffer-less. + let kv = SharedKvBlobStore::new(DummyKvBlobStore); // A Wireless handler with a sample app cluster (on-off) let handler = mk_static!( diff --git a/examples/src/bin/bridge.rs b/examples/src/bin/bridge.rs index 525f4e388..7930ca83c 100644 --- a/examples/src/bin/bridge.rs +++ b/examples/src/bin/bridge.rs @@ -69,17 +69,20 @@ fn main() -> Result<(), Error> { let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); // Persistence - let mut kv_buf = [0; 4096]; let mut kv = DirKvBlobStore::new_default(); - futures_lite::future::block_on(matter.load_persist(&mut kv, &mut kv_buf))?; // Create the transport buffers let buffers = PooledBuffers::<10, _>::new(0); - // Create the data model state (subscriptions, events, network store) and load - // the persisted event counter. + // Create the data model state (subscriptions, events, network store). It owns + // the KV scratch buffer, which the startup loads below reuse rather than + // allocating a separate one. let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); - futures_lite::future::block_on(state.load_persist(&mut kv, &mut kv_buf))?; + + // Re-hydrate the `Matter` instance and the data model state (event-number + // epoch) using the state's own scratch buffer. + futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; + futures_lite::future::block_on(state.load_persist(&mut kv))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -104,7 +107,7 @@ fn main() -> Result<(), Error> { &crypto, &buffers, dm_handler(rand, &on_off_handler_ep2, &on_off_handler_ep3), - SharedKvBlobStore::new(kv, kv_buf.as_mut_slice()), + SharedKvBlobStore::new(kv), &state, ); diff --git a/examples/src/bin/camera_tests.rs b/examples/src/bin/camera_tests.rs index 18b588ed4..b88ebe4fa 100644 --- a/examples/src/bin/camera_tests.rs +++ b/examples/src/bin/camera_tests.rs @@ -371,7 +371,6 @@ type WebRtc = WebRtcProvHandler = StaticCell::new(); static BUFFERS: StaticCell> = StaticCell::new(); -static KV_BUF: StaticCell<[u8; 4096]> = StaticCell::new(); static WEBRTC: StaticCell = StaticCell::new(); static CAM_AV: StaticCell = StaticCell::new(); static CAM_AV_SETTINGS: StaticCell< @@ -405,16 +404,19 @@ fn main() -> Result<(), Error> { args::port_override(), )); - let kv_buf = KV_BUF.uninit().init_zeroed().as_mut_slice(); let mut kv = args::file_kv_store(); - futures_lite::future::block_on(matter.load_persist(&mut kv, kv_buf))?; let buffers = BUFFERS.uninit().init_with(PooledBuffers::init(0)); - // Create the data model state (subscriptions, events, network store) and load - // the persisted event counter. + // Create the data model state (subscriptions, events, network store). It owns + // the KV scratch buffer, which the startup loads below reuse rather than + // allocating a separate one. let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); - futures_lite::future::block_on(state.load_persist(&mut kv, kv_buf))?; + + // Re-hydrate the `Matter` instance and the data model state (event-number + // epoch) using the state's own scratch buffer. + futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; + futures_lite::future::block_on(state.load_persist(&mut kv))?; let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); let mut rand = crypto.rand()?; @@ -572,7 +574,7 @@ fn main() -> Result<(), Error> { push_av, chime, ), - SharedKvBlobStore::new(kv, kv_buf), + SharedKvBlobStore::new(kv), &state, ); diff --git a/examples/src/bin/dimmable_light.rs b/examples/src/bin/dimmable_light.rs index b566579ce..d5af080ab 100644 --- a/examples/src/bin/dimmable_light.rs +++ b/examples/src/bin/dimmable_light.rs @@ -76,17 +76,20 @@ fn main() -> Result<(), Error> { let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); // Persistence - let mut kv_buf = [0u8; 4096]; let mut kv = rs_matter::persist::DirKvBlobStore::new_default(); - futures_lite::future::block_on(matter.load_persist(&mut kv, &mut kv_buf))?; // Create the transport buffers let buffers = PooledBuffers::<10, IMBuffer>::new(0); - // Create the data model state (subscriptions, events, network store) and load - // the persisted event counter. + // Create the data model state (subscriptions, events, network store). It owns + // the KV scratch buffer, which the startup loads below reuse rather than + // allocating a separate one. let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); - futures_lite::future::block_on(state.load_persist(&mut kv, &mut kv_buf))?; + + // Re-hydrate the `Matter` instance and the data model state (event-number + // epoch) using the state's own scratch buffer. + futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; + futures_lite::future::block_on(state.load_persist(&mut kv))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -119,7 +122,7 @@ fn main() -> Result<(), Error> { &crypto, &buffers, dm_handler(rand, &on_off_handler, &level_control_handler), - SharedKvBlobStore::new(kv, kv_buf), + SharedKvBlobStore::new(kv), &state, ); diff --git a/examples/src/bin/light_tests.rs b/examples/src/bin/light_tests.rs index 11c3cc0cd..024e6fda7 100644 --- a/examples/src/bin/light_tests.rs +++ b/examples/src/bin/light_tests.rs @@ -79,7 +79,6 @@ mod args; static MATTER: StaticCell = StaticCell::new(); static BUFFERS: StaticCell> = StaticCell::new(); static STATE: StaticCell = StaticCell::new(); -static KV_BUF: StaticCell<[u8; 4096]> = StaticCell::new(); fn main() -> Result<(), Error> { let thread = std::thread::Builder::new() @@ -106,16 +105,19 @@ fn run() -> Result<(), Error> { args::port_override(), )); - let kv_buf = KV_BUF.uninit().init_zeroed().as_mut_slice(); let mut kv = args::file_kv_store(); - futures_lite::future::block_on(matter.load_persist(&mut kv, kv_buf))?; let buffers = BUFFERS.uninit().init_with(PooledBuffers::init(0)); - // Create the data model state (subscriptions, events, network store) and load - // the persisted event counter. + // Create the data model state (subscriptions, events, network store). It owns + // the KV scratch buffer, which the startup loads below reuse rather than + // allocating a separate one. let state = STATE.init(EthDataModelState::new(EthNetwork::new_default())); - futures_lite::future::block_on(state.load_persist(&mut kv, kv_buf))?; + + // Re-hydrate the `Matter` instance and the data model state (event-number + // epoch) using the state's own scratch buffer. + futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; + futures_lite::future::block_on(state.load_persist(&mut kv))?; let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); let mut rand = crypto.rand()?; @@ -160,7 +162,7 @@ fn run() -> Result<(), Error> { &level_control_handler, &color_control_handler, ), - SharedKvBlobStore::new(kv, kv_buf), + SharedKvBlobStore::new(kv), state, ); diff --git a/examples/src/bin/media_player.rs b/examples/src/bin/media_player.rs index 921932f43..117602cc2 100644 --- a/examples/src/bin/media_player.rs +++ b/examples/src/bin/media_player.rs @@ -85,17 +85,20 @@ fn main() -> Result<(), Error> { let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); // Persistence - let mut kv_buf = [0; 4096]; let mut kv = DirKvBlobStore::new_default(); - futures_lite::future::block_on(matter.load_persist(&mut kv, &mut kv_buf))?; // Create the transport buffers let buffers = PooledBuffers::<10, _>::new(0); - // Create the data model state (subscriptions, events, network store) and load - // the persisted event counter. + // Create the data model state (subscriptions, events, network store). It owns + // the KV scratch buffer, which the startup loads below reuse rather than + // allocating a separate one. let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); - futures_lite::future::block_on(state.load_persist(&mut kv, &mut kv_buf))?; + + // Re-hydrate the `Matter` instance and the data model state (event-number + // epoch) using the state's own scratch buffer. + futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; + futures_lite::future::block_on(state.load_persist(&mut kv))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -115,7 +118,7 @@ fn main() -> Result<(), Error> { &crypto, &buffers, dm_handler(rand, &on_off_handler), - SharedKvBlobStore::new(kv, kv_buf.as_mut_slice()), + SharedKvBlobStore::new(kv), &state, ); diff --git a/examples/src/bin/onoff_light.rs b/examples/src/bin/onoff_light.rs index 63c4cb24e..338f058e9 100644 --- a/examples/src/bin/onoff_light.rs +++ b/examples/src/bin/onoff_light.rs @@ -61,15 +61,19 @@ fn main() -> Result<(), Error> { let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); // Persistence - let mut kv_buf = [0u8; 4096]; let mut kv = DirKvBlobStore::new_default(); - futures_lite::future::block_on(matter.load_persist(&mut kv, &mut kv_buf))?; // Create the transport buffers let buffers = PooledBuffers::<10, IMBuffer>::new(0); - // Create the data model state (subscriptions table, events queue, network store) - let state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); + // Create the data model state (subscriptions table, events queue, network + // store). It owns the KV scratch buffer, which we reuse for the startup load + // below rather than allocating a separate one. + let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); + + // Re-hydrate the `Matter` instance (fabrics, ACLs, basic info) using the + // state's own scratch buffer. + futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -89,7 +93,7 @@ fn main() -> Result<(), Error> { &crypto, &buffers, dm_handler(rand, &on_off_handler), - SharedKvBlobStore::new(kv, kv_buf), + SharedKvBlobStore::new(kv), &state, ); diff --git a/examples/src/bin/onoff_light_bt.rs b/examples/src/bin/onoff_light_bt.rs index f5fea70df..9bfce1da3 100644 --- a/examples/src/bin/onoff_light_bt.rs +++ b/examples/src/bin/onoff_light_bt.rs @@ -126,23 +126,22 @@ fn run( // Create the Matter object let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); - // A storage for the Wifi networks, re-hydrated from persistence. - let mut networks = WifiNetworks::<3>::new(); - // Persistence - let mut kv_buf = [0; 4096]; let mut kv = DirKvBlobStore::new_default(); - futures_lite::future::block_on(matter.load_persist(&mut kv, &mut kv_buf))?; - futures_lite::future::block_on(networks.load_persist(&mut kv, &mut kv_buf))?; // Create the transport buffers let buffers = PooledBuffers::<10, _>::new(0); - // Create the data model state (subscriptions, events, the Wifi network store) - // and load the persisted event counter. The (raw) network store was loaded - // above, before being moved into the state. - let mut state: WirelessDataModelState> = WirelessDataModelState::new(networks); - futures_lite::future::block_on(state.load_persist(&mut kv, &mut kv_buf))?; + // Create the data model state (subscriptions, events, the Wifi network store). + // It owns the KV scratch buffer, so the one-time startup loads below reuse it + // (`state.kv_buf_mut()`) rather than allocating a separate buffer. + let mut state: WirelessDataModelState> = + WirelessDataModelState::new(WifiNetworks::new()); + + // Re-hydrate persisted state: the `Matter` instance (fabrics, ACLs, basic + // info) and the data model state itself (event-number epoch + Wifi networks). + futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; + futures_lite::future::block_on(state.load_persist(&mut kv))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -169,7 +168,7 @@ fn run( &crypto, &buffers, dm_handler(rand, &on_off_handler, &net_ctl, &net_ctl), - SharedKvBlobStore::new(kv, kv_buf.as_mut_slice()), + SharedKvBlobStore::new(kv), &net_ctl, &state, ); diff --git a/examples/src/bin/onoff_light_switch.rs b/examples/src/bin/onoff_light_switch.rs index 3eafb54a2..9dfe0118c 100644 --- a/examples/src/bin/onoff_light_switch.rs +++ b/examples/src/bin/onoff_light_switch.rs @@ -101,22 +101,24 @@ fn main() -> Result<(), Error> { let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); // Persistence - let mut kv_buf = [0u8; 4096]; let mut kv = DirKvBlobStore::new_default(); - futures_lite::future::block_on(matter.load_persist(&mut kv, &mut kv_buf))?; - - // The Binding registry (the switch's address book), loaded from persistence. - let bindings = Bindings::::new(); - futures_lite::future::block_on(bindings.load_persist(&mut kv, &mut kv_buf))?; let buffers = PooledBuffers::<10, IMBuffer>::new(0); // Create the data model state. This device EMITS events (the Generic Switch // press events), so - unlike the examples that use `NoEvents` - the default // state carries a real (non-zero) event queue that holds them until - // subscribers read them. + // subscribers read them. It also owns the KV scratch buffer, which all the + // startup loads below reuse rather than allocating a separate one. let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); - futures_lite::future::block_on(state.load_persist(&mut kv, &mut kv_buf))?; + + // The Binding registry (the switch's address book), loaded from persistence. + let bindings = Bindings::::new(); + + // Re-hydrate persisted state using the state's own scratch buffer. + futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; + futures_lite::future::block_on(bindings.load_persist(&mut kv, state.kv_buf_mut()))?; + futures_lite::future::block_on(state.load_persist(&mut kv))?; let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); let rand = crypto.rand()?; @@ -126,7 +128,7 @@ fn main() -> Result<(), Error> { &crypto, &buffers, dm_handler(rand, &bindings), - SharedKvBlobStore::new(kv, kv_buf), + SharedKvBlobStore::new(kv), &state, ); diff --git a/examples/src/bin/onoff_light_work_stealing.rs b/examples/src/bin/onoff_light_work_stealing.rs index 39e41388e..c8551f9ad 100644 --- a/examples/src/bin/onoff_light_work_stealing.rs +++ b/examples/src/bin/onoff_light_work_stealing.rs @@ -66,7 +66,6 @@ static MATTER: StaticCell = StaticCell::new(); static BUFFERS: StaticCell> = StaticCell::new(); static STATE: StaticCell = StaticCell::new(); static CRYPTO: StaticCell> = StaticCell::new(); -static KV_BUF: StaticCell<[u8; 4096]> = StaticCell::new(); fn main() -> Result<(), Error> { env_logger::init_from_env( @@ -81,17 +80,20 @@ fn main() -> Result<(), Error> { )); // Persistence - let kv_buf = KV_BUF.uninit().init_zeroed().as_mut_slice(); let mut kv = DirKvBlobStore::new_default(); - futures_lite::future::block_on(matter.load_persist(&mut kv, kv_buf))?; // Create the transport buffers let buffers = &*BUFFERS.uninit().init_with(PooledBuffers::init(0)); - // Create the data model state (subscriptions, events, network store) and load - // the persisted event counter. + // Create the data model state (subscriptions, events, network store). It owns + // the KV scratch buffer, which the startup loads below reuse rather than + // allocating a separate one. let state = STATE.init(EthDataModelState::new(EthNetwork::new_default())); - futures_lite::future::block_on(state.load_persist(&mut kv, kv_buf))?; + + // Re-hydrate the `Matter` instance and the data model state (event-number + // epoch) using the state's own scratch buffer. + futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; + futures_lite::future::block_on(state.load_persist(&mut kv))?; // Create the crypto instance let crypto = &*CRYPTO.init(RustCrypto::new(FakeRng, DAC_PRIVKEY)); @@ -111,7 +113,7 @@ fn main() -> Result<(), Error> { crypto, buffers, (NODE, dm_handler(rand, on_off_handler)), - SharedKvBlobStore::new(kv, kv_buf), + SharedKvBlobStore::new(kv), state, ); diff --git a/examples/src/bin/ota_requestor.rs b/examples/src/bin/ota_requestor.rs index 5545c7448..81e4f95a9 100644 --- a/examples/src/bin/ota_requestor.rs +++ b/examples/src/bin/ota_requestor.rs @@ -90,13 +90,7 @@ fn main() -> Result<(), Error> { let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); // Persistence - let mut kv_buf = [0u8; 4096]; let mut kv = DirKvBlobStore::new_default(); - futures_lite::future::block_on(matter.load_persist(&mut kv, &mut kv_buf))?; - - // The OTA Requestor's persistent provider list, re-hydrated from storage. - let providers = Providers::new(); - futures_lite::future::block_on(providers.load_persist(&mut kv, &mut kv_buf))?; // The OTA Requestor's transient, reported update state, for the cluster on // endpoint 1 (see `NODE`). State changes are pushed to subscribers via the @@ -105,10 +99,18 @@ fn main() -> Result<(), Error> { let buffers = PooledBuffers::<10, IMBuffer>::new(0); - // Create the data model state (subscriptions, events, network store) and load - // the persisted event counter. + // Create the data model state (subscriptions, events, network store). It owns + // the KV scratch buffer, which all the startup loads below reuse rather than + // allocating a separate one. let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); - futures_lite::future::block_on(state.load_persist(&mut kv, &mut kv_buf))?; + + // The OTA Requestor's persistent provider list, re-hydrated from storage. + let providers = Providers::new(); + + // Re-hydrate persisted state using the state's own scratch buffer. + futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; + futures_lite::future::block_on(providers.load_persist(&mut kv, state.kv_buf_mut()))?; + futures_lite::future::block_on(state.load_persist(&mut kv))?; let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -119,7 +121,7 @@ fn main() -> Result<(), Error> { &crypto, &buffers, dm_handler(rand, &providers, &ota_state), - SharedKvBlobStore::new(kv, kv_buf), + SharedKvBlobStore::new(kv), &state, ); diff --git a/examples/src/bin/scenes_tests.rs b/examples/src/bin/scenes_tests.rs index 73b2ce1a7..6f6948356 100644 --- a/examples/src/bin/scenes_tests.rs +++ b/examples/src/bin/scenes_tests.rs @@ -88,7 +88,6 @@ mod args; static MATTER: StaticCell = StaticCell::new(); static BUFFERS: StaticCell> = StaticCell::new(); static STATE: StaticCell = StaticCell::new(); -static KV_BUF: StaticCell<[u8; 4096]> = StaticCell::new(); const SCENES_CAPACITY: usize = 16; static SCENES_STATE: StaticCell> = StaticCell::new(); @@ -131,17 +130,20 @@ fn run() -> Result<(), Error> { )); // Persistence - let kv_buf = KV_BUF.uninit().init_zeroed().as_mut_slice(); let mut kv = args::file_kv_store(); - futures_lite::future::block_on(matter.load_persist(&mut kv, kv_buf))?; // Create the transport buffers let buffers = BUFFERS.uninit().init_with(PooledBuffers::init(0)); - // Create the data model state (subscriptions, events, network store) and load - // the persisted event counter. + // Create the data model state (subscriptions, events, network store). It owns + // the KV scratch buffer, which the startup loads (here and the scenes load + // below) reuse rather than allocating a separate one. let state = STATE.init(EthDataModelState::new(EthNetwork::new_default())); - futures_lite::future::block_on(state.load_persist(&mut kv, kv_buf))?; + + // Re-hydrate the `Matter` instance and the data model state (event-number + // epoch) using the state's own scratch buffer. + futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; + futures_lite::future::block_on(state.load_persist(&mut kv))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -155,7 +157,7 @@ fn run() -> Result<(), Error> { .init_with(RefCell::init(UnitTestingHandlerData::init())); let scenes_state = SCENES_STATE.uninit().init_with(ScenesState::init()); - futures_lite::future::block_on(scenes_state.load_persist(&mut kv, kv_buf))?; + futures_lite::future::block_on(scenes_state.load_persist(&mut kv, state.kv_buf_mut()))?; // OnOff cluster setup let on_off_handler = @@ -198,7 +200,7 @@ fn run() -> Result<(), Error> { scenes_handler, unit_testing_data, ), - SharedKvBlobStore::new(kv, kv_buf), + SharedKvBlobStore::new(kv), state, ); diff --git a/examples/src/bin/speaker.rs b/examples/src/bin/speaker.rs index d53a34d64..6b2748b71 100644 --- a/examples/src/bin/speaker.rs +++ b/examples/src/bin/speaker.rs @@ -66,17 +66,20 @@ fn main() -> Result<(), Error> { let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); // Persistence - let mut kv_buf = [0; 4096]; let mut kv = DirKvBlobStore::new_default(); - futures_lite::future::block_on(matter.load_persist(&mut kv, &mut kv_buf))?; // Create the transport buffers let buffers = PooledBuffers::<10, _>::new(0); - // Create the data model state (subscriptions, events, network store) and load - // the persisted event counter. + // Create the data model state (subscriptions, events, network store). It owns + // the KV scratch buffer, which the startup loads below reuse rather than + // allocating a separate one. let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); - futures_lite::future::block_on(state.load_persist(&mut kv, &mut kv_buf))?; + + // Re-hydrate the `Matter` instance and the data model state (event-number + // epoch) using the state's own scratch buffer. + futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; + futures_lite::future::block_on(state.load_persist(&mut kv))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -115,7 +118,7 @@ fn main() -> Result<(), Error> { &crypto, &buffers, dm_handler(rand, &on_off_handler, &level_control_handler), - SharedKvBlobStore::new(kv, kv_buf.as_mut_slice()), + SharedKvBlobStore::new(kv), &state, ); diff --git a/examples/src/bin/system_tests.rs b/examples/src/bin/system_tests.rs index bae0e5e5f..fe7ff034d 100644 --- a/examples/src/bin/system_tests.rs +++ b/examples/src/bin/system_tests.rs @@ -109,7 +109,6 @@ mod args; // as well as just allocating the objects on-stack or on the heap. static MATTER: StaticCell = StaticCell::new(); static BUFFERS: StaticCell> = StaticCell::new(); -static KV_BUF: StaticCell<[u8; 4096]> = StaticCell::new(); static UNIT_TESTING_DATA: StaticCell> = StaticCell::new(); static GEN_DIAG: StaticCell = StaticCell::new(); // UserLabel registry — host endpoints and labels-per-endpoint counts @@ -171,17 +170,20 @@ fn main() -> Result<(), Error> { .init_with(Matter::init(&BASIC_INFO, comm_data, &TEST_DEV_ATT, port)); // Persistence - let kv_buf = KV_BUF.uninit().init_zeroed().as_mut_slice(); let mut kv = args::file_kv_store(); - futures_lite::future::block_on(matter.load_persist(&mut kv, kv_buf))?; // Create the transport buffers let buffers = BUFFERS.uninit().init_with(PooledBuffers::init(0)); - // Create the data model state (subscriptions, events, network store) and load - // the persisted event counter. + // Create the data model state (subscriptions, events, network store). It owns + // the KV scratch buffer, which all the startup loads (here and the user-label + // / binding loads below) reuse rather than allocating a separate one. let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); - futures_lite::future::block_on(state.load_persist(&mut kv, kv_buf))?; + + // Re-hydrate the `Matter` instance and the data model state (event-number + // epoch) using the state's own scratch buffer. + futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; + futures_lite::future::block_on(state.load_persist(&mut kv))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -210,7 +212,7 @@ fn main() -> Result<(), Error> { // `TestUserLabelCluster` YAML test sees the labels the previous // boot wrote. let user_labels = USER_LABELS.uninit().init_with(UserLabels::init()); - futures_lite::future::block_on(user_labels.load_persist(&mut kv, kv_buf))?; + futures_lite::future::block_on(user_labels.load_persist(&mut kv, state.kv_buf_mut()))?; let user_label_handler = UserLabelHandler::new(Dataver::new_rand(&mut rand), ROOT_ENDPOINT_ID, user_labels); @@ -219,7 +221,7 @@ fn main() -> Result<(), Error> { // UserLabels. Loaded from KV before the data model accepts traffic // so bindings written pre-reboot survive. let bindings = BINDINGS.uninit().init_with(Bindings::init()); - futures_lite::future::block_on(bindings.load_persist(&mut kv, kv_buf))?; + futures_lite::future::block_on(bindings.load_persist(&mut kv, state.kv_buf_mut()))?; let binding_handler_ep0 = BindingHandler::new(Dataver::new_rand(&mut rand), ROOT_ENDPOINT_ID, bindings); @@ -298,7 +300,7 @@ fn main() -> Result<(), Error> { dlog_buffers, log_provider, ), - SharedKvBlobStore::new(kv, kv_buf), + SharedKvBlobStore::new(kv), &state, ); diff --git a/examples/src/bin/webrtc_camera.rs b/examples/src/bin/webrtc_camera.rs index 7c64072db..961f0b48f 100644 --- a/examples/src/bin/webrtc_camera.rs +++ b/examples/src/bin/webrtc_camera.rs @@ -1102,7 +1102,6 @@ impl WebRtcHooks for Str0mHooks { static MATTER: StaticCell = StaticCell::new(); static BUFFERS: StaticCell> = StaticCell::new(); static STATE: StaticCell = StaticCell::new(); -static KV_BUF: StaticCell<[u8; 4096]> = StaticCell::new(); static WEBRTC: StaticCell = StaticCell::new(); static CAM_AV: StaticCell> = StaticCell::new(); @@ -1158,16 +1157,19 @@ fn main() -> Result<(), Error> { MATTER_PORT, )); - let kv_buf = KV_BUF.uninit().init_zeroed().as_mut_slice(); let mut kv = DirKvBlobStore::new_default(); - futures_lite::future::block_on(matter.load_persist(&mut kv, kv_buf))?; let buffers = BUFFERS.uninit().init_with(PooledBuffers::init(0)); - // Create the data model state (subscriptions, events, network store) and load - // the persisted event counter. + // Create the data model state (subscriptions, events, network store). It owns + // the KV scratch buffer, which the startup loads below reuse rather than + // allocating a separate one. let state = STATE.init(EthDataModelState::new(EthNetwork::new_default())); - futures_lite::future::block_on(state.load_persist(&mut kv, kv_buf))?; + + // Re-hydrate the `Matter` instance and the data model state (event-number + // epoch) using the state's own scratch buffer. + futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; + futures_lite::future::block_on(state.load_persist(&mut kv))?; let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); let mut rand = crypto.rand()?; @@ -1298,7 +1300,7 @@ fn main() -> Result<(), Error> { &crypto, buffers, dm_handler(rand, webrtc, cam_av, cam_av_settings, zone_mgmt), - SharedKvBlobStore::new(kv, kv_buf), + SharedKvBlobStore::new(kv), state, ); diff --git a/rs-matter/src/dm.rs b/rs-matter/src/dm.rs index 3ceef8182..2e9d72d18 100644 --- a/rs-matter/src/dm.rs +++ b/rs-matter/src/dm.rs @@ -38,15 +38,19 @@ use crate::im::{ ReadReq, ReportDataReq, ReportDataRespTag, StatusResp, SubscribeReq, SubscribeResp, TimedReq, WriteReq, WriteRespTag, IM_REVISION, PROTO_ID_INTERACTION_MODEL, }; -use crate::persist::{KvBlobStore, KvBlobStoreAccess}; +use crate::persist::{ + KvBlobStore, KvBlobStoreAccess, SharedKvBlobStore, DEFAULT_KV_BUF_SIZE, NETWORKS_KEY, +}; use crate::respond::ExchangeHandler; use crate::tlv::{get_root_node_struct, FromTLV, Nullable, TLVElement, TLVTag, TLVWrite, ToTLV}; use crate::transport::exchange::{ Exchange, ExchangeId, MAX_EXCHANGE_RX_BUF_SIZE, MAX_EXCHANGE_TX_BUF_SIZE, }; +use crate::utils::cell::RefCell; use crate::utils::select::Coalesce; use crate::utils::storage::pooled::BufferAccess; use crate::utils::storage::WriteBuf; +use crate::utils::sync::blocking::Mutex; use crate::Matter; use crate::utils::init::{init, Init}; @@ -88,41 +92,80 @@ pub struct DataModelState< N, const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, + const KB: usize = DEFAULT_KV_BUF_SIZE, > { subscriptions: Subscriptions, events: Events, networks: SharedNetworks, + /// The scratch buffer used by the key-value persistence machinery at runtime. + /// Behind a blocking mutex so the data model can recombine it with the + /// (store-only) [`SharedKvBlobStore`](crate::persist::SharedKvBlobStore). + kv_buf: Mutex>, } -impl DataModelState { +impl DataModelState { /// Create a new state instance backed by the given (raw) [`Networks`] store. pub const fn new(networks: N) -> Self { Self { subscriptions: Subscriptions::new(), events: Events::new(), networks: SharedNetworks::new(networks), + kv_buf: Mutex::new(RefCell::new([0; KB])), } } - /// Return an in-place initializer for the state (for large `NE`, to avoid a - /// big temporary on the stack). + /// Return an in-place initializer for the state (for large `NE`/`KB`, to + /// avoid a big temporary on the stack). pub fn init(networks: impl Init) -> impl Init { init!(Self { subscriptions <- Subscriptions::init(), events <- Events::init(), networks <- SharedNetworks::init(networks), + kv_buf <- Mutex::init(RefCell::init(crate::utils::init::zeroed())), }) } - /// Re-hydrate the events queue's persisted state (the event-number epoch) so - /// event numbers are not reused across reboots. Call once at startup, before - /// the state is shared with a [`DataModel`]. The (raw) network store is loaded - /// separately, before this state is constructed. - pub async fn load_persist(&mut self, kv: S, buf: &mut [u8]) -> Result<(), Error> + /// Re-hydrate this state's persisted contents - the events-queue epoch (so + /// event numbers are not reused across reboots) and the network store - using + /// this state's own (owned) scratch buffer. Call once at startup, before the + /// state is shared with a [`DataModel`]. + pub async fn load_persist(&mut self, mut kv: S) -> Result<(), Error> where S: KvBlobStore, + N: Networks, { - self.events.load_persist(kv, buf).await + // We hold `&mut self`, so borrow the scratch buffer directly - no locking + // (the mutex is only needed for shared, runtime access). + let Self { + events, + networks, + kv_buf, + .. + } = self; + + let buf = &mut kv_buf.get_mut().get_mut()[..]; + + // The event-number epoch. + events.load_persist(&mut kv, buf).await?; + + // The network store. + let networks = networks.get_mut().get_mut(); + networks.reset()?; + if let Some(data) = kv.load(NETWORKS_KEY, buf)? { + networks.load(data)?; + } + + Ok(()) + } + + /// Borrow this state's owned scratch buffer for one-time startup loads (e.g. + /// [`Matter::load_persist`] or a cluster's `load_persist`), so callers need + /// not allocate a separate buffer. + /// + /// Available only with exclusive (`&mut`) access - i.e. before the state is + /// shared with a [`DataModel`]. + pub fn kv_buf_mut(&mut self) -> &mut [u8] { + &mut self.kv_buf.get_mut().get_mut()[..] } /// The subscriptions table. @@ -141,6 +184,33 @@ impl DataModelState { } } +/// Recombines a store-only [`SharedKvBlobStore`] with the scratch buffer owned by +/// a [`DataModelState`] to present a full [`KvBlobStoreAccess`]. +/// +/// The buffer lock is always taken first, then the store lock, so the two-lock +/// order is consistent across all persistence paths (and single-threaded +/// executors never actually block on either). +struct StateKvBlobStore<'a, S, const KB: usize> { + store: &'a SharedKvBlobStore, + buf: &'a Mutex>, +} + +impl KvBlobStoreAccess for StateKvBlobStore<'_, S, KB> +where + S: KvBlobStore, +{ + fn access(&self, f: F) -> R + where + F: FnOnce(&mut dyn KvBlobStore, &mut [u8]) -> R, + { + self.buf.lock(|cell| { + let mut buf = cell.borrow_mut(); + + self.store.with_store(|store| f(store, &mut buf[..])) + }) + } +} + /// The implementation needs a `DataModelHandler` instance to interact with the underlying clusters of the data model. /// /// `NC` is the network controller type driving the (optional) wireless connection @@ -148,17 +218,27 @@ impl DataModelState { /// the right choice for Ethernet (and what the convenience [`DataModel::new`] /// constructor wires up); wireless devices pass a real controller via /// [`DataModel::new_with_net_ctl`]. -pub struct DataModel<'a, const NS: usize, const NE: usize, C, B, T, S, N, NC = NoopWirelessNetCtl> -where +pub struct DataModel< + 'a, + C, + B, + T, + S, + N, + NC = NoopWirelessNetCtl, + const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, + const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, + const KB: usize = DEFAULT_KV_BUF_SIZE, +> where B: BufferAccess, { matter: &'a Matter<'a>, crypto: C, buffers: &'a B, - kv: S, + kv: SharedKvBlobStore, net_ctl: NC, subscriptions_buffers: SubscriptionsBuffers<'a, B, NS>, - state: &'a DataModelState, + state: &'a DataModelState, handler: T, } @@ -168,12 +248,22 @@ where pub type EthDataModelState< const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, -> = DataModelState, NS, NE>; + const KB: usize = DEFAULT_KV_BUF_SIZE, +> = DataModelState, NS, NE, KB>; /// A [`DataModel`] for an Ethernet device (network store fixed to [`EthNetwork`]), /// so the `N` generic disappears from call sites. Pairs with [`EthDataModelState`]. -pub type EthDataModel<'a, const NS: usize, const NE: usize, C, B, T, S> = - DataModel<'a, NS, NE, C, B, T, S, EthNetwork<'static>>; +pub type EthDataModel< + 'a, + C, + B, + T, + S, + NC = NoopWirelessNetCtl, + const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, + const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, + const KB: usize = DEFAULT_KV_BUF_SIZE, +> = DataModel<'a, C, B, T, S, EthNetwork<'static>, NC, NS, NE, KB>; /// A [`DataModelState`] for a wireless device, parameterized by the concrete /// wireless network store `N` (e.g. `WifiNetworks<3>` or a Thread store). Pairs @@ -182,19 +272,31 @@ pub type WirelessDataModelState< N, const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, -> = DataModelState; + const KB: usize = DEFAULT_KV_BUF_SIZE, +> = DataModelState; /// A [`DataModel`] for a wireless device (network store `N`, network controller /// `NC`). Pairs with [`WirelessDataModelState`]. -pub type WirelessDataModel<'a, const NS: usize, const NE: usize, C, B, T, S, N, NC> = - DataModel<'a, NS, NE, C, B, T, S, N, NC>; +pub type WirelessDataModel< + 'a, + C, + B, + T, + S, + N, + NC, + const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, + const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, + const KB: usize = DEFAULT_KV_BUF_SIZE, +> = DataModel<'a, C, B, T, S, N, NC, NS, NE, KB>; -impl<'a, const NS: usize, const NE: usize, C, B, T, S, N> DataModel<'a, NS, NE, C, B, T, S, N> +impl<'a, C, B, T, S, N, const NS: usize, const NE: usize, const KB: usize> + DataModel<'a, C, B, T, S, N, NoopWirelessNetCtl, NS, NE, KB> where C: Crypto, B: BufferAccess, T: DataModelHandler, - S: KvBlobStoreAccess, + S: KvBlobStore, N: Networks, { /// Create the data model for a device that does not need an operational @@ -220,8 +322,8 @@ where crypto: C, buffers: &'a B, handler: T, - kv: S, - state: &'a DataModelState, + kv: SharedKvBlobStore, + state: &'a DataModelState, ) -> Self { Self::new_with_net_ctl( matter, @@ -235,13 +337,13 @@ where } } -impl<'a, const NS: usize, const NE: usize, C, B, T, S, N, NC> - DataModel<'a, NS, NE, C, B, T, S, N, NC> +impl<'a, C, B, T, S, N, NC, const NS: usize, const NE: usize, const KB: usize> + DataModel<'a, C, B, T, S, N, NC, NS, NE, KB> where C: Crypto, B: BufferAccess, T: DataModelHandler, - S: KvBlobStoreAccess, + S: KvBlobStore, N: Networks, { /// Create the data model with an explicit network controller `net_ctl`. @@ -269,9 +371,9 @@ where crypto: C, buffers: &'a B, handler: T, - kv: S, + kv: SharedKvBlobStore, net_ctl: NC, - state: &'a DataModelState, + state: &'a DataModelState, ) -> Self { state.subscriptions.clear(); @@ -296,9 +398,20 @@ where &self.crypto } - /// Return a reference to the `KvBlobStoreAccess` instance used by this data model for interacting with the key-value blob store. - pub const fn kv(&self) -> &S { - &self.kv + /// Return a [`KvBlobStoreAccess`] for interacting with the key-value blob + /// store. This recombines the store-only `S` held by the data model with the + /// scratch buffer owned by the [`DataModelState`]. + pub fn kv(&self) -> impl KvBlobStoreAccess + '_ { + self.kv_access() + } + + /// Recombine the store-only KV (`self.kv`) with the scratch buffer owned by + /// [`DataModelState`] into a full [`KvBlobStoreAccess`]. + fn kv_access(&self) -> StateKvBlobStore<'_, S, KB> { + StateKvBlobStore { + store: &self.kv, + buf: &self.state.kv_buf, + } } /// Open the basic commissioning window. @@ -350,7 +463,8 @@ where // `AttrChangeNotifier` so the cluster's `Dataver` is bumped // too (the `Matter`-level call by itself only routes // subscribers and persists). - self.matter.bump_configuration_version(&self.kv, self) + self.matter + .bump_configuration_version(self.kv_access(), self) } /// Run the Data Model instance. @@ -422,7 +536,7 @@ where &mut state.fabrics, &mut state.sessions, &self.state.networks, - &self.kv, + self.kv_access(), expire_sess_id, &mut notify_mdns, &mut notify_change, @@ -1162,13 +1276,13 @@ where } } -impl ExchangeHandler - for DataModel<'_, NS, NE, C, B, T, S, N, NC> +impl ExchangeHandler + for DataModel<'_, C, B, T, S, N, NC, NS, NE, KB> where C: Crypto, B: BufferAccess, T: DataModelHandler, - S: KvBlobStoreAccess, + S: KvBlobStore, N: Networks, { async fn handle(&self, mut exchange: Exchange<'_>) -> Result<(), Error> { @@ -1176,13 +1290,13 @@ where } } -impl HandlerContext - for DataModel<'_, NS, NE, C, B, T, S, N, NC> +impl HandlerContext + for DataModel<'_, C, B, T, S, N, NC, NS, NE, KB> where C: Crypto, B: BufferAccess, T: DataModelHandler, - S: KvBlobStoreAccess, + S: KvBlobStore, N: Networks, { fn matter(&self) -> &Matter<'_> { @@ -1194,7 +1308,7 @@ where } fn kv(&self) -> impl KvBlobStoreAccess + '_ { - &self.kv + self.kv_access() } fn networks(&self) -> impl NetworksAccess + '_ { @@ -1214,13 +1328,13 @@ where } } -impl AttrChangeNotifier - for DataModel<'_, NS, NE, C, B, T, S, N, NC> +impl AttrChangeNotifier + for DataModel<'_, C, B, T, S, N, NC, NS, NE, KB> where C: Crypto, B: BufferAccess, T: DataModelHandler, - S: KvBlobStoreAccess, + S: KvBlobStore, N: Networks, { fn notify_attr_changed(&self, endpoint_id: EndptId, cluster_id: ClusterId, attr_id: AttrId) { @@ -1258,13 +1372,13 @@ where } } -impl EventEmitter - for DataModel<'_, NS, NE, C, B, T, S, N, NC> +impl EventEmitter + for DataModel<'_, C, B, T, S, N, NC, NS, NE, KB> where C: Crypto, B: BufferAccess, T: DataModelHandler, - S: KvBlobStoreAccess, + S: KvBlobStore, N: Networks, { fn emit_event( @@ -1278,10 +1392,14 @@ where where F: FnOnce(EventTLVWrite<'_>) -> Result<(), Error>, { - let event_number = - self.state - .events - .push(endpoint_id, cluster_id, event_id, priority, &self.kv, f)?; + let event_number = self.state.events.push( + endpoint_id, + cluster_id, + event_id, + priority, + self.kv_access(), + f, + )?; self.state .subscriptions diff --git a/rs-matter/src/persist.rs b/rs-matter/src/persist.rs index 38c6513e5..3726492c0 100644 --- a/rs-matter/src/persist.rs +++ b/rs-matter/src/persist.rs @@ -17,8 +17,6 @@ //! This module provides the key-value BLOB store traits used throughout `rs-matter` for persistence, as well as some implementations for those. -use core::borrow::BorrowMut; - use crate::error::Error; use crate::tlv::{TLVTag, ToTLV}; use crate::utils::cell::RefCell; @@ -28,6 +26,12 @@ use crate::utils::sync::blocking::Mutex; #[cfg(feature = "std")] pub use fileio::*; +/// The default size (in bytes) of the scratch buffer used by the key-value +/// persistence machinery for (de)serializing BLOBs. This is the buffer that +/// [`DataModelState`](crate::dm::DataModelState) owns and the data model +/// recombines with the (store-only) [`SharedKvBlobStore`] at runtime. +pub const DEFAULT_KV_BUF_SIZE: usize = 4096; + /// The first key available for the vendor-specific data. pub const VENDOR_KEYS_START: u16 = 0x1000; @@ -186,7 +190,10 @@ where } } -/// A noop implementation of the `KvBlobStoreAccess` trait. +/// A noop implementation of the `KvBlobStoreAccess` trait (uses an empty buffer). +/// +/// Useful for tests and for exercising persistence-consuming APIs without a real +/// store. pub struct DummyKvBlobStoreAccess; impl KvBlobStoreAccess for DummyKvBlobStoreAccess { @@ -198,35 +205,37 @@ impl KvBlobStoreAccess for DummyKvBlobStoreAccess { } } -/// An implementation of the `KvBlobStoreAccess` trait that provides access -/// to a shared `KvBlobStore` instance and a shared buffer using async mutex. -pub struct SharedKvBlobStore(Mutex>); +/// A store-only wrapper around a shared `KvBlobStore` instance behind a blocking +/// mutex. +/// +/// The scratch buffer used for (de)serialization is not owned here; it is owned +/// by [`DataModelState`](crate::dm::DataModelState) and recombined with this +/// store by the data model into a full [`KvBlobStoreAccess`]. +pub struct SharedKvBlobStore(Mutex>); -impl SharedKvBlobStore { +impl SharedKvBlobStore { /// Create a new `SharedKvBlobStore` instance. /// /// # Arguments /// - `store` - the wrapped `KvBlobStore` instance - /// - `buf` - the wrapped buffer - pub const fn new(store: S, buf: T) -> Self { - Self(Mutex::new(RefCell::new((store, buf)))) + pub const fn new(store: S) -> Self { + Self(Mutex::new(RefCell::new(store))) } -} -impl KvBlobStoreAccess for SharedKvBlobStore -where - S: KvBlobStore, - T: BorrowMut<[u8]>, -{ - fn access(&self, f: F) -> R + /// Get exclusive (locked) access to the wrapped `KvBlobStore`. + /// + /// The data model uses this to recombine the store with the scratch buffer + /// owned by [`DataModelState`](crate::dm::DataModelState) into a full + /// [`KvBlobStoreAccess`]. + pub fn with_store(&self, f: F) -> R where - F: FnOnce(&mut dyn KvBlobStore, &mut [u8]) -> R, + S: KvBlobStore, + F: FnOnce(&mut dyn KvBlobStore) -> R, { self.0.lock(|cell| { - let mut kvb = cell.borrow_mut(); - let kvb = &mut *kvb; + let mut store = cell.borrow_mut(); - f(&mut kvb.0, kvb.1.borrow_mut()) + f(&mut *store) }) } } diff --git a/rs-matter/src/respond.rs b/rs-matter/src/respond.rs index 86480e0b2..4c4d936d2 100644 --- a/rs-matter/src/respond.rs +++ b/rs-matter/src/respond.rs @@ -23,12 +23,15 @@ use embassy_futures::select::{select, select_slice}; use crate::crypto::Crypto; use crate::dm::clusters::net_comm; +use crate::dm::events::DEFAULT_MAX_EVENTS_BUF_SIZE; +use crate::dm::networks::wireless::NoopWirelessNetCtl; +use crate::dm::subscriptions::DEFAULT_MAX_SUBSCRIPTIONS; use crate::dm::DataModelHandler; use crate::dm::{DataModel, IMBuffer}; use crate::error::Error; use crate::im::busy::BusyInteractionModel; use crate::im::PROTO_ID_INTERACTION_MODEL; -use crate::persist::KvBlobStoreAccess; +use crate::persist::{KvBlobStore, DEFAULT_KV_BUF_SIZE}; use crate::sc::busy::BusySecureChannel; use crate::sc::SecureChannel; use crate::transport::exchange::Exchange; @@ -261,22 +264,36 @@ where } /// A type alias for the "default" responder handler, which is a chained handler of the `DataModel` and `SecureChannel` handlers. -pub type DefaultExchangeHandler<'d, 'a, const NS: usize, const NE: usize, C, B, T, S, N, NC> = - ChainedExchangeHandler<&'d DataModel<'a, NS, NE, C, B, T, S, N, NC>, SecureChannel<'d, &'d C>>; - -impl<'d, 'a, const NS: usize, const NE: usize, C, B, T, S, N, NC> - Responder<'a, DefaultExchangeHandler<'d, 'a, NS, NE, C, B, T, S, N, NC>> +pub type DefaultExchangeHandler< + 'd, + 'a, + C, + B, + T, + S, + N, + NC = NoopWirelessNetCtl, + const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, + const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, + const KB: usize = DEFAULT_KV_BUF_SIZE, +> = ChainedExchangeHandler< + &'d DataModel<'a, C, B, T, S, N, NC, NS, NE, KB>, + SecureChannel<'d, &'d C>, +>; + +impl<'d, 'a, C, B, T, S, N, NC, const NS: usize, const NE: usize, const KB: usize> + Responder<'a, DefaultExchangeHandler<'d, 'a, C, B, T, S, N, NC, NS, NE, KB>> where B: BufferAccess, { /// Creates a "default" responder. This is a responder that composes and uses the `rs-matter`-provided `ExchangeHandler` implementations /// (`SecureChannel` and `DataModel`) for handling the Secure Channel protocol and the Interaction Model protocol. #[inline(always)] - pub const fn new_default(data_model: &'d DataModel<'a, NS, NE, C, B, T, S, N, NC>) -> Self + pub const fn new_default(data_model: &'d DataModel<'a, C, B, T, S, N, NC, NS, NE, KB>) -> Self where C: Crypto, T: DataModelHandler, - S: KvBlobStoreAccess, + S: KvBlobStore, N: net_comm::Networks, { Self::new( @@ -318,26 +335,37 @@ impl<'a> Responder<'a, BusyExchangeHandler> { } /// A composition of the `Responder::new_default` and `Responder::new_busy` responders. -pub struct DefaultResponder<'d, 'a, const NS: usize, const NE: usize, C, B, T, S, N, NC> -where +pub struct DefaultResponder< + 'd, + 'a, + C, + B, + T, + S, + N, + NC = NoopWirelessNetCtl, + const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, + const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, + const KB: usize = DEFAULT_KV_BUF_SIZE, +> where B: BufferAccess, { - responder: Responder<'a, DefaultExchangeHandler<'d, 'a, NS, NE, C, B, T, S, N, NC>>, + responder: Responder<'a, DefaultExchangeHandler<'d, 'a, C, B, T, S, N, NC, NS, NE, KB>>, busy_responder: Responder<'a, BusyExchangeHandler>, } -impl<'d, 'a, const NS: usize, const NE: usize, C, B, T, S, N, NC> - DefaultResponder<'d, 'a, NS, NE, C, B, T, S, N, NC> +impl<'d, 'a, C, B, T, S, N, NC, const NS: usize, const NE: usize, const KB: usize> + DefaultResponder<'d, 'a, C, B, T, S, N, NC, NS, NE, KB> where C: Crypto, B: BufferAccess, T: DataModelHandler, - S: KvBlobStoreAccess, + S: KvBlobStore, N: net_comm::Networks, { /// Creates the responder composition. #[inline(always)] - pub const fn new(data_model: &'d DataModel<'a, NS, NE, C, B, T, S, N, NC>) -> Self { + pub const fn new(data_model: &'d DataModel<'a, C, B, T, S, N, NC, NS, NE, KB>) -> Self { Self { responder: Responder::new_default(data_model), busy_responder: Responder::new_busy(data_model.matter(), RESPOND_BUSY_MS), @@ -361,7 +389,7 @@ where ) -> &Responder< 'a, ChainedExchangeHandler< - &'d DataModel<'a, NS, NE, C, B, T, S, N, NC>, + &'d DataModel<'a, C, B, T, S, N, NC, NS, NE, KB>, SecureChannel<'d, &'d C>, >, > { diff --git a/rs-matter/tests/commissioning.rs b/rs-matter/tests/commissioning.rs index 93a362d0f..e2e1eaca7 100644 --- a/rs-matter/tests/commissioning.rs +++ b/rs-matter/tests/commissioning.rs @@ -71,7 +71,7 @@ use rs_matter::im::IMStatusCode; use rs_matter::onboard::cac::{IcacGenerator, RcacGenerator}; use rs_matter::onboard::noc::NocGenerator; use rs_matter::onboard::{CommissionOptions, Commissioner}; -use rs_matter::persist::DummyKvBlobStoreAccess; +use rs_matter::persist::{DummyKvBlobStore, SharedKvBlobStore}; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::transport::exchange::Exchange; @@ -201,7 +201,7 @@ macro_rules! commissioning_test { &device_crypto, device_buffers, dm_handler(rand, &on_off_handler), - DummyKvBlobStoreAccess, + SharedKvBlobStore::new(DummyKvBlobStore), device_state, ); diff --git a/rs-matter/tests/common/e2e.rs b/rs-matter/tests/common/e2e.rs index ee2d5a3cb..0e641bc0d 100644 --- a/rs-matter/tests/common/e2e.rs +++ b/rs-matter/tests/common/e2e.rs @@ -28,7 +28,7 @@ use rs_matter::dm::clusters::net_comm::DummyNetworks; use rs_matter::dm::devices::test::{TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; use rs_matter::dm::{DataModel, DataModelHandler, DataModelState, IMBuffer, Privilege}; use rs_matter::error::Error; -use rs_matter::persist::DummyKvBlobStoreAccess; +use rs_matter::persist::{DummyKvBlobStore, SharedKvBlobStore}; use rs_matter::respond::{ExchangeHandler, Responder}; use rs_matter::transport::exchange::Exchange; use rs_matter::transport::network::{ @@ -181,7 +181,7 @@ impl E2eRunner { &self.crypto, &self.buffers, handler, - DummyKvBlobStoreAccess, + SharedKvBlobStore::new(DummyKvBlobStore), &self.state, ); From b52c0a29ef1ee8874ffa38cde9f155fed20c9303 Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Thu, 18 Jun 2026 13:56:36 +0000 Subject: [PATCH 04/14] Simplify PooledBuffers via a MatterBuffers alias --- bloat-check/src/bin/bloat-check.rs | 12 +-- examples/src/bin/bridge.rs | 4 +- examples/src/bin/camera_tests.rs | 6 +- examples/src/bin/dimmable_light.rs | 5 +- examples/src/bin/light_tests.rs | 7 +- examples/src/bin/media_player.rs | 4 +- examples/src/bin/onoff_light.rs | 5 +- examples/src/bin/onoff_light_bt.rs | 4 +- examples/src/bin/onoff_light_switch.rs | 5 +- examples/src/bin/onoff_light_work_stealing.rs | 7 +- examples/src/bin/ota_requestor.rs | 5 +- examples/src/bin/scenes_tests.rs | 7 +- examples/src/bin/speaker.rs | 4 +- examples/src/bin/system_tests.rs | 22 +++--- examples/src/bin/webrtc_camera.rs | 7 +- rs-matter/src/bdx.rs | 11 +-- rs-matter/src/dm.rs | 30 +++---- rs-matter/src/dm/clusters/diag_logs.rs | 8 +- rs-matter/src/dm/clusters/ota_prov.rs | 8 +- rs-matter/src/dm/subscriptions.rs | 78 +++++++++---------- rs-matter/src/dm/types/handler.rs | 12 +-- rs-matter/src/lib.rs | 2 +- rs-matter/src/respond.rs | 8 +- rs-matter/src/transport.rs | 4 +- rs-matter/src/transport/exchange.rs | 15 ++++ .../src/transport/network/mdns/builtin.rs | 2 +- rs-matter/src/utils/storage/pooled.rs | 63 ++++++++++----- rs-matter/tests/commissioning.rs | 10 +-- rs-matter/tests/common/e2e.rs | 8 +- 29 files changed, 197 insertions(+), 166 deletions(-) diff --git a/bloat-check/src/bin/bloat-check.rs b/bloat-check/src/bin/bloat-check.rs index 9267ff05e..8e5479abe 100644 --- a/bloat-check/src/bin/bloat-check.rs +++ b/bloat-check/src/bin/bloat-check.rs @@ -70,12 +70,12 @@ use rs_matter::dm::clusters::wifi_diag::{ }; use rs_matter::dm::devices::test::{DAC_PRIVKEY, TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; use rs_matter::dm::devices::DEV_TYPE_ON_OFF_LIGHT; +use rs_matter::dm::endpoints; use rs_matter::dm::endpoints::WifiSysHandler; use rs_matter::dm::networks::wireless::{ NetCtlState, NetCtlStateMutex, NetCtlWithStatusImpl, WifiNetworks, }; use rs_matter::dm::networks::NetChangeNotif; -use rs_matter::dm::{endpoints, IMBuffer}; use rs_matter::dm::{ Async, DataModel, Dataver, Endpoint, EpClMatcher, Node, WirelessDataModelState, }; @@ -86,13 +86,13 @@ use rs_matter::persist::{DummyKvBlobStore, SharedKvBlobStore, DEFAULT_KV_BUF_SIZ use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::tlv::Nullable; +use rs_matter::transport::exchange::MatterBuffers; use rs_matter::transport::network::btp::Btp; use rs_matter::transport::network::mdns::builtin::{BuiltinMdns, Host}; use rs_matter::transport::network::{ Address, ChainedNetwork, Ipv4Addr, Ipv6Addr, NetworkReceive, NetworkSend, NoNetwork, }; use rs_matter::utils::init::{init, Init, InitMaybeUninit}; -use rs_matter::utils::storage::pooled::PooledBuffers; use rs_matter::utils::sync::DynBase; use rs_matter::{clusters, devices, handler_chain_type, root_endpoint, Matter, MATTER_PORT}; @@ -156,7 +156,7 @@ macro_rules! unwrap { /// One large struct holding the entire Matter stack state struct MatterStack<'a> { matter: Matter<'a>, - buffers: PooledBuffers<10, IMBuffer>, + buffers: MatterBuffers, // The data model's consolidated state: subscriptions table, events queue and // the (Wifi) network store, all behind `DataModelState`. state: WirelessDataModelState>, @@ -174,7 +174,7 @@ impl<'a> MatterStack<'a> { &TEST_DEV_ATT, MATTER_PORT, ), - buffers <- PooledBuffers::init(0), + buffers <- MatterBuffers::init(), state <- WirelessDataModelState::init(WifiNetworks::init()), net_ctl_state <- NetCtlState::init_with_mutex(), btp <- Btp::init(), @@ -196,7 +196,7 @@ type AppCrypto = RustCrypto<'static, WeakTestOnlyRand>; type AppDataModel<'a> = DataModel< 'a, &'a AppCrypto, - PooledBuffers<10, IMBuffer>, + MatterBuffers, (Node<'a>, &'a AppDmHandler<'a>), DummyKvBlobStore, WifiNetworks<3>, @@ -206,7 +206,7 @@ type AppResponder<'d, 'a> = DefaultResponder< 'd, 'a, &'a AppCrypto, - PooledBuffers<10, IMBuffer>, + MatterBuffers, (Node<'a>, &'a AppDmHandler<'a>), DummyKvBlobStore, WifiNetworks<3>, diff --git a/examples/src/bin/bridge.rs b/examples/src/bin/bridge.rs index 7930ca83c..d1f1bb0a7 100644 --- a/examples/src/bin/bridge.rs +++ b/examples/src/bin/bridge.rs @@ -48,9 +48,9 @@ use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::tlv::{TLVBuilderParent, Utf8StrBuilder}; +use rs_matter::transport::exchange::MatterBuffers; use rs_matter::transport::MATTER_SOCKET_BIND_ADDR; use rs_matter::utils::select::Coalesce; -use rs_matter::utils::storage::pooled::PooledBuffers; use rs_matter::{clusters, devices, root_endpoint, with, Matter, MATTER_PORT}; pub use rs_matter::dm::clusters::decl::bridged_device_basic_information::{ @@ -72,7 +72,7 @@ fn main() -> Result<(), Error> { let mut kv = DirKvBlobStore::new_default(); // Create the transport buffers - let buffers = PooledBuffers::<10, _>::new(0); + let buffers: MatterBuffers = MatterBuffers::new(); // Create the data model state (subscriptions, events, network store). It owns // the KV scratch buffer, which the startup loads below reuse rather than diff --git a/examples/src/bin/camera_tests.rs b/examples/src/bin/camera_tests.rs index b88ebe4fa..0e365f99e 100644 --- a/examples/src/bin/camera_tests.rs +++ b/examples/src/bin/camera_tests.rs @@ -84,9 +84,9 @@ use rs_matter::persist::SharedKvBlobStore; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::tlv::{TLVArray, TLVBuilderParent}; +use rs_matter::transport::exchange::MatterBuffers; use rs_matter::utils::init::InitMaybeUninit; use rs_matter::utils::select::Coalesce; -use rs_matter::utils::storage::pooled::PooledBuffers; use rs_matter::{clusters, devices, root_endpoint, Matter}; use static_cell::StaticCell; @@ -370,7 +370,7 @@ type WebRtc = WebRtcProvHandler = StaticCell::new(); -static BUFFERS: StaticCell> = StaticCell::new(); +static BUFFERS: StaticCell = StaticCell::new(); static WEBRTC: StaticCell = StaticCell::new(); static CAM_AV: StaticCell = StaticCell::new(); static CAM_AV_SETTINGS: StaticCell< @@ -406,7 +406,7 @@ fn main() -> Result<(), Error> { let mut kv = args::file_kv_store(); - let buffers = BUFFERS.uninit().init_with(PooledBuffers::init(0)); + let buffers = BUFFERS.uninit().init_with(MatterBuffers::init()); // Create the data model state (subscriptions, events, network store). It owns // the KV scratch buffer, which the startup loads below reuse rather than diff --git a/examples/src/bin/dimmable_light.rs b/examples/src/bin/dimmable_light.rs index d5af080ab..dbc9b9ca3 100644 --- a/examples/src/bin/dimmable_light.rs +++ b/examples/src/bin/dimmable_light.rs @@ -48,7 +48,6 @@ use rs_matter::dm::devices::DEV_TYPE_DIMMABLE_LIGHT; use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::IMBuffer; use rs_matter::dm::{ Async, Cluster, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, Node, @@ -60,9 +59,9 @@ use rs_matter::persist::SharedKvBlobStore; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::tlv::Nullable; +use rs_matter::transport::exchange::MatterBuffers; use rs_matter::transport::MATTER_SOCKET_BIND_ADDR; use rs_matter::utils::select::Coalesce; -use rs_matter::utils::storage::pooled::PooledBuffers; use rs_matter::{clusters, devices, root_endpoint, with, Matter, MATTER_PORT}; #[path = "../common/mdns.rs"] @@ -79,7 +78,7 @@ fn main() -> Result<(), Error> { let mut kv = rs_matter::persist::DirKvBlobStore::new_default(); // Create the transport buffers - let buffers = PooledBuffers::<10, IMBuffer>::new(0); + let buffers: MatterBuffers = MatterBuffers::new(); // Create the data model state (subscriptions, events, network store). It owns // the KV scratch buffer, which the startup loads below reuse rather than diff --git a/examples/src/bin/light_tests.rs b/examples/src/bin/light_tests.rs index 024e6fda7..5c54e62f7 100644 --- a/examples/src/bin/light_tests.rs +++ b/examples/src/bin/light_tests.rs @@ -51,7 +51,6 @@ use rs_matter::dm::devices::DEV_TYPE_EXTENDED_COLOR_LIGHT; use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::IMBuffer; use rs_matter::dm::{ Async, Cluster, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, Node, @@ -63,9 +62,9 @@ use rs_matter::persist::SharedKvBlobStore; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::tlv::Nullable; +use rs_matter::transport::exchange::MatterBuffers; use rs_matter::utils::init::InitMaybeUninit; use rs_matter::utils::select::Coalesce; -use rs_matter::utils::storage::pooled::PooledBuffers; use rs_matter::{clusters, devices, root_endpoint, with, Matter}; use static_cell::StaticCell; @@ -77,7 +76,7 @@ mod mdns; mod args; static MATTER: StaticCell = StaticCell::new(); -static BUFFERS: StaticCell> = StaticCell::new(); +static BUFFERS: StaticCell = StaticCell::new(); static STATE: StaticCell = StaticCell::new(); fn main() -> Result<(), Error> { @@ -107,7 +106,7 @@ fn run() -> Result<(), Error> { let mut kv = args::file_kv_store(); - let buffers = BUFFERS.uninit().init_with(PooledBuffers::init(0)); + let buffers = BUFFERS.uninit().init_with(MatterBuffers::init()); // Create the data model state (subscriptions, events, network store). It owns // the KV scratch buffer, which the startup loads below reuse rather than diff --git a/examples/src/bin/media_player.rs b/examples/src/bin/media_player.rs index 117602cc2..e1e1286d2 100644 --- a/examples/src/bin/media_player.rs +++ b/examples/src/bin/media_player.rs @@ -68,9 +68,9 @@ use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::tlv::{TLVBuilderParent, Utf8StrArrayBuilder, Utf8StrBuilder}; +use rs_matter::transport::exchange::MatterBuffers; use rs_matter::transport::MATTER_SOCKET_BIND_ADDR; use rs_matter::utils::select::Coalesce; -use rs_matter::utils::storage::pooled::PooledBuffers; use rs_matter::{clusters, devices, root_endpoint, with, Matter, MATTER_PORT}; #[path = "../common/mdns.rs"] @@ -88,7 +88,7 @@ fn main() -> Result<(), Error> { let mut kv = DirKvBlobStore::new_default(); // Create the transport buffers - let buffers = PooledBuffers::<10, _>::new(0); + let buffers: MatterBuffers = MatterBuffers::new(); // Create the data model state (subscriptions, events, network store). It owns // the KV scratch buffer, which the startup loads below reuse rather than diff --git a/examples/src/bin/onoff_light.rs b/examples/src/bin/onoff_light.rs index 338f058e9..bd6aa87a9 100644 --- a/examples/src/bin/onoff_light.rs +++ b/examples/src/bin/onoff_light.rs @@ -35,7 +35,6 @@ use rs_matter::dm::devices::DEV_TYPE_ON_OFF_LIGHT; use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::IMBuffer; use rs_matter::dm::{ Async, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, Node, }; @@ -45,9 +44,9 @@ use rs_matter::pairing::DiscoveryCapabilities; use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; +use rs_matter::transport::exchange::MatterBuffers; use rs_matter::transport::MATTER_SOCKET_BIND_ADDR; use rs_matter::utils::select::Coalesce; -use rs_matter::utils::storage::pooled::PooledBuffers; use rs_matter::{clusters, devices, root_endpoint, Matter, MATTER_PORT}; #[path = "../common/mdns.rs"] @@ -64,7 +63,7 @@ fn main() -> Result<(), Error> { let mut kv = DirKvBlobStore::new_default(); // Create the transport buffers - let buffers = PooledBuffers::<10, IMBuffer>::new(0); + let buffers: MatterBuffers = MatterBuffers::new(); // Create the data model state (subscriptions table, events queue, network // store). It owns the KV scratch buffer, which we reuse for the startup load diff --git a/examples/src/bin/onoff_light_bt.rs b/examples/src/bin/onoff_light_bt.rs index 9bfce1da3..15a0608cc 100644 --- a/examples/src/bin/onoff_light_bt.rs +++ b/examples/src/bin/onoff_light_bt.rs @@ -63,6 +63,7 @@ use rs_matter::pairing::DiscoveryCapabilities; use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; +use rs_matter::transport::exchange::MatterBuffers; #[cfg(target_os = "linux")] use rs_matter::transport::network::btp::bluez; use rs_matter::transport::network::btp::{AdvData, Btp}; @@ -71,7 +72,6 @@ use rs_matter::transport::network::wifi::wpa_supp::unix::DhClientCtl; use rs_matter::transport::network::wifi::wpa_supp::WpaSuppCtl; use rs_matter::transport::MATTER_SOCKET_BIND_ADDR; use rs_matter::utils::select::Coalesce; -use rs_matter::utils::storage::pooled::PooledBuffers; use rs_matter::utils::zbus::Connection; use rs_matter::{clusters, devices, root_endpoint, Matter, MATTER_PORT}; @@ -130,7 +130,7 @@ fn run( let mut kv = DirKvBlobStore::new_default(); // Create the transport buffers - let buffers = PooledBuffers::<10, _>::new(0); + let buffers: MatterBuffers = MatterBuffers::new(); // Create the data model state (subscriptions, events, the Wifi network store). // It owns the KV scratch buffer, so the one-time startup loads below reuse it diff --git a/examples/src/bin/onoff_light_switch.rs b/examples/src/bin/onoff_light_switch.rs index 9dfe0118c..7a9692778 100644 --- a/examples/src/bin/onoff_light_switch.rs +++ b/examples/src/bin/onoff_light_switch.rs @@ -59,7 +59,6 @@ use rs_matter::dm::devices::{DEV_TYPE_GENERIC_SWITCH, DEV_TYPE_ON_OFF_LIGHT_SWIT use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::IMBuffer; use rs_matter::dm::{ Async, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, EventEmitter, Node, @@ -70,9 +69,9 @@ use rs_matter::pairing::DiscoveryCapabilities; use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::transport::exchange::Exchange; +use rs_matter::transport::exchange::MatterBuffers; use rs_matter::transport::MATTER_SOCKET_BIND_ADDR; use rs_matter::utils::select::Coalesce; -use rs_matter::utils::storage::pooled::PooledBuffers; use rs_matter::{clusters, devices, root_endpoint, Matter, MATTER_PORT}; // `OnOffClient` brings the `.on_off()` IM-client method into scope on `Exchange`. @@ -103,7 +102,7 @@ fn main() -> Result<(), Error> { // Persistence let mut kv = DirKvBlobStore::new_default(); - let buffers = PooledBuffers::<10, IMBuffer>::new(0); + let buffers: MatterBuffers = MatterBuffers::new(); // Create the data model state. This device EMITS events (the Generic Switch // press events), so - unlike the examples that use `NoEvents` - the default diff --git a/examples/src/bin/onoff_light_work_stealing.rs b/examples/src/bin/onoff_light_work_stealing.rs index c8551f9ad..dbe22dcb2 100644 --- a/examples/src/bin/onoff_light_work_stealing.rs +++ b/examples/src/bin/onoff_light_work_stealing.rs @@ -35,7 +35,6 @@ use rs_matter::dm::devices::DEV_TYPE_ON_OFF_LIGHT; use rs_matter::dm::endpoints::{self, EthSysHandler}; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::IMBuffer; use rs_matter::dm::{Async, DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, Node}; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -43,9 +42,9 @@ use rs_matter::pairing::DiscoveryCapabilities; use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; +use rs_matter::transport::exchange::MatterBuffers; use rs_matter::transport::MATTER_SOCKET_BIND_ADDR; use rs_matter::utils::init::InitMaybeUninit; -use rs_matter::utils::storage::pooled::PooledBuffers; use rs_matter::{clusters, devices, handler_chain_type, root_endpoint, Matter, MATTER_PORT}; use static_cell::StaticCell; @@ -63,7 +62,7 @@ type AppDmHandler<'a> = handler_chain_type!( // `rs-matter` supports efficient initialization of BSS objects (with `init`) // as well as just allocating the objects on-stack or on the heap. static MATTER: StaticCell = StaticCell::new(); -static BUFFERS: StaticCell> = StaticCell::new(); +static BUFFERS: StaticCell = StaticCell::new(); static STATE: StaticCell = StaticCell::new(); static CRYPTO: StaticCell> = StaticCell::new(); @@ -83,7 +82,7 @@ fn main() -> Result<(), Error> { let mut kv = DirKvBlobStore::new_default(); // Create the transport buffers - let buffers = &*BUFFERS.uninit().init_with(PooledBuffers::init(0)); + let buffers = &*BUFFERS.uninit().init_with(MatterBuffers::init()); // Create the data model state (subscriptions, events, network store). It owns // the KV scratch buffer, which the startup loads below reuse rather than diff --git a/examples/src/bin/ota_requestor.rs b/examples/src/bin/ota_requestor.rs index 81e4f95a9..74e60799a 100644 --- a/examples/src/bin/ota_requestor.rs +++ b/examples/src/bin/ota_requestor.rs @@ -50,7 +50,6 @@ use rs_matter::dm::devices::DEV_TYPE_OTA_REQUESTOR; use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::IMBuffer; use rs_matter::dm::{ Async, AttrChangeNotifier, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, Node, @@ -62,9 +61,9 @@ use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::transport::exchange::Exchange; +use rs_matter::transport::exchange::MatterBuffers; use rs_matter::transport::MATTER_SOCKET_BIND_ADDR; use rs_matter::utils::select::Coalesce; -use rs_matter::utils::storage::pooled::PooledBuffers; use rs_matter::{clusters, devices, root_endpoint, Matter, MATTER_PORT}; #[path = "../common/mdns.rs"] @@ -97,7 +96,7 @@ fn main() -> Result<(), Error> { // data model's change-notifier (the `DataModel`, passed to the OTA loop below). let ota_state = OtaState::new(1); - let buffers = PooledBuffers::<10, IMBuffer>::new(0); + let buffers: MatterBuffers = MatterBuffers::new(); // Create the data model state (subscriptions, events, network store). It owns // the KV scratch buffer, which all the startup loads below reuse rather than diff --git a/examples/src/bin/scenes_tests.rs b/examples/src/bin/scenes_tests.rs index 6f6948356..cfe65632f 100644 --- a/examples/src/bin/scenes_tests.rs +++ b/examples/src/bin/scenes_tests.rs @@ -56,7 +56,6 @@ use rs_matter::dm::devices::DEV_TYPE_DIMMABLE_LIGHT; use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::IMBuffer; use rs_matter::dm::{ Async, Cluster, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, Node, @@ -68,10 +67,10 @@ use rs_matter::persist::SharedKvBlobStore; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::tlv::Nullable; +use rs_matter::transport::exchange::MatterBuffers; use rs_matter::utils::cell::RefCell; use rs_matter::utils::init::InitMaybeUninit; use rs_matter::utils::select::Coalesce; -use rs_matter::utils::storage::pooled::PooledBuffers; use rs_matter::{clusters, devices, root_endpoint, with, Matter}; use static_cell::StaticCell; @@ -86,7 +85,7 @@ mod args; // `rs-matter` supports efficient initialization of BSS objects (with `init`) // as well as just allocating the objects on-stack or on the heap. static MATTER: StaticCell = StaticCell::new(); -static BUFFERS: StaticCell> = StaticCell::new(); +static BUFFERS: StaticCell = StaticCell::new(); static STATE: StaticCell = StaticCell::new(); const SCENES_CAPACITY: usize = 16; @@ -133,7 +132,7 @@ fn run() -> Result<(), Error> { let mut kv = args::file_kv_store(); // Create the transport buffers - let buffers = BUFFERS.uninit().init_with(PooledBuffers::init(0)); + let buffers = BUFFERS.uninit().init_with(MatterBuffers::init()); // Create the data model state (subscriptions, events, network store). It owns // the KV scratch buffer, which the startup loads (here and the scenes load diff --git a/examples/src/bin/speaker.rs b/examples/src/bin/speaker.rs index 6b2748b71..d2475748f 100644 --- a/examples/src/bin/speaker.rs +++ b/examples/src/bin/speaker.rs @@ -49,9 +49,9 @@ use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::tlv::Nullable; +use rs_matter::transport::exchange::MatterBuffers; use rs_matter::transport::MATTER_SOCKET_BIND_ADDR; use rs_matter::utils::select::Coalesce; -use rs_matter::utils::storage::pooled::PooledBuffers; use rs_matter::{clusters, devices, root_endpoint, Matter, MATTER_PORT}; #[path = "../common/mdns.rs"] @@ -69,7 +69,7 @@ fn main() -> Result<(), Error> { let mut kv = DirKvBlobStore::new_default(); // Create the transport buffers - let buffers = PooledBuffers::<10, _>::new(0); + let buffers: MatterBuffers = MatterBuffers::new(); // Create the data model state (subscriptions, events, network store). It owns // the KV scratch buffer, which the startup loads below reuse rather than diff --git a/examples/src/bin/system_tests.rs b/examples/src/bin/system_tests.rs index fe7ff034d..bef3f469a 100644 --- a/examples/src/bin/system_tests.rs +++ b/examples/src/bin/system_tests.rs @@ -60,7 +60,7 @@ use rs_matter::dm::clusters::identify::{self, IdentifyHandler}; use rs_matter::dm::clusters::net_comm; use rs_matter::dm::clusters::noc::{self, ClusterHandler as _}; use rs_matter::dm::clusters::ota_prov::{ - BdxBuffer, ClusterAsyncHandler, DownloadProtocolEnum, OtaBdxHandler, OtaImageMeta, OtaImages, + ClusterAsyncHandler, DownloadProtocolEnum, OtaBdxHandler, OtaImageMeta, OtaImages, OtaImagesRegistry, OtaProviderHandler, OtaQueryOutcome, StatusEnum, }; use rs_matter::dm::clusters::ota_req::{ @@ -89,10 +89,10 @@ use rs_matter::respond::{ChainedExchangeHandler, Responder}; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::sc::SecureChannel; use rs_matter::transport::exchange::Exchange; +use rs_matter::transport::exchange::MatterBuffers; use rs_matter::utils::cell::RefCell; use rs_matter::utils::init::InitMaybeUninit; use rs_matter::utils::select::Coalesce; -use rs_matter::utils::storage::pooled::PooledBuffers; use rs_matter::utils::sync::Notification; use rs_matter::{clusters, devices, Matter}; @@ -108,7 +108,7 @@ mod args; // `rs-matter` supports efficient initialization of BSS objects (with `init`) // as well as just allocating the objects on-stack or on the heap. static MATTER: StaticCell = StaticCell::new(); -static BUFFERS: StaticCell> = StaticCell::new(); +static BUFFERS: StaticCell> = StaticCell::new(); static UNIT_TESTING_DATA: StaticCell> = StaticCell::new(); static GEN_DIAG: StaticCell = StaticCell::new(); // UserLabel registry — host endpoints and labels-per-endpoint counts @@ -122,13 +122,13 @@ static BINDINGS: StaticCell> = StaticCell::new(); // OTA Provider role (gated behind `--filepath`): the file-backed image source // and a small pool of BDX block-staging buffers. static OTA_IMAGES: StaticCell = StaticCell::new(); -static BDX_BUFFERS: StaticCell> = StaticCell::new(); +static BDX_BUFFERS: StaticCell> = StaticCell::new(); // Diagnostic Logs role (driven by `--end_user_support_log` / `--network_diagnostics_log` // / `--crash_log`): the file-backed log source, plus a small pool of BDX staging // buffers (one for an inline read, one for a concurrent BDX transfer). static LOG_PROVIDER: StaticCell = StaticCell::new(); -static DLOG_BUFFERS: StaticCell> = StaticCell::new(); +static DLOG_BUFFERS: StaticCell> = StaticCell::new(); static SW_FAULT_NOTIFY: Notification = Notification::new(); @@ -173,7 +173,7 @@ fn main() -> Result<(), Error> { let mut kv = args::file_kv_store(); // Create the transport buffers - let buffers = BUFFERS.uninit().init_with(PooledBuffers::init(0)); + let buffers = BUFFERS.uninit().init_with(MatterBuffers::init()); // Create the data model state (subscriptions, events, network store). It owns // the KV scratch buffer, which all the startup loads (here and the user-label @@ -257,8 +257,7 @@ fn main() -> Result<(), Error> { args::parse_arg_opt_override("--network_diagnostics_log", |s| s.to_string()), args::parse_arg_opt_override("--crash_log", |s| s.to_string()), )); - let dlog_buffers: &PooledBuffers<2, BdxBuffer> = - DLOG_BUFFERS.uninit().init_with(PooledBuffers::init(0)); + let dlog_buffers: &MatterBuffers<2> = DLOG_BUFFERS.uninit().init_with(MatterBuffers::init()); let app_pipe = parse_app_pipe_override(); let node: &'static Node<'static> = if app_pipe.is_some() { @@ -309,8 +308,7 @@ fn main() -> Result<(), Error> { // traffic, so this is equivalent to `DefaultResponder` for every non-OTA // test. We can't use `DefaultResponder` directly because it builds its // handler chain internally with no way to inject BDX. - let bdx_buffers: &PooledBuffers<2, BdxBuffer> = - BDX_BUFFERS.uninit().init_with(PooledBuffers::init(0)); + let bdx_buffers: &MatterBuffers<2> = BDX_BUFFERS.uninit().init_with(MatterBuffers::init()); let main_handler = ChainedExchangeHandler::new( PROTO_ID_INTERACTION_MODEL, &dm, @@ -603,7 +601,7 @@ const OTA_REQUESTOR_CLUSTER: Cluster<'static> = OtaRequestorHandler::CLUSTER; /// [`DiagLogsHandler`] wired in `dm_handler` (so `NODE`'s declaration /// matches the handler). const DIAGNOSTIC_LOGS_CLUSTER: Cluster<'static> = , + &MatterBuffers<2>, &LogFileProvider, > as diag_logs::ClusterAsyncHandler>::CLUSTER; @@ -724,7 +722,7 @@ fn dm_handler<'a, OH: OnOffHooks, LH: LevelControlHooks>( ota_images: &'a OtaFileImages, ota_providers: &'a Providers, ota_state: &'a OtaState, - dlog_buffers: &'a PooledBuffers<2, BdxBuffer>, + dlog_buffers: &'a MatterBuffers<2>, log_provider: &'a LogFileProvider, ) -> impl DataModelHandler + 'a { ( diff --git a/examples/src/bin/webrtc_camera.rs b/examples/src/bin/webrtc_camera.rs index 961f0b48f..51746a355 100644 --- a/examples/src/bin/webrtc_camera.rs +++ b/examples/src/bin/webrtc_camera.rs @@ -110,7 +110,6 @@ use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::unix::UnixNetifs; use rs_matter::dm::DataModel; use rs_matter::dm::DeviceType; -use rs_matter::dm::IMBuffer; use rs_matter::dm::{DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, Node}; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -119,10 +118,10 @@ use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::tlv::TLVArray; +use rs_matter::transport::exchange::MatterBuffers; use rs_matter::transport::MATTER_SOCKET_BIND_ADDR; use rs_matter::utils::init::InitMaybeUninit; use rs_matter::utils::select::Coalesce; -use rs_matter::utils::storage::pooled::PooledBuffers; use rs_matter::{clusters, devices, root_endpoint, Matter, MATTER_PORT}; use static_cell::StaticCell; @@ -1100,7 +1099,7 @@ impl WebRtcHooks for Str0mHooks { // --------------------------------------------------------------------------- static MATTER: StaticCell = StaticCell::new(); -static BUFFERS: StaticCell> = StaticCell::new(); +static BUFFERS: StaticCell = StaticCell::new(); static STATE: StaticCell = StaticCell::new(); static WEBRTC: StaticCell = StaticCell::new(); static CAM_AV: StaticCell> = @@ -1159,7 +1158,7 @@ fn main() -> Result<(), Error> { let mut kv = DirKvBlobStore::new_default(); - let buffers = BUFFERS.uninit().init_with(PooledBuffers::init(0)); + let buffers = BUFFERS.uninit().init_with(MatterBuffers::init()); // Create the data model state (subscriptions, events, network store). It owns // the KV scratch buffer, which the startup loads below reuse rather than diff --git a/rs-matter/src/bdx.rs b/rs-matter/src/bdx.rs index c4e57ccc0..d27f1b49e 100644 --- a/rs-matter/src/bdx.rs +++ b/rs-matter/src/bdx.rs @@ -36,9 +36,9 @@ use num_derive::FromPrimitive; use crate::error::{Error, ErrorCode}; use crate::sc::{self, GeneralCode, StatusReport}; -use crate::transport::exchange::{Exchange, MessageMeta, MAX_EXCHANGE_RX_BUF_SIZE}; +use crate::transport::exchange::{Exchange, MessageMeta}; use crate::transport::{MAX_RX_PAYLOAD_SIZE, MAX_TX_PAYLOAD_SIZE}; -use crate::utils::storage::{ReadBuf, Vec, WriteBuf}; +use crate::utils::storage::{ReadBuf, WriteBuf}; mod handler; mod nego; @@ -49,12 +49,13 @@ pub use handler::*; pub use read::*; pub use write::*; -/// The buffer a BDX transfer stages each block in. Same size as an Interaction -/// Model exchange buffer, so a single [`PooledBuffers`] pool can be shared with +/// The buffer a BDX transfer stages each block in. Aliases the central +/// [`Buffer`](crate::transport::exchange::Buffer) (same size as an Interaction +/// Model exchange buffer), so a single [`PooledBuffers`] pool can be shared with /// the data model if desired. /// /// [`PooledBuffers`]: crate::utils::storage::pooled::PooledBuffers -pub type BdxBuffer = Vec; +pub type BdxBuffer = crate::transport::exchange::Buffer; /// The Matter protocol id for BDX. pub const PROTO_ID_BDX: u16 = 0x0002; diff --git a/rs-matter/src/dm.rs b/rs-matter/src/dm.rs index 2e9d72d18..fbc87d78b 100644 --- a/rs-matter/src/dm.rs +++ b/rs-matter/src/dm.rs @@ -43,12 +43,10 @@ use crate::persist::{ }; use crate::respond::ExchangeHandler; use crate::tlv::{get_root_node_struct, FromTLV, Nullable, TLVElement, TLVTag, TLVWrite, ToTLV}; -use crate::transport::exchange::{ - Exchange, ExchangeId, MAX_EXCHANGE_RX_BUF_SIZE, MAX_EXCHANGE_TX_BUF_SIZE, -}; +use crate::transport::exchange::{Exchange, ExchangeId, MAX_EXCHANGE_TX_BUF_SIZE}; use crate::utils::cell::RefCell; use crate::utils::select::Coalesce; -use crate::utils::storage::pooled::BufferAccess; +use crate::utils::storage::pooled::Buffers; use crate::utils::storage::WriteBuf; use crate::utils::sync::blocking::Mutex; use crate::Matter; @@ -69,7 +67,9 @@ pub mod subscriptions; mod types; -pub type IMBuffer = crate::utils::storage::Vec; +/// The buffer type used by the Interaction Model for RX/TX payloads. Aliases the +/// central [`Buffer`](crate::transport::exchange::Buffer). +pub type IMBuffer = crate::transport::exchange::Buffer; /// An `ExchangeHandler` implementation capable of handling responder exchanges for the Interaction Model protocol. /// The mutable, owned-together state a [`DataModel`] operates on: the @@ -230,7 +230,7 @@ pub struct DataModel< const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, const KB: usize = DEFAULT_KV_BUF_SIZE, > where - B: BufferAccess, + B: Buffers, { matter: &'a Matter<'a>, crypto: C, @@ -294,7 +294,7 @@ impl<'a, C, B, T, S, N, const NS: usize, const NE: usize, const KB: usize> DataModel<'a, C, B, T, S, N, NoopWirelessNetCtl, NS, NE, KB> where C: Crypto, - B: BufferAccess, + B: Buffers, T: DataModelHandler, S: KvBlobStore, N: Networks, @@ -308,7 +308,7 @@ where /// /// # Arguments /// - `matter` - a reference to the `Matter` instance - /// - `buffers` - a reference to an implementation of `BufferAccess` which is used for allocating RX and TX buffers on the fly, when necessary + /// - `buffers` - a reference to an implementation of `Buffers` which is used for allocating RX and TX buffers on the fly, when necessary /// - `handler` - an instance of type `T` which implements the `DataModelHandler` trait. This instance is used for interacting with the underlying /// clusters of the data model. Note that the expectations is for the user to provide a handler that handles the Matter system clusters /// as well (Endpoint 0), possibly by decorating her own clusters with the `rs_matter::dm::root_endpoint::with_` methods @@ -341,7 +341,7 @@ impl<'a, C, B, T, S, N, NC, const NS: usize, const NE: usize, const KB: usize> DataModel<'a, C, B, T, S, N, NC, NS, NE, KB> where C: Crypto, - B: BufferAccess, + B: Buffers, T: DataModelHandler, S: KvBlobStore, N: Networks, @@ -355,7 +355,7 @@ where /// /// # Arguments /// - `matter` - a reference to the `Matter` instance - /// - `buffers` - a reference to an implementation of `BufferAccess` which is used for allocating RX and TX buffers on the fly, when necessary + /// - `buffers` - a reference to an implementation of `Buffers` which is used for allocating RX and TX buffers on the fly, when necessary /// - `handler` - an instance of type `T` which implements the `DataModelHandler` trait. This instance is used for interacting with the underlying /// clusters of the data model. Note that the expectations is for the user to provide a handler that handles the Matter system clusters /// as well (Endpoint 0), possibly by decorating her own clusters with the `rs_matter::dm::root_endpoint::with_` methods @@ -1280,7 +1280,7 @@ impl Excha for DataModel<'_, C, B, T, S, N, NC, NS, NE, KB> where C: Crypto, - B: BufferAccess, + B: Buffers, T: DataModelHandler, S: KvBlobStore, N: Networks, @@ -1294,7 +1294,7 @@ impl Handl for DataModel<'_, C, B, T, S, N, NC, NS, NE, KB> where C: Crypto, - B: BufferAccess, + B: Buffers, T: DataModelHandler, S: KvBlobStore, N: Networks, @@ -1323,7 +1323,7 @@ where &self.handler } - fn buffers(&self) -> impl BufferAccess + '_ { + fn buffers(&self) -> impl Buffers + '_ { self.buffers } } @@ -1332,7 +1332,7 @@ impl AttrC for DataModel<'_, C, B, T, S, N, NC, NS, NE, KB> where C: Crypto, - B: BufferAccess, + B: Buffers, T: DataModelHandler, S: KvBlobStore, N: Networks, @@ -1376,7 +1376,7 @@ impl Event for DataModel<'_, C, B, T, S, N, NC, NS, NE, KB> where C: Crypto, - B: BufferAccess, + B: Buffers, T: DataModelHandler, S: KvBlobStore, N: Networks, diff --git a/rs-matter/src/dm/clusters/diag_logs.rs b/rs-matter/src/dm/clusters/diag_logs.rs index f42d79af9..405386d5c 100644 --- a/rs-matter/src/dm/clusters/diag_logs.rs +++ b/rs-matter/src/dm/clusters/diag_logs.rs @@ -59,7 +59,7 @@ use crate::error::{Error, ErrorCode}; use crate::tlv::{Octets, TLVBuilderParent}; use crate::transport::exchange::{Exchange, MAX_EXCHANGE_RX_BUF_SIZE}; use crate::utils::cell::RefCell; -use crate::utils::storage::pooled::BufferAccess; +use crate::utils::storage::pooled::Buffers; use crate::utils::sync::blocking::Mutex; use crate::utils::sync::{Notification, Signal}; use crate::with; @@ -155,7 +155,7 @@ enum Bdx { /// given, returning small logs inline and - when the requestor asks for `BDX` - /// streaming larger logs over a BDX transfer it initiates back to the requestor. /// -/// `buffers` is a [`BufferAccess`] pool ([`BdxBuffer`]-sized): one buffer is +/// `buffers` is a [`Buffers`] pool ([`BdxBuffer`]-sized): one buffer is /// leased to stage the inline read, and one for the duration of a BDX transfer, /// so the pool needs at least two buffers to serve an inline request while a BDX /// transfer is in flight. When no buffer is free, the request is answered with @@ -198,7 +198,7 @@ impl DiagLogsHandler { impl DiagLogsHandler where - B: BufferAccess, + B: Buffers, P: DiagLogs, { /// Fill `buf` from the `intent` log starting at `offset`, looping until it is @@ -315,7 +315,7 @@ where impl ClusterAsyncHandler for DiagLogsHandler where - B: BufferAccess, + B: Buffers, P: DiagLogs, { const CLUSTER: Cluster<'static> = FULL_CLUSTER.with_attrs(with!(required)); diff --git a/rs-matter/src/dm/clusters/ota_prov.rs b/rs-matter/src/dm/clusters/ota_prov.rs index f3b072e9c..3509563a7 100644 --- a/rs-matter/src/dm/clusters/ota_prov.rs +++ b/rs-matter/src/dm/clusters/ota_prov.rs @@ -42,7 +42,7 @@ use crate::dm::{Cluster, Dataver, InvokeContext}; use crate::error::{Error, ErrorCode}; use crate::tlv::{Octets, TLVBuilderParent}; use crate::transport::exchange::MAX_EXCHANGE_RX_BUF_SIZE; -use crate::utils::storage::pooled::BufferAccess; +use crate::utils::storage::pooled::Buffers; use crate::with; /// The buffer an [`OtaBdxHandler`] stages each BDX block in. @@ -424,7 +424,7 @@ impl ClusterAsyncHandler for OtaProviderHandler { /// use rs_matter::utils::storage::pooled::PooledBuffers; /// /// // One staging buffer per concurrent download (here: two). -/// let buffers = PooledBuffers::<2, BdxBuffer>::new(0); +/// let buffers = PooledBuffers::::new(); /// let bdx = Bdx::new(OtaBdxHandler::new(&buffers, &images)); /// let handler = im_and_sc_handler.chain(PROTO_ID_BDX, bdx); /// let responder = Responder::new("ota-provider", handler, matter, 0); @@ -437,7 +437,7 @@ pub struct OtaBdxHandler { impl OtaBdxHandler { /// Create a new BDX image handler backed by the given image data source. /// - /// `buffers` is a [`BufferAccess`] pool ([`BdxBuffer`]-sized): one buffer is + /// `buffers` is a [`Buffers`] pool ([`BdxBuffer`]-sized): one buffer is /// leased per in-flight download to stage the BDX blocks (the image bytes are /// read straight into it), so the pool's size caps how many downloads run /// concurrently. When the pool is exhausted, further downloads are rejected @@ -483,7 +483,7 @@ impl OtaBdxHandler { impl BdxHandler for OtaBdxHandler where - B: BufferAccess, + B: Buffers, I: OtaImages, { async fn handles(&self, responder: &BdxResponder<'_>) -> bool { diff --git a/rs-matter/src/dm/subscriptions.rs b/rs-matter/src/dm/subscriptions.rs index 6110b70c4..5e7522e64 100644 --- a/rs-matter/src/dm/subscriptions.rs +++ b/rs-matter/src/dm/subscriptions.rs @@ -23,7 +23,7 @@ use crate::dm::{AttrId, ClusterId, EndptId, EventId, EventNumber, IMBuffer, Node use crate::fabric::MAX_FABRICS; use crate::utils::cell::RefCell; use crate::utils::init::{init, Init}; -use crate::utils::storage::pooled::BufferAccess; +use crate::utils::storage::pooled::Buffers; use crate::utils::storage::Vec; use crate::utils::sync::blocking::Mutex; use crate::utils::sync::{DynBase, Notification}; @@ -52,14 +52,14 @@ pub const MAX_CHANGED_ATTRS: usize = 16; // which is why `remove` / `report` / `add` all grew a second ref parameter. pub struct SubscriptionsBuffers<'a, B, const N: usize = DEFAULT_MAX_SUBSCRIPTIONS> where - B: BufferAccess + 'a, + B: Buffers + 'a, { buffers: Mutex>>, } impl<'a, B, const N: usize> SubscriptionsBuffers<'a, B, N> where - B: BufferAccess + 'a, + B: Buffers + 'a, { /// Create the instance. pub const fn new() -> Self { @@ -85,7 +85,7 @@ where impl<'a, B, const N: usize> Default for SubscriptionsBuffers<'a, B, N> where - B: BufferAccess + 'a, + B: Buffers + 'a, { fn default() -> Self { Self::new() @@ -94,7 +94,7 @@ where /// A type alias for the inner buffer vector of `SubscriptionsBuffers`. type SubscriptionsBuffersInner<'a, B, const N: usize> = - Vec<>::Buffer<'a>, N>; + Vec<>::Buffer<'a>, N>; /// A type for tracking subscriptions accepted by the data model. /// @@ -232,7 +232,7 @@ impl Subscriptions { buffers: &'s SubscriptionsBuffers<'a, B, N>, ) -> Option> where - B: BufferAccess + 'a, + B: Buffers + 'a, { let (sub, buf, next_max_seen_attr_change_id) = self.with(buffers, |state, buffers| { let (sub, buf) = state.add::( @@ -278,7 +278,7 @@ impl Subscriptions { /// later — never both for the same subscription. pub(crate) fn remove(&self, buffers: &SubscriptionsBuffers<'_, B, N>, mut f: F) -> bool where - B: BufferAccess, + B: Buffers, F: FnMut(&Subscription) -> Option<&'static str>, { let removed = self.with(buffers, |state, buffers| { @@ -347,7 +347,7 @@ impl Subscriptions { buffers: &'s SubscriptionsBuffers<'a, B, N>, ) -> Option> where - B: BufferAccess + 'a, + B: Buffers + 'a, { let (sub, buf, next_max_seen_attr_change_id) = self.with(buffers, |state, buffers| { let (sub, buf) = state.report::(now, event_numbers_watermark, buffers)?; @@ -381,7 +381,7 @@ impl Subscriptions { buffers: &SubscriptionsBuffers<'a, B, N>, ) -> Instant where - B: BufferAccess + 'a, + B: Buffers + 'a, { self.with(buffers, |state, buffers| { state.next_report_at::(event_numbers_watermark, buffers) @@ -398,7 +398,7 @@ impl Subscriptions { /// and re-inserting it into the table if the `keep` flag is set on the context. fn report_complete<'a, B>(&self, report: &mut ReportContext<'a, '_, B, N>) where - B: BufferAccess + 'a, + B: Buffers + 'a, { let mut sub = unwrap!(report.subscription.take()); let buf = unwrap!(report.subscription_buffer.take()); @@ -416,7 +416,7 @@ impl Subscriptions { fn with<'a, B, F, R>(&self, buffers: &SubscriptionsBuffers<'a, B, N>, f: F) -> R where - B: BufferAccess + 'a, + B: Buffers + 'a, F: FnOnce(&mut SubscriptionsInner, &mut SubscriptionsBuffersInner<'a, B, N>) -> R, { self.state.lock(|state| { @@ -521,7 +521,7 @@ impl SubscriptionsInner { _buffers: &mut SubscriptionsBuffersInner<'a, B, N>, ) -> Option<(Subscription, B::Buffer<'a>)> where - B: BufferAccess + 'a, + B: Buffers + 'a, { if self.subscriptions_count >= N { return None; @@ -577,7 +577,7 @@ impl SubscriptionsInner { buffers: &mut SubscriptionsBuffersInner<'a, B, N>, ) -> Option<(Subscription, B::Buffer<'a>)> where - B: BufferAccess + 'a, + B: Buffers + 'a, { // `reporting` must be vacant: callers only start a new report after // the previous `ReportContext` has been dropped (which clears the @@ -609,7 +609,7 @@ impl SubscriptionsInner { buffers: &mut SubscriptionsBuffersInner<'a, B, N>, keep: bool, ) where - B: BufferAccess + 'a, + B: Buffers + 'a, { // Always clear the reporting slot; it was populated in `report()`. self.reporting = None; @@ -640,7 +640,7 @@ impl SubscriptionsInner { buffers: &SubscriptionsBuffersInner<'a, B, N>, ) -> Option where - B: BufferAccess + 'a, + B: Buffers + 'a, { self.subscriptions .iter() @@ -674,7 +674,7 @@ impl SubscriptionsInner { buffers: &SubscriptionsBuffersInner<'a, B, N>, ) -> Instant where - B: BufferAccess + 'a, + B: Buffers + 'a, { self.subscriptions .iter() @@ -1244,7 +1244,7 @@ impl ChangedAttr { /// Per-subscription context for an in-progress report. pub struct ReportContext<'a, 's, B, const N: usize> where - B: BufferAccess + 'a, + B: Buffers + 'a, { /// A reference to the global subscriptions table, used to return the subscription on /// successful completion of the report @@ -1281,7 +1281,7 @@ where impl<'a, 's, B, const N: usize> ReportContext<'a, 's, B, N> where - B: BufferAccess + 'a, + B: Buffers + 'a, { /// Return a reference to the subscription being reported on. pub fn subscription(&self) -> &Subscription { @@ -1350,7 +1350,7 @@ where impl<'a, 's, B, const N: usize> Drop for ReportContext<'a, 's, B, N> where - B: BufferAccess + 'a, + B: Buffers + 'a, { fn drop(&mut self) { self.subscriptions.report_complete(self); @@ -1365,7 +1365,7 @@ mod tests { use embassy_time::Duration; - type TestPool = PooledBuffers; + type TestPool = PooledBuffers; // ---------- ChangedAttributes ---------- @@ -1942,7 +1942,7 @@ mod tests { #[test] fn add_returns_monotonic_ids_and_rejects_when_full() { let subs: Subscriptions<2> = Subscriptions::new(); - let pool = TestPool::<3>::new(0); + let pool = TestPool::<3>::new(); let subs_bufs: SubscriptionsBuffers, 2> = SubscriptionsBuffers::new(); let now = Instant::now(); @@ -1995,7 +1995,7 @@ mod tests { #[test] fn begin_report_snapshots_watermark_and_pending() { let subs: Subscriptions<2> = Subscriptions::new(); - let pool = TestPool::<3>::new(0); + let pool = TestPool::<3>::new(); let subs_bufs: SubscriptionsBuffers, 2> = SubscriptionsBuffers::new(); let now = Instant::now(); @@ -2091,7 +2091,7 @@ mod tests { // unconditionally) and, when dropped with `set_keep`, must survive in // the subscription table for subsequent incremental reports. let subs: Subscriptions<1> = Subscriptions::new(); - let pool = TestPool::<2>::new(0); + let pool = TestPool::<2>::new(); let subs_bufs: SubscriptionsBuffers, 1> = SubscriptionsBuffers::new(); let now = Instant::now(); @@ -2113,7 +2113,7 @@ mod tests { // subscription from the table (and free its buffer), so a new // subscription can take its place up to the `N` capacity. let subs: Subscriptions<1> = Subscriptions::new(); - let pool = TestPool::<2>::new(0); + let pool = TestPool::<2>::new(); let subs_bufs: SubscriptionsBuffers, 1> = SubscriptionsBuffers::new(); let now = Instant::now(); @@ -2133,7 +2133,7 @@ mod tests { // After a "kept" report, the subscription must not be picked up again // at the same instant unless new changes arrive. let subs: Subscriptions<1> = Subscriptions::new(); - let pool = TestPool::<2>::new(0); + let pool = TestPool::<2>::new(); let subs_bufs: SubscriptionsBuffers, 1> = SubscriptionsBuffers::new(); let now = Instant::now(); @@ -2173,7 +2173,7 @@ mod tests { // A bump in `event_numbers_watermark` (i.e. a newly emitted event) // makes the subscription reportable even without attribute changes. let subs: Subscriptions<1> = Subscriptions::new(); - let pool = TestPool::<2>::new(0); + let pool = TestPool::<2>::new(); let subs_bufs: SubscriptionsBuffers, 1> = SubscriptionsBuffers::new(); let now = Instant::now(); @@ -2219,7 +2219,7 @@ mod tests { // it enters the "liveness" window (within half of `max_int` of the // deadline). let subs: Subscriptions<1> = Subscriptions::new(); - let pool = TestPool::<2>::new(0); + let pool = TestPool::<2>::new(); let subs_bufs: SubscriptionsBuffers, 1> = SubscriptionsBuffers::new(); let now = Instant::now(); @@ -2256,7 +2256,7 @@ mod tests { // No pending data → wake at the liveness point // `reported_at + max_int - max_int/2` (when `is_report_due` flips). let subs: Subscriptions<1> = Subscriptions::new(); - let pool = TestPool::<2>::new(0); + let pool = TestPool::<2>::new(); let subs_bufs: SubscriptionsBuffers, 1> = SubscriptionsBuffers::new(); let now = Instant::now(); @@ -2278,7 +2278,7 @@ mod tests { // the end of that period (`reported_at + min_int`), not the far-off // liveness point. let subs: Subscriptions<1> = Subscriptions::new(); - let pool = TestPool::<2>::new(0); + let pool = TestPool::<2>::new(); let subs_bufs: SubscriptionsBuffers, 1> = SubscriptionsBuffers::new(); let now = Instant::now(); @@ -2304,7 +2304,7 @@ mod tests { // Same as above, driven by a new event (watermark past the sub's // max_seen = 0) rather than an attribute change. let subs: Subscriptions<1> = Subscriptions::new(); - let pool = TestPool::<2>::new(0); + let pool = TestPool::<2>::new(); let subs_bufs: SubscriptionsBuffers, 1> = SubscriptionsBuffers::new(); let now = Instant::now(); @@ -2327,7 +2327,7 @@ mod tests { // be clamped to the gate; otherwise the reporter wakes early, finds the // sub still gated, re-arms the same past deadline, and spins. let subs: Subscriptions<1> = Subscriptions::new(); - let pool = TestPool::<2>::new(0); + let pool = TestPool::<2>::new(); let subs_bufs: SubscriptionsBuffers, 1> = SubscriptionsBuffers::new(); let now = Instant::now(); @@ -2356,7 +2356,7 @@ mod tests { fn next_report_at_returns_earliest_across_subs() { // The reporter must wake for whichever subscription is due first. let subs: Subscriptions<2> = Subscriptions::new(); - let pool = TestPool::<3>::new(0); + let pool = TestPool::<3>::new(); let subs_bufs: SubscriptionsBuffers, 2> = SubscriptionsBuffers::new(); let now = Instant::now(); @@ -2383,7 +2383,7 @@ mod tests { use embassy_futures::select::{select, Either}; let subs: Subscriptions<2> = Subscriptions::new(); - let pool = TestPool::<3>::new(0); + let pool = TestPool::<3>::new(); let subs_bufs: SubscriptionsBuffers, 2> = SubscriptionsBuffers::new(); let now = Instant::now(); @@ -2424,7 +2424,7 @@ mod tests { // `Subscription::is_expired` returns true once `max_int` has elapsed // since the last reported_at. let subs: Subscriptions<1> = Subscriptions::new(); - let pool = TestPool::<2>::new(0); + let pool = TestPool::<2>::new(); let subs_bufs: SubscriptionsBuffers, 1> = SubscriptionsBuffers::new(); let base = Instant::now(); @@ -2452,7 +2452,7 @@ mod tests { // returns whether anything was removed, and frees the slots so that // subsequent `add` calls succeed up to the capacity `N`. let subs: Subscriptions<3> = Subscriptions::new(); - let pool = TestPool::<4>::new(0); + let pool = TestPool::<4>::new(); let subs_bufs: SubscriptionsBuffers, 3> = SubscriptionsBuffers::new(); let now = Instant::now(); @@ -2531,7 +2531,7 @@ mod tests { // it must cause `report_complete` to drop the subscription on Drop // rather than re-inserting it, even when `set_keep` was called. let subs: Subscriptions<2> = Subscriptions::new(); - let pool = TestPool::<3>::new(0); + let pool = TestPool::<3>::new(); let subs_bufs: SubscriptionsBuffers, 2> = SubscriptionsBuffers::new(); let now = Instant::now(); @@ -2587,7 +2587,7 @@ mod tests { // nor anything in the table, the in-flight subscription must still // be re-inserted on `ReportContext::drop` when `set_keep` is called. let subs: Subscriptions<2> = Subscriptions::new(); - let pool = TestPool::<3>::new(0); + let pool = TestPool::<3>::new(); let subs_bufs: SubscriptionsBuffers, 2> = SubscriptionsBuffers::new(); let now = Instant::now(); @@ -2622,7 +2622,7 @@ mod tests { // subscription has already reported on: the slowest subscriber's // `max_seen_attr_change_id` acts as a floor. let subs: Subscriptions<2> = Subscriptions::new(); - let pool = TestPool::<3>::new(0); + let pool = TestPool::<3>::new(); let subs_bufs: SubscriptionsBuffers, 2> = SubscriptionsBuffers::new(); let base = Instant::now(); @@ -2679,7 +2679,7 @@ mod tests { // subscriptions that are not interested in events but receive an // event-triggered report. let subs: Subscriptions<1> = Subscriptions::new(); - let pool = TestPool::<2>::new(0); + let pool = TestPool::<2>::new(); let subs_bufs: SubscriptionsBuffers, 1> = SubscriptionsBuffers::new(); let now = Instant::now(); diff --git a/rs-matter/src/dm/types/handler.rs b/rs-matter/src/dm/types/handler.rs index 7fcb7d5d7..8e9cefa54 100644 --- a/rs-matter/src/dm/types/handler.rs +++ b/rs-matter/src/dm/types/handler.rs @@ -30,7 +30,7 @@ use crate::persist::KvBlobStoreAccess; use crate::tlv::TLVElement; use crate::transport::exchange::Exchange; use crate::utils::select::Coalesce; -use crate::utils::storage::pooled::BufferAccess; +use crate::utils::storage::pooled::Buffers; use crate::utils::sync::DynBase; use crate::Matter; @@ -277,7 +277,7 @@ pub trait HandlerContext: AttrChangeNotifier + EventEmitter { /// /// Useful in case e.g. a concrete cluster handler needs to invoke read/write/invoke operations on /// other clusters, and the TLV input/output data for those operations is non-trivial in size. - fn buffers(&self) -> impl BufferAccess + '_; + fn buffers(&self) -> impl Buffers + '_; } impl HandlerContext for &T @@ -308,7 +308,7 @@ where (**self).handler() } - fn buffers(&self) -> impl BufferAccess + '_ { + fn buffers(&self) -> impl Buffers + '_ { (**self).buffers() } } @@ -497,7 +497,7 @@ where self.context.handler() } - fn buffers(&self) -> impl BufferAccess + '_ { + fn buffers(&self) -> impl Buffers + '_ { self.context.buffers() } } @@ -673,7 +673,7 @@ where self.context.handler() } - fn buffers(&self) -> impl BufferAccess + '_ { + fn buffers(&self) -> impl Buffers + '_ { self.context.buffers() } } @@ -853,7 +853,7 @@ where self.context.handler() } - fn buffers(&self) -> impl BufferAccess + '_ { + fn buffers(&self) -> impl Buffers + '_ { self.context.buffers() } } diff --git a/rs-matter/src/lib.rs b/rs-matter/src/lib.rs index 59a30d505..892851715 100644 --- a/rs-matter/src/lib.rs +++ b/rs-matter/src/lib.rs @@ -55,7 +55,7 @@ use crate::transport::{ }; use crate::utils::cell::RefCell; use crate::utils::init::{init, Init}; -use crate::utils::storage::pooled::BufferAccess; +use crate::utils::storage::pooled::Buffers; use crate::utils::sync::blocking::Mutex; use rand_core::RngCore; diff --git a/rs-matter/src/respond.rs b/rs-matter/src/respond.rs index 4c4d936d2..e4039a27f 100644 --- a/rs-matter/src/respond.rs +++ b/rs-matter/src/respond.rs @@ -36,7 +36,7 @@ use crate::sc::busy::BusySecureChannel; use crate::sc::SecureChannel; use crate::transport::exchange::Exchange; use crate::utils::select::Coalesce; -use crate::utils::storage::pooled::BufferAccess; +use crate::utils::storage::pooled::Buffers; use crate::Matter; /// Send a busy response if - after that many ms - the exchange @@ -284,7 +284,7 @@ pub type DefaultExchangeHandler< impl<'d, 'a, C, B, T, S, N, NC, const NS: usize, const NE: usize, const KB: usize> Responder<'a, DefaultExchangeHandler<'d, 'a, C, B, T, S, N, NC, NS, NE, KB>> where - B: BufferAccess, + B: Buffers, { /// Creates a "default" responder. This is a responder that composes and uses the `rs-matter`-provided `ExchangeHandler` implementations /// (`SecureChannel` and `DataModel`) for handling the Secure Channel protocol and the Interaction Model protocol. @@ -348,7 +348,7 @@ pub struct DefaultResponder< const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, const KB: usize = DEFAULT_KV_BUF_SIZE, > where - B: BufferAccess, + B: Buffers, { responder: Responder<'a, DefaultExchangeHandler<'d, 'a, C, B, T, S, N, NC, NS, NE, KB>>, busy_responder: Responder<'a, BusyExchangeHandler>, @@ -358,7 +358,7 @@ impl<'d, 'a, C, B, T, S, N, NC, const NS: usize, const NE: usize, const KB: usiz DefaultResponder<'d, 'a, C, B, T, S, N, NC, NS, NE, KB> where C: Crypto, - B: BufferAccess, + B: Buffers, T: DataModelHandler, S: KvBlobStore, N: net_comm::Networks, diff --git a/rs-matter/src/transport.rs b/rs-matter/src/transport.rs index 1e025ead1..e217167c1 100644 --- a/rs-matter/src/transport.rs +++ b/rs-matter/src/transport.rs @@ -49,7 +49,7 @@ use crate::utils::init::{init, Init}; use crate::utils::ipv6::compute_group_multicast_addr; use crate::utils::select::Coalesce; use crate::utils::storage::Vec; -use crate::utils::storage::{pooled::BufferAccess, ParseBuf, WriteBuf}; +use crate::utils::storage::{pooled::Buffers, ParseBuf, WriteBuf}; use crate::utils::sync::{IfMutex, IfMutexGuard, Notification, Signal}; use crate::{Matter, MATTER_PORT}; @@ -2223,7 +2223,7 @@ impl Display for PacketAccess<'_, N> { // Used by the builtin mDNS responder, as well as by the QR code generator pub struct PacketBufferExternalAccess<'a, const N: usize>(pub(crate) &'a IfMutex>); -impl BufferAccess<[u8]> for PacketBufferExternalAccess<'_, N> { +impl Buffers<[u8]> for PacketBufferExternalAccess<'_, N> { type Buffer<'b> = ExternalPacketBuffer<'b, N> where diff --git a/rs-matter/src/transport/exchange.rs b/rs-matter/src/transport/exchange.rs index a1de6dbda..9e72e4cb7 100644 --- a/rs-matter/src/transport/exchange.rs +++ b/rs-matter/src/transport/exchange.rs @@ -32,6 +32,7 @@ use crate::im::{self, PROTO_ID_INTERACTION_MODEL}; use crate::sc::{self, PROTO_ID_SECURE_CHANNEL}; use crate::transport::session::Sessions; use crate::transport::TxPayloadState; +use crate::utils::storage::pooled::{PooledBuffers, DEFAULT_BUFFER_POOL_SIZE}; use crate::utils::storage::WriteBuf; use crate::{Matter, MatterState}; @@ -63,6 +64,20 @@ pub const MAX_EXCHANGE_TX_BUF_SIZE: usize = pub const MAX_EXCHANGE_TX_BUF_SIZE: usize = network::MAX_TX_PACKET_SIZE - PacketHdr::HDR_RESERVE - PacketHdr::TAIL_RESERVE; +/// A protocol payload buffer, sized to hold a full exchange RX message +/// ([`MAX_EXCHANGE_RX_BUF_SIZE`]). +/// +/// This is the central buffer type that both [`IMBuffer`](crate::dm::IMBuffer) +/// and [`BdxBuffer`](crate::bdx::BdxBuffer) alias, so a single +/// [`PooledBuffers`](crate::utils::storage::pooled::PooledBuffers) pool can be +/// shared across the data model and BDX. +pub type Buffer = crate::utils::storage::Vec; + +/// A [`PooledBuffers`] pool pre-configured with Matter defaults: it holds +/// [`Buffer`]s (the central exchange-sized buffer) and [`DEFAULT_BUFFER_POOL_SIZE`] +/// of them, behind the default Matter raw mutex. +pub type MatterBuffers = PooledBuffers; + /// An exchange identifier, uniquely identifying a session and an exchange within that session for a given Matter stack. #[derive(Copy, Clone, Debug, Eq, PartialEq)] pub struct ExchangeId(u32); diff --git a/rs-matter/src/transport/network/mdns/builtin.rs b/rs-matter/src/transport/network/mdns/builtin.rs index 7f3ec0e8c..4b975d13a 100644 --- a/rs-matter/src/transport/network/mdns/builtin.rs +++ b/rs-matter/src/transport/network/mdns/builtin.rs @@ -41,7 +41,7 @@ use crate::transport::network::{ }; use crate::utils::init::{init, Init}; use crate::utils::select::Coalesce; -use crate::utils::storage::pooled::BufferAccess; +use crate::utils::storage::pooled::Buffers; use crate::utils::storage::Vec; use crate::utils::sync::IfMutex; use crate::Matter; diff --git a/rs-matter/src/utils/storage/pooled.rs b/rs-matter/src/utils/storage/pooled.rs index 54a3285ff..6f1a091f5 100644 --- a/rs-matter/src/utils/storage/pooled.rs +++ b/rs-matter/src/utils/storage/pooled.rs @@ -29,7 +29,7 @@ use crate::utils::sync::blocking::raw::MatterRawMutex; use crate::utils::sync::Signal; /// A trait for getting access to a `&mut T` buffer, potentially awaiting until a buffer becomes available. -pub trait BufferAccess +pub trait Buffers where T: ?Sized, { @@ -50,9 +50,9 @@ where fn get_immediate(&self) -> Option>; } -impl BufferAccess for &B +impl Buffers for &B where - B: BufferAccess, + B: Buffers, T: ?Sized, { type Buffer<'a> @@ -69,24 +69,34 @@ where } } -/// A concrete implementation of `BufferAccess` utilizing an internal pool of buffers. +/// The default number of buffers held by a [`PooledBuffers`] pool. +pub const DEFAULT_BUFFER_POOL_SIZE: usize = 10; + +/// A concrete implementation of `Buffers` utilizing an internal pool of buffers. /// Accessing a buffer would fail when all buffers are still used elsewhere after a wait timeout expires. -pub struct PooledBuffers { +pub struct PooledBuffers { available: Signal<[bool; N], M>, // TODO XXX FIXME: Needs multiple wakers for work-stealing executors pool: UnsafeCell>, wait_timeout_ms: u32, } -impl PooledBuffers +impl PooledBuffers where M: RawMutex, { + /// Create a new instance of `PooledBuffers` with the default (zero) wait + /// timeout, i.e. buffer access is denied immediately when none is free. + #[inline(always)] + pub const fn new() -> Self { + Self::new_with_timeout(0) + } + /// Create a new instance of `PooledBuffers`. /// - /// `wait_timneout_ms` is the maximum time to wait for a buffer to become available + /// `wait_timeout_ms` is the maximum time to wait for a buffer to become available /// before returning `None`. #[inline(always)] - pub const fn new(wait_timeout_ms: u32) -> Self { + pub const fn new_with_timeout(wait_timeout_ms: u32) -> Self { Self { available: Signal::new([true; N]), pool: UnsafeCell::new(crate::utils::storage::Vec::new()), @@ -94,11 +104,17 @@ where } } + /// Create an in-place initializer for `PooledBuffers` with the default (zero) + /// wait timeout, i.e. buffer access is denied immediately when none is free. + pub fn init() -> impl Init { + Self::init_with_timeout(0) + } + /// Create an in-place initializer for `PooledBuffers`. /// - /// `wait_timneout_ms` is the maximum time to wait for a buffer to become available + /// `wait_timeout_ms` is the maximum time to wait for a buffer to become available /// before returning `None`. - pub fn init(wait_timeout_ms: u32) -> impl Init { + pub fn init_with_timeout(wait_timeout_ms: u32) -> impl Init { init!(Self { available: Signal::new([true; N]), pool <- UnsafeCell::init(crate::utils::storage::Vec::init()), @@ -121,27 +137,36 @@ where } } -unsafe impl Send for PooledBuffers +impl Default for PooledBuffers +where + M: RawMutex, +{ + fn default() -> Self { + Self::new() + } +} + +unsafe impl Send for PooledBuffers where T: Send, M: RawMutex + Send, { } -unsafe impl Sync for PooledBuffers +unsafe impl Sync for PooledBuffers where T: Send, M: RawMutex + Send + Sync, { } -impl BufferAccess for PooledBuffers +impl Buffers for PooledBuffers where T: InitDefault, M: RawMutex, { type Buffer<'b> - = PooledBuffer<'b, N, T, M> + = PooledBuffer<'b, T, N, M> where Self: 'b; @@ -209,16 +234,16 @@ where } } -pub struct PooledBuffer<'a, const N: usize, T, M = MatterRawMutex> +pub struct PooledBuffer<'a, T, const N: usize, M = MatterRawMutex> where M: RawMutex, { index: usize, buffer: &'a mut T, - access: &'a PooledBuffers, + access: &'a PooledBuffers, } -impl Drop for PooledBuffer<'_, N, T, M> +impl Drop for PooledBuffer<'_, T, N, M> where M: RawMutex, { @@ -230,7 +255,7 @@ where } } -impl Deref for PooledBuffer<'_, N, T, M> +impl Deref for PooledBuffer<'_, T, N, M> where M: RawMutex, { @@ -241,7 +266,7 @@ where } } -impl DerefMut for PooledBuffer<'_, N, T, M> +impl DerefMut for PooledBuffer<'_, T, N, M> where M: RawMutex, { diff --git a/rs-matter/tests/commissioning.rs b/rs-matter/tests/commissioning.rs index e2e1eaca7..bb3e5637b 100644 --- a/rs-matter/tests/commissioning.rs +++ b/rs-matter/tests/commissioning.rs @@ -64,7 +64,7 @@ use rs_matter::dm::networks::unix::UnixNetifs; use rs_matter::dm::subscriptions::DEFAULT_MAX_SUBSCRIPTIONS; use rs_matter::dm::{ endpoints, Async, DataModel, DataModelHandler, DataModelState, Dataver, Endpoint, EpClMatcher, - IMBuffer, Node, + Node, }; use rs_matter::error::Error; use rs_matter::im::IMStatusCode; @@ -75,12 +75,12 @@ use rs_matter::persist::{DummyKvBlobStore, SharedKvBlobStore}; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::transport::exchange::Exchange; +use rs_matter::transport::exchange::MatterBuffers; use rs_matter::transport::network::tcp::TcpNetwork; use rs_matter::transport::network::{Address, NoNetwork, SocketAddr, SocketAddrV6}; use rs_matter::transport::MATTER_SOCKET_BIND_ADDR; use rs_matter::utils::init::InitMaybeUninit; use rs_matter::utils::select::Coalesce; -use rs_matter::utils::storage::pooled::PooledBuffers; use rs_matter::{clusters, devices, root_endpoint, Matter, MATTER_PORT}; use socket2::{Domain, Protocol, Socket, Type}; @@ -102,13 +102,13 @@ const IM_TIMEOUT_SECS: u64 = 10; type DeviceDmState = DataModelState; static DEVICE_MATTER: StaticCell = StaticCell::new(); -static DEVICE_BUFFERS: StaticCell> = StaticCell::new(); +static DEVICE_BUFFERS: StaticCell = StaticCell::new(); static DEVICE_STATE: StaticCell = StaticCell::new(); static CTRL_MATTER: StaticCell = StaticCell::new(); // Separate statics for the TCP variant (StaticCell is one-shot) static TCP_DEVICE_MATTER: StaticCell = StaticCell::new(); -static TCP_DEVICE_BUFFERS: StaticCell> = StaticCell::new(); +static TCP_DEVICE_BUFFERS: StaticCell = StaticCell::new(); static TCP_DEVICE_STATE: StaticCell = StaticCell::new(); static TCP_CTRL_MATTER: StaticCell = StaticCell::new(); @@ -187,7 +187,7 @@ macro_rules! commissioning_test { let device_crypto = test_only_crypto(); let mut rand = device_crypto.rand()?; - let device_buffers = $dev_buffers.uninit().init_with(PooledBuffers::init(0)); + let device_buffers = $dev_buffers.uninit().init_with(MatterBuffers::init()); let device_state = $dev_subs.init(DataModelState::new(DummyNetworks)); let on_off_handler = on_off::OnOffHandler::new_standalone( diff --git a/rs-matter/tests/common/e2e.rs b/rs-matter/tests/common/e2e.rs index 0e641bc0d..72ec57417 100644 --- a/rs-matter/tests/common/e2e.rs +++ b/rs-matter/tests/common/e2e.rs @@ -26,17 +26,17 @@ use rs_matter::acl::{AclEntry, AuthMode}; use rs_matter::crypto::{test_only_crypto, Crypto}; use rs_matter::dm::clusters::net_comm::DummyNetworks; use rs_matter::dm::devices::test::{TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; -use rs_matter::dm::{DataModel, DataModelHandler, DataModelState, IMBuffer, Privilege}; +use rs_matter::dm::{DataModel, DataModelHandler, DataModelState, Privilege}; use rs_matter::error::Error; use rs_matter::persist::{DummyKvBlobStore, SharedKvBlobStore}; use rs_matter::respond::{ExchangeHandler, Responder}; use rs_matter::transport::exchange::Exchange; +use rs_matter::transport::exchange::MatterBuffers; use rs_matter::transport::network::{ Address, NetworkReceive, NetworkSend, NoNetwork, MAX_RX_PACKET_SIZE, MAX_TX_PACKET_SIZE, }; use rs_matter::transport::session::{NocCatIds, ReservedSession, SessionMode}; use rs_matter::utils::select::Coalesce; -use rs_matter::utils::storage::pooled::PooledBuffers; use rs_matter::utils::sync::blocking::raw::MatterRawMutex; use rs_matter::{Matter, MATTER_PORT}; @@ -75,7 +75,7 @@ pub struct E2eRunner { pub matter: Matter<'static>, matter_client: Matter<'static>, crypto: C, - buffers: PooledBuffers<10, IMBuffer>, + buffers: MatterBuffers, pub state: DataModelState, cat_ids: NocCatIds, } @@ -95,7 +95,7 @@ impl E2eRunner { matter: Self::new_matter(), matter_client: Self::new_matter(), crypto, - buffers: PooledBuffers::new(0), + buffers: MatterBuffers::new(), state: DataModelState::new(DummyNetworks), cat_ids, } From 3f2fb048e77593a6cd41de3418636e0eb4ea1a31 Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Fri, 19 Jun 2026 06:52:32 +0000 Subject: [PATCH 05/14] Rename DataModel to InteractionModel --- bloat-check/src/bin/bloat-check.rs | 8 +-- examples/src/bin/bridge.rs | 12 ++-- examples/src/bin/camera_tests.rs | 10 +-- examples/src/bin/dimmable_light.rs | 12 ++-- examples/src/bin/light_tests.rs | 12 ++-- examples/src/bin/media_player.rs | 12 ++-- examples/src/bin/onoff_light.rs | 11 ++-- examples/src/bin/onoff_light_bt.rs | 14 ++-- examples/src/bin/onoff_light_switch.rs | 16 ++--- examples/src/bin/onoff_light_work_stealing.rs | 16 +++-- examples/src/bin/ota_requestor.rs | 16 ++--- examples/src/bin/scenes_tests.rs | 12 ++-- examples/src/bin/speaker.rs | 11 ++-- examples/src/bin/system_tests.rs | 26 ++++---- examples/src/bin/webrtc_camera.rs | 12 ++-- rs-matter/src/dm.rs | 64 +++++++++---------- rs-matter/src/dm/clusters/basic_info.rs | 8 +-- rs-matter/src/dm/clusters/ota_req.rs | 4 +- rs-matter/src/dm/clusters/time_sync/client.rs | 2 +- rs-matter/src/dm/types/handler.rs | 2 +- rs-matter/src/lib.rs | 10 +-- rs-matter/src/respond.rs | 16 +++-- rs-matter/tests/commissioning.rs | 8 +-- rs-matter/tests/common/e2e.rs | 4 +- 24 files changed, 162 insertions(+), 156 deletions(-) diff --git a/bloat-check/src/bin/bloat-check.rs b/bloat-check/src/bin/bloat-check.rs index 8e5479abe..0c1806013 100644 --- a/bloat-check/src/bin/bloat-check.rs +++ b/bloat-check/src/bin/bloat-check.rs @@ -77,7 +77,7 @@ use rs_matter::dm::networks::wireless::{ }; use rs_matter::dm::networks::NetChangeNotif; use rs_matter::dm::{ - Async, DataModel, Dataver, Endpoint, EpClMatcher, Node, WirelessDataModelState, + Async, Dataver, Endpoint, EpClMatcher, InteractionModel, Node, WirelessDataModelState, }; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -193,7 +193,7 @@ type AppDmHandler<'a> = handler_chain_type!( | WifiSysHandler<'a, &'a AppNetCtl<'a>> ); type AppCrypto = RustCrypto<'static, WeakTestOnlyRand>; -type AppDataModel<'a> = DataModel< +type AppDataModel<'a> = InteractionModel< 'a, &'a AppCrypto, MatterBuffers, @@ -304,7 +304,7 @@ fn main() -> ! { report_size("Network controller", size_of_val(net_ctl), &mut aux_total); // The operational Wifi connection manager is now driven from inside - // `DataModel::run` (no separate task); its footprint shows up under the data + // `InteractionModel::run` (no separate task); its footprint shows up under the data // model future below. let crypto = &*mk_static!( @@ -339,7 +339,7 @@ fn main() -> ! { // operational Wifi connection manager itself (no separate manager task). let dm = &*mk_static!( AppDataModel, - DataModel::new_with_net_ctl( + InteractionModel::new_with_net_ctl( &stack.matter, crypto, &stack.buffers, diff --git a/examples/src/bin/bridge.rs b/examples/src/bin/bridge.rs index d1f1bb0a7..7535460b8 100644 --- a/examples/src/bin/bridge.rs +++ b/examples/src/bin/bridge.rs @@ -38,8 +38,8 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, Cluster, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, - InvokeContext, Node, ReadContext, + Async, Cluster, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, + InteractionModel, InvokeContext, Node, ReadContext, }; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -102,7 +102,7 @@ fn main() -> Result<(), Error> { ); // Create the Data Model instance - let dm = DataModel::new( + let im = InteractionModel::new( &matter, &crypto, &buffers, @@ -113,14 +113,14 @@ fn main() -> Result<(), Error> { // Create a default responder capable of handling up to 3 subscriptions // All other subscription requests will be turned down with "resource exhausted" - let responder = DefaultResponder::new(&dm); + let responder = DefaultResponder::new(&im); // Run the responder with up to 4 handlers (i.e. 4 exchanges can be handled simultaneously) // Clients trying to open more exchanges than the ones currently running will get "I'm busy, please try again later" let mut respond = pin!(responder.run::<4, 4>()); // Run the background job of the data model - let mut dm_job = pin!(dm.run()); + let mut im_job = pin!(im.run()); // Create the Matter UDP socket let socket = async_io::Async::::bind(MATTER_SOCKET_BIND_ADDR)?; @@ -140,7 +140,7 @@ fn main() -> Result<(), Error> { } // Combine all async tasks in a single one - let all = select4(&mut transport, &mut mdns, &mut respond, &mut dm_job).coalesce(); + let all = select4(&mut transport, &mut mdns, &mut respond, &mut im_job).coalesce(); // Run with a simple `block_on`. Any local executor would do. futures_lite::future::block_on(all) diff --git a/examples/src/bin/camera_tests.rs b/examples/src/bin/camera_tests.rs index 0e365f99e..2aa95c67f 100644 --- a/examples/src/bin/camera_tests.rs +++ b/examples/src/bin/camera_tests.rs @@ -71,7 +71,7 @@ use rs_matter::dm::clusters::groups::{self, ClusterHandler as _}; use rs_matter::dm::devices::test::{DAC_PRIVKEY, TEST_DEV_ATT, TEST_DEV_DET}; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::{endpoints, DataModel}; +use rs_matter::dm::{endpoints, InteractionModel}; use rs_matter::dm::{ ArrayAttributeRead, Async, DataModelHandler, Dataver, DeviceType, Endpoint, EpClMatcher, EthDataModelState, InvokeContext, Node, ReadContext, WriteContext, @@ -561,7 +561,7 @@ fn main() -> Result<(), Error> { let chime = ChimeHandler::new(Dataver::new_rand(&mut rand)); - let dm = DataModel::new( + let im = InteractionModel::new( matter, &crypto, buffers, @@ -578,9 +578,9 @@ fn main() -> Result<(), Error> { &state, ); - let responder = DefaultResponder::new(&dm); + let responder = DefaultResponder::new(&im); let mut respond = pin!(responder.run::<4, 4>()); - let mut dm_job = pin!(dm.run()); + let mut im_job = pin!(im.run()); let udp_socket = async_io::Async::::bind(args::bind_addr())?; let tcp_socket = async_io::Async::::bind(args::bind_addr())?; @@ -614,7 +614,7 @@ fn main() -> Result<(), Error> { let all = select3( &mut transport, &mut mdns, - select3(&mut respond, &mut dm_job, &mut term).coalesce(), + select3(&mut respond, &mut im_job, &mut term).coalesce(), ); futures_lite::future::block_on(all.coalesce()) diff --git a/examples/src/bin/dimmable_light.rs b/examples/src/bin/dimmable_light.rs index dbc9b9ca3..7be1435cb 100644 --- a/examples/src/bin/dimmable_light.rs +++ b/examples/src/bin/dimmable_light.rs @@ -49,8 +49,8 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, Cluster, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, - Node, + Async, Cluster, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, + InteractionModel, Node, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::pairing::qr::QrTextType; @@ -116,7 +116,7 @@ fn main() -> Result<(), Error> { level_control_handler.init(Some(&on_off_handler)); // Create the Data Model instance - let dm = DataModel::new( + let im = InteractionModel::new( &matter, &crypto, &buffers, @@ -127,14 +127,14 @@ fn main() -> Result<(), Error> { // Create a default responder capable of handling up to 3 subscriptions // All other subscription requests will be turned down with "resource exhausted" - let responder = DefaultResponder::new(&dm); + let responder = DefaultResponder::new(&im); // Run the responder with up to 4 handlers (i.e. 4 exchanges can be handled simultaneously) // Clients trying to open more exchanges than the ones currently running will get "I'm busy, please try again later" let mut respond = pin!(responder.run::<4, 4>()); // Run the background job of the data model - let mut dm_job = pin!(dm.run()); + let mut im_job = pin!(im.run()); let socket = async_io::Async::::bind(MATTER_SOCKET_BIND_ADDR)?; @@ -171,7 +171,7 @@ fn main() -> Result<(), Error> { let all = select3( &mut transport, &mut mdns, - select3(&mut respond, &mut dm_job, &mut term).coalesce(), + select3(&mut respond, &mut im_job, &mut term).coalesce(), ); // Run with a simple `block_on`. Any local executor would do. diff --git a/examples/src/bin/light_tests.rs b/examples/src/bin/light_tests.rs index 5c54e62f7..bb368eb85 100644 --- a/examples/src/bin/light_tests.rs +++ b/examples/src/bin/light_tests.rs @@ -52,8 +52,8 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, Cluster, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, - Node, + Async, Cluster, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, + InteractionModel, Node, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::pairing::qr::QrTextType; @@ -151,7 +151,7 @@ fn run() -> Result<(), Error> { ); color_control_handler.init(Some(&on_off_handler)); - let dm = DataModel::new( + let im = InteractionModel::new( matter, &crypto, buffers, @@ -165,10 +165,10 @@ fn run() -> Result<(), Error> { state, ); - let responder = DefaultResponder::new(&dm); + let responder = DefaultResponder::new(&im); let mut respond = pin!(responder.run::<4, 4>()); - let mut dm_job = pin!(dm.run()); + let mut im_job = pin!(im.run()); let socket = async_io::Async::::bind(args::bind_addr())?; @@ -194,7 +194,7 @@ fn run() -> Result<(), Error> { let all = select3( &mut transport, &mut mdns, - select3(&mut respond, &mut dm_job, &mut term).coalesce(), + select3(&mut respond, &mut im_job, &mut term).coalesce(), ); futures_lite::future::block_on(all.coalesce()) diff --git a/examples/src/bin/media_player.rs b/examples/src/bin/media_player.rs index e1e1286d2..c5e037278 100644 --- a/examples/src/bin/media_player.rs +++ b/examples/src/bin/media_player.rs @@ -58,8 +58,8 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - ArrayAttributeRead, Async, Cluster, DataModel, DataModelHandler, Dataver, Endpoint, - EpClMatcher, EthDataModelState, InvokeContext, Node, ReadContext, + ArrayAttributeRead, Async, Cluster, DataModelHandler, Dataver, Endpoint, EpClMatcher, + EthDataModelState, InteractionModel, InvokeContext, Node, ReadContext, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::pairing::qr::QrTextType; @@ -113,7 +113,7 @@ fn main() -> Result<(), Error> { ); // Create the Data Model instance - let dm = DataModel::new( + let im = InteractionModel::new( &matter, &crypto, &buffers, @@ -124,14 +124,14 @@ fn main() -> Result<(), Error> { // Create a default responder capable of handling up to 3 subscriptions // All other subscription requests will be turned down with "resource exhausted" - let responder = DefaultResponder::new(&dm); + let responder = DefaultResponder::new(&im); // Run the responder with up to 4 handlers (i.e. 4 exchanges can be handled simultaneously) // Clients trying to open more exchanges than the ones currently running will get "I'm busy, please try again later" let mut respond = pin!(responder.run::<4, 4>()); // Run the background job of the data model - let mut dm_job = pin!(dm.run()); + let mut im_job = pin!(im.run()); // Create the Matter UDP socket let socket = async_io::Async::::bind(MATTER_SOCKET_BIND_ADDR)?; @@ -151,7 +151,7 @@ fn main() -> Result<(), Error> { } // Combine all async tasks in a single one - let all = select4(&mut transport, &mut mdns, &mut respond, &mut dm_job).coalesce(); + let all = select4(&mut transport, &mut mdns, &mut respond, &mut im_job).coalesce(); // Run with a simple `block_on`. Any local executor would do. futures_lite::future::block_on(all) diff --git a/examples/src/bin/onoff_light.rs b/examples/src/bin/onoff_light.rs index bd6aa87a9..98e41990f 100644 --- a/examples/src/bin/onoff_light.rs +++ b/examples/src/bin/onoff_light.rs @@ -36,7 +36,8 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, Node, + Async, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, InteractionModel, + Node, }; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -87,7 +88,7 @@ fn main() -> Result<(), Error> { ); // Create the Data Model instance - let dm = DataModel::new( + let im = InteractionModel::new( &matter, &crypto, &buffers, @@ -98,14 +99,14 @@ fn main() -> Result<(), Error> { // Create a default responder capable of handling up to 3 subscriptions // All other subscription requests will be turned down with "resource exhausted" - let responder = DefaultResponder::new(&dm); + let responder = DefaultResponder::new(&im); // Run the responder with up to 4 handlers (i.e. 4 exchanges can be handled simultaneously) // Clients trying to open more exchanges than the ones currently running will get "I'm busy, please try again later" let mut respond = pin!(responder.run::<4, 4>()); // Run the background job of the data model - let mut dm_job = pin!(dm.run()); + let mut im_job = pin!(im.run()); // Create, load and run the persister let socket = async_io::Async::::bind(MATTER_SOCKET_BIND_ADDR)?; @@ -125,7 +126,7 @@ fn main() -> Result<(), Error> { } // Combine all async tasks in a single one - let all = select4(&mut transport, &mut mdns, &mut respond, &mut dm_job).coalesce(); + let all = select4(&mut transport, &mut mdns, &mut respond, &mut im_job).coalesce(); // Run with a simple `block_on`. Any local executor would do. futures_lite::future::block_on(all) diff --git a/examples/src/bin/onoff_light_bt.rs b/examples/src/bin/onoff_light_bt.rs index 15a0608cc..6e497c826 100644 --- a/examples/src/bin/onoff_light_bt.rs +++ b/examples/src/bin/onoff_light_bt.rs @@ -54,7 +54,7 @@ use rs_matter::dm::networks::unix::UnixNetifs; use rs_matter::dm::networks::wireless::{NetCtlState, NetCtlWithStatusImpl, WifiNetworks}; use rs_matter::dm::networks::NetChangeNotif; use rs_matter::dm::{ - Async, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, Node, + Async, DataModelHandler, Dataver, Endpoint, EpClMatcher, InteractionModel, Node, WirelessDataModelState, }; use rs_matter::error::Error; @@ -162,8 +162,8 @@ fn run( // Create the Data Model instance. The same `net_ctl` is wired both into the // `NetworkCommissioning` handler (above) and into the data model, which drives - // the operational Wifi connection manager from `DataModel::run`. - let dm = DataModel::new_with_net_ctl( + // the operational Wifi connection manager from `InteractionModel::run`. + let im = InteractionModel::new_with_net_ctl( &matter, &crypto, &buffers, @@ -175,14 +175,14 @@ fn run( // Create a default responder capable of handling up to 3 subscriptions // All other subscription requests will be turned down with "resource exhausted" - let responder = DefaultResponder::new(&dm); + let responder = DefaultResponder::new(&im); // Run the responder with up to 4 handlers (i.e. 4 exchanges can be handled simultaneously) // Clients trying to open more exchanges than the ones currently running will get "I'm busy, please try again later" let mut respond = pin!(responder.run::<4, 4>()); // Run the background job of the data model - let mut dm_job = pin!(dm.run()); + let mut im_job = pin!(im.run()); // Create and run the mDNS responder let mut mdns = pin!(mdns::run_mdns(&matter, &crypto)); @@ -230,7 +230,7 @@ fn run( &mut transport, &mut bluetooth, &mut wifi_prov_task, - select(&mut respond, &mut dm_job).coalesce(), + select(&mut respond, &mut im_job).coalesce(), ); // Run with a simple `block_on`. Any local executor would do. @@ -247,7 +247,7 @@ fn run( let mut transport = pin!(matter.run(&crypto, &udp, &udp, &udp)); // Combine all async tasks in a single one - let all = select4(&mut transport, &mut mdns, &mut respond, &mut dm_job).coalesce(); + let all = select4(&mut transport, &mut mdns, &mut respond, &mut im_job).coalesce(); // Run with a simple `block_on`. Any local executor would do. futures_lite::future::block_on(all) diff --git a/examples/src/bin/onoff_light_switch.rs b/examples/src/bin/onoff_light_switch.rs index 7a9692778..26ff6e332 100644 --- a/examples/src/bin/onoff_light_switch.rs +++ b/examples/src/bin/onoff_light_switch.rs @@ -60,8 +60,8 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, - EventEmitter, Node, + Async, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, EventEmitter, + InteractionModel, Node, }; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -122,7 +122,7 @@ fn main() -> Result<(), Error> { let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); let rand = crypto.rand()?; - let dm = DataModel::new( + let im = InteractionModel::new( &matter, &crypto, &buffers, @@ -131,10 +131,10 @@ fn main() -> Result<(), Error> { &state, ); - let responder = rs_matter::respond::DefaultResponder::new(&dm); + let responder = rs_matter::respond::DefaultResponder::new(&im); let mut respond = pin!(responder.run::<4, 4>()); - let mut dm_job = pin!(dm.run()); + let mut im_job = pin!(im.run()); let socket = async_io::Async::::bind(MATTER_SOCKET_BIND_ADDR)?; @@ -148,12 +148,12 @@ fn main() -> Result<(), Error> { } // The switch task: on each Enter, emit Generic Switch press events and - // toggle every bound light. `&dm` is the `EventEmitter` used to publish the + // toggle every bound light. `&im` is the `EventEmitter` used to publish the // Generic Switch events. - let mut switch = pin!(run_switch(&matter, &crypto, &bindings, &dm)); + let mut switch = pin!(run_switch(&matter, &crypto, &bindings, &im)); // Combine the core Matter tasks, then add the switch task alongside. - let mut core = pin!(select4(&mut transport, &mut mdns, &mut respond, &mut dm_job,).coalesce()); + let mut core = pin!(select4(&mut transport, &mut mdns, &mut respond, &mut im_job,).coalesce()); let all = select(&mut core, &mut switch).coalesce(); diff --git a/examples/src/bin/onoff_light_work_stealing.rs b/examples/src/bin/onoff_light_work_stealing.rs index dbe22dcb2..0b047674a 100644 --- a/examples/src/bin/onoff_light_work_stealing.rs +++ b/examples/src/bin/onoff_light_work_stealing.rs @@ -35,7 +35,9 @@ use rs_matter::dm::devices::DEV_TYPE_ON_OFF_LIGHT; use rs_matter::dm::endpoints::{self, EthSysHandler}; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::{Async, DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, Node}; +use rs_matter::dm::{ + Async, Dataver, Endpoint, EpClMatcher, EthDataModelState, InteractionModel, Node, +}; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; @@ -107,7 +109,7 @@ fn main() -> Result<(), Error> { ); // Create the Data Model instance - let dm = DataModel::new( + let im = InteractionModel::new( matter, crypto, buffers, @@ -118,7 +120,7 @@ fn main() -> Result<(), Error> { // Create a default responder capable of handling up to 3 subscriptions // All other subscription requests will be turned down with "resource exhausted" - let responder = DefaultResponder::new(&dm); + let responder = DefaultResponder::new(&im); // Run the responder with up to 4 handlers (i.e. 4 exchanges can be handled simultaneously) // Clients trying to open more exchanges than the ones currently running will get "I'm busy, please try again later" @@ -127,7 +129,7 @@ fn main() -> Result<(), Error> { // Run the background job of the data model #[allow(unused)] - let dm_job = dm.run(); + let im_job = im.run(); // Create, load and run the persister let socket = async_io::Async::::bind(MATTER_SOCKET_BIND_ADDR)?; @@ -154,7 +156,7 @@ fn main() -> Result<(), Error> { // executor.spawn(mdns).detach(); // NOTE: Commented out because compiling this line blocks forever - //executor.spawn(dm_job).detach(); + //executor.spawn(im_job).detach(); // NOTE: Commented out because compiling this line spits out the following errors: // (Likely, we are experiencing https://github.com/rust-lang/rust/issues/64552) @@ -183,8 +185,8 @@ fn main() -> Result<(), Error> { // 229 | executor.spawn(respond).detach(); // | ^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Send` is not general enough // | - // = note: `Send` would have to be implemented for the type `&Responder<'_, ChainedExchangeHandler<&DataModel<'_, 15, 0, &RustCrypto<'_, FakeRng>, PooledBuffers<10, heapless::vec::Vec>, (Node<'_>, ChainedHandler>, ChainedHandler>, ChainedHandler>>, ChainedHandler>>, ChainedHandler>, ChainedHandler>>, ChainedHandler>, ChainedHandler>, ChainedHandler>, ChainedHandler>, ChainedHandler>, ChainedHandler>>, EmptyHandler>>>>>>>>>>>>)>, SecureChannel<'_, &&RustCrypto<'_, FakeRng>>>>` - // = note: ...but `Send` is actually implemented for the type `&'0 Responder<'_, ChainedExchangeHandler<&DataModel<'_, 15, 0, &RustCrypto<'_, FakeRng>, PooledBuffers<10, heapless::vec::Vec>, (Node<'_>, ChainedHandler>, ChainedHandler>, ChainedHandler>>, ChainedHandler>>, ChainedHandler>, ChainedHandler>>, ChainedHandler>, ChainedHandler>, ChainedHandler>, ChainedHandler>, ChainedHandler>, ChainedHandler>>, EmptyHandler>>>>>>>>>>>>)>, SecureChannel<'_, &&RustCrypto<'_, FakeRng>>>>`, for some specific lifetime `'0` + // = note: `Send` would have to be implemented for the type `&Responder<'_, ChainedExchangeHandler<&InteractionModel<'_, 15, 0, &RustCrypto<'_, FakeRng>, PooledBuffers<10, heapless::vec::Vec>, (Node<'_>, ChainedHandler>, ChainedHandler>, ChainedHandler>>, ChainedHandler>>, ChainedHandler>, ChainedHandler>>, ChainedHandler>, ChainedHandler>, ChainedHandler>, ChainedHandler>, ChainedHandler>, ChainedHandler>>, EmptyHandler>>>>>>>>>>>>)>, SecureChannel<'_, &&RustCrypto<'_, FakeRng>>>>` + // = note: ...but `Send` is actually implemented for the type `&'0 Responder<'_, ChainedExchangeHandler<&InteractionModel<'_, 15, 0, &RustCrypto<'_, FakeRng>, PooledBuffers<10, heapless::vec::Vec>, (Node<'_>, ChainedHandler>, ChainedHandler>, ChainedHandler>>, ChainedHandler>>, ChainedHandler>, ChainedHandler>>, ChainedHandler>, ChainedHandler>, ChainedHandler>, ChainedHandler>, ChainedHandler>, ChainedHandler>>, EmptyHandler>>>>>>>>>>>>)>, SecureChannel<'_, &&RustCrypto<'_, FakeRng>>>>`, for some specific lifetime `'0` //``` //executor.spawn(respond).detach(); diff --git a/examples/src/bin/ota_requestor.rs b/examples/src/bin/ota_requestor.rs index 74e60799a..9512b71da 100644 --- a/examples/src/bin/ota_requestor.rs +++ b/examples/src/bin/ota_requestor.rs @@ -51,8 +51,8 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, AttrChangeNotifier, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, - EthDataModelState, Node, + Async, AttrChangeNotifier, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, + InteractionModel, Node, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::pairing::qr::QrTextType; @@ -93,7 +93,7 @@ fn main() -> Result<(), Error> { // The OTA Requestor's transient, reported update state, for the cluster on // endpoint 1 (see `NODE`). State changes are pushed to subscribers via the - // data model's change-notifier (the `DataModel`, passed to the OTA loop below). + // data model's change-notifier (the `InteractionModel`, passed to the OTA loop below). let ota_state = OtaState::new(1); let buffers: MatterBuffers = MatterBuffers::new(); @@ -115,7 +115,7 @@ fn main() -> Result<(), Error> { let rand = crypto.rand()?; - let dm = DataModel::new( + let im = InteractionModel::new( &matter, &crypto, &buffers, @@ -124,9 +124,9 @@ fn main() -> Result<(), Error> { &state, ); - let responder = DefaultResponder::new(&dm); + let responder = DefaultResponder::new(&im); let mut respond = pin!(responder.run::<4, 4>()); - let mut dm_job = pin!(dm.run()); + let mut im_job = pin!(im.run()); let socket = async_io::Async::::bind(MATTER_SOCKET_BIND_ADDR)?; @@ -136,7 +136,7 @@ fn main() -> Result<(), Error> { // The application's OTA update loop, built from the cluster's building blocks. // The OTA loop shares the same crypto by reference (`&T: Crypto`), initiating // its own CASE exchanges to the provider. - let ota_job = pin!(run_ota(&matter, &crypto, &providers, &ota_state, &dm)); + let ota_job = pin!(run_ota(&matter, &crypto, &providers, &ota_state, &im)); if !matter.is_commissioned() { matter.print_standard_qr_text(DiscoveryCapabilities::IP)?; @@ -147,7 +147,7 @@ fn main() -> Result<(), Error> { // Combine the Matter stack (transport, mDNS, responder, data model) with the // OTA loop into a single task. - let matter_job = select4(&mut transport, &mut mdns, &mut respond, &mut dm_job).coalesce(); + let matter_job = select4(&mut transport, &mut mdns, &mut respond, &mut im_job).coalesce(); let all = select(matter_job, ota_job).coalesce(); futures_lite::future::block_on(all) diff --git a/examples/src/bin/scenes_tests.rs b/examples/src/bin/scenes_tests.rs index cfe65632f..10457ea3d 100644 --- a/examples/src/bin/scenes_tests.rs +++ b/examples/src/bin/scenes_tests.rs @@ -57,8 +57,8 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, Cluster, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, - Node, + Async, Cluster, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, + InteractionModel, Node, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::pairing::qr::QrTextType; @@ -188,7 +188,7 @@ fn run() -> Result<(), Error> { ); // Create the Data Model instance - let dm = DataModel::new( + let im = InteractionModel::new( matter, &crypto, buffers, @@ -205,14 +205,14 @@ fn run() -> Result<(), Error> { // Create a default responder capable of handling up to 3 subscriptions // All other subscription requests will be turned down with "resource exhausted" - let responder = DefaultResponder::new(&dm); + let responder = DefaultResponder::new(&im); // Run the responder with up to 4 handlers (i.e. 4 exchanges can be handled simultaneously) // Clients trying to open more exchanges than the ones currently running will get "I'm busy, please try again later" let mut respond = pin!(responder.run::<4, 4>()); // Run the background job of the data model - let mut dm_job = pin!(dm.run()); + let mut im_job = pin!(im.run()); let socket = async_io::Async::::bind(args::bind_addr())?; @@ -249,7 +249,7 @@ fn run() -> Result<(), Error> { let all = select3( &mut transport, &mut mdns, - select3(&mut respond, &mut dm_job, &mut term).coalesce(), + select3(&mut respond, &mut im_job, &mut term).coalesce(), ); // Run with a simple `block_on`. Any local executor would do. diff --git a/examples/src/bin/speaker.rs b/examples/src/bin/speaker.rs index d2475748f..5cd3c1398 100644 --- a/examples/src/bin/speaker.rs +++ b/examples/src/bin/speaker.rs @@ -40,7 +40,8 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, DataModel, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, Node, + Async, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, InteractionModel, + Node, }; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -113,7 +114,7 @@ fn main() -> Result<(), Error> { level_control_handler.init(Some(&on_off_handler)); // Create the Data Model instance - let dm = DataModel::new( + let im = InteractionModel::new( &matter, &crypto, &buffers, @@ -124,14 +125,14 @@ fn main() -> Result<(), Error> { // Create a default responder capable of handling up to 3 subscriptions // All other subscription requests will be turned down with "resource exhausted" - let responder = DefaultResponder::new(&dm); + let responder = DefaultResponder::new(&im); // Run the responder with up to 4 handlers (i.e. 4 exchanges can be handled simultaneously) // Clients trying to open more exchanges than the ones currently running will get "I'm busy, please try again later" let mut respond = pin!(responder.run::<4, 4>()); // Run the background job of the data model - let mut dm_job = pin!(dm.run()); + let mut im_job = pin!(im.run()); // Create the Matter UDP socket let socket = async_io::Async::::bind(MATTER_SOCKET_BIND_ADDR)?; @@ -151,7 +152,7 @@ fn main() -> Result<(), Error> { } // Combine all async tasks in a single one - let all = select4(&mut transport, &mut mdns, &mut respond, &mut dm_job).coalesce(); + let all = select4(&mut transport, &mut mdns, &mut respond, &mut im_job).coalesce(); // Run with a simple `block_on`. Any local executor would do. futures_lite::future::block_on(all) diff --git a/examples/src/bin/system_tests.rs b/examples/src/bin/system_tests.rs index bef3f469a..239090e73 100644 --- a/examples/src/bin/system_tests.rs +++ b/examples/src/bin/system_tests.rs @@ -77,8 +77,8 @@ use rs_matter::dm::endpoints::{self, ROOT_ENDPOINT_ID}; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, AttrChangeNotifier, Cluster, DataModel, DataModelHandler, Dataver, Endpoint, - EpClMatcher, EthDataModelState, Node, + Async, AttrChangeNotifier, Cluster, DataModelHandler, Dataver, Endpoint, EpClMatcher, + EthDataModelState, InteractionModel, Node, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::im::PROTO_ID_INTERACTION_MODEL; @@ -279,7 +279,7 @@ fn main() -> Result<(), Error> { }; // Create the Data Model instance - let dm = DataModel::new( + let im = InteractionModel::new( matter, &crypto, buffers, @@ -311,8 +311,8 @@ fn main() -> Result<(), Error> { let bdx_buffers: &MatterBuffers<2> = BDX_BUFFERS.uninit().init_with(MatterBuffers::init()); let main_handler = ChainedExchangeHandler::new( PROTO_ID_INTERACTION_MODEL, - &dm, - SecureChannel::new(dm.crypto(), &dm), + &im, + SecureChannel::new(im.crypto(), &im), ) .chain( PROTO_ID_BDX, @@ -334,7 +334,7 @@ fn main() -> Result<(), Error> { }); // Run the background job of the data model - let mut dm_job = pin!(dm.run()); + let mut im_job = pin!(im.run()); // Bind the UDP socket. When `--port` is overridden we have to bind to // the same port instead of the default `MATTER_SOCKET_BIND_ADDR` (which @@ -396,7 +396,7 @@ fn main() -> Result<(), Error> { // commands to the DUT through a named pipe at the given path. let mut app_pipe_actions = pin!(run_app_pipe_actions(app_pipe, |action| { if action.contains("SimulateConfigurationVersionChange") { - dm.bump_configuration_version()?; + im.bump_configuration_version()?; Ok(true) } else { @@ -416,7 +416,7 @@ fn main() -> Result<(), Error> { Ok(()) }); - let mut sw_fault_emitter = pin!(emit_software_fault_on_trigger(&dm)); + let mut sw_fault_emitter = pin!(emit_software_fault_on_trigger(&im)); // OTA Requestor role loop (active only with `--otaDownloadPath`): reacts to // `AnnounceOTAProvider` by downloading the image from the announced provider. @@ -425,7 +425,7 @@ fn main() -> Result<(), Error> { &crypto, &ota_providers, &ota_state, - &dm, + &im, ota_download_path, )); @@ -436,7 +436,7 @@ fn main() -> Result<(), Error> { &mut app_pipe_actions, select4( &mut respond, - &mut dm_job, + &mut im_job, &mut sw_fault_emitter, select(&mut term, &mut ota_job).coalesce(), ) @@ -848,7 +848,7 @@ fn dm_handler<'a, OH: OnOffHooks, LH: LevelControlHooks>( ), ) // Diagnostic Logs on the root endpoint. The handler's `run` hook (BDX - // streaming) is driven as part of this chain by `dm.run()`. + // streaming) is driven as part of this chain by `im.run()`. .chain( EpClMatcher::new(Some(ROOT_ENDPOINT_ID), Some(DIAGNOSTIC_LOGS_CLUSTER.id)), DiagLogsHandler::new(Dataver::new_rand(&mut rand), dlog_buffers, log_provider) @@ -939,7 +939,7 @@ impl GenDiag for TestEventTriggerDiag { /// `SoftwareDiagnostics::SoftwareFault` event each time it fires. Bridges /// the sync `GenDiag::test_event_trigger` trait method (which can't carry /// an event-emitter context) to the async event-emission path on -/// `DataModel`. The emitted event's fields (`id`, `name`, +/// `InteractionModel`. The emitted event's fields (`id`, `name`, /// `faultRecording`) are vendor-defined; we ship plausible stub values /// that satisfy `TC_DGSW_2_2`'s `validate_soft_fault_event_data` shape /// checks (uint64 / Utf8 / OctetStr). @@ -969,7 +969,7 @@ where /// Read JSON command lines from the named pipe at `path` and dispatch them to /// `bump` on the calling task — which is the main thread, so it's free to -/// touch `&Matter` / `&DataModel` directly (neither is `Sync`). +/// touch `&Matter` / `&InteractionModel` directly (neither is `Sync`). async fn run_app_pipe_actions( path: Option, mut action: impl FnMut(String) -> Result, diff --git a/examples/src/bin/webrtc_camera.rs b/examples/src/bin/webrtc_camera.rs index 51746a355..995860fb0 100644 --- a/examples/src/bin/webrtc_camera.rs +++ b/examples/src/bin/webrtc_camera.rs @@ -36,7 +36,7 @@ //! │ matter.run ──┐ │ //! │ mdns ──┤ │ //! │ responder ──┼── select5 ──► futures_lite::future::block_on │ -//! │ dm.run ──┤ │ +//! │ im.run ──┤ │ //! │ drive ──┘ │ //! │ │ │ //! │ ▼ LocalExecutor │ @@ -108,8 +108,8 @@ use rs_matter::dm::devices::test::{DAC_PRIVKEY, TEST_DEV_ATT, TEST_DEV_COMM, TES use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::unix::UnixNetifs; -use rs_matter::dm::DataModel; use rs_matter::dm::DeviceType; +use rs_matter::dm::InteractionModel; use rs_matter::dm::{DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, Node}; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -1294,7 +1294,7 @@ fn main() -> Result<(), Error> { DemoZoneHooks, )); - let dm = DataModel::new( + let im = InteractionModel::new( matter, &crypto, buffers, @@ -1303,9 +1303,9 @@ fn main() -> Result<(), Error> { state, ); - let responder = DefaultResponder::new(&dm); + let responder = DefaultResponder::new(&im); let mut respond = pin!(responder.run::<4, 4>()); - let mut dm_job = pin!(dm.run()); + let mut im_job = pin!(im.run()); let udp_socket = Async::::bind(MATTER_SOCKET_BIND_ADDR)?; @@ -1339,7 +1339,7 @@ fn main() -> Result<(), Error> { matter.open_basic_comm_window(MAX_COMM_WINDOW_TIMEOUT_SECS, &crypto, &())?; } - let matter_core = select4(&mut transport, &mut mdns, &mut respond, &mut dm_job).coalesce(); + let matter_core = select4(&mut transport, &mut mdns, &mut respond, &mut im_job).coalesce(); let all = select(matter_core, &mut driver).coalesce(); futures_lite::future::block_on(all) } diff --git a/rs-matter/src/dm.rs b/rs-matter/src/dm.rs index fbc87d78b..f1267ae1d 100644 --- a/rs-matter/src/dm.rs +++ b/rs-matter/src/dm.rs @@ -72,12 +72,12 @@ mod types; pub type IMBuffer = crate::transport::exchange::Buffer; /// An `ExchangeHandler` implementation capable of handling responder exchanges for the Interaction Model protocol. -/// The mutable, owned-together state a [`DataModel`] operates on: the +/// The mutable, owned-together state a [`InteractionModel`] operates on: the /// subscriptions table, the events queue and the network store. /// /// Allocating these as a single value (rather than three separate locals wired /// up by hand at every call site) is the whole point: construct one -/// `DataModelState`, then hand a reference to it to [`DataModel::new`]. Each of +/// `DataModelState`, then hand a reference to it to [`InteractionModel::new`]. Each of /// the three pieces keeps its own lock internally (the proven multi-lock model); /// folding them behind a single mutex is a possible later refinement. /// @@ -128,7 +128,7 @@ impl DataModelState(&mut self, mut kv: S) -> Result<(), Error> where S: KvBlobStore, @@ -163,7 +163,7 @@ impl DataModelState &mut [u8] { &mut self.kv_buf.get_mut().get_mut()[..] } @@ -214,11 +214,11 @@ where /// The implementation needs a `DataModelHandler` instance to interact with the underlying clusters of the data model. /// /// `NC` is the network controller type driving the (optional) wireless connection -/// manager from [`DataModel::run`]. It defaults to [`NoopWirelessNetCtl`], which is -/// the right choice for Ethernet (and what the convenience [`DataModel::new`] +/// manager from [`InteractionModel::run`]. It defaults to [`NoopWirelessNetCtl`], which is +/// the right choice for Ethernet (and what the convenience [`InteractionModel::new`] /// constructor wires up); wireless devices pass a real controller via -/// [`DataModel::new_with_net_ctl`]. -pub struct DataModel< +/// [`InteractionModel::new_with_net_ctl`]. +pub struct InteractionModel< 'a, C, B, @@ -244,16 +244,16 @@ pub struct DataModel< /// A [`DataModelState`] for an Ethernet device: its network store is a fixed /// [`EthNetwork`], so call sites need only the (defaulted) subscription/event -/// sizes. Pairs with [`EthDataModel`]. +/// sizes. Pairs with [`EthInteractionModel`]. pub type EthDataModelState< const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, const KB: usize = DEFAULT_KV_BUF_SIZE, > = DataModelState, NS, NE, KB>; -/// A [`DataModel`] for an Ethernet device (network store fixed to [`EthNetwork`]), +/// A [`InteractionModel`] for an Ethernet device (network store fixed to [`EthNetwork`]), /// so the `N` generic disappears from call sites. Pairs with [`EthDataModelState`]. -pub type EthDataModel< +pub type EthInteractionModel< 'a, C, B, @@ -263,11 +263,11 @@ pub type EthDataModel< const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, const KB: usize = DEFAULT_KV_BUF_SIZE, -> = DataModel<'a, C, B, T, S, EthNetwork<'static>, NC, NS, NE, KB>; +> = InteractionModel<'a, C, B, T, S, EthNetwork<'static>, NC, NS, NE, KB>; /// A [`DataModelState`] for a wireless device, parameterized by the concrete /// wireless network store `N` (e.g. `WifiNetworks<3>` or a Thread store). Pairs -/// with [`WirelessDataModel`]. +/// with [`WirelessInteractionModel`]. pub type WirelessDataModelState< N, const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, @@ -275,9 +275,9 @@ pub type WirelessDataModelState< const KB: usize = DEFAULT_KV_BUF_SIZE, > = DataModelState; -/// A [`DataModel`] for a wireless device (network store `N`, network controller +/// A [`InteractionModel`] for a wireless device (network store `N`, network controller /// `NC`). Pairs with [`WirelessDataModelState`]. -pub type WirelessDataModel< +pub type WirelessInteractionModel< 'a, C, B, @@ -288,10 +288,10 @@ pub type WirelessDataModel< const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, const KB: usize = DEFAULT_KV_BUF_SIZE, -> = DataModel<'a, C, B, T, S, N, NC, NS, NE, KB>; +> = InteractionModel<'a, C, B, T, S, N, NC, NS, NE, KB>; impl<'a, C, B, T, S, N, const NS: usize, const NE: usize, const KB: usize> - DataModel<'a, C, B, T, S, N, NoopWirelessNetCtl, NS, NE, KB> + InteractionModel<'a, C, B, T, S, N, NoopWirelessNetCtl, NS, NE, KB> where C: Crypto, B: Buffers, @@ -302,9 +302,9 @@ where /// Create the data model for a device that does not need an operational /// wireless connection manager (typically an Ethernet device). /// - /// This is a convenience wrapper around [`DataModel::new_with_net_ctl`] that + /// This is a convenience wrapper around [`InteractionModel::new_with_net_ctl`] that /// fixes the network controller to an inert [`NoopWirelessNetCtl`], so - /// [`DataModel::run`]'s connection-management branch stays dormant. + /// [`InteractionModel::run`]'s connection-management branch stays dormant. /// /// # Arguments /// - `matter` - a reference to the `Matter` instance @@ -338,7 +338,7 @@ where } impl<'a, C, B, T, S, N, NC, const NS: usize, const NE: usize, const KB: usize> - DataModel<'a, C, B, T, S, N, NC, NS, NE, KB> + InteractionModel<'a, C, B, T, S, N, NC, NS, NE, KB> where C: Crypto, B: Buffers, @@ -349,9 +349,9 @@ where /// Create the data model with an explicit network controller `net_ctl`. /// /// Use this for wireless devices: `net_ctl` drives the operational connection - /// manager run from [`DataModel::run`] (and is typically the same controller + /// manager run from [`InteractionModel::run`] (and is typically the same controller /// instance also wired into the `NetworkCommissioning` cluster handler). For - /// Ethernet devices prefer the [`DataModel::new`] convenience constructor. + /// Ethernet devices prefer the [`InteractionModel::new`] convenience constructor. /// /// # Arguments /// - `matter` - a reference to the `Matter` instance @@ -361,7 +361,7 @@ where /// as well (Endpoint 0), possibly by decorating her own clusters with the `rs_matter::dm::root_endpoint::with_` methods /// - `kv` - an instance of type `S` which implements the `KvBlobStoreAccess` trait. This instance is used for interacting with the key-value blob store. /// - `net_ctl` - the network controller (`NetCtl` + `WirelessDiag` + `NetChangeNotif`) used by - /// the operational wireless connection manager driven from [`DataModel::run`]. + /// the operational wireless connection manager driven from [`InteractionModel::run`]. /// - `state` - a reference to the [`DataModelState`] holding the subscriptions table, the /// events queue and the network store (the latter parameterized by the `Networks` /// implementation `N`). @@ -419,11 +419,11 @@ where /// Equivalent to [`Matter::open_basic_comm_window`] but additionally /// bumps the data version of the `AdministratorCommissioning` /// cluster on the root endpoint and routes the change to - /// subscribers — both happen automatically because this `DataModel` + /// subscribers — both happen automatically because this `InteractionModel` /// is itself the [`AttrChangeNotifier`] passed down. /// /// Prefer this entry point over the `Matter` one for any code path - /// that has a `DataModel` available; `Matter::open_basic_comm_window` + /// that has a `InteractionModel` available; `Matter::open_basic_comm_window` /// is the building block we delegate to and does not bump dataver /// (see its docs). pub fn open_basic_comm_window(&self, timeout_secs: u16) -> Result<(), Error> { @@ -435,7 +435,7 @@ where /// /// Equivalent to [`Matter::close_comm_window`] but additionally /// bumps the `AdministratorCommissioning` dataver and routes - /// subscribers via this `DataModel`'s [`AttrChangeNotifier`]. See + /// subscribers via this `InteractionModel`'s [`AttrChangeNotifier`]. See /// `open_basic_comm_window` for the rationale. pub fn close_comm_window(&self) -> Result { self.matter.close_comm_window(self) @@ -443,7 +443,7 @@ where /// Bump `BasicInformation::ConfigurationVersion` by one, persist /// the new value, and notify subscribers (which also bumps the - /// `BasicInformation` cluster's dataver via this `DataModel`'s + /// `BasicInformation` cluster's dataver via this `InteractionModel`'s /// [`AttrChangeNotifier`]). /// /// Per Matter Core Spec, callers MUST invoke this @@ -1277,7 +1277,7 @@ where } impl ExchangeHandler - for DataModel<'_, C, B, T, S, N, NC, NS, NE, KB> + for InteractionModel<'_, C, B, T, S, N, NC, NS, NE, KB> where C: Crypto, B: Buffers, @@ -1286,12 +1286,12 @@ where N: Networks, { async fn handle(&self, mut exchange: Exchange<'_>) -> Result<(), Error> { - DataModel::handle(self, &mut exchange).await + InteractionModel::handle(self, &mut exchange).await } } impl HandlerContext - for DataModel<'_, C, B, T, S, N, NC, NS, NE, KB> + for InteractionModel<'_, C, B, T, S, N, NC, NS, NE, KB> where C: Crypto, B: Buffers, @@ -1329,7 +1329,7 @@ where } impl AttrChangeNotifier - for DataModel<'_, C, B, T, S, N, NC, NS, NE, KB> + for InteractionModel<'_, C, B, T, S, N, NC, NS, NE, KB> where C: Crypto, B: Buffers, @@ -1373,7 +1373,7 @@ where } impl EventEmitter - for DataModel<'_, C, B, T, S, N, NC, NS, NE, KB> + for InteractionModel<'_, C, B, T, S, N, NC, NS, NE, KB> where C: Crypto, B: Buffers, diff --git a/rs-matter/src/dm/clusters/basic_info.rs b/rs-matter/src/dm/clusters/basic_info.rs index 6f8839c3b..9c649d19b 100644 --- a/rs-matter/src/dm/clusters/basic_info.rs +++ b/rs-matter/src/dm/clusters/basic_info.rs @@ -319,7 +319,7 @@ pub struct BasicInfoSettings { /// `BasicInformation::ConfigurationVersion` (Matter Core Spec). /// Non-volatile, monotonically increasing, minimum 1. /// Bumped by application code via - /// `DataModel::bump_configuration_version` whenever the node's + /// `InteractionModel::bump_configuration_version` whenever the node's /// fixed-quality surface (Server/Parts list, device types, software /// version, …) changes — see Matter Core Spec. pub configuration_version: u32, @@ -369,7 +369,7 @@ impl BasicInfoSettings { /// /// This routine only mutates the in-memory value. Persistence and /// subscriber notification are the caller's responsibility — use - /// `DataModel::bump_configuration_version` for the full + /// `InteractionModel::bump_configuration_version` for the full /// "bump + persist + notify + dataver-bump" pass. pub fn bump_configuration_version(&mut self) -> u32 { self.configuration_version = self.configuration_version.saturating_add(1); @@ -481,7 +481,7 @@ impl ClusterHandler for BasicInfoHandler { // `BasicInformation`'s `AttributeList`. The // `BasicInformation`/`BasicInfoSettings` plumbing for it stays in // place — read handler, persisted settings field, and the - // `Matter::bump_configuration_version` / `DataModel::bump_configuration_version` + // `Matter::bump_configuration_version` / `InteractionModel::bump_configuration_version` // entry points — so a user that supplies their own cluster metadata // (i.e. one that drops `ConfigurationVersion` from `except!`) gets a // working implementation out of the box. @@ -629,7 +629,7 @@ impl ClusterHandler for BasicInfoHandler { fn configuration_version(&self, ctx: impl ReadContext) -> Result { // Non-volatile, runtime-mutable. Lives in `BasicInfoSettings`, - // bumped via `DataModel::bump_configuration_version`. + // bumped via `InteractionModel::bump_configuration_version`. Self::with_settings( ctx.exchange(), |settings| Ok(settings.configuration_version), diff --git a/rs-matter/src/dm/clusters/ota_req.rs b/rs-matter/src/dm/clusters/ota_req.rs index 2df8642c5..e8c8f813c 100644 --- a/rs-matter/src/dm/clusters/ota_req.rs +++ b/rs-matter/src/dm/clusters/ota_req.rs @@ -492,9 +492,9 @@ impl Default for Providers { /// /// Because progress is reported from the application's own update loop (outside /// any cluster-handler `ctx`), the reporting calls take the data model's -/// [`AttrChangeNotifier`] (typically the `DataModel`) so each change bumps the +/// [`AttrChangeNotifier`] (typically the `InteractionModel`) so each change bumps the /// cluster's data version and wakes subscribers. It is passed in rather than -/// stored because the `DataModel` is constructed *after* this state (it borrows +/// stored because the `InteractionModel` is constructed *after* this state (it borrows /// it), so there is never a moment at which it could be stored here. pub struct OtaState { endpoint_id: EndptId, diff --git a/rs-matter/src/dm/clusters/time_sync/client.rs b/rs-matter/src/dm/clusters/time_sync/client.rs index 3413700a8..65a4d2635 100644 --- a/rs-matter/src/dm/clusters/time_sync/client.rs +++ b/rs-matter/src/dm/clusters/time_sync/client.rs @@ -54,7 +54,7 @@ use crate::Matter; /// /// Holds a borrow of the [`Matter`] instance for its lifetime; the /// `run` / `refresh_once` methods take the KV-store handle and the -/// attribute-change notifier (typically your `DataModel`) by reference +/// attribute-change notifier (typically your `InteractionModel`) by reference /// so the same client struct can be re-used across refresh cycles. pub struct TimeSyncClient<'a, C> { matter: &'a Matter<'a>, diff --git a/rs-matter/src/dm/types/handler.rs b/rs-matter/src/dm/types/handler.rs index 8e9cefa54..2e15eea7b 100644 --- a/rs-matter/src/dm/types/handler.rs +++ b/rs-matter/src/dm/types/handler.rs @@ -1354,7 +1354,7 @@ mod asynch { /// Handlers are typically implemented by user-defined clusters, but there is no 1:1 correspondence between /// a handler and a cluster, as a single handler can handle multiple clusters and even multiple endpoints. /// - /// Moreover, the `DataModel` implementation expects a single `AsyncHandler` instance, so the expectation + /// Moreover, the `InteractionModel` implementation expects a single `AsyncHandler` instance, so the expectation /// is that the user will compose multiple handlers into a single `AsyncHandler` instance, using `ChainedHandler` /// or other means. pub trait AsyncHandler { diff --git a/rs-matter/src/lib.rs b/rs-matter/src/lib.rs index 892851715..aa5048407 100644 --- a/rs-matter/src/lib.rs +++ b/rs-matter/src/lib.rs @@ -364,8 +364,8 @@ impl<'a> Matter<'a> { /// via `notify`, but does **not** bump the per-cluster `Dataver` of /// `AdministratorCommissioning` — a subsequent dataver-filtered /// read could therefore cache-hit and miss the change. Application - /// code that holds a `DataModel` should prefer - /// [`crate::dm::DataModel::open_basic_comm_window`], which delegates + /// code that holds a `InteractionModel` should prefer + /// [`crate::dm::InteractionModel::open_basic_comm_window`], which delegates /// here and additionally bumps dataver via its /// [`AttrChangeNotifier`] impl. pub fn open_basic_comm_window( @@ -405,7 +405,7 @@ impl<'a> Matter<'a> { /// **Note:** As with [`Matter::open_basic_comm_window`], this does /// not bump the per-cluster `Dataver` of /// `AdministratorCommissioning`. Prefer - /// [`crate::dm::DataModel::close_comm_window`] when a `DataModel` + /// [`crate::dm::InteractionModel::close_comm_window`] when a `InteractionModel` /// is available. pub fn close_comm_window(&self, notify: &dyn AttrChangeNotifier) -> Result { let notify_mdns = || self.transport().notify_mdns_changed(); @@ -429,8 +429,8 @@ impl<'a> Matter<'a> { /// does **not** bump the per-cluster `Dataver` of /// `BasicInformation`. A subsequent dataver-filtered read could /// therefore cache-hit and miss the change. Application code that - /// holds a `DataModel` should prefer - /// [`crate::dm::DataModel::bump_configuration_version`], which + /// holds a `InteractionModel` should prefer + /// [`crate::dm::InteractionModel::bump_configuration_version`], which /// delegates here and additionally bumps dataver via its /// [`AttrChangeNotifier`] impl. /// diff --git a/rs-matter/src/respond.rs b/rs-matter/src/respond.rs index e4039a27f..0cb9c54f7 100644 --- a/rs-matter/src/respond.rs +++ b/rs-matter/src/respond.rs @@ -27,7 +27,7 @@ use crate::dm::events::DEFAULT_MAX_EVENTS_BUF_SIZE; use crate::dm::networks::wireless::NoopWirelessNetCtl; use crate::dm::subscriptions::DEFAULT_MAX_SUBSCRIPTIONS; use crate::dm::DataModelHandler; -use crate::dm::{DataModel, IMBuffer}; +use crate::dm::{IMBuffer, InteractionModel}; use crate::error::Error; use crate::im::busy::BusyInteractionModel; use crate::im::PROTO_ID_INTERACTION_MODEL; @@ -263,7 +263,7 @@ where } } -/// A type alias for the "default" responder handler, which is a chained handler of the `DataModel` and `SecureChannel` handlers. +/// A type alias for the "default" responder handler, which is a chained handler of the `InteractionModel` and `SecureChannel` handlers. pub type DefaultExchangeHandler< 'd, 'a, @@ -277,7 +277,7 @@ pub type DefaultExchangeHandler< const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, const KB: usize = DEFAULT_KV_BUF_SIZE, > = ChainedExchangeHandler< - &'d DataModel<'a, C, B, T, S, N, NC, NS, NE, KB>, + &'d InteractionModel<'a, C, B, T, S, N, NC, NS, NE, KB>, SecureChannel<'d, &'d C>, >; @@ -287,9 +287,11 @@ where B: Buffers, { /// Creates a "default" responder. This is a responder that composes and uses the `rs-matter`-provided `ExchangeHandler` implementations - /// (`SecureChannel` and `DataModel`) for handling the Secure Channel protocol and the Interaction Model protocol. + /// (`SecureChannel` and `InteractionModel`) for handling the Secure Channel protocol and the Interaction Model protocol. #[inline(always)] - pub const fn new_default(data_model: &'d DataModel<'a, C, B, T, S, N, NC, NS, NE, KB>) -> Self + pub const fn new_default( + data_model: &'d InteractionModel<'a, C, B, T, S, N, NC, NS, NE, KB>, + ) -> Self where C: Crypto, T: DataModelHandler, @@ -365,7 +367,7 @@ where { /// Creates the responder composition. #[inline(always)] - pub const fn new(data_model: &'d DataModel<'a, C, B, T, S, N, NC, NS, NE, KB>) -> Self { + pub const fn new(data_model: &'d InteractionModel<'a, C, B, T, S, N, NC, NS, NE, KB>) -> Self { Self { responder: Responder::new_default(data_model), busy_responder: Responder::new_busy(data_model.matter(), RESPOND_BUSY_MS), @@ -389,7 +391,7 @@ where ) -> &Responder< 'a, ChainedExchangeHandler< - &'d DataModel<'a, C, B, T, S, N, NC, NS, NE, KB>, + &'d InteractionModel<'a, C, B, T, S, N, NC, NS, NE, KB>, SecureChannel<'d, &'d C>, >, > { diff --git a/rs-matter/tests/commissioning.rs b/rs-matter/tests/commissioning.rs index bb3e5637b..c3ca4c18e 100644 --- a/rs-matter/tests/commissioning.rs +++ b/rs-matter/tests/commissioning.rs @@ -18,7 +18,7 @@ //! Full in-process commissioning integration test. //! //! Exercises the complete flow: -//! 1. Device (in-process) starts with a full DataModel + mDNS responder +//! 1. Device (in-process) starts with a full InteractionModel + mDNS responder //! 2. Controller discovers the device via mDNS //! 3. PASE session established over UDP //! 4. IM read on OnOff attribute (ep 1) — assert initial value is `false` @@ -63,8 +63,8 @@ use rs_matter::dm::devices::DEV_TYPE_ON_OFF_LIGHT; use rs_matter::dm::networks::unix::UnixNetifs; use rs_matter::dm::subscriptions::DEFAULT_MAX_SUBSCRIPTIONS; use rs_matter::dm::{ - endpoints, Async, DataModel, DataModelHandler, DataModelState, Dataver, Endpoint, EpClMatcher, - Node, + endpoints, Async, DataModelHandler, DataModelState, Dataver, Endpoint, EpClMatcher, + InteractionModel, Node, }; use rs_matter::error::Error; use rs_matter::im::IMStatusCode; @@ -196,7 +196,7 @@ macro_rules! commissioning_test { TestOnOffDeviceLogic::new(false), ); - let dm = DataModel::new( + let dm = InteractionModel::new( device_matter, &device_crypto, device_buffers, diff --git a/rs-matter/tests/common/e2e.rs b/rs-matter/tests/common/e2e.rs index 72ec57417..e5cc145ce 100644 --- a/rs-matter/tests/common/e2e.rs +++ b/rs-matter/tests/common/e2e.rs @@ -26,7 +26,7 @@ use rs_matter::acl::{AclEntry, AuthMode}; use rs_matter::crypto::{test_only_crypto, Crypto}; use rs_matter::dm::clusters::net_comm::DummyNetworks; use rs_matter::dm::devices::test::{TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; -use rs_matter::dm::{DataModel, DataModelHandler, DataModelState, Privilege}; +use rs_matter::dm::{DataModelHandler, DataModelState, InteractionModel, Privilege}; use rs_matter::error::Error; use rs_matter::persist::{DummyKvBlobStore, SharedKvBlobStore}; use rs_matter::respond::{ExchangeHandler, Responder}; @@ -176,7 +176,7 @@ impl E2eRunner { let matter_client = &self.matter_client; - let dm = DataModel::new( + let dm = InteractionModel::new( &self.matter, &self.crypto, &self.buffers, From 3631e0e04408441b4599bead45c52883c13cffbe Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Fri, 19 Jun 2026 07:13:27 +0000 Subject: [PATCH 06/14] Rename DataModelHandler to just DataModel --- bloat-check/src/bin/bloat-check.rs | 28 ++++++++++--------- examples/src/bin/bridge.rs | 10 +++---- examples/src/bin/camera_tests.rs | 8 +++--- examples/src/bin/dimmable_light.rs | 10 +++---- examples/src/bin/light_tests.rs | 10 +++---- examples/src/bin/media_player.rs | 8 +++--- examples/src/bin/onoff_light.rs | 9 +++--- examples/src/bin/onoff_light_bt.rs | 8 +++--- examples/src/bin/onoff_light_switch.rs | 8 +++--- examples/src/bin/onoff_light_work_stealing.rs | 4 +-- examples/src/bin/ota_requestor.rs | 8 +++--- examples/src/bin/scenes_tests.rs | 10 +++---- examples/src/bin/speaker.rs | 9 +++--- examples/src/bin/system_tests.rs | 12 ++++---- examples/src/bin/webrtc_camera.rs | 8 +++--- rs-matter/src/dm.rs | 22 +++++++-------- rs-matter/src/dm/types/handler.rs | 4 +-- rs-matter/src/respond.rs | 6 ++-- rs-matter/tests/commissioning.rs | 10 +++---- rs-matter/tests/common/e2e.rs | 4 +-- rs-matter/tests/common/e2e/im/attributes.rs | 6 ++-- rs-matter/tests/common/e2e/im/commands.rs | 4 +-- rs-matter/tests/common/e2e/test.rs | 6 ++-- 23 files changed, 106 insertions(+), 106 deletions(-) diff --git a/bloat-check/src/bin/bloat-check.rs b/bloat-check/src/bin/bloat-check.rs index 0c1806013..1d2c43628 100644 --- a/bloat-check/src/bin/bloat-check.rs +++ b/bloat-check/src/bin/bloat-check.rs @@ -193,7 +193,7 @@ type AppDmHandler<'a> = handler_chain_type!( | WifiSysHandler<'a, &'a AppNetCtl<'a>> ); type AppCrypto = RustCrypto<'static, WeakTestOnlyRand>; -type AppDataModel<'a> = InteractionModel< +type AppInteractionModel<'a> = InteractionModel< 'a, &'a AppCrypto, MatterBuffers, @@ -321,7 +321,7 @@ fn main() -> ! { // A Wireless handler with a sample app cluster (on-off) let handler = mk_static!( AppDmHandler, - dm_handler( + data_model( rand, on_off::OnOffHandler::new_standalone( Dataver::new_rand(&mut rand), @@ -337,8 +337,8 @@ fn main() -> ! { // Data Model. `net_ctl` is wired in so the data model's `run` drives the // operational Wifi connection manager itself (no separate manager task). - let dm = &*mk_static!( - AppDataModel, + let im = &*mk_static!( + AppInteractionModel, InteractionModel::new_with_net_ctl( &stack.matter, crypto, @@ -350,7 +350,7 @@ fn main() -> ! { ) ); - report_size("Data Model", size_of_val(dm), &mut aux_total); + report_size("Interaction Model", size_of_val(im), &mut aux_total); let mdns = mk_static!(BuiltinMdns, BuiltinMdns::new()); @@ -379,7 +379,7 @@ fn main() -> ! { ); // A default responder - let responder = mk_static!(AppResponder, DefaultResponder::new(dm)); + let responder = mk_static!(AppResponder, DefaultResponder::new(im)); report_size("Responder", size_of_val(&*responder), &mut aux_total); @@ -406,7 +406,7 @@ fn main() -> ! { size_of_val(&respond_busy_task_fut(responder, 0)) * 2, &mut fut_total, ); - report_size("DM task", size_of_val(&dm_task_fut(dm)), &mut fut_total); + report_size("IM task", size_of_val(&im_task_fut(im)), &mut fut_total); report_size( "mDNS task", size_of_val(&mdns_task_fut(mdns, &stack.matter, crypto)), @@ -457,7 +457,7 @@ fn main() -> ! { spawner.spawn(unwrap!(respond_task(responder, 2))); spawner.spawn(unwrap!(respond_task(responder, 1))); spawner.spawn(unwrap!(respond_task(responder, 0))); - spawner.spawn(unwrap!(dm_task(dm))); + spawner.spawn(unwrap!(im_task(im))); spawner.spawn(unwrap!(mdns_task(mdns, &stack.matter, crypto))); spawner.spawn(unwrap!(btp_task(&stack.btp))); spawner.spawn(unwrap!(transport_task( @@ -498,14 +498,16 @@ async fn respond_busy_task(responder: &'static AppResponder<'static, 'static>, h } #[inline(always)] -fn dm_task_fut<'a>(dm: &'a AppDataModel<'a>) -> impl Future> + 'a { - dm.run() +fn im_task_fut<'a>( + im: &'a AppInteractionModel<'a>, +) -> impl Future> + 'a { + im.run() } #[embassy_executor::task] -async fn dm_task(dm: &'static AppDataModel<'static>) { +async fn im_task(im: &'static AppInteractionModel<'static>) { info!("Starting DM task..."); - unwrap!(dm_task_fut(dm).await); + unwrap!(im_task_fut(im).await); } #[inline(always)] @@ -614,7 +616,7 @@ const NODE: Node<'static> = Node { /// The Data Model handler for our Matter device. /// The handler is the root endpoint 0 handler plus the on-off handler and its descriptor. -fn dm_handler<'a>( +fn data_model<'a>( mut rand: impl RngCore + Copy, on_off: on_off::OnOffHandler<'a, TestOnOffDeviceLogic, NoLevelControl>, wifi_diag: &'a dyn WifiDiag, diff --git a/examples/src/bin/bridge.rs b/examples/src/bin/bridge.rs index 7535460b8..284f2b00a 100644 --- a/examples/src/bin/bridge.rs +++ b/examples/src/bin/bridge.rs @@ -38,8 +38,8 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, Cluster, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, - InteractionModel, InvokeContext, Node, ReadContext, + Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, InteractionModel, + InvokeContext, Node, ReadContext, }; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -106,7 +106,7 @@ fn main() -> Result<(), Error> { &matter, &crypto, &buffers, - dm_handler(rand, &on_off_handler_ep2, &on_off_handler_ep3), + data_model(rand, &on_off_handler_ep2, &on_off_handler_ep3), SharedKvBlobStore::new(kv), &state, ); @@ -197,11 +197,11 @@ const NODE: Node<'static> = Node { }; /// The Data Model handler + meta-data for our Matter Bridge. -fn dm_handler<'a, OH: OnOffHooks, LH: LevelControlHooks>( +fn data_model<'a, OH: OnOffHooks, LH: LevelControlHooks>( mut rand: impl RngCore + Copy, on_off_ep2: &'a on_off::OnOffHandler<'a, OH, LH>, on_off_ep3: &'a on_off::OnOffHandler<'a, OH, LH>, -) -> impl DataModelHandler + 'a { +) -> impl DataModel + 'a { ( NODE, endpoints::EthSysHandlerBuilder::new() diff --git a/examples/src/bin/camera_tests.rs b/examples/src/bin/camera_tests.rs index 2aa95c67f..afee455f6 100644 --- a/examples/src/bin/camera_tests.rs +++ b/examples/src/bin/camera_tests.rs @@ -73,7 +73,7 @@ use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{endpoints, InteractionModel}; use rs_matter::dm::{ - ArrayAttributeRead, Async, DataModelHandler, Dataver, DeviceType, Endpoint, EpClMatcher, + ArrayAttributeRead, Async, DataModel, Dataver, DeviceType, Endpoint, EpClMatcher, EthDataModelState, InvokeContext, Node, ReadContext, WriteContext, }; use rs_matter::error::{Error, ErrorCode}; @@ -565,7 +565,7 @@ fn main() -> Result<(), Error> { matter, &crypto, buffers, - dm_handler( + data_model( rand, webrtc, cam_av, @@ -663,7 +663,7 @@ const NODE: Node<'static> = Node { // Handler wiring // --------------------------------------------------------------------------- -fn dm_handler<'a>( +fn data_model<'a>( mut rand: impl RngCore + Copy, webrtc: &'a WebRtc, cam_av: &'a CamAv, @@ -675,7 +675,7 @@ fn dm_handler<'a>( zone_mgmt: &'a ZoneMgmtHandler, push_av: &'a PushAvStreamHandler<'static, StubPushHooks, PUSH_NC>, chime: ChimeHandler, -) -> impl DataModelHandler + 'a { +) -> impl DataModel + 'a { ( NODE, endpoints::EthSysHandlerBuilder::new() diff --git a/examples/src/bin/dimmable_light.rs b/examples/src/bin/dimmable_light.rs index 7be1435cb..c86eb2692 100644 --- a/examples/src/bin/dimmable_light.rs +++ b/examples/src/bin/dimmable_light.rs @@ -49,8 +49,8 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, Cluster, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, - InteractionModel, Node, + Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, InteractionModel, + Node, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::pairing::qr::QrTextType; @@ -120,7 +120,7 @@ fn main() -> Result<(), Error> { &matter, &crypto, &buffers, - dm_handler(rand, &on_off_handler, &level_control_handler), + data_model(rand, &on_off_handler, &level_control_handler), SharedKvBlobStore::new(kv), &state, ); @@ -197,11 +197,11 @@ const NODE: Node<'static> = Node { /// The Data Model handler + meta-data for our Matter device. /// The handler is the root endpoint 0 handler plus the on-off handler and its descriptor. -fn dm_handler<'a, LH: LevelControlHooks, OH: OnOffHooks>( +fn data_model<'a, LH: LevelControlHooks, OH: OnOffHooks>( mut rand: impl RngCore + Copy, on_off: &'a on_off::OnOffHandler<'a, OH, LH>, level_control: &'a level_control::LevelControlHandler<'a, LH, OH>, -) -> impl DataModelHandler + 'a { +) -> impl DataModel + 'a { ( NODE, endpoints::EthSysHandlerBuilder::new() diff --git a/examples/src/bin/light_tests.rs b/examples/src/bin/light_tests.rs index bb368eb85..7c6ee59de 100644 --- a/examples/src/bin/light_tests.rs +++ b/examples/src/bin/light_tests.rs @@ -52,8 +52,8 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, Cluster, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, - InteractionModel, Node, + Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, InteractionModel, + Node, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::pairing::qr::QrTextType; @@ -155,7 +155,7 @@ fn run() -> Result<(), Error> { matter, &crypto, buffers, - dm_handler( + data_model( rand, &on_off_handler, &level_control_handler, @@ -217,12 +217,12 @@ const NODE: Node<'static> = Node { ], }; -fn dm_handler<'a, LH: LevelControlHooks, OH: OnOffHooks, CH: ColorControlHooks>( +fn data_model<'a, LH: LevelControlHooks, OH: OnOffHooks, CH: ColorControlHooks>( mut rand: impl RngCore + Copy, on_off: &'a on_off::OnOffHandler<'a, OH, LH>, level_control: &'a level_control::LevelControlHandler<'a, LH, OH>, color_control: &'a color_control::ColorControlHandler<'a, CH, OH, LH>, -) -> impl DataModelHandler + 'a { +) -> impl DataModel + 'a { ( NODE, endpoints::EthSysHandlerBuilder::new() diff --git a/examples/src/bin/media_player.rs b/examples/src/bin/media_player.rs index c5e037278..e90fedcd3 100644 --- a/examples/src/bin/media_player.rs +++ b/examples/src/bin/media_player.rs @@ -58,7 +58,7 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - ArrayAttributeRead, Async, Cluster, DataModelHandler, Dataver, Endpoint, EpClMatcher, + ArrayAttributeRead, Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, InteractionModel, InvokeContext, Node, ReadContext, }; use rs_matter::error::{Error, ErrorCode}; @@ -117,7 +117,7 @@ fn main() -> Result<(), Error> { &matter, &crypto, &buffers, - dm_handler(rand, &on_off_handler), + data_model(rand, &on_off_handler), SharedKvBlobStore::new(kv), &state, ); @@ -177,10 +177,10 @@ const NODE: Node<'static> = Node { /// The Data Model handler + meta-data for our Matter device. /// The handler is the root endpoint 0 handler plus the Media Player cluster handlers. -fn dm_handler<'a, OH: OnOffHooks, LH: LevelControlHooks>( +fn data_model<'a, OH: OnOffHooks, LH: LevelControlHooks>( mut rand: impl RngCore + Copy, on_off: &'a on_off::OnOffHandler<'a, OH, LH>, -) -> impl DataModelHandler + 'a { +) -> impl DataModel + 'a { ( NODE, endpoints::EthSysHandlerBuilder::new() diff --git a/examples/src/bin/onoff_light.rs b/examples/src/bin/onoff_light.rs index 98e41990f..c6012f881 100644 --- a/examples/src/bin/onoff_light.rs +++ b/examples/src/bin/onoff_light.rs @@ -36,8 +36,7 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, InteractionModel, - Node, + Async, DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, InteractionModel, Node, }; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -92,7 +91,7 @@ fn main() -> Result<(), Error> { &matter, &crypto, &buffers, - dm_handler(rand, &on_off_handler), + data_model(rand, &on_off_handler), SharedKvBlobStore::new(kv), &state, ); @@ -150,10 +149,10 @@ const NODE: Node<'static> = Node { /// The Data Model handler + meta-data for our Matter device. /// The handler is the root endpoint 0 handler plus the on-off handler and its descriptor. -fn dm_handler<'a, OH: OnOffHooks, LH: LevelControlHooks>( +fn data_model<'a, OH: OnOffHooks, LH: LevelControlHooks>( mut rand: impl RngCore + Copy, on_off: &'a on_off::OnOffHandler<'a, OH, LH>, -) -> impl DataModelHandler + 'a { +) -> impl DataModel + 'a { ( NODE, endpoints::EthSysHandlerBuilder::new() diff --git a/examples/src/bin/onoff_light_bt.rs b/examples/src/bin/onoff_light_bt.rs index 6e497c826..2d6ab55d9 100644 --- a/examples/src/bin/onoff_light_bt.rs +++ b/examples/src/bin/onoff_light_bt.rs @@ -54,7 +54,7 @@ use rs_matter::dm::networks::unix::UnixNetifs; use rs_matter::dm::networks::wireless::{NetCtlState, NetCtlWithStatusImpl, WifiNetworks}; use rs_matter::dm::networks::NetChangeNotif; use rs_matter::dm::{ - Async, DataModelHandler, Dataver, Endpoint, EpClMatcher, InteractionModel, Node, + Async, DataModel, Dataver, Endpoint, EpClMatcher, InteractionModel, Node, WirelessDataModelState, }; use rs_matter::error::Error; @@ -167,7 +167,7 @@ fn run( &matter, &crypto, &buffers, - dm_handler(rand, &on_off_handler, &net_ctl, &net_ctl), + data_model(rand, &on_off_handler, &net_ctl, &net_ctl), SharedKvBlobStore::new(kv), &net_ctl, &state, @@ -271,12 +271,12 @@ const NODE: Node<'static> = Node { /// The Data Model handler + meta-data for our Matter device. /// The handler is the root endpoint 0 handler plus the on-off handler and its descriptor. -fn dm_handler<'a, OH: OnOffHooks, LH: LevelControlHooks, T>( +fn data_model<'a, OH: OnOffHooks, LH: LevelControlHooks, T>( mut rand: impl RngCore + Copy, on_off: &'a on_off::OnOffHandler<'a, OH, LH>, wifi_diag: &'a dyn WifiDiag, net_ctl: T, -) -> impl DataModelHandler + 'a +) -> impl DataModel + 'a where T: NetCtl + NetCtlStatus + 'a, { diff --git a/examples/src/bin/onoff_light_switch.rs b/examples/src/bin/onoff_light_switch.rs index 26ff6e332..cddb8def9 100644 --- a/examples/src/bin/onoff_light_switch.rs +++ b/examples/src/bin/onoff_light_switch.rs @@ -60,7 +60,7 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, EventEmitter, + Async, DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, EventEmitter, InteractionModel, Node, }; use rs_matter::error::Error; @@ -126,7 +126,7 @@ fn main() -> Result<(), Error> { &matter, &crypto, &buffers, - dm_handler(rand, &bindings), + data_model(rand, &bindings), SharedKvBlobStore::new(kv), &state, ); @@ -348,10 +348,10 @@ const NODE: Node<'static> = Node { /// The Data Model handler: root endpoint 0 + the Descriptor and Binding handlers /// on the switch endpoint. -fn dm_handler<'a, const N: usize>( +fn data_model<'a, const N: usize>( mut rand: impl RngCore + Copy, bindings: &'a Bindings, -) -> impl DataModelHandler + 'a { +) -> impl DataModel + 'a { ( NODE, endpoints::EthSysHandlerBuilder::new() diff --git a/examples/src/bin/onoff_light_work_stealing.rs b/examples/src/bin/onoff_light_work_stealing.rs index 0b047674a..9785d9a73 100644 --- a/examples/src/bin/onoff_light_work_stealing.rs +++ b/examples/src/bin/onoff_light_work_stealing.rs @@ -113,7 +113,7 @@ fn main() -> Result<(), Error> { matter, crypto, buffers, - (NODE, dm_handler(rand, on_off_handler)), + (NODE, data_model(rand, on_off_handler)), SharedKvBlobStore::new(kv), state, ); @@ -209,7 +209,7 @@ const NODE: Node<'static> = Node { /// The Data Model handler + meta-data for our Matter device. /// The handler is the root endpoint 0 handler plus the on-off handler and its descriptor. -fn dm_handler<'a>( +fn data_model<'a>( mut rand: impl RngCore + Copy, on_off: on_off::OnOffHandler<'a, TestOnOffDeviceLogic, NoLevelControl>, ) -> AppDmHandler<'a> { diff --git a/examples/src/bin/ota_requestor.rs b/examples/src/bin/ota_requestor.rs index 9512b71da..ba12fadd0 100644 --- a/examples/src/bin/ota_requestor.rs +++ b/examples/src/bin/ota_requestor.rs @@ -51,7 +51,7 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, AttrChangeNotifier, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, + Async, AttrChangeNotifier, DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, InteractionModel, Node, }; use rs_matter::error::{Error, ErrorCode}; @@ -119,7 +119,7 @@ fn main() -> Result<(), Error> { &matter, &crypto, &buffers, - dm_handler(rand, &providers, &ota_state), + data_model(rand, &providers, &ota_state), SharedKvBlobStore::new(kv), &state, ); @@ -167,11 +167,11 @@ const NODE: Node<'static> = Node { /// The Data Model handler: the root endpoint 0 handler plus the OTA Requestor /// cluster (and its descriptor) on endpoint 1. -fn dm_handler<'a>( +fn data_model<'a>( mut rand: impl RngCore + Copy, providers: &'a Providers, ota_state: &'a OtaState, -) -> impl DataModelHandler + 'a { +) -> impl DataModel + 'a { ( NODE, endpoints::EthSysHandlerBuilder::new() diff --git a/examples/src/bin/scenes_tests.rs b/examples/src/bin/scenes_tests.rs index 10457ea3d..90505b91b 100644 --- a/examples/src/bin/scenes_tests.rs +++ b/examples/src/bin/scenes_tests.rs @@ -57,8 +57,8 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, Cluster, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, - InteractionModel, Node, + Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, InteractionModel, + Node, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::pairing::qr::QrTextType; @@ -192,7 +192,7 @@ fn run() -> Result<(), Error> { matter, &crypto, buffers, - dm_handler( + data_model( rand, &on_off_handler, &level_control_handler, @@ -281,13 +281,13 @@ const NODE: Node<'static> = Node { /// The Data Model handler + meta-data for our Matter device. /// The handler is the root endpoint 0 handler plus the OnOff / /// LevelControl / Scenes handlers wired onto EP1. -fn dm_handler<'a, LH: LevelControlHooks, OH: OnOffHooks, R>( +fn data_model<'a, LH: LevelControlHooks, OH: OnOffHooks, R>( mut rand: impl RngCore + Copy, on_off: &'a on_off::OnOffHandler<'a, OH, LH>, level_control: &'a level_control::LevelControlHandler<'a, LH, OH>, scenes: ScenesHandler<'a, SCENES_CAPACITY, R>, unit_testing_data: &'a RefCell, -) -> impl DataModelHandler + 'a +) -> impl DataModel + 'a where R: rs_matter::dm::clusters::scenes::SceneClusters + 'a, { diff --git a/examples/src/bin/speaker.rs b/examples/src/bin/speaker.rs index 5cd3c1398..cbd1ba943 100644 --- a/examples/src/bin/speaker.rs +++ b/examples/src/bin/speaker.rs @@ -40,8 +40,7 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, InteractionModel, - Node, + Async, DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, InteractionModel, Node, }; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -118,7 +117,7 @@ fn main() -> Result<(), Error> { &matter, &crypto, &buffers, - dm_handler(rand, &on_off_handler, &level_control_handler), + data_model(rand, &on_off_handler, &level_control_handler), SharedKvBlobStore::new(kv), &state, ); @@ -176,11 +175,11 @@ const NODE: Node<'static> = Node { /// The Data Model handler + meta-data for our Matter device. /// The handler is the root endpoint 0 handler plus the Speaker handler. -fn dm_handler<'a, LH: LevelControlHooks, OH: OnOffHooks>( +fn data_model<'a, LH: LevelControlHooks, OH: OnOffHooks>( mut rand: impl RngCore + Copy, on_off: &'a OnOffHandler<'a, OH, LH>, level_control: &'a LevelControlHandler<'a, LH, OH>, -) -> impl DataModelHandler + 'a { +) -> impl DataModel + 'a { ( NODE, endpoints::EthSysHandlerBuilder::new() diff --git a/examples/src/bin/system_tests.rs b/examples/src/bin/system_tests.rs index 239090e73..1867b90c7 100644 --- a/examples/src/bin/system_tests.rs +++ b/examples/src/bin/system_tests.rs @@ -77,7 +77,7 @@ use rs_matter::dm::endpoints::{self, ROOT_ENDPOINT_ID}; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, AttrChangeNotifier, Cluster, DataModelHandler, Dataver, Endpoint, EpClMatcher, + Async, AttrChangeNotifier, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, InteractionModel, Node, }; use rs_matter::error::{Error, ErrorCode}; @@ -112,7 +112,7 @@ static BUFFERS: StaticCell> = StaticCell::new(); static UNIT_TESTING_DATA: StaticCell> = StaticCell::new(); static GEN_DIAG: StaticCell = StaticCell::new(); // UserLabel registry — host endpoints and labels-per-endpoint counts -// match `dm_handler`'s `UserLabelHandler<'_, E, N>` parameterisation. +// match `data_model`'s `UserLabelHandler<'_, E, N>` parameterisation. static USER_LABELS: StaticCell> = StaticCell::new(); // Binding registry. Capacity 16 — `TestBinding` writes a 17-entry // table and expects `RESOURCE_EXHAUSTED`, so this bound is what makes @@ -283,7 +283,7 @@ fn main() -> Result<(), Error> { matter, &crypto, buffers, - dm_handler( + data_model( node, gen_diag, rand, @@ -598,7 +598,7 @@ const OTA_PROVIDER_CLUSTER: Cluster<'static> = const OTA_REQUESTOR_CLUSTER: Cluster<'static> = OtaRequestorHandler::CLUSTER; /// The Diagnostic Logs cluster metadata, exactly as served by the -/// [`DiagLogsHandler`] wired in `dm_handler` (so `NODE`'s declaration +/// [`DiagLogsHandler`] wired in `data_model` (so `NODE`'s declaration /// matches the handler). const DIAGNOSTIC_LOGS_CLUSTER: Cluster<'static> = , @@ -709,7 +709,7 @@ const NODE_BINFO_CV_EXPOSED: Node<'static> = Node { // composition root — every additional cluster handler we wire grows // the parameter list. Suppressing here is cleaner than abstracting. #[allow(clippy::too_many_arguments)] -fn dm_handler<'a, OH: OnOffHooks, LH: LevelControlHooks>( +fn data_model<'a, OH: OnOffHooks, LH: LevelControlHooks>( node: &'static Node<'static>, gen_diag: &'a dyn GenDiag, mut rand: impl RngCore + Copy, @@ -724,7 +724,7 @@ fn dm_handler<'a, OH: OnOffHooks, LH: LevelControlHooks>( ota_state: &'a OtaState, dlog_buffers: &'a MatterBuffers<2>, log_provider: &'a LogFileProvider, -) -> impl DataModelHandler + 'a { +) -> impl DataModel + 'a { ( node, endpoints::EthSysHandlerBuilder::new() diff --git a/examples/src/bin/webrtc_camera.rs b/examples/src/bin/webrtc_camera.rs index 995860fb0..28cb37f03 100644 --- a/examples/src/bin/webrtc_camera.rs +++ b/examples/src/bin/webrtc_camera.rs @@ -110,7 +110,7 @@ use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::unix::UnixNetifs; use rs_matter::dm::DeviceType; use rs_matter::dm::InteractionModel; -use rs_matter::dm::{DataModelHandler, Dataver, Endpoint, EpClMatcher, EthDataModelState, Node}; +use rs_matter::dm::{DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, Node}; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; @@ -1298,7 +1298,7 @@ fn main() -> Result<(), Error> { matter, &crypto, buffers, - dm_handler(rand, webrtc, cam_av, cam_av_settings, zone_mgmt), + data_model(rand, webrtc, cam_av, cam_av_settings, zone_mgmt), SharedKvBlobStore::new(kv), state, ); @@ -1375,7 +1375,7 @@ const NODE: Node<'static> = Node { ], }; -fn dm_handler<'a>( +fn data_model<'a>( mut rand: impl RngCore + Copy, webrtc: &'a WebRtc, cam_av: &'a CameraAvStreamHandler<'static, Str0mCamHooks, CAM_AV_NV>, @@ -1385,7 +1385,7 @@ fn dm_handler<'a>( CAM_AV_SETTINGS_NS, >, zone_mgmt: &'a ZoneMgmtHandler, -) -> impl DataModelHandler + 'a { +) -> impl DataModel + 'a { ( NODE, endpoints::EthSysHandlerBuilder::new() diff --git a/rs-matter/src/dm.rs b/rs-matter/src/dm.rs index f1267ae1d..30ae643fe 100644 --- a/rs-matter/src/dm.rs +++ b/rs-matter/src/dm.rs @@ -211,7 +211,7 @@ where } } -/// The implementation needs a `DataModelHandler` instance to interact with the underlying clusters of the data model. +/// The implementation needs a `DataModel` instance to interact with the underlying clusters of the data model. /// /// `NC` is the network controller type driving the (optional) wireless connection /// manager from [`InteractionModel::run`]. It defaults to [`NoopWirelessNetCtl`], which is @@ -295,7 +295,7 @@ impl<'a, C, B, T, S, N, const NS: usize, const NE: usize, const KB: usize> where C: Crypto, B: Buffers, - T: DataModelHandler, + T: DataModel, S: KvBlobStore, N: Networks, { @@ -309,7 +309,7 @@ where /// # Arguments /// - `matter` - a reference to the `Matter` instance /// - `buffers` - a reference to an implementation of `Buffers` which is used for allocating RX and TX buffers on the fly, when necessary - /// - `handler` - an instance of type `T` which implements the `DataModelHandler` trait. This instance is used for interacting with the underlying + /// - `handler` - an instance of type `T` which implements the `DataModel` trait. This instance is used for interacting with the underlying /// clusters of the data model. Note that the expectations is for the user to provide a handler that handles the Matter system clusters /// as well (Endpoint 0), possibly by decorating her own clusters with the `rs_matter::dm::root_endpoint::with_` methods /// - `kv` - an instance of type `S` which implements the `KvBlobStoreAccess` trait. This instance is used for interacting with the key-value blob store. @@ -342,7 +342,7 @@ impl<'a, C, B, T, S, N, NC, const NS: usize, const NE: usize, const KB: usize> where C: Crypto, B: Buffers, - T: DataModelHandler, + T: DataModel, S: KvBlobStore, N: Networks, { @@ -356,7 +356,7 @@ where /// # Arguments /// - `matter` - a reference to the `Matter` instance /// - `buffers` - a reference to an implementation of `Buffers` which is used for allocating RX and TX buffers on the fly, when necessary - /// - `handler` - an instance of type `T` which implements the `DataModelHandler` trait. This instance is used for interacting with the underlying + /// - `handler` - an instance of type `T` which implements the `DataModel` trait. This instance is used for interacting with the underlying /// clusters of the data model. Note that the expectations is for the user to provide a handler that handles the Matter system clusters /// as well (Endpoint 0), possibly by decorating her own clusters with the `rs_matter::dm::root_endpoint::with_` methods /// - `kv` - an instance of type `S` which implements the `KvBlobStoreAccess` trait. This instance is used for interacting with the key-value blob store. @@ -551,7 +551,7 @@ where }) } - /// Answer a responding exchange using the `DataModelHandler` instance wrapped by this exchange handler. + /// Answer a responding exchange using the `DataModel` instance wrapped by this exchange handler. pub async fn handle(&self, exchange: &mut Exchange<'_>) -> Result<(), Error> { let fetch_meta = |exchange: &mut Exchange| { let meta = exchange.rx()?.meta(); @@ -1121,7 +1121,7 @@ where with_dataver: bool, ) -> Result where - T: DataModelHandler, + T: DataModel, { let mut wb = WriteBuf::new(tx); @@ -1281,7 +1281,7 @@ impl Excha where C: Crypto, B: Buffers, - T: DataModelHandler, + T: DataModel, S: KvBlobStore, N: Networks, { @@ -1295,7 +1295,7 @@ impl Handl where C: Crypto, B: Buffers, - T: DataModelHandler, + T: DataModel, S: KvBlobStore, N: Networks, { @@ -1333,7 +1333,7 @@ impl AttrC where C: Crypto, B: Buffers, - T: DataModelHandler, + T: DataModel, S: KvBlobStore, N: Networks, { @@ -1377,7 +1377,7 @@ impl Event where C: Crypto, B: Buffers, - T: DataModelHandler, + T: DataModel, S: KvBlobStore, N: Networks, { diff --git a/rs-matter/src/dm/types/handler.rs b/rs-matter/src/dm/types/handler.rs index 2e15eea7b..3a8cb8a8f 100644 --- a/rs-matter/src/dm/types/handler.rs +++ b/rs-matter/src/dm/types/handler.rs @@ -975,8 +975,8 @@ where } } -pub trait DataModelHandler: Metadata + AsyncHandler {} -impl DataModelHandler for T where T: Metadata + AsyncHandler {} +pub trait DataModel: Metadata + AsyncHandler {} +impl DataModel for T where T: Metadata + AsyncHandler {} /// A version of the `AsyncHandler` trait that never awaits any operation. /// diff --git a/rs-matter/src/respond.rs b/rs-matter/src/respond.rs index 0cb9c54f7..d5349204e 100644 --- a/rs-matter/src/respond.rs +++ b/rs-matter/src/respond.rs @@ -26,7 +26,7 @@ use crate::dm::clusters::net_comm; use crate::dm::events::DEFAULT_MAX_EVENTS_BUF_SIZE; use crate::dm::networks::wireless::NoopWirelessNetCtl; use crate::dm::subscriptions::DEFAULT_MAX_SUBSCRIPTIONS; -use crate::dm::DataModelHandler; +use crate::dm::DataModel; use crate::dm::{IMBuffer, InteractionModel}; use crate::error::Error; use crate::im::busy::BusyInteractionModel; @@ -294,7 +294,7 @@ where ) -> Self where C: Crypto, - T: DataModelHandler, + T: DataModel, S: KvBlobStore, N: net_comm::Networks, { @@ -361,7 +361,7 @@ impl<'d, 'a, C, B, T, S, N, NC, const NS: usize, const NE: usize, const KB: usiz where C: Crypto, B: Buffers, - T: DataModelHandler, + T: DataModel, S: KvBlobStore, N: net_comm::Networks, { diff --git a/rs-matter/tests/commissioning.rs b/rs-matter/tests/commissioning.rs index c3ca4c18e..2928a8d1f 100644 --- a/rs-matter/tests/commissioning.rs +++ b/rs-matter/tests/commissioning.rs @@ -63,8 +63,8 @@ use rs_matter::dm::devices::DEV_TYPE_ON_OFF_LIGHT; use rs_matter::dm::networks::unix::UnixNetifs; use rs_matter::dm::subscriptions::DEFAULT_MAX_SUBSCRIPTIONS; use rs_matter::dm::{ - endpoints, Async, DataModelHandler, DataModelState, Dataver, Endpoint, EpClMatcher, - InteractionModel, Node, + endpoints, Async, DataModel, DataModelState, Dataver, Endpoint, EpClMatcher, InteractionModel, + Node, }; use rs_matter::error::Error; use rs_matter::im::IMStatusCode; @@ -127,10 +127,10 @@ const NODE: Node<'static> = Node { ], }; -fn dm_handler<'a, OH: OnOffHooks, LH: LevelControlHooks>( +fn data_model<'a, OH: OnOffHooks, LH: LevelControlHooks>( mut rand: impl RngCore + Copy, on_off: &'a on_off::OnOffHandler<'a, OH, LH>, -) -> impl DataModelHandler + 'a { +) -> impl DataModel + 'a { ( NODE, endpoints::EthSysHandlerBuilder::new() @@ -200,7 +200,7 @@ macro_rules! commissioning_test { device_matter, &device_crypto, device_buffers, - dm_handler(rand, &on_off_handler), + data_model(rand, &on_off_handler), SharedKvBlobStore::new(DummyKvBlobStore), device_state, ); diff --git a/rs-matter/tests/common/e2e.rs b/rs-matter/tests/common/e2e.rs index e5cc145ce..3279b43eb 100644 --- a/rs-matter/tests/common/e2e.rs +++ b/rs-matter/tests/common/e2e.rs @@ -26,7 +26,7 @@ use rs_matter::acl::{AclEntry, AuthMode}; use rs_matter::crypto::{test_only_crypto, Crypto}; use rs_matter::dm::clusters::net_comm::DummyNetworks; use rs_matter::dm::devices::test::{TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; -use rs_matter::dm::{DataModelHandler, DataModelState, InteractionModel, Privilege}; +use rs_matter::dm::{DataModel, DataModelState, InteractionModel, Privilege}; use rs_matter::error::Error; use rs_matter::persist::{DummyKvBlobStore, SharedKvBlobStore}; use rs_matter::respond::{ExchangeHandler, Responder}; @@ -161,7 +161,7 @@ impl E2eRunner { /// drive the tests (i.e. it does not have any server clusters and such). pub async fn run(&self, handler: H) -> Result<(), Error> where - H: DataModelHandler, + H: DataModel, { self.init()?; diff --git a/rs-matter/tests/common/e2e/im/attributes.rs b/rs-matter/tests/common/e2e/im/attributes.rs index 61288be71..15d6717f4 100644 --- a/rs-matter/tests/common/e2e/im/attributes.rs +++ b/rs-matter/tests/common/e2e/im/attributes.rs @@ -16,7 +16,7 @@ */ use rs_matter::crypto::Crypto; -use rs_matter::dm::DataModelHandler; +use rs_matter::dm::DataModel; use rs_matter::error::Error; use rs_matter::im::GenericPath; use rs_matter::im::{AttrPath, AttrStatus}; @@ -246,7 +246,7 @@ impl E2eRunner { input: &'a [AttrPath], expected: &'a [TestAttrResp<'a>], ) where - H: DataModelHandler, + H: DataModel, { self.test_one(handler, TLVTest::read_attrs(input, expected)) } @@ -258,7 +258,7 @@ impl E2eRunner { input: &'a [TestAttrData<'a>], expected: &'a [AttrStatus], ) where - H: DataModelHandler, + H: DataModel, { self.test_one(handler, TLVTest::write_attrs(input, expected)) } diff --git a/rs-matter/tests/common/e2e/im/commands.rs b/rs-matter/tests/common/e2e/im/commands.rs index 328ded40d..7ed3868ac 100644 --- a/rs-matter/tests/common/e2e/im/commands.rs +++ b/rs-matter/tests/common/e2e/im/commands.rs @@ -16,7 +16,7 @@ */ use rs_matter::crypto::Crypto; -use rs_matter::dm::DataModelHandler; +use rs_matter::dm::DataModel; use rs_matter::error::Error; use rs_matter::im::{CmdPath, CmdStatus}; use rs_matter::tlv::{TLVTag, TLVWrite}; @@ -161,7 +161,7 @@ impl E2eRunner { input: &'a [TestCmdData<'a>], expected: &'a [TestCmdResp<'a>], ) where - H: DataModelHandler, + H: DataModel, { self.test_one(handler, TLVTest::inv_cmds(input, expected)) } diff --git a/rs-matter/tests/common/e2e/test.rs b/rs-matter/tests/common/e2e/test.rs index 97b1aeaf6..1c3b2500b 100644 --- a/rs-matter/tests/common/e2e/test.rs +++ b/rs-matter/tests/common/e2e/test.rs @@ -23,7 +23,7 @@ use embassy_futures::select::select; use embassy_time::{Duration, Timer}; use rs_matter::crypto::Crypto; -use rs_matter::dm::DataModelHandler; +use rs_matter::dm::DataModel; use rs_matter::error::Error; use rs_matter::transport::exchange::{Exchange, MessageMeta}; use rs_matter::utils::select::Coalesce; @@ -91,7 +91,7 @@ impl E2eRunner { /// until the test completes or fails. pub fn test_one(&self, handler: H, test: T) where - H: DataModelHandler, + H: DataModel, T: E2eTest, { self.test_all(handler, core::iter::once(test)) @@ -101,7 +101,7 @@ impl E2eRunner { /// until all tests complete or the first one fails. pub fn test_all(&self, handler: H, tests: I) where - H: DataModelHandler, + H: DataModel, I: IntoIterator, T: E2eTest, { From 185303151690581cf82c84a09d367f975d8758f3 Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Fri, 19 Jun 2026 07:34:46 +0000 Subject: [PATCH 07/14] Rename DataModelState to InteractionModelState --- bloat-check/src/bin/bloat-check.rs | 12 +++--- examples/src/bin/bridge.rs | 7 ++-- examples/src/bin/camera_tests.rs | 5 ++- examples/src/bin/dimmable_light.rs | 7 ++-- examples/src/bin/light_tests.rs | 8 ++-- examples/src/bin/media_player.rs | 5 ++- examples/src/bin/onoff_light.rs | 6 ++- examples/src/bin/onoff_light_bt.rs | 6 +-- examples/src/bin/onoff_light_switch.rs | 5 ++- examples/src/bin/onoff_light_work_stealing.rs | 6 +-- examples/src/bin/ota_requestor.rs | 5 ++- examples/src/bin/scenes_tests.rs | 8 ++-- examples/src/bin/speaker.rs | 6 ++- examples/src/bin/system_tests.rs | 5 ++- examples/src/bin/webrtc_camera.rs | 6 +-- rs-matter/src/dm.rs | 38 +++++++++---------- rs-matter/src/persist.rs | 6 +-- rs-matter/tests/commissioning.rs | 8 ++-- rs-matter/tests/common/e2e.rs | 6 +-- 19 files changed, 83 insertions(+), 72 deletions(-) diff --git a/bloat-check/src/bin/bloat-check.rs b/bloat-check/src/bin/bloat-check.rs index 1d2c43628..bdcd17ff5 100644 --- a/bloat-check/src/bin/bloat-check.rs +++ b/bloat-check/src/bin/bloat-check.rs @@ -77,7 +77,7 @@ use rs_matter::dm::networks::wireless::{ }; use rs_matter::dm::networks::NetChangeNotif; use rs_matter::dm::{ - Async, Dataver, Endpoint, EpClMatcher, InteractionModel, Node, WirelessDataModelState, + Async, Dataver, Endpoint, EpClMatcher, InteractionModel, Node, WirelessInteractionModelState, }; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -158,8 +158,8 @@ struct MatterStack<'a> { matter: Matter<'a>, buffers: MatterBuffers, // The data model's consolidated state: subscriptions table, events queue and - // the (Wifi) network store, all behind `DataModelState`. - state: WirelessDataModelState>, + // the (Wifi) network store, all behind `InteractionModelState`. + state: WirelessInteractionModelState>, net_ctl_state: NetCtlStateMutex, btp: Btp, } @@ -175,7 +175,7 @@ impl<'a> MatterStack<'a> { MATTER_PORT, ), buffers <- MatterBuffers::init(), - state <- WirelessDataModelState::init(WifiNetworks::init()), + state <- WirelessInteractionModelState::init(WifiNetworks::init()), net_ctl_state <- NetCtlState::init_with_mutex(), btp <- Btp::init(), }) @@ -282,7 +282,7 @@ fn main() -> ! { &mut stack_total, ); report_size("BTP", size_of_val(&stack.btp), &mut stack_total); - // The KV/persister scratch buffer now lives inside `DataModelState` (behind a + // The KV/persister scratch buffer now lives inside `InteractionModelState` (behind a // blocking mutex) rather than in the `SharedKvBlobStore`. It is not visible // through the per-component accessors above, so account for it explicitly. report_size("KV scratch buffer", DEFAULT_KV_BUF_SIZE, &mut stack_total); @@ -314,7 +314,7 @@ fn main() -> ! { let mut rand = unwrap!(crypto.weak_rand()); - // The KV scratch buffer now lives inside `DataModelState` (see the "KV scratch + // The KV scratch buffer now lives inside `InteractionModelState` (see the "KV scratch // buffer" line in the memory report); the store itself is buffer-less. let kv = SharedKvBlobStore::new(DummyKvBlobStore); diff --git a/examples/src/bin/bridge.rs b/examples/src/bin/bridge.rs index 284f2b00a..866f06349 100644 --- a/examples/src/bin/bridge.rs +++ b/examples/src/bin/bridge.rs @@ -38,8 +38,8 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, InteractionModel, - InvokeContext, Node, ReadContext, + Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, EthInteractionModelState, + InteractionModel, InvokeContext, Node, ReadContext, }; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -77,7 +77,8 @@ fn main() -> Result<(), Error> { // Create the data model state (subscriptions, events, network store). It owns // the KV scratch buffer, which the startup loads below reuse rather than // allocating a separate one. - let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); + let mut state: EthInteractionModelState = + EthInteractionModelState::new(EthNetwork::new_default()); // Re-hydrate the `Matter` instance and the data model state (event-number // epoch) using the state's own scratch buffer. diff --git a/examples/src/bin/camera_tests.rs b/examples/src/bin/camera_tests.rs index afee455f6..a86ca6d00 100644 --- a/examples/src/bin/camera_tests.rs +++ b/examples/src/bin/camera_tests.rs @@ -74,7 +74,7 @@ use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{endpoints, InteractionModel}; use rs_matter::dm::{ ArrayAttributeRead, Async, DataModel, Dataver, DeviceType, Endpoint, EpClMatcher, - EthDataModelState, InvokeContext, Node, ReadContext, WriteContext, + EthInteractionModelState, InvokeContext, Node, ReadContext, WriteContext, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::im::FabricIndex; @@ -411,7 +411,8 @@ fn main() -> Result<(), Error> { // Create the data model state (subscriptions, events, network store). It owns // the KV scratch buffer, which the startup loads below reuse rather than // allocating a separate one. - let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); + let mut state: EthInteractionModelState = + EthInteractionModelState::new(EthNetwork::new_default()); // Re-hydrate the `Matter` instance and the data model state (event-number // epoch) using the state's own scratch buffer. diff --git a/examples/src/bin/dimmable_light.rs b/examples/src/bin/dimmable_light.rs index c86eb2692..d695d455b 100644 --- a/examples/src/bin/dimmable_light.rs +++ b/examples/src/bin/dimmable_light.rs @@ -49,8 +49,8 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, InteractionModel, - Node, + Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, EthInteractionModelState, + InteractionModel, Node, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::pairing::qr::QrTextType; @@ -83,7 +83,8 @@ fn main() -> Result<(), Error> { // Create the data model state (subscriptions, events, network store). It owns // the KV scratch buffer, which the startup loads below reuse rather than // allocating a separate one. - let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); + let mut state: EthInteractionModelState = + EthInteractionModelState::new(EthNetwork::new_default()); // Re-hydrate the `Matter` instance and the data model state (event-number // epoch) using the state's own scratch buffer. diff --git a/examples/src/bin/light_tests.rs b/examples/src/bin/light_tests.rs index 7c6ee59de..f1327469b 100644 --- a/examples/src/bin/light_tests.rs +++ b/examples/src/bin/light_tests.rs @@ -52,8 +52,8 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, InteractionModel, - Node, + Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, EthInteractionModelState, + InteractionModel, Node, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::pairing::qr::QrTextType; @@ -77,7 +77,7 @@ mod args; static MATTER: StaticCell = StaticCell::new(); static BUFFERS: StaticCell = StaticCell::new(); -static STATE: StaticCell = StaticCell::new(); +static STATE: StaticCell = StaticCell::new(); fn main() -> Result<(), Error> { let thread = std::thread::Builder::new() @@ -111,7 +111,7 @@ fn run() -> Result<(), Error> { // Create the data model state (subscriptions, events, network store). It owns // the KV scratch buffer, which the startup loads below reuse rather than // allocating a separate one. - let state = STATE.init(EthDataModelState::new(EthNetwork::new_default())); + let state = STATE.init(EthInteractionModelState::new(EthNetwork::new_default())); // Re-hydrate the `Matter` instance and the data model state (event-number // epoch) using the state's own scratch buffer. diff --git a/examples/src/bin/media_player.rs b/examples/src/bin/media_player.rs index e90fedcd3..9cf921394 100644 --- a/examples/src/bin/media_player.rs +++ b/examples/src/bin/media_player.rs @@ -59,7 +59,7 @@ use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ ArrayAttributeRead, Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, - EthDataModelState, InteractionModel, InvokeContext, Node, ReadContext, + EthInteractionModelState, InteractionModel, InvokeContext, Node, ReadContext, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::pairing::qr::QrTextType; @@ -93,7 +93,8 @@ fn main() -> Result<(), Error> { // Create the data model state (subscriptions, events, network store). It owns // the KV scratch buffer, which the startup loads below reuse rather than // allocating a separate one. - let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); + let mut state: EthInteractionModelState = + EthInteractionModelState::new(EthNetwork::new_default()); // Re-hydrate the `Matter` instance and the data model state (event-number // epoch) using the state's own scratch buffer. diff --git a/examples/src/bin/onoff_light.rs b/examples/src/bin/onoff_light.rs index c6012f881..80ffcdd64 100644 --- a/examples/src/bin/onoff_light.rs +++ b/examples/src/bin/onoff_light.rs @@ -36,7 +36,8 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, InteractionModel, Node, + Async, DataModel, Dataver, Endpoint, EpClMatcher, EthInteractionModelState, InteractionModel, + Node, }; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -68,7 +69,8 @@ fn main() -> Result<(), Error> { // Create the data model state (subscriptions table, events queue, network // store). It owns the KV scratch buffer, which we reuse for the startup load // below rather than allocating a separate one. - let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); + let mut state: EthInteractionModelState = + EthInteractionModelState::new(EthNetwork::new_default()); // Re-hydrate the `Matter` instance (fabrics, ACLs, basic info) using the // state's own scratch buffer. diff --git a/examples/src/bin/onoff_light_bt.rs b/examples/src/bin/onoff_light_bt.rs index 2d6ab55d9..add64a9bc 100644 --- a/examples/src/bin/onoff_light_bt.rs +++ b/examples/src/bin/onoff_light_bt.rs @@ -55,7 +55,7 @@ use rs_matter::dm::networks::wireless::{NetCtlState, NetCtlWithStatusImpl, WifiN use rs_matter::dm::networks::NetChangeNotif; use rs_matter::dm::{ Async, DataModel, Dataver, Endpoint, EpClMatcher, InteractionModel, Node, - WirelessDataModelState, + WirelessInteractionModelState, }; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -135,8 +135,8 @@ fn run( // Create the data model state (subscriptions, events, the Wifi network store). // It owns the KV scratch buffer, so the one-time startup loads below reuse it // (`state.kv_buf_mut()`) rather than allocating a separate buffer. - let mut state: WirelessDataModelState> = - WirelessDataModelState::new(WifiNetworks::new()); + let mut state: WirelessInteractionModelState> = + WirelessInteractionModelState::new(WifiNetworks::new()); // Re-hydrate persisted state: the `Matter` instance (fabrics, ACLs, basic // info) and the data model state itself (event-number epoch + Wifi networks). diff --git a/examples/src/bin/onoff_light_switch.rs b/examples/src/bin/onoff_light_switch.rs index cddb8def9..bdd1312ef 100644 --- a/examples/src/bin/onoff_light_switch.rs +++ b/examples/src/bin/onoff_light_switch.rs @@ -60,7 +60,7 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, EventEmitter, + Async, DataModel, Dataver, Endpoint, EpClMatcher, EthInteractionModelState, EventEmitter, InteractionModel, Node, }; use rs_matter::error::Error; @@ -109,7 +109,8 @@ fn main() -> Result<(), Error> { // state carries a real (non-zero) event queue that holds them until // subscribers read them. It also owns the KV scratch buffer, which all the // startup loads below reuse rather than allocating a separate one. - let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); + let mut state: EthInteractionModelState = + EthInteractionModelState::new(EthNetwork::new_default()); // The Binding registry (the switch's address book), loaded from persistence. let bindings = Bindings::::new(); diff --git a/examples/src/bin/onoff_light_work_stealing.rs b/examples/src/bin/onoff_light_work_stealing.rs index 9785d9a73..cbfae389c 100644 --- a/examples/src/bin/onoff_light_work_stealing.rs +++ b/examples/src/bin/onoff_light_work_stealing.rs @@ -36,7 +36,7 @@ use rs_matter::dm::endpoints::{self, EthSysHandler}; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, Dataver, Endpoint, EpClMatcher, EthDataModelState, InteractionModel, Node, + Async, Dataver, Endpoint, EpClMatcher, EthInteractionModelState, InteractionModel, Node, }; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -65,7 +65,7 @@ type AppDmHandler<'a> = handler_chain_type!( // as well as just allocating the objects on-stack or on the heap. static MATTER: StaticCell = StaticCell::new(); static BUFFERS: StaticCell = StaticCell::new(); -static STATE: StaticCell = StaticCell::new(); +static STATE: StaticCell = StaticCell::new(); static CRYPTO: StaticCell> = StaticCell::new(); fn main() -> Result<(), Error> { @@ -89,7 +89,7 @@ fn main() -> Result<(), Error> { // Create the data model state (subscriptions, events, network store). It owns // the KV scratch buffer, which the startup loads below reuse rather than // allocating a separate one. - let state = STATE.init(EthDataModelState::new(EthNetwork::new_default())); + let state = STATE.init(EthInteractionModelState::new(EthNetwork::new_default())); // Re-hydrate the `Matter` instance and the data model state (event-number // epoch) using the state's own scratch buffer. diff --git a/examples/src/bin/ota_requestor.rs b/examples/src/bin/ota_requestor.rs index ba12fadd0..8c98f784a 100644 --- a/examples/src/bin/ota_requestor.rs +++ b/examples/src/bin/ota_requestor.rs @@ -51,7 +51,7 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, AttrChangeNotifier, DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, + Async, AttrChangeNotifier, DataModel, Dataver, Endpoint, EpClMatcher, EthInteractionModelState, InteractionModel, Node, }; use rs_matter::error::{Error, ErrorCode}; @@ -101,7 +101,8 @@ fn main() -> Result<(), Error> { // Create the data model state (subscriptions, events, network store). It owns // the KV scratch buffer, which all the startup loads below reuse rather than // allocating a separate one. - let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); + let mut state: EthInteractionModelState = + EthInteractionModelState::new(EthNetwork::new_default()); // The OTA Requestor's persistent provider list, re-hydrated from storage. let providers = Providers::new(); diff --git a/examples/src/bin/scenes_tests.rs b/examples/src/bin/scenes_tests.rs index 90505b91b..31c2cd8c9 100644 --- a/examples/src/bin/scenes_tests.rs +++ b/examples/src/bin/scenes_tests.rs @@ -57,8 +57,8 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, InteractionModel, - Node, + Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, EthInteractionModelState, + InteractionModel, Node, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::pairing::qr::QrTextType; @@ -86,7 +86,7 @@ mod args; // as well as just allocating the objects on-stack or on the heap. static MATTER: StaticCell = StaticCell::new(); static BUFFERS: StaticCell = StaticCell::new(); -static STATE: StaticCell = StaticCell::new(); +static STATE: StaticCell = StaticCell::new(); const SCENES_CAPACITY: usize = 16; static SCENES_STATE: StaticCell> = StaticCell::new(); @@ -137,7 +137,7 @@ fn run() -> Result<(), Error> { // Create the data model state (subscriptions, events, network store). It owns // the KV scratch buffer, which the startup loads (here and the scenes load // below) reuse rather than allocating a separate one. - let state = STATE.init(EthDataModelState::new(EthNetwork::new_default())); + let state = STATE.init(EthInteractionModelState::new(EthNetwork::new_default())); // Re-hydrate the `Matter` instance and the data model state (event-number // epoch) using the state's own scratch buffer. diff --git a/examples/src/bin/speaker.rs b/examples/src/bin/speaker.rs index cbd1ba943..e5fbed828 100644 --- a/examples/src/bin/speaker.rs +++ b/examples/src/bin/speaker.rs @@ -40,7 +40,8 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, InteractionModel, Node, + Async, DataModel, Dataver, Endpoint, EpClMatcher, EthInteractionModelState, InteractionModel, + Node, }; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; @@ -74,7 +75,8 @@ fn main() -> Result<(), Error> { // Create the data model state (subscriptions, events, network store). It owns // the KV scratch buffer, which the startup loads below reuse rather than // allocating a separate one. - let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); + let mut state: EthInteractionModelState = + EthInteractionModelState::new(EthNetwork::new_default()); // Re-hydrate the `Matter` instance and the data model state (event-number // epoch) using the state's own scratch buffer. diff --git a/examples/src/bin/system_tests.rs b/examples/src/bin/system_tests.rs index 1867b90c7..bf80ff583 100644 --- a/examples/src/bin/system_tests.rs +++ b/examples/src/bin/system_tests.rs @@ -78,7 +78,7 @@ use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ Async, AttrChangeNotifier, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, - EthDataModelState, InteractionModel, Node, + EthInteractionModelState, InteractionModel, Node, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::im::PROTO_ID_INTERACTION_MODEL; @@ -178,7 +178,8 @@ fn main() -> Result<(), Error> { // Create the data model state (subscriptions, events, network store). It owns // the KV scratch buffer, which all the startup loads (here and the user-label // / binding loads below) reuse rather than allocating a separate one. - let mut state: EthDataModelState = EthDataModelState::new(EthNetwork::new_default()); + let mut state: EthInteractionModelState = + EthInteractionModelState::new(EthNetwork::new_default()); // Re-hydrate the `Matter` instance and the data model state (event-number // epoch) using the state's own scratch buffer. diff --git a/examples/src/bin/webrtc_camera.rs b/examples/src/bin/webrtc_camera.rs index 28cb37f03..3b6521d84 100644 --- a/examples/src/bin/webrtc_camera.rs +++ b/examples/src/bin/webrtc_camera.rs @@ -110,7 +110,7 @@ use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::unix::UnixNetifs; use rs_matter::dm::DeviceType; use rs_matter::dm::InteractionModel; -use rs_matter::dm::{DataModel, Dataver, Endpoint, EpClMatcher, EthDataModelState, Node}; +use rs_matter::dm::{DataModel, Dataver, Endpoint, EpClMatcher, EthInteractionModelState, Node}; use rs_matter::error::Error; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; @@ -1100,7 +1100,7 @@ impl WebRtcHooks for Str0mHooks { static MATTER: StaticCell = StaticCell::new(); static BUFFERS: StaticCell = StaticCell::new(); -static STATE: StaticCell = StaticCell::new(); +static STATE: StaticCell = StaticCell::new(); static WEBRTC: StaticCell = StaticCell::new(); static CAM_AV: StaticCell> = StaticCell::new(); @@ -1163,7 +1163,7 @@ fn main() -> Result<(), Error> { // Create the data model state (subscriptions, events, network store). It owns // the KV scratch buffer, which the startup loads below reuse rather than // allocating a separate one. - let state = STATE.init(EthDataModelState::new(EthNetwork::new_default())); + let state = STATE.init(EthInteractionModelState::new(EthNetwork::new_default())); // Re-hydrate the `Matter` instance and the data model state (event-number // epoch) using the state's own scratch buffer. diff --git a/rs-matter/src/dm.rs b/rs-matter/src/dm.rs index 30ae643fe..3e4c68738 100644 --- a/rs-matter/src/dm.rs +++ b/rs-matter/src/dm.rs @@ -77,7 +77,7 @@ pub type IMBuffer = crate::transport::exchange::Buffer; /// /// Allocating these as a single value (rather than three separate locals wired /// up by hand at every call site) is the whole point: construct one -/// `DataModelState`, then hand a reference to it to [`InteractionModel::new`]. Each of +/// `InteractionModelState`, then hand a reference to it to [`InteractionModel::new`]. Each of /// the three pieces keeps its own lock internally (the proven multi-lock model); /// folding them behind a single mutex is a possible later refinement. /// @@ -88,7 +88,7 @@ pub type IMBuffer = crate::transport::exchange::Buffer; /// wireless manager can share it. `NS`/`NE` bound the subscription table and the /// event-buffer size and default to [`DEFAULT_MAX_SUBSCRIPTIONS`] / /// [`DEFAULT_MAX_EVENTS_BUF_SIZE`]. -pub struct DataModelState< +pub struct InteractionModelState< N, const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, @@ -103,7 +103,7 @@ pub struct DataModelState< kv_buf: Mutex>, } -impl DataModelState { +impl InteractionModelState { /// Create a new state instance backed by the given (raw) [`Networks`] store. pub const fn new(networks: N) -> Self { Self { @@ -185,7 +185,7 @@ impl DataModelState, net_ctl: NC, subscriptions_buffers: SubscriptionsBuffers<'a, B, NS>, - state: &'a DataModelState, + state: &'a InteractionModelState, handler: T, } -/// A [`DataModelState`] for an Ethernet device: its network store is a fixed +/// A [`InteractionModelState`] for an Ethernet device: its network store is a fixed /// [`EthNetwork`], so call sites need only the (defaulted) subscription/event /// sizes. Pairs with [`EthInteractionModel`]. -pub type EthDataModelState< +pub type EthInteractionModelState< const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, const KB: usize = DEFAULT_KV_BUF_SIZE, -> = DataModelState, NS, NE, KB>; +> = InteractionModelState, NS, NE, KB>; /// A [`InteractionModel`] for an Ethernet device (network store fixed to [`EthNetwork`]), -/// so the `N` generic disappears from call sites. Pairs with [`EthDataModelState`]. +/// so the `N` generic disappears from call sites. Pairs with [`EthInteractionModelState`]. pub type EthInteractionModel< 'a, C, @@ -265,18 +265,18 @@ pub type EthInteractionModel< const KB: usize = DEFAULT_KV_BUF_SIZE, > = InteractionModel<'a, C, B, T, S, EthNetwork<'static>, NC, NS, NE, KB>; -/// A [`DataModelState`] for a wireless device, parameterized by the concrete +/// A [`InteractionModelState`] for a wireless device, parameterized by the concrete /// wireless network store `N` (e.g. `WifiNetworks<3>` or a Thread store). Pairs /// with [`WirelessInteractionModel`]. -pub type WirelessDataModelState< +pub type WirelessInteractionModelState< N, const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, const KB: usize = DEFAULT_KV_BUF_SIZE, -> = DataModelState; +> = InteractionModelState; /// A [`InteractionModel`] for a wireless device (network store `N`, network controller -/// `NC`). Pairs with [`WirelessDataModelState`]. +/// `NC`). Pairs with [`WirelessInteractionModelState`]. pub type WirelessInteractionModel< 'a, C, @@ -313,7 +313,7 @@ where /// clusters of the data model. Note that the expectations is for the user to provide a handler that handles the Matter system clusters /// as well (Endpoint 0), possibly by decorating her own clusters with the `rs_matter::dm::root_endpoint::with_` methods /// - `kv` - an instance of type `S` which implements the `KvBlobStoreAccess` trait. This instance is used for interacting with the key-value blob store. - /// - `state` - a reference to the [`DataModelState`] holding the subscriptions table, the + /// - `state` - a reference to the [`InteractionModelState`] holding the subscriptions table, the /// events queue and the network store (the latter parameterized by the `Networks` /// implementation `N`). #[inline(always)] @@ -323,7 +323,7 @@ where buffers: &'a B, handler: T, kv: SharedKvBlobStore, - state: &'a DataModelState, + state: &'a InteractionModelState, ) -> Self { Self::new_with_net_ctl( matter, @@ -362,7 +362,7 @@ where /// - `kv` - an instance of type `S` which implements the `KvBlobStoreAccess` trait. This instance is used for interacting with the key-value blob store. /// - `net_ctl` - the network controller (`NetCtl` + `WirelessDiag` + `NetChangeNotif`) used by /// the operational wireless connection manager driven from [`InteractionModel::run`]. - /// - `state` - a reference to the [`DataModelState`] holding the subscriptions table, the + /// - `state` - a reference to the [`InteractionModelState`] holding the subscriptions table, the /// events queue and the network store (the latter parameterized by the `Networks` /// implementation `N`). #[inline(always)] @@ -373,7 +373,7 @@ where handler: T, kv: SharedKvBlobStore, net_ctl: NC, - state: &'a DataModelState, + state: &'a InteractionModelState, ) -> Self { state.subscriptions.clear(); @@ -400,13 +400,13 @@ where /// Return a [`KvBlobStoreAccess`] for interacting with the key-value blob /// store. This recombines the store-only `S` held by the data model with the - /// scratch buffer owned by the [`DataModelState`]. + /// scratch buffer owned by the [`InteractionModelState`]. pub fn kv(&self) -> impl KvBlobStoreAccess + '_ { self.kv_access() } /// Recombine the store-only KV (`self.kv`) with the scratch buffer owned by - /// [`DataModelState`] into a full [`KvBlobStoreAccess`]. + /// [`InteractionModelState`] into a full [`KvBlobStoreAccess`]. fn kv_access(&self) -> StateKvBlobStore<'_, S, KB> { StateKvBlobStore { store: &self.kv, diff --git a/rs-matter/src/persist.rs b/rs-matter/src/persist.rs index 3726492c0..f5f6a75b9 100644 --- a/rs-matter/src/persist.rs +++ b/rs-matter/src/persist.rs @@ -28,7 +28,7 @@ pub use fileio::*; /// The default size (in bytes) of the scratch buffer used by the key-value /// persistence machinery for (de)serializing BLOBs. This is the buffer that -/// [`DataModelState`](crate::dm::DataModelState) owns and the data model +/// [`InteractionModelState`](crate::dm::InteractionModelState) owns and the data model /// recombines with the (store-only) [`SharedKvBlobStore`] at runtime. pub const DEFAULT_KV_BUF_SIZE: usize = 4096; @@ -209,7 +209,7 @@ impl KvBlobStoreAccess for DummyKvBlobStoreAccess { /// mutex. /// /// The scratch buffer used for (de)serialization is not owned here; it is owned -/// by [`DataModelState`](crate::dm::DataModelState) and recombined with this +/// by [`InteractionModelState`](crate::dm::InteractionModelState) and recombined with this /// store by the data model into a full [`KvBlobStoreAccess`]. pub struct SharedKvBlobStore(Mutex>); @@ -225,7 +225,7 @@ impl SharedKvBlobStore { /// Get exclusive (locked) access to the wrapped `KvBlobStore`. /// /// The data model uses this to recombine the store with the scratch buffer - /// owned by [`DataModelState`](crate::dm::DataModelState) into a full + /// owned by [`InteractionModelState`](crate::dm::InteractionModelState) into a full /// [`KvBlobStoreAccess`]. pub fn with_store(&self, f: F) -> R where diff --git a/rs-matter/tests/commissioning.rs b/rs-matter/tests/commissioning.rs index 2928a8d1f..4e5cce6d9 100644 --- a/rs-matter/tests/commissioning.rs +++ b/rs-matter/tests/commissioning.rs @@ -63,8 +63,8 @@ use rs_matter::dm::devices::DEV_TYPE_ON_OFF_LIGHT; use rs_matter::dm::networks::unix::UnixNetifs; use rs_matter::dm::subscriptions::DEFAULT_MAX_SUBSCRIPTIONS; use rs_matter::dm::{ - endpoints, Async, DataModel, DataModelState, Dataver, Endpoint, EpClMatcher, InteractionModel, - Node, + endpoints, Async, DataModel, Dataver, Endpoint, EpClMatcher, InteractionModel, + InteractionModelState, Node, }; use rs_matter::error::Error; use rs_matter::im::IMStatusCode; @@ -99,7 +99,7 @@ const IM_TIMEOUT_SECS: u64 = 10; /// The device's data model state: a dummy (no-op) network store, default /// subscription count, no events. -type DeviceDmState = DataModelState; +type DeviceDmState = InteractionModelState; static DEVICE_MATTER: StaticCell = StaticCell::new(); static DEVICE_BUFFERS: StaticCell = StaticCell::new(); @@ -188,7 +188,7 @@ macro_rules! commissioning_test { let mut rand = device_crypto.rand()?; let device_buffers = $dev_buffers.uninit().init_with(MatterBuffers::init()); - let device_state = $dev_subs.init(DataModelState::new(DummyNetworks)); + let device_state = $dev_subs.init(InteractionModelState::new(DummyNetworks)); let on_off_handler = on_off::OnOffHandler::new_standalone( Dataver::new_rand(&mut rand), diff --git a/rs-matter/tests/common/e2e.rs b/rs-matter/tests/common/e2e.rs index 3279b43eb..40cbf97c9 100644 --- a/rs-matter/tests/common/e2e.rs +++ b/rs-matter/tests/common/e2e.rs @@ -26,7 +26,7 @@ use rs_matter::acl::{AclEntry, AuthMode}; use rs_matter::crypto::{test_only_crypto, Crypto}; use rs_matter::dm::clusters::net_comm::DummyNetworks; use rs_matter::dm::devices::test::{TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; -use rs_matter::dm::{DataModel, DataModelState, InteractionModel, Privilege}; +use rs_matter::dm::{DataModel, InteractionModel, InteractionModelState, Privilege}; use rs_matter::error::Error; use rs_matter::persist::{DummyKvBlobStore, SharedKvBlobStore}; use rs_matter::respond::{ExchangeHandler, Responder}; @@ -76,7 +76,7 @@ pub struct E2eRunner { matter_client: Matter<'static>, crypto: C, buffers: MatterBuffers, - pub state: DataModelState, + pub state: InteractionModelState, cat_ids: NocCatIds, } @@ -96,7 +96,7 @@ impl E2eRunner { matter_client: Self::new_matter(), crypto, buffers: MatterBuffers::new(), - state: DataModelState::new(DummyNetworks), + state: InteractionModelState::new(DummyNetworks), cat_ids, } } From 1dba8ac14ec41ba238094bf2c7d0663b5fd6e283 Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Fri, 19 Jun 2026 09:11:05 +0000 Subject: [PATCH 08/14] Move events, subscriptions, the interaction model and its state to the im module --- bloat-check/src/bin/bloat-check.rs | 5 +- examples/src/bin/bridge.rs | 4 +- examples/src/bin/camera_tests.rs | 6 +- examples/src/bin/dimmable_light.rs | 6 +- examples/src/bin/light_tests.rs | 6 +- examples/src/bin/media_player.rs | 5 +- examples/src/bin/onoff_light.rs | 6 +- examples/src/bin/onoff_light_bt.rs | 6 +- examples/src/bin/onoff_light_switch.rs | 6 +- examples/src/bin/onoff_light_work_stealing.rs | 5 +- examples/src/bin/ota_requestor.rs | 6 +- examples/src/bin/scenes_tests.rs | 6 +- examples/src/bin/speaker.rs | 6 +- examples/src/bin/system_tests.rs | 4 +- examples/src/bin/webrtc_camera.rs | 4 +- rs-matter-codegen/src/idl.rs | 2 +- rs-matter-codegen/src/idl/event.rs | 8 +- rs-matter/src/dm.rs | 2015 +--------------- rs-matter/src/dm/clusters/basic_info.rs | 2 +- rs-matter/src/dm/types/handler.rs | 6 +- rs-matter/src/im.rs | 2020 ++++++++++++++++- rs-matter/src/{dm => im}/events.rs | 0 rs-matter/src/{dm => im}/subscriptions.rs | 2 +- rs-matter/src/lib.rs | 6 +- rs-matter/src/persist.rs | 6 +- rs-matter/src/respond.rs | 7 +- rs-matter/src/transport/exchange.rs | 2 +- rs-matter/tests/commissioning.rs | 8 +- rs-matter/tests/common/e2e.rs | 3 +- 29 files changed, 2079 insertions(+), 2089 deletions(-) rename rs-matter/src/{dm => im}/events.rs (100%) rename rs-matter/src/{dm => im}/subscriptions.rs (99%) diff --git a/bloat-check/src/bin/bloat-check.rs b/bloat-check/src/bin/bloat-check.rs index bdcd17ff5..6f349002c 100644 --- a/bloat-check/src/bin/bloat-check.rs +++ b/bloat-check/src/bin/bloat-check.rs @@ -76,10 +76,9 @@ use rs_matter::dm::networks::wireless::{ NetCtlState, NetCtlStateMutex, NetCtlWithStatusImpl, WifiNetworks, }; use rs_matter::dm::networks::NetChangeNotif; -use rs_matter::dm::{ - Async, Dataver, Endpoint, EpClMatcher, InteractionModel, Node, WirelessInteractionModelState, -}; +use rs_matter::dm::{Async, Dataver, Endpoint, EpClMatcher, Node}; use rs_matter::error::Error; +use rs_matter::im::{InteractionModel, WirelessInteractionModelState}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; use rs_matter::persist::{DummyKvBlobStore, SharedKvBlobStore, DEFAULT_KV_BUF_SIZE}; diff --git a/examples/src/bin/bridge.rs b/examples/src/bin/bridge.rs index 866f06349..494b893c5 100644 --- a/examples/src/bin/bridge.rs +++ b/examples/src/bin/bridge.rs @@ -38,10 +38,10 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, EthInteractionModelState, - InteractionModel, InvokeContext, Node, ReadContext, + Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, InvokeContext, Node, ReadContext, }; use rs_matter::error::Error; +use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; diff --git a/examples/src/bin/camera_tests.rs b/examples/src/bin/camera_tests.rs index a86ca6d00..2df9ea179 100644 --- a/examples/src/bin/camera_tests.rs +++ b/examples/src/bin/camera_tests.rs @@ -69,15 +69,17 @@ use rs_matter::dm::clusters::decl::globals::WebRTCEndReasonEnum; use rs_matter::dm::clusters::desc::{self, ClusterHandler as _}; use rs_matter::dm::clusters::groups::{self, ClusterHandler as _}; use rs_matter::dm::devices::test::{DAC_PRIVKEY, TEST_DEV_ATT, TEST_DEV_DET}; +use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::{endpoints, InteractionModel}; use rs_matter::dm::{ ArrayAttributeRead, Async, DataModel, Dataver, DeviceType, Endpoint, EpClMatcher, - EthInteractionModelState, InvokeContext, Node, ReadContext, WriteContext, + InvokeContext, Node, ReadContext, WriteContext, }; use rs_matter::error::{Error, ErrorCode}; +use rs_matter::im::EthInteractionModelState; use rs_matter::im::FabricIndex; +use rs_matter::im::InteractionModel; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; use rs_matter::persist::SharedKvBlobStore; diff --git a/examples/src/bin/dimmable_light.rs b/examples/src/bin/dimmable_light.rs index d695d455b..d8bfe3f82 100644 --- a/examples/src/bin/dimmable_light.rs +++ b/examples/src/bin/dimmable_light.rs @@ -48,11 +48,9 @@ use rs_matter::dm::devices::DEV_TYPE_DIMMABLE_LIGHT; use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::{ - Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, EthInteractionModelState, - InteractionModel, Node, -}; +use rs_matter::dm::{Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, Node}; use rs_matter::error::{Error, ErrorCode}; +use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; use rs_matter::persist::SharedKvBlobStore; diff --git a/examples/src/bin/light_tests.rs b/examples/src/bin/light_tests.rs index f1327469b..1ece066fc 100644 --- a/examples/src/bin/light_tests.rs +++ b/examples/src/bin/light_tests.rs @@ -51,11 +51,9 @@ use rs_matter::dm::devices::DEV_TYPE_EXTENDED_COLOR_LIGHT; use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::{ - Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, EthInteractionModelState, - InteractionModel, Node, -}; +use rs_matter::dm::{Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, Node}; use rs_matter::error::{Error, ErrorCode}; +use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; use rs_matter::persist::SharedKvBlobStore; diff --git a/examples/src/bin/media_player.rs b/examples/src/bin/media_player.rs index 9cf921394..3d0e3585f 100644 --- a/examples/src/bin/media_player.rs +++ b/examples/src/bin/media_player.rs @@ -58,10 +58,11 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - ArrayAttributeRead, Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, - EthInteractionModelState, InteractionModel, InvokeContext, Node, ReadContext, + ArrayAttributeRead, Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, InvokeContext, + Node, ReadContext, }; use rs_matter::error::{Error, ErrorCode}; +use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; diff --git a/examples/src/bin/onoff_light.rs b/examples/src/bin/onoff_light.rs index 80ffcdd64..0697ee0fa 100644 --- a/examples/src/bin/onoff_light.rs +++ b/examples/src/bin/onoff_light.rs @@ -35,11 +35,9 @@ use rs_matter::dm::devices::DEV_TYPE_ON_OFF_LIGHT; use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::{ - Async, DataModel, Dataver, Endpoint, EpClMatcher, EthInteractionModelState, InteractionModel, - Node, -}; +use rs_matter::dm::{Async, DataModel, Dataver, Endpoint, EpClMatcher, Node}; use rs_matter::error::Error; +use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; diff --git a/examples/src/bin/onoff_light_bt.rs b/examples/src/bin/onoff_light_bt.rs index add64a9bc..b5a3b4b87 100644 --- a/examples/src/bin/onoff_light_bt.rs +++ b/examples/src/bin/onoff_light_bt.rs @@ -53,11 +53,9 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::unix::UnixNetifs; use rs_matter::dm::networks::wireless::{NetCtlState, NetCtlWithStatusImpl, WifiNetworks}; use rs_matter::dm::networks::NetChangeNotif; -use rs_matter::dm::{ - Async, DataModel, Dataver, Endpoint, EpClMatcher, InteractionModel, Node, - WirelessInteractionModelState, -}; +use rs_matter::dm::{Async, DataModel, Dataver, Endpoint, EpClMatcher, Node}; use rs_matter::error::Error; +use rs_matter::im::{InteractionModel, WirelessInteractionModelState}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; diff --git a/examples/src/bin/onoff_light_switch.rs b/examples/src/bin/onoff_light_switch.rs index bdd1312ef..0f1dd40c8 100644 --- a/examples/src/bin/onoff_light_switch.rs +++ b/examples/src/bin/onoff_light_switch.rs @@ -59,11 +59,9 @@ use rs_matter::dm::devices::{DEV_TYPE_GENERIC_SWITCH, DEV_TYPE_ON_OFF_LIGHT_SWIT use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::{ - Async, DataModel, Dataver, Endpoint, EpClMatcher, EthInteractionModelState, EventEmitter, - InteractionModel, Node, -}; +use rs_matter::dm::{Async, DataModel, Dataver, Endpoint, EpClMatcher, EventEmitter, Node}; use rs_matter::error::Error; +use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; diff --git a/examples/src/bin/onoff_light_work_stealing.rs b/examples/src/bin/onoff_light_work_stealing.rs index cbfae389c..7d915174e 100644 --- a/examples/src/bin/onoff_light_work_stealing.rs +++ b/examples/src/bin/onoff_light_work_stealing.rs @@ -35,10 +35,9 @@ use rs_matter::dm::devices::DEV_TYPE_ON_OFF_LIGHT; use rs_matter::dm::endpoints::{self, EthSysHandler}; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::{ - Async, Dataver, Endpoint, EpClMatcher, EthInteractionModelState, InteractionModel, Node, -}; +use rs_matter::dm::{Async, Dataver, Endpoint, EpClMatcher, Node}; use rs_matter::error::Error; +use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; diff --git a/examples/src/bin/ota_requestor.rs b/examples/src/bin/ota_requestor.rs index 8c98f784a..f99bdabff 100644 --- a/examples/src/bin/ota_requestor.rs +++ b/examples/src/bin/ota_requestor.rs @@ -50,11 +50,9 @@ use rs_matter::dm::devices::DEV_TYPE_OTA_REQUESTOR; use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::{ - Async, AttrChangeNotifier, DataModel, Dataver, Endpoint, EpClMatcher, EthInteractionModelState, - InteractionModel, Node, -}; +use rs_matter::dm::{Async, AttrChangeNotifier, DataModel, Dataver, Endpoint, EpClMatcher, Node}; use rs_matter::error::{Error, ErrorCode}; +use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; diff --git a/examples/src/bin/scenes_tests.rs b/examples/src/bin/scenes_tests.rs index 31c2cd8c9..5478acba4 100644 --- a/examples/src/bin/scenes_tests.rs +++ b/examples/src/bin/scenes_tests.rs @@ -56,11 +56,9 @@ use rs_matter::dm::devices::DEV_TYPE_DIMMABLE_LIGHT; use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::{ - Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, EthInteractionModelState, - InteractionModel, Node, -}; +use rs_matter::dm::{Async, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, Node}; use rs_matter::error::{Error, ErrorCode}; +use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; use rs_matter::persist::SharedKvBlobStore; diff --git a/examples/src/bin/speaker.rs b/examples/src/bin/speaker.rs index e5fbed828..86d8d67e3 100644 --- a/examples/src/bin/speaker.rs +++ b/examples/src/bin/speaker.rs @@ -39,11 +39,9 @@ use rs_matter::dm::devices::DEV_TYPE_SMART_SPEAKER; use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; -use rs_matter::dm::{ - Async, DataModel, Dataver, Endpoint, EpClMatcher, EthInteractionModelState, InteractionModel, - Node, -}; +use rs_matter::dm::{Async, DataModel, Dataver, Endpoint, EpClMatcher, Node}; use rs_matter::error::Error; +use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; diff --git a/examples/src/bin/system_tests.rs b/examples/src/bin/system_tests.rs index bf80ff583..a358e981b 100644 --- a/examples/src/bin/system_tests.rs +++ b/examples/src/bin/system_tests.rs @@ -77,11 +77,11 @@ use rs_matter::dm::endpoints::{self, ROOT_ENDPOINT_ID}; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::SysNetifs; use rs_matter::dm::{ - Async, AttrChangeNotifier, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, - EthInteractionModelState, InteractionModel, Node, + Async, AttrChangeNotifier, Cluster, DataModel, Dataver, Endpoint, EpClMatcher, Node, }; use rs_matter::error::{Error, ErrorCode}; use rs_matter::im::PROTO_ID_INTERACTION_MODEL; +use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; use rs_matter::persist::SharedKvBlobStore; diff --git a/examples/src/bin/webrtc_camera.rs b/examples/src/bin/webrtc_camera.rs index 3b6521d84..c527ebfb3 100644 --- a/examples/src/bin/webrtc_camera.rs +++ b/examples/src/bin/webrtc_camera.rs @@ -109,9 +109,9 @@ use rs_matter::dm::endpoints; use rs_matter::dm::networks::eth::EthNetwork; use rs_matter::dm::networks::unix::UnixNetifs; use rs_matter::dm::DeviceType; -use rs_matter::dm::InteractionModel; -use rs_matter::dm::{DataModel, Dataver, Endpoint, EpClMatcher, EthInteractionModelState, Node}; +use rs_matter::dm::{DataModel, Dataver, Endpoint, EpClMatcher, Node}; use rs_matter::error::Error; +use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; diff --git a/rs-matter-codegen/src/idl.rs b/rs-matter-codegen/src/idl.rs index d765a80b3..0a51bfbc7 100644 --- a/rs-matter-codegen/src/idl.rs +++ b/rs-matter-codegen/src/idl.rs @@ -1114,7 +1114,7 @@ pub mod globals { "#; const TOKEN_STREAM_OUTPUT: &str = r#" -# [doc = "This module contains generated Rust types for the \"UnitTesting\" cluster"] # [allow (async_fn_in_trait)] # [allow (unknown_lints)] # [allow (clippy :: uninlined_format_args)] # [allow (unexpected_cfgs)] pub mod unit_testing { # [cfg (not (feature = "defmt"))] rs_matter_crate :: reexport :: bitflags :: bitflags ! { # [repr (transparent)] # [derive (Default , Debug , Copy , Clone , Eq , PartialEq , Hash)] pub struct Bitmap16MaskMap : u16 { const MASK_VAL_1 = 1 ; const MASK_VAL_2 = 2 ; const MASK_VAL_3 = 4 ; const MASK_VAL_4 = 16384 ; const _INTERNAL_ALL_BITS = ! 0 ; } } # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: bitflags ! { # [repr (transparent)] # [derive (Default)] pub struct Bitmap16MaskMap : u16 { const MASK_VAL_1 = 1 ; const MASK_VAL_2 = 2 ; const MASK_VAL_3 = 4 ; const MASK_VAL_4 = 16384 ; const _INTERNAL_ALL_BITS = ! 0 ; } } rs_matter_crate :: bitflags_tlv ! (Bitmap16MaskMap , u16) ; # [cfg (not (feature = "defmt"))] rs_matter_crate :: reexport :: bitflags :: bitflags ! { # [repr (transparent)] # [derive (Default , Debug , Copy , Clone , Eq , PartialEq , Hash)] pub struct Bitmap32MaskMap : u32 { const MASK_VAL_1 = 1 ; const MASK_VAL_2 = 2 ; const MASK_VAL_3 = 4 ; const MASK_VAL_4 = 1073741824 ; const _INTERNAL_ALL_BITS = ! 0 ; } } # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: bitflags ! { # [repr (transparent)] # [derive (Default)] pub struct Bitmap32MaskMap : u32 { const MASK_VAL_1 = 1 ; const MASK_VAL_2 = 2 ; const MASK_VAL_3 = 4 ; const MASK_VAL_4 = 1073741824 ; const _INTERNAL_ALL_BITS = ! 0 ; } } rs_matter_crate :: bitflags_tlv ! (Bitmap32MaskMap , u32) ; # [cfg (not (feature = "defmt"))] rs_matter_crate :: reexport :: bitflags :: bitflags ! { # [repr (transparent)] # [derive (Default , Debug , Copy , Clone , Eq , PartialEq , Hash)] pub struct Bitmap64MaskMap : u64 { const MASK_VAL_1 = 1 ; const MASK_VAL_2 = 2 ; const MASK_VAL_3 = 4 ; const MASK_VAL_4 = 4611686018427387904 ; const _INTERNAL_ALL_BITS = ! 0 ; } } # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: bitflags ! { # [repr (transparent)] # [derive (Default)] pub struct Bitmap64MaskMap : u64 { const MASK_VAL_1 = 1 ; const MASK_VAL_2 = 2 ; const MASK_VAL_3 = 4 ; const MASK_VAL_4 = 4611686018427387904 ; const _INTERNAL_ALL_BITS = ! 0 ; } } rs_matter_crate :: bitflags_tlv ! (Bitmap64MaskMap , u64) ; # [cfg (not (feature = "defmt"))] rs_matter_crate :: reexport :: bitflags :: bitflags ! { # [repr (transparent)] # [derive (Default , Debug , Copy , Clone , Eq , PartialEq , Hash)] pub struct Bitmap8MaskMap : u8 { const MASK_VAL_1 = 1 ; const MASK_VAL_2 = 2 ; const MASK_VAL_3 = 4 ; const MASK_VAL_4 = 64 ; const _INTERNAL_ALL_BITS = ! 0 ; } } # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: bitflags ! { # [repr (transparent)] # [derive (Default)] pub struct Bitmap8MaskMap : u8 { const MASK_VAL_1 = 1 ; const MASK_VAL_2 = 2 ; const MASK_VAL_3 = 4 ; const MASK_VAL_4 = 64 ; const _INTERNAL_ALL_BITS = ! 0 ; } } rs_matter_crate :: bitflags_tlv ! (Bitmap8MaskMap , u8) ; # [cfg (not (feature = "defmt"))] rs_matter_crate :: reexport :: bitflags :: bitflags ! { # [repr (transparent)] # [derive (Default , Debug , Copy , Clone , Eq , PartialEq , Hash)] pub struct SimpleBitmap : u8 { const VALUE_A = 1 ; const VALUE_B = 2 ; const VALUE_C = 4 ; const _INTERNAL_ALL_BITS = ! 0 ; } } # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: bitflags ! { # [repr (transparent)] # [derive (Default)] pub struct SimpleBitmap : u8 { const VALUE_A = 1 ; const VALUE_B = 2 ; const VALUE_C = 4 ; const _INTERNAL_ALL_BITS = ! 0 ; } } rs_matter_crate :: bitflags_tlv ! (SimpleBitmap , u8) ; # [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 SimpleEnum { # [enumval (0)] Unspecified = 0 , # [enumval (1)] ValueA = 1 , # [enumval (2)] ValueB = 2 , # [enumval (3)] ValueC = 3 } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum SimpleStructTag { A = 0 , B = 1 , C = 2 , D = 3 , E = 4 , F = 5 , G = 6 , H = 7 , I = 8 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestFabricScopedTag { FabricSensitiveInt8U = 1 , OptionalFabricSensitiveInt8U = 2 , NullableFabricSensitiveInt8U = 3 , NullableOptionalFabricSensitiveInt8U = 4 , FabricSensitiveCharString = 5 , FabricSensitiveStruct = 6 , FabricSensitiveInt8UList = 7 , FabricIndex = 254 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum NullablesAndOptionalsStructTag { NullableInt = 0 , OptionalInt = 1 , NullableOptionalInt = 2 , NullableString = 3 , OptionalString = 4 , NullableOptionalString = 5 , NullableStruct = 6 , OptionalStruct = 7 , NullableOptionalStruct = 8 , NullableList = 9 , OptionalList = 10 , NullableOptionalList = 11 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum NestedStructTag { A = 0 , B = 1 , C = 2 , D = 3 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum NestedStructListTag { A = 0 , B = 1 , C = 2 , D = 3 , E = 4 , F = 5 , G = 6 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum DoubleNestedStructListTag { A = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestListStructOctetTag { Member1 = 0 , Member2 = 1 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestSpecificResponseTag { ReturnValue = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestAddArgumentsResponseTag { ReturnValue = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestSimpleArgumentResponseTag { ReturnValue = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestStructArrayArgumentResponseTag { Arg1 = 0 , Arg2 = 1 , Arg3 = 2 , Arg4 = 3 , Arg5 = 4 , Arg6 = 5 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestAddArgumentsRequestTag { Arg1 = 0 , Arg2 = 1 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestListInt8UReverseResponseTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestSimpleArgumentRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestEnumsResponseTag { Arg1 = 0 , Arg2 = 1 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestStructArrayArgumentRequestRequestTag { Arg1 = 0 , Arg2 = 1 , Arg3 = 2 , Arg4 = 3 , Arg5 = 4 , Arg6 = 5 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestNullableOptionalResponseTag { WasPresent = 0 , WasNull = 1 , Value = 2 , OriginalValue = 3 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestStructArgumentRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestComplexNullableOptionalResponseTag { NullableIntWasNull = 0 , NullableIntValue = 1 , OptionalIntWasPresent = 2 , OptionalIntValue = 3 , NullableOptionalIntWasPresent = 4 , NullableOptionalIntWasNull = 5 , NullableOptionalIntValue = 6 , NullableStringWasNull = 7 , NullableStringValue = 8 , OptionalStringWasPresent = 9 , OptionalStringValue = 10 , NullableOptionalStringWasPresent = 11 , NullableOptionalStringWasNull = 12 , NullableOptionalStringValue = 13 , NullableStructWasNull = 14 , NullableStructValue = 15 , OptionalStructWasPresent = 16 , OptionalStructValue = 17 , NullableOptionalStructWasPresent = 18 , NullableOptionalStructWasNull = 19 , NullableOptionalStructValue = 20 , NullableListWasNull = 21 , NullableListValue = 22 , OptionalListWasPresent = 23 , OptionalListValue = 24 , NullableOptionalListWasPresent = 25 , NullableOptionalListWasNull = 26 , NullableOptionalListValue = 27 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestNestedStructArgumentRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum BooleanResponseTag { Value = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestListStructArgumentRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum SimpleStructResponseTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestListInt8UArgumentRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestEmitTestEventResponseTag { Value = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestNestedStructListArgumentRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestEmitTestFabricScopedEventResponseTag { Value = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestListNestedStructListArgumentRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestBatchHelperResponseTag { Buffer = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestListInt8UReverseRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum StringEchoResponseTag { Payload = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestEnumsRequestRequestTag { Arg1 = 0 , Arg2 = 1 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum GlobalEchoResponseTag { Field1 = 0 , Field2 = 1 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestNullableOptionalRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestComplexNullableOptionalRequestRequestTag { NullableInt = 0 , OptionalInt = 1 , NullableOptionalInt = 2 , NullableString = 3 , OptionalString = 4 , NullableOptionalString = 5 , NullableStruct = 6 , OptionalStruct = 7 , NullableOptionalStruct = 8 , NullableList = 9 , OptionalList = 10 , NullableOptionalList = 11 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum SimpleStructEchoRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestSimpleOptionalArgumentRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestEmitTestEventRequestRequestTag { Arg1 = 0 , Arg2 = 1 , Arg3 = 2 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestEmitTestFabricScopedEventRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestBatchHelperRequestRequestTag { SleepBeforeResponseTimeMs = 0 , SizeOfResponseBuffer = 1 , FillCharacter = 2 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestSecondBatchHelperRequestRequestTag { SleepBeforeResponseTimeMs = 0 , SizeOfResponseBuffer = 1 , FillCharacter = 2 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum StringEchoRequestRequestTag { Payload = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum GlobalEchoRequestRequestTag { Field1 = 0 , Field2 = 1 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestDifferentVendorMeiRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestDifferentVendorMeiResponseTag { Arg1 = 0 , EventNumber = 1 , } # [derive (PartialEq , Eq , Clone , Hash)] pub struct SimpleStruct < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > SimpleStruct < 'a > { # [doc = "Create a new instance"] 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 a (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn b (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (1) ?) } pub fn c (& self) -> Result < SimpleEnum , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (2) ?) } pub fn d (& self) -> Result < rs_matter_crate :: tlv :: OctetStr < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (3) ?) } pub fn e (& self) -> Result < rs_matter_crate :: tlv :: Utf8Str < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (4) ?) } pub fn f (& self) -> Result < SimpleBitmap , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (5) ?) } pub fn g (& self) -> Result < f32 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (6) ?) } pub fn h (& self) -> Result < f64 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (7) ?) } pub fn i (& self) -> Result < Option < TestGlobalEnum > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (8) ? ; 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 SimpleStruct < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for SimpleStruct < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for SimpleStruct < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "SimpleStruct") ? ; match self . a () { Ok (value) => write ! (f , "{}: {:?}," , "a" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "a" , e . code ()) ? , } match self . b () { Ok (value) => write ! (f , "{}: {:?}," , "b" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "b" , e . code ()) ? , } match self . c () { Ok (value) => write ! (f , "{}: {:?}," , "c" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "c" , e . code ()) ? , } match self . d () { Ok (value) => write ! (f , "{}: {:?}," , "d" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "d" , e . code ()) ? , } match self . e () { Ok (value) => write ! (f , "{}: {:?}," , "e" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "e" , e . code ()) ? , } match self . f () { Ok (value) => write ! (f , "{}: {:?}," , "f" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "f" , e . code ()) ? , } match self . g () { Ok (value) => write ! (f , "{}: {:?}," , "g" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "g" , e . code ()) ? , } match self . h () { Ok (value) => write ! (f , "{}: {:?}," , "h" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "h" , e . code ()) ? , } match self . i () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "i" , value) ? , Ok (None) => write ! (f , "{}: None," , "i") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "i" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for SimpleStruct < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "SimpleStruct") ; match self . a () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "a" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "a" , e . code ()) , } match self . b () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "b" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "b" , e . code ()) , } match self . c () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "c" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "c" , e . code ()) , } match self . d () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "d" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "d" , e . code ()) , } match self . e () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "e" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "e" , e . code ()) , } match self . f () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "f" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "f" , e . code ()) , } match self . g () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "g" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "g" , e . code ()) , } match self . h () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "h" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "h" , e . code ()) , } match self . i () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "i" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "i") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "i" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestFabricScoped < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestFabricScoped < 'a > { # [doc = "Create a new instance"] 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 fabric_sensitive_int_8_u (& self) -> Result < Option < u8 > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (1) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn optional_fabric_sensitive_int_8_u (& self) -> Result < Option < u8 > , 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) ?)) } } pub fn nullable_fabric_sensitive_int_8_u (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < u8 > > , 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) ?)) } } pub fn nullable_optional_fabric_sensitive_int_8_u (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < u8 > > , 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) ?)) } } pub fn fabric_sensitive_char_string (& self) -> Result < Option < rs_matter_crate :: tlv :: Utf8Str < '_ > > , 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) ?)) } } pub fn fabric_sensitive_struct (& self) -> Result < Option < SimpleStruct < '_ > > , 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) ?)) } } pub fn fabric_sensitive_int_8_u_list (& self) -> Result < Option < rs_matter_crate :: tlv :: TLVArray < '_ , u8 > > , 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) ?)) } } pub fn fabric_index (& self) -> Result < Option < rs_matter_crate :: im :: FabricIndex > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (254) ? ; 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 TestFabricScoped < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestFabricScoped < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestFabricScoped < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestFabricScoped") ? ; match self . fabric_sensitive_int_8_u () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "fabric_sensitive_int_8_u" , value) ? , Ok (None) => write ! (f , "{}: None," , "fabric_sensitive_int_8_u") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "fabric_sensitive_int_8_u" , e . code ()) ? , } match self . optional_fabric_sensitive_int_8_u () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_fabric_sensitive_int_8_u" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_fabric_sensitive_int_8_u") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_fabric_sensitive_int_8_u" , e . code ()) ? , } match self . nullable_fabric_sensitive_int_8_u () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_fabric_sensitive_int_8_u" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_fabric_sensitive_int_8_u") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_fabric_sensitive_int_8_u" , e . code ()) ? , } match self . nullable_optional_fabric_sensitive_int_8_u () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_fabric_sensitive_int_8_u" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_fabric_sensitive_int_8_u") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_fabric_sensitive_int_8_u" , e . code ()) ? , } match self . fabric_sensitive_char_string () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "fabric_sensitive_char_string" , value) ? , Ok (None) => write ! (f , "{}: None," , "fabric_sensitive_char_string") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "fabric_sensitive_char_string" , e . code ()) ? , } match self . fabric_sensitive_struct () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "fabric_sensitive_struct" , value) ? , Ok (None) => write ! (f , "{}: None," , "fabric_sensitive_struct") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "fabric_sensitive_struct" , e . code ()) ? , } match self . fabric_sensitive_int_8_u_list () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "fabric_sensitive_int_8_u_list" , value) ? , Ok (None) => write ! (f , "{}: None," , "fabric_sensitive_int_8_u_list") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "fabric_sensitive_int_8_u_list" , e . code ()) ? , } match self . fabric_index () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "fabric_index" , value) ? , Ok (None) => write ! (f , "{}: None," , "fabric_index") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "fabric_index" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestFabricScoped < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestFabricScoped") ; match self . fabric_sensitive_int_8_u () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "fabric_sensitive_int_8_u" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "fabric_sensitive_int_8_u") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "fabric_sensitive_int_8_u" , e . code ()) , } match self . optional_fabric_sensitive_int_8_u () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_fabric_sensitive_int_8_u" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_fabric_sensitive_int_8_u") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_fabric_sensitive_int_8_u" , e . code ()) , } match self . nullable_fabric_sensitive_int_8_u () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_fabric_sensitive_int_8_u" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_fabric_sensitive_int_8_u") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_fabric_sensitive_int_8_u" , e . code ()) , } match self . nullable_optional_fabric_sensitive_int_8_u () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_fabric_sensitive_int_8_u" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_fabric_sensitive_int_8_u") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_fabric_sensitive_int_8_u" , e . code ()) , } match self . fabric_sensitive_char_string () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "fabric_sensitive_char_string" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "fabric_sensitive_char_string") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "fabric_sensitive_char_string" , e . code ()) , } match self . fabric_sensitive_struct () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "fabric_sensitive_struct" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "fabric_sensitive_struct") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "fabric_sensitive_struct" , e . code ()) , } match self . fabric_sensitive_int_8_u_list () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "fabric_sensitive_int_8_u_list" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "fabric_sensitive_int_8_u_list") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "fabric_sensitive_int_8_u_list" , e . code ()) , } match self . fabric_index () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "fabric_index" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "fabric_index") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "fabric_index" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct NullablesAndOptionalsStruct < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > NullablesAndOptionalsStruct < 'a > { # [doc = "Create a new instance"] 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 nullable_int (& self) -> Result < rs_matter_crate :: tlv :: Nullable < u16 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn optional_int (& self) -> Result < Option < u16 > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (1) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_optional_int (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < u16 > > , 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) ?)) } } pub fn nullable_string (& self) -> Result < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (3) ?) } pub fn optional_string (& self) -> Result < Option < rs_matter_crate :: tlv :: Utf8Str < '_ > > , 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) ?)) } } pub fn nullable_optional_string (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > > > , 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) ?)) } } pub fn nullable_struct (& self) -> Result < rs_matter_crate :: tlv :: Nullable < SimpleStruct < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (6) ?) } pub fn optional_struct (& self) -> Result < Option < SimpleStruct < '_ > > , 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) ?)) } } pub fn nullable_optional_struct (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < SimpleStruct < '_ > > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (8) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_list (& self) -> Result < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (9) ?) } pub fn optional_list (& self) -> Result < Option < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (10) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_optional_list (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (11) ? ; 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 NullablesAndOptionalsStruct < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for NullablesAndOptionalsStruct < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for NullablesAndOptionalsStruct < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "NullablesAndOptionalsStruct") ? ; match self . nullable_int () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_int" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_int" , e . code ()) ? , } match self . optional_int () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_int" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_int") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_int" , e . code ()) ? , } match self . nullable_optional_int () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_int" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_int") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_int" , e . code ()) ? , } match self . nullable_string () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_string" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_string" , e . code ()) ? , } match self . optional_string () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_string" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_string") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_string" , e . code ()) ? , } match self . nullable_optional_string () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_string" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_string") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_string" , e . code ()) ? , } match self . nullable_struct () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_struct" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_struct" , e . code ()) ? , } match self . optional_struct () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_struct" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_struct") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_struct" , e . code ()) ? , } match self . nullable_optional_struct () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_struct" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_struct") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_struct" , e . code ()) ? , } match self . nullable_list () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_list" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_list" , e . code ()) ? , } match self . optional_list () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_list" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_list") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_list" , e . code ()) ? , } match self . nullable_optional_list () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_list" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_list") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_list" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for NullablesAndOptionalsStruct < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "NullablesAndOptionalsStruct") ; match self . nullable_int () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_int" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_int" , e . code ()) , } match self . optional_int () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_int" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_int") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_int" , e . code ()) , } match self . nullable_optional_int () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_int" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_int") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_int" , e . code ()) , } match self . nullable_string () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_string" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_string" , e . code ()) , } match self . optional_string () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_string" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_string") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_string" , e . code ()) , } match self . nullable_optional_string () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_string" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_string") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_string" , e . code ()) , } match self . nullable_struct () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_struct" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_struct" , e . code ()) , } match self . optional_struct () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_struct" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_struct") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_struct" , e . code ()) , } match self . nullable_optional_struct () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_struct" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_struct") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_struct" , e . code ()) , } match self . nullable_list () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_list" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_list" , e . code ()) , } match self . optional_list () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_list" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_list") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_list" , e . code ()) , } match self . nullable_optional_list () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_list" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_list") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_list" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct NestedStruct < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > NestedStruct < 'a > { # [doc = "Create a new instance"] 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 a (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn b (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (1) ?) } pub fn c (& self) -> Result < SimpleStruct < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (2) ?) } pub fn d (& self) -> Result < Option < TestGlobalStruct < '_ > > , 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) ?)) } } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for NestedStruct < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for NestedStruct < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for NestedStruct < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "NestedStruct") ? ; match self . a () { Ok (value) => write ! (f , "{}: {:?}," , "a" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "a" , e . code ()) ? , } match self . b () { Ok (value) => write ! (f , "{}: {:?}," , "b" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "b" , e . code ()) ? , } match self . c () { Ok (value) => write ! (f , "{}: {:?}," , "c" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "c" , e . code ()) ? , } match self . d () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "d" , value) ? , Ok (None) => write ! (f , "{}: None," , "d") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "d" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for NestedStruct < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "NestedStruct") ; match self . a () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "a" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "a" , e . code ()) , } match self . b () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "b" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "b" , e . code ()) , } match self . c () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "c" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "c" , e . code ()) , } match self . d () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "d" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "d") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "d" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct NestedStructList < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > NestedStructList < 'a > { # [doc = "Create a new instance"] 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 a (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn b (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (1) ?) } pub fn c (& self) -> Result < SimpleStruct < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (2) ?) } pub fn d (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleStruct < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (3) ?) } pub fn e (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , u32 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (4) ?) } pub fn f (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , rs_matter_crate :: tlv :: OctetStr < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (5) ?) } pub fn g (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , u8 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (6) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for NestedStructList < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for NestedStructList < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for NestedStructList < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "NestedStructList") ? ; match self . a () { Ok (value) => write ! (f , "{}: {:?}," , "a" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "a" , e . code ()) ? , } match self . b () { Ok (value) => write ! (f , "{}: {:?}," , "b" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "b" , e . code ()) ? , } match self . c () { Ok (value) => write ! (f , "{}: {:?}," , "c" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "c" , e . code ()) ? , } match self . d () { Ok (value) => write ! (f , "{}: {:?}," , "d" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "d" , e . code ()) ? , } match self . e () { Ok (value) => write ! (f , "{}: {:?}," , "e" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "e" , e . code ()) ? , } match self . f () { Ok (value) => write ! (f , "{}: {:?}," , "f" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "f" , e . code ()) ? , } match self . g () { Ok (value) => write ! (f , "{}: {:?}," , "g" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "g" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for NestedStructList < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "NestedStructList") ; match self . a () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "a" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "a" , e . code ()) , } match self . b () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "b" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "b" , e . code ()) , } match self . c () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "c" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "c" , e . code ()) , } match self . d () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "d" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "d" , e . code ()) , } match self . e () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "e" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "e" , e . code ()) , } match self . f () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "f" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "f" , e . code ()) , } match self . g () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "g" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "g" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct DoubleNestedStructList < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > DoubleNestedStructList < 'a > { # [doc = "Create a new instance"] 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 a (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , NestedStructList < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for DoubleNestedStructList < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for DoubleNestedStructList < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for DoubleNestedStructList < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "DoubleNestedStructList") ? ; match self . a () { Ok (value) => write ! (f , "{}: {:?}," , "a" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "a" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for DoubleNestedStructList < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "DoubleNestedStructList") ; match self . a () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "a" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "a" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestListStructOctet < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestListStructOctet < 'a > { # [doc = "Create a new instance"] 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 member_1 (& self) -> Result < u64 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn member_2 (& self) -> Result < rs_matter_crate :: tlv :: OctetStr < '_ > , 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 TestListStructOctet < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestListStructOctet < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestListStructOctet < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestListStructOctet") ? ; match self . member_1 () { Ok (value) => write ! (f , "{}: {:?}," , "member_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "member_1" , e . code ()) ? , } match self . member_2 () { Ok (value) => write ! (f , "{}: {:?}," , "member_2" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "member_2" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestListStructOctet < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestListStructOctet") ; match self . member_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "member_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "member_1" , e . code ()) , } match self . member_2 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "member_2" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "member_2" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestSpecificResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestSpecificResponse < 'a > { # [doc = "Create a new instance"] 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 return_value (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestSpecificResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestSpecificResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestSpecificResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestSpecificResponse") ? ; match self . return_value () { Ok (value) => write ! (f , "{}: {:?}," , "return_value" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "return_value" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestSpecificResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestSpecificResponse") ; match self . return_value () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "return_value" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "return_value" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestAddArgumentsResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestAddArgumentsResponse < 'a > { # [doc = "Create a new instance"] 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 return_value (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestAddArgumentsResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestAddArgumentsResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestAddArgumentsResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestAddArgumentsResponse") ? ; match self . return_value () { Ok (value) => write ! (f , "{}: {:?}," , "return_value" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "return_value" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestAddArgumentsResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestAddArgumentsResponse") ; match self . return_value () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "return_value" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "return_value" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestSimpleArgumentResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestSimpleArgumentResponse < 'a > { # [doc = "Create a new instance"] 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 return_value (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestSimpleArgumentResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestSimpleArgumentResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestSimpleArgumentResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestSimpleArgumentResponse") ? ; match self . return_value () { Ok (value) => write ! (f , "{}: {:?}," , "return_value" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "return_value" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestSimpleArgumentResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestSimpleArgumentResponse") ; match self . return_value () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "return_value" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "return_value" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestStructArrayArgumentResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestStructArrayArgumentResponse < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , NestedStructList < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn arg_2 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleStruct < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (1) ?) } pub fn arg_3 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (2) ?) } pub fn arg_4 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , bool > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (3) ?) } pub fn arg_5 (& self) -> Result < SimpleEnum , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (4) ?) } pub fn arg_6 (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (5) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestStructArrayArgumentResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestStructArrayArgumentResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestStructArrayArgumentResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestStructArrayArgumentResponse") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } match self . arg_2 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_2" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) ? , } match self . arg_3 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_3" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_3" , e . code ()) ? , } match self . arg_4 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_4" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_4" , e . code ()) ? , } match self . arg_5 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_5" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_5" , e . code ()) ? , } match self . arg_6 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_6" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_6" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestStructArrayArgumentResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestStructArrayArgumentResponse") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } match self . arg_2 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_2" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) , } match self . arg_3 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_3" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_3" , e . code ()) , } match self . arg_4 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_4" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_4" , e . code ()) , } match self . arg_5 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_5" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_5" , e . code ()) , } match self . arg_6 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_6" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_6" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestAddArgumentsRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestAddArgumentsRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn arg_2 (& self) -> Result < u8 , 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 TestAddArgumentsRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestAddArgumentsRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestAddArgumentsRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestAddArgumentsRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } match self . arg_2 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_2" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestAddArgumentsRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestAddArgumentsRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } match self . arg_2 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_2" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestListInt8UReverseResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestListInt8UReverseResponse < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , u8 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestListInt8UReverseResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestListInt8UReverseResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestListInt8UReverseResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestListInt8UReverseResponse") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestListInt8UReverseResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestListInt8UReverseResponse") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestSimpleArgumentRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestSimpleArgumentRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestSimpleArgumentRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestSimpleArgumentRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestSimpleArgumentRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestSimpleArgumentRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestSimpleArgumentRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestSimpleArgumentRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestEnumsResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestEnumsResponse < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < u16 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn arg_2 (& self) -> Result < SimpleEnum , 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 TestEnumsResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestEnumsResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestEnumsResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestEnumsResponse") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } match self . arg_2 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_2" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestEnumsResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestEnumsResponse") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } match self . arg_2 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_2" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestStructArrayArgumentRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestStructArrayArgumentRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , NestedStructList < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn arg_2 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleStruct < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (1) ?) } pub fn arg_3 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (2) ?) } pub fn arg_4 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , bool > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (3) ?) } pub fn arg_5 (& self) -> Result < SimpleEnum , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (4) ?) } pub fn arg_6 (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (5) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestStructArrayArgumentRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestStructArrayArgumentRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestStructArrayArgumentRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestStructArrayArgumentRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } match self . arg_2 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_2" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) ? , } match self . arg_3 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_3" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_3" , e . code ()) ? , } match self . arg_4 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_4" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_4" , e . code ()) ? , } match self . arg_5 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_5" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_5" , e . code ()) ? , } match self . arg_6 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_6" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_6" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestStructArrayArgumentRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestStructArrayArgumentRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } match self . arg_2 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_2" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) , } match self . arg_3 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_3" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_3" , e . code ()) , } match self . arg_4 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_4" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_4" , e . code ()) , } match self . arg_5 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_5" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_5" , e . code ()) , } match self . arg_6 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_6" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_6" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestNullableOptionalResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestNullableOptionalResponse < 'a > { # [doc = "Create a new instance"] 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 was_present (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn was_null (& self) -> Result < Option < bool > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (1) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn value (& self) -> Result < Option < u8 > , 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) ?)) } } pub fn original_value (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < u8 > > , 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) ?)) } } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestNullableOptionalResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestNullableOptionalResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestNullableOptionalResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestNullableOptionalResponse") ? ; match self . was_present () { Ok (value) => write ! (f , "{}: {:?}," , "was_present" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "was_present" , e . code ()) ? , } match self . was_null () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "was_null" , value) ? , Ok (None) => write ! (f , "{}: None," , "was_null") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "was_null" , e . code ()) ? , } match self . value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "value" , value) ? , Ok (None) => write ! (f , "{}: None," , "value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "value" , e . code ()) ? , } match self . original_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "original_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "original_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "original_value" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestNullableOptionalResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestNullableOptionalResponse") ; match self . was_present () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "was_present" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "was_present" , e . code ()) , } match self . was_null () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "was_null" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "was_null") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "was_null" , e . code ()) , } match self . value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "value" , e . code ()) , } match self . original_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "original_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "original_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "original_value" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestStructArgumentRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestStructArgumentRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < SimpleStruct < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestStructArgumentRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestStructArgumentRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestStructArgumentRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestStructArgumentRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestStructArgumentRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestStructArgumentRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestComplexNullableOptionalResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestComplexNullableOptionalResponse < 'a > { # [doc = "Create a new instance"] 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 nullable_int_was_null (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn nullable_int_value (& self) -> Result < Option < u16 > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (1) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn optional_int_was_present (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (2) ?) } pub fn optional_int_value (& self) -> Result < Option < u16 > , 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) ?)) } } pub fn nullable_optional_int_was_present (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (4) ?) } pub fn nullable_optional_int_was_null (& self) -> Result < Option < bool > , 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) ?)) } } pub fn nullable_optional_int_value (& self) -> Result < Option < u16 > , 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) ?)) } } pub fn nullable_string_was_null (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (7) ?) } pub fn nullable_string_value (& self) -> Result < Option < rs_matter_crate :: tlv :: Utf8Str < '_ > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (8) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn optional_string_was_present (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (9) ?) } pub fn optional_string_value (& self) -> Result < Option < rs_matter_crate :: tlv :: Utf8Str < '_ > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (10) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_optional_string_was_present (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (11) ?) } pub fn nullable_optional_string_was_null (& self) -> Result < Option < bool > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (12) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_optional_string_value (& self) -> Result < Option < rs_matter_crate :: tlv :: Utf8Str < '_ > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (13) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_struct_was_null (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (14) ?) } pub fn nullable_struct_value (& self) -> Result < Option < SimpleStruct < '_ > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (15) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn optional_struct_was_present (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (16) ?) } pub fn optional_struct_value (& self) -> Result < Option < SimpleStruct < '_ > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (17) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_optional_struct_was_present (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (18) ?) } pub fn nullable_optional_struct_was_null (& self) -> Result < Option < bool > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (19) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_optional_struct_value (& self) -> Result < Option < SimpleStruct < '_ > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (20) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_list_was_null (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (21) ?) } pub fn nullable_list_value (& self) -> Result < Option < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (22) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn optional_list_was_present (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (23) ?) } pub fn optional_list_value (& self) -> Result < Option < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (24) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_optional_list_was_present (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (25) ?) } pub fn nullable_optional_list_was_null (& self) -> Result < Option < bool > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (26) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_optional_list_value (& self) -> Result < Option < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (27) ? ; 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 TestComplexNullableOptionalResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestComplexNullableOptionalResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestComplexNullableOptionalResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestComplexNullableOptionalResponse") ? ; match self . nullable_int_was_null () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_int_was_null" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_int_was_null" , e . code ()) ? , } match self . nullable_int_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_int_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_int_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_int_value" , e . code ()) ? , } match self . optional_int_was_present () { Ok (value) => write ! (f , "{}: {:?}," , "optional_int_was_present" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_int_was_present" , e . code ()) ? , } match self . optional_int_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_int_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_int_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_int_value" , e . code ()) ? , } match self . nullable_optional_int_was_present () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_optional_int_was_present" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_int_was_present" , e . code ()) ? , } match self . nullable_optional_int_was_null () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_int_was_null" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_int_was_null") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_int_was_null" , e . code ()) ? , } match self . nullable_optional_int_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_int_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_int_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_int_value" , e . code ()) ? , } match self . nullable_string_was_null () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_string_was_null" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_string_was_null" , e . code ()) ? , } match self . nullable_string_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_string_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_string_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_string_value" , e . code ()) ? , } match self . optional_string_was_present () { Ok (value) => write ! (f , "{}: {:?}," , "optional_string_was_present" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_string_was_present" , e . code ()) ? , } match self . optional_string_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_string_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_string_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_string_value" , e . code ()) ? , } match self . nullable_optional_string_was_present () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_optional_string_was_present" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_string_was_present" , e . code ()) ? , } match self . nullable_optional_string_was_null () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_string_was_null" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_string_was_null") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_string_was_null" , e . code ()) ? , } match self . nullable_optional_string_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_string_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_string_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_string_value" , e . code ()) ? , } match self . nullable_struct_was_null () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_struct_was_null" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_struct_was_null" , e . code ()) ? , } match self . nullable_struct_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_struct_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_struct_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_struct_value" , e . code ()) ? , } match self . optional_struct_was_present () { Ok (value) => write ! (f , "{}: {:?}," , "optional_struct_was_present" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_struct_was_present" , e . code ()) ? , } match self . optional_struct_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_struct_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_struct_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_struct_value" , e . code ()) ? , } match self . nullable_optional_struct_was_present () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_optional_struct_was_present" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_struct_was_present" , e . code ()) ? , } match self . nullable_optional_struct_was_null () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_struct_was_null" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_struct_was_null") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_struct_was_null" , e . code ()) ? , } match self . nullable_optional_struct_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_struct_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_struct_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_struct_value" , e . code ()) ? , } match self . nullable_list_was_null () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_list_was_null" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_list_was_null" , e . code ()) ? , } match self . nullable_list_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_list_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_list_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_list_value" , e . code ()) ? , } match self . optional_list_was_present () { Ok (value) => write ! (f , "{}: {:?}," , "optional_list_was_present" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_list_was_present" , e . code ()) ? , } match self . optional_list_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_list_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_list_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_list_value" , e . code ()) ? , } match self . nullable_optional_list_was_present () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_optional_list_was_present" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_list_was_present" , e . code ()) ? , } match self . nullable_optional_list_was_null () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_list_was_null" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_list_was_null") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_list_was_null" , e . code ()) ? , } match self . nullable_optional_list_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_list_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_list_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_list_value" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestComplexNullableOptionalResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestComplexNullableOptionalResponse") ; match self . nullable_int_was_null () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_int_was_null" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_int_was_null" , e . code ()) , } match self . nullable_int_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_int_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_int_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_int_value" , e . code ()) , } match self . optional_int_was_present () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "optional_int_was_present" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_int_was_present" , e . code ()) , } match self . optional_int_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_int_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_int_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_int_value" , e . code ()) , } match self . nullable_optional_int_was_present () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_optional_int_was_present" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_int_was_present" , e . code ()) , } match self . nullable_optional_int_was_null () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_int_was_null" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_int_was_null") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_int_was_null" , e . code ()) , } match self . nullable_optional_int_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_int_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_int_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_int_value" , e . code ()) , } match self . nullable_string_was_null () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_string_was_null" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_string_was_null" , e . code ()) , } match self . nullable_string_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_string_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_string_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_string_value" , e . code ()) , } match self . optional_string_was_present () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "optional_string_was_present" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_string_was_present" , e . code ()) , } match self . optional_string_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_string_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_string_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_string_value" , e . code ()) , } match self . nullable_optional_string_was_present () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_optional_string_was_present" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_string_was_present" , e . code ()) , } match self . nullable_optional_string_was_null () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_string_was_null" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_string_was_null") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_string_was_null" , e . code ()) , } match self . nullable_optional_string_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_string_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_string_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_string_value" , e . code ()) , } match self . nullable_struct_was_null () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_struct_was_null" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_struct_was_null" , e . code ()) , } match self . nullable_struct_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_struct_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_struct_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_struct_value" , e . code ()) , } match self . optional_struct_was_present () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "optional_struct_was_present" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_struct_was_present" , e . code ()) , } match self . optional_struct_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_struct_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_struct_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_struct_value" , e . code ()) , } match self . nullable_optional_struct_was_present () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_optional_struct_was_present" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_struct_was_present" , e . code ()) , } match self . nullable_optional_struct_was_null () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_struct_was_null" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_struct_was_null") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_struct_was_null" , e . code ()) , } match self . nullable_optional_struct_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_struct_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_struct_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_struct_value" , e . code ()) , } match self . nullable_list_was_null () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_list_was_null" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_list_was_null" , e . code ()) , } match self . nullable_list_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_list_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_list_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_list_value" , e . code ()) , } match self . optional_list_was_present () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "optional_list_was_present" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_list_was_present" , e . code ()) , } match self . optional_list_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_list_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_list_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_list_value" , e . code ()) , } match self . nullable_optional_list_was_present () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_optional_list_was_present" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_list_was_present" , e . code ()) , } match self . nullable_optional_list_was_null () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_list_was_null" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_list_was_null") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_list_was_null" , e . code ()) , } match self . nullable_optional_list_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_list_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_list_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_list_value" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestNestedStructArgumentRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestNestedStructArgumentRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < NestedStruct < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestNestedStructArgumentRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestNestedStructArgumentRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestNestedStructArgumentRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestNestedStructArgumentRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestNestedStructArgumentRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestNestedStructArgumentRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct BooleanResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > BooleanResponse < 'a > { # [doc = "Create a new instance"] 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 value (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for BooleanResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for BooleanResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for BooleanResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "BooleanResponse") ? ; match self . value () { Ok (value) => write ! (f , "{}: {:?}," , "value" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "value" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for BooleanResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "BooleanResponse") ; match self . value () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "value" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "value" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestListStructArgumentRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestListStructArgumentRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleStruct < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestListStructArgumentRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestListStructArgumentRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestListStructArgumentRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestListStructArgumentRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestListStructArgumentRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestListStructArgumentRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct SimpleStructResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > SimpleStructResponse < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < SimpleStruct < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for SimpleStructResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for SimpleStructResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for SimpleStructResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "SimpleStructResponse") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for SimpleStructResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "SimpleStructResponse") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestListInt8UArgumentRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestListInt8UArgumentRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , u8 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestListInt8UArgumentRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestListInt8UArgumentRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestListInt8UArgumentRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestListInt8UArgumentRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestListInt8UArgumentRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestListInt8UArgumentRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestEmitTestEventResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestEmitTestEventResponse < 'a > { # [doc = "Create a new instance"] 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 value (& self) -> Result < u64 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestEmitTestEventResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestEmitTestEventResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestEmitTestEventResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestEmitTestEventResponse") ? ; match self . value () { Ok (value) => write ! (f , "{}: {:?}," , "value" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "value" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestEventResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestEmitTestEventResponse") ; match self . value () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "value" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "value" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestNestedStructListArgumentRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestNestedStructListArgumentRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < NestedStructList < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestNestedStructListArgumentRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestNestedStructListArgumentRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestNestedStructListArgumentRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestNestedStructListArgumentRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestNestedStructListArgumentRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestNestedStructListArgumentRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestEmitTestFabricScopedEventResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestEmitTestFabricScopedEventResponse < 'a > { # [doc = "Create a new instance"] 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 value (& self) -> Result < u64 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestEmitTestFabricScopedEventResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestEmitTestFabricScopedEventResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestEmitTestFabricScopedEventResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestEmitTestFabricScopedEventResponse") ? ; match self . value () { Ok (value) => write ! (f , "{}: {:?}," , "value" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "value" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestFabricScopedEventResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestEmitTestFabricScopedEventResponse") ; match self . value () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "value" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "value" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestListNestedStructListArgumentRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestListNestedStructListArgumentRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , NestedStructList < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestListNestedStructListArgumentRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestListNestedStructListArgumentRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestListNestedStructListArgumentRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestListNestedStructListArgumentRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestListNestedStructListArgumentRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestListNestedStructListArgumentRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestBatchHelperResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestBatchHelperResponse < 'a > { # [doc = "Create a new instance"] 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 buffer (& self) -> Result < rs_matter_crate :: tlv :: OctetStr < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestBatchHelperResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestBatchHelperResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestBatchHelperResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestBatchHelperResponse") ? ; match self . buffer () { Ok (value) => write ! (f , "{}: {:?}," , "buffer" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "buffer" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestBatchHelperResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestBatchHelperResponse") ; match self . buffer () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "buffer" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "buffer" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestListInt8UReverseRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestListInt8UReverseRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , u8 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestListInt8UReverseRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestListInt8UReverseRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestListInt8UReverseRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestListInt8UReverseRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestListInt8UReverseRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestListInt8UReverseRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct StringEchoResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > StringEchoResponse < 'a > { # [doc = "Create a new instance"] 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 payload (& self) -> Result < rs_matter_crate :: tlv :: OctetStr < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for StringEchoResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for StringEchoResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for StringEchoResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "StringEchoResponse") ? ; match self . payload () { Ok (value) => write ! (f , "{}: {:?}," , "payload" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "payload" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for StringEchoResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "StringEchoResponse") ; match self . payload () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "payload" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "payload" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestEnumsRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestEnumsRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < u16 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn arg_2 (& self) -> Result < SimpleEnum , 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 TestEnumsRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestEnumsRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestEnumsRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestEnumsRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } match self . arg_2 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_2" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestEnumsRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestEnumsRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } match self . arg_2 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_2" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct GlobalEchoResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > GlobalEchoResponse < 'a > { # [doc = "Create a new instance"] 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 field_1 (& self) -> Result < TestGlobalStruct < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn field_2 (& self) -> Result < TestGlobalEnum , 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 GlobalEchoResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for GlobalEchoResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for GlobalEchoResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "GlobalEchoResponse") ? ; match self . field_1 () { Ok (value) => write ! (f , "{}: {:?}," , "field_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "field_1" , e . code ()) ? , } match self . field_2 () { Ok (value) => write ! (f , "{}: {:?}," , "field_2" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "field_2" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for GlobalEchoResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "GlobalEchoResponse") ; match self . field_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "field_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "field_1" , e . code ()) , } match self . field_2 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "field_2" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "field_2" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestNullableOptionalRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestNullableOptionalRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < u8 > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (0) ? ; 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 TestNullableOptionalRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestNullableOptionalRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestNullableOptionalRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestNullableOptionalRequestRequest") ? ; match self . arg_1 () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "arg_1" , value) ? , Ok (None) => write ! (f , "{}: None," , "arg_1") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestNullableOptionalRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestNullableOptionalRequestRequest") ; match self . arg_1 () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "arg_1" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "arg_1") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestComplexNullableOptionalRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestComplexNullableOptionalRequestRequest < 'a > { # [doc = "Create a new instance"] 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 nullable_int (& self) -> Result < rs_matter_crate :: tlv :: Nullable < u16 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn optional_int (& self) -> Result < Option < u16 > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (1) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_optional_int (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < u16 > > , 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) ?)) } } pub fn nullable_string (& self) -> Result < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (3) ?) } pub fn optional_string (& self) -> Result < Option < rs_matter_crate :: tlv :: Utf8Str < '_ > > , 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) ?)) } } pub fn nullable_optional_string (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > > > , 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) ?)) } } pub fn nullable_struct (& self) -> Result < rs_matter_crate :: tlv :: Nullable < SimpleStruct < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (6) ?) } pub fn optional_struct (& self) -> Result < Option < SimpleStruct < '_ > > , 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) ?)) } } pub fn nullable_optional_struct (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < SimpleStruct < '_ > > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (8) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_list (& self) -> Result < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (9) ?) } pub fn optional_list (& self) -> Result < Option < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (10) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_optional_list (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (11) ? ; 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 TestComplexNullableOptionalRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestComplexNullableOptionalRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestComplexNullableOptionalRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestComplexNullableOptionalRequestRequest") ? ; match self . nullable_int () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_int" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_int" , e . code ()) ? , } match self . optional_int () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_int" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_int") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_int" , e . code ()) ? , } match self . nullable_optional_int () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_int" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_int") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_int" , e . code ()) ? , } match self . nullable_string () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_string" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_string" , e . code ()) ? , } match self . optional_string () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_string" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_string") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_string" , e . code ()) ? , } match self . nullable_optional_string () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_string" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_string") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_string" , e . code ()) ? , } match self . nullable_struct () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_struct" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_struct" , e . code ()) ? , } match self . optional_struct () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_struct" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_struct") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_struct" , e . code ()) ? , } match self . nullable_optional_struct () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_struct" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_struct") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_struct" , e . code ()) ? , } match self . nullable_list () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_list" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_list" , e . code ()) ? , } match self . optional_list () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_list" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_list") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_list" , e . code ()) ? , } match self . nullable_optional_list () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_list" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_list") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_list" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestComplexNullableOptionalRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestComplexNullableOptionalRequestRequest") ; match self . nullable_int () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_int" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_int" , e . code ()) , } match self . optional_int () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_int" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_int") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_int" , e . code ()) , } match self . nullable_optional_int () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_int" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_int") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_int" , e . code ()) , } match self . nullable_string () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_string" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_string" , e . code ()) , } match self . optional_string () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_string" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_string") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_string" , e . code ()) , } match self . nullable_optional_string () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_string" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_string") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_string" , e . code ()) , } match self . nullable_struct () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_struct" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_struct" , e . code ()) , } match self . optional_struct () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_struct" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_struct") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_struct" , e . code ()) , } match self . nullable_optional_struct () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_struct" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_struct") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_struct" , e . code ()) , } match self . nullable_list () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_list" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_list" , e . code ()) , } match self . optional_list () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_list" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_list") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_list" , e . code ()) , } match self . nullable_optional_list () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_list" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_list") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_list" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct SimpleStructEchoRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > SimpleStructEchoRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < SimpleStruct < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for SimpleStructEchoRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for SimpleStructEchoRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for SimpleStructEchoRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "SimpleStructEchoRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for SimpleStructEchoRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "SimpleStructEchoRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestSimpleOptionalArgumentRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestSimpleOptionalArgumentRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < Option < bool > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (0) ? ; 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 TestSimpleOptionalArgumentRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestSimpleOptionalArgumentRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestSimpleOptionalArgumentRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestSimpleOptionalArgumentRequestRequest") ? ; match self . arg_1 () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "arg_1" , value) ? , Ok (None) => write ! (f , "{}: None," , "arg_1") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestSimpleOptionalArgumentRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestSimpleOptionalArgumentRequestRequest") ; match self . arg_1 () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "arg_1" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "arg_1") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestEmitTestEventRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestEmitTestEventRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn arg_2 (& self) -> Result < SimpleEnum , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (1) ?) } pub fn arg_3 (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (2) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestEmitTestEventRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestEmitTestEventRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestEmitTestEventRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestEmitTestEventRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } match self . arg_2 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_2" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) ? , } match self . arg_3 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_3" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_3" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestEventRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestEmitTestEventRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } match self . arg_2 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_2" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) , } match self . arg_3 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_3" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_3" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestEmitTestFabricScopedEventRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestEmitTestFabricScopedEventRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestEmitTestFabricScopedEventRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestEmitTestFabricScopedEventRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestEmitTestFabricScopedEventRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestEmitTestFabricScopedEventRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestFabricScopedEventRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestEmitTestFabricScopedEventRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestBatchHelperRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestBatchHelperRequestRequest < 'a > { # [doc = "Create a new instance"] 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 sleep_before_response_time_ms (& self) -> Result < u16 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn size_of_response_buffer (& self) -> Result < u16 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (1) ?) } pub fn fill_character (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (2) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestBatchHelperRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestBatchHelperRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestBatchHelperRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestBatchHelperRequestRequest") ? ; match self . sleep_before_response_time_ms () { Ok (value) => write ! (f , "{}: {:?}," , "sleep_before_response_time_ms" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "sleep_before_response_time_ms" , e . code ()) ? , } match self . size_of_response_buffer () { Ok (value) => write ! (f , "{}: {:?}," , "size_of_response_buffer" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "size_of_response_buffer" , e . code ()) ? , } match self . fill_character () { Ok (value) => write ! (f , "{}: {:?}," , "fill_character" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "fill_character" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestBatchHelperRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestBatchHelperRequestRequest") ; match self . sleep_before_response_time_ms () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "sleep_before_response_time_ms" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "sleep_before_response_time_ms" , e . code ()) , } match self . size_of_response_buffer () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "size_of_response_buffer" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "size_of_response_buffer" , e . code ()) , } match self . fill_character () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "fill_character" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "fill_character" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestSecondBatchHelperRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestSecondBatchHelperRequestRequest < 'a > { # [doc = "Create a new instance"] 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 sleep_before_response_time_ms (& self) -> Result < u16 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn size_of_response_buffer (& self) -> Result < u16 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (1) ?) } pub fn fill_character (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (2) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestSecondBatchHelperRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestSecondBatchHelperRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestSecondBatchHelperRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestSecondBatchHelperRequestRequest") ? ; match self . sleep_before_response_time_ms () { Ok (value) => write ! (f , "{}: {:?}," , "sleep_before_response_time_ms" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "sleep_before_response_time_ms" , e . code ()) ? , } match self . size_of_response_buffer () { Ok (value) => write ! (f , "{}: {:?}," , "size_of_response_buffer" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "size_of_response_buffer" , e . code ()) ? , } match self . fill_character () { Ok (value) => write ! (f , "{}: {:?}," , "fill_character" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "fill_character" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestSecondBatchHelperRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestSecondBatchHelperRequestRequest") ; match self . sleep_before_response_time_ms () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "sleep_before_response_time_ms" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "sleep_before_response_time_ms" , e . code ()) , } match self . size_of_response_buffer () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "size_of_response_buffer" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "size_of_response_buffer" , e . code ()) , } match self . fill_character () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "fill_character" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "fill_character" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct StringEchoRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > StringEchoRequestRequest < 'a > { # [doc = "Create a new instance"] 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 payload (& self) -> Result < rs_matter_crate :: tlv :: OctetStr < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for StringEchoRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for StringEchoRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for StringEchoRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "StringEchoRequestRequest") ? ; match self . payload () { Ok (value) => write ! (f , "{}: {:?}," , "payload" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "payload" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for StringEchoRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "StringEchoRequestRequest") ; match self . payload () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "payload" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "payload" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct GlobalEchoRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > GlobalEchoRequestRequest < 'a > { # [doc = "Create a new instance"] 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 field_1 (& self) -> Result < TestGlobalStruct < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn field_2 (& self) -> Result < TestGlobalEnum , 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 GlobalEchoRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for GlobalEchoRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for GlobalEchoRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "GlobalEchoRequestRequest") ? ; match self . field_1 () { Ok (value) => write ! (f , "{}: {:?}," , "field_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "field_1" , e . code ()) ? , } match self . field_2 () { Ok (value) => write ! (f , "{}: {:?}," , "field_2" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "field_2" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for GlobalEchoRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "GlobalEchoRequestRequest") ; match self . field_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "field_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "field_1" , e . code ()) , } match self . field_2 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "field_2" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "field_2" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestDifferentVendorMeiRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestDifferentVendorMeiRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestDifferentVendorMeiRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestDifferentVendorMeiRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestDifferentVendorMeiRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestDifferentVendorMeiRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestDifferentVendorMeiRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestDifferentVendorMeiRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestDifferentVendorMeiResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestDifferentVendorMeiResponse < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn event_number (& self) -> Result < u64 , 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 TestDifferentVendorMeiResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestDifferentVendorMeiResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestDifferentVendorMeiResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestDifferentVendorMeiResponse") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } match self . event_number () { Ok (value) => write ! (f , "{}: {:?}," , "event_number" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "event_number" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestDifferentVendorMeiResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestDifferentVendorMeiResponse") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } match self . event_number () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "event_number" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "event_number" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } pub struct SimpleStructBuilder < P , const F : usize = 0usize > (P) ; impl < P > SimpleStructBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > SimpleStructBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn a (mut self , value : u8) -> Result < SimpleStructBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "a" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "a" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > SimpleStructBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn a (mut self , value : u8) -> Result < SimpleStructBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "a" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > SimpleStructBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn b (mut self , value : bool) -> Result < SimpleStructBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "b" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "b" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > SimpleStructBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn b (mut self , value : bool) -> Result < SimpleStructBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "b" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > SimpleStructBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn c (mut self , value : SimpleEnum) -> Result < SimpleStructBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "c" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "c" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > SimpleStructBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn c (mut self , value : SimpleEnum) -> Result < SimpleStructBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "c" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > SimpleStructBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn d (mut self , value : rs_matter_crate :: tlv :: OctetStr < '_ >) -> Result < SimpleStructBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "d" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "d" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > SimpleStructBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn d (mut self , value : rs_matter_crate :: tlv :: OctetStr < '_ >) -> Result < SimpleStructBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "d" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > SimpleStructBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn e (mut self , value : rs_matter_crate :: tlv :: Utf8Str < '_ >) -> Result < SimpleStructBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "e" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "e" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > SimpleStructBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn e (mut self , value : rs_matter_crate :: tlv :: Utf8Str < '_ >) -> Result < SimpleStructBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "e" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > SimpleStructBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn f (mut self , value : SimpleBitmap) -> Result < SimpleStructBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "f" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "f" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > SimpleStructBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn f (mut self , value : SimpleBitmap) -> Result < SimpleStructBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "f" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > SimpleStructBuilder < P , 6 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn g (mut self , value : f32) -> Result < SimpleStructBuilder < P , 7usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "g" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "g" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (6) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > SimpleStructBuilder < P , 6 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn g (mut self , value : f32) -> Result < SimpleStructBuilder < P , 7usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "g" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (6) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > SimpleStructBuilder < P , 7 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn h (mut self , value : f64) -> Result < SimpleStructBuilder < P , 8usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "h" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "h" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (7) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > SimpleStructBuilder < P , 7 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn h (mut self , value : f64) -> Result < SimpleStructBuilder < P , 8usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "h" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (7) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > SimpleStructBuilder < P , 8 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn i (mut self , value : Option < TestGlobalEnum >) -> Result < SimpleStructBuilder < P , 9usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "i" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "i" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (8) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > SimpleStructBuilder < P , 8 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn i (mut self , value : Option < TestGlobalEnum >) -> Result < SimpleStructBuilder < P , 9usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "i" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (8) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } impl < P > SimpleStructBuilder < P , 9usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for SimpleStructBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "SimpleStruct") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for SimpleStructBuilder < P , F > 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 , "SimpleStruct") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for SimpleStructBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for SimpleStructBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct SimpleStructArrayBuilder < P > (P) ; impl < P > SimpleStructArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < SimpleStructBuilder < SimpleStructArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (SimpleStructArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for SimpleStructArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "SimpleStruct[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for SimpleStructArrayBuilder < P > 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 , "SimpleStruct[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for SimpleStructArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for SimpleStructArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestFabricScopedBuilder < P , const F : usize = 1usize > (P) ; impl < P > TestFabricScopedBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestFabricScopedBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn fabric_sensitive_int_8_u (mut self , value : Option < u8 >) -> Result < TestFabricScopedBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricSensitiveInt8u" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricSensitiveInt8u" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestFabricScopedBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn fabric_sensitive_int_8_u (mut self , value : Option < u8 >) -> Result < TestFabricScopedBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricSensitiveInt8u" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestFabricScopedBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn optional_fabric_sensitive_int_8_u (mut self , value : Option < u8 >) -> Result < TestFabricScopedBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalFabricSensitiveInt8u" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalFabricSensitiveInt8u" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestFabricScopedBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn optional_fabric_sensitive_int_8_u (mut self , value : Option < u8 >) -> Result < TestFabricScopedBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalFabricSensitiveInt8u" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestFabricScopedBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_fabric_sensitive_int_8_u (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u8 > >) -> Result < TestFabricScopedBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableFabricSensitiveInt8u" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableFabricSensitiveInt8u" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestFabricScopedBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_fabric_sensitive_int_8_u (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u8 > >) -> Result < TestFabricScopedBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableFabricSensitiveInt8u" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestFabricScopedBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_fabric_sensitive_int_8_u (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u8 > >) -> Result < TestFabricScopedBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalFabricSensitiveInt8u" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalFabricSensitiveInt8u" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestFabricScopedBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_fabric_sensitive_int_8_u (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u8 > >) -> Result < TestFabricScopedBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalFabricSensitiveInt8u" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestFabricScopedBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn fabric_sensitive_char_string (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestFabricScopedBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricSensitiveCharString" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricSensitiveCharString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestFabricScopedBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn fabric_sensitive_char_string (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestFabricScopedBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricSensitiveCharString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } impl < P > TestFabricScopedBuilder < P , 6 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn fabric_sensitive_struct (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestFabricScopedBuilder < P , 7usize > , SimpleStructBuilder < TestFabricScopedBuilder < P , 7usize > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestFabricScopedBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (6) ,) } } impl < P > TestFabricScopedBuilder < P , 7 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn fabric_sensitive_int_8_u_list (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestFabricScopedBuilder < P , 254usize > , rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestFabricScopedBuilder < P , 254usize > , u8 > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestFabricScopedBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (7) ,) } } # [cfg (feature = "defmt")] impl < P > TestFabricScopedBuilder < P , 254 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn fabric_index (mut self , value : Option < rs_matter_crate :: im :: FabricIndex >) -> Result < TestFabricScopedBuilder < P , 255usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricIndex" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricIndex" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (254) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestFabricScopedBuilder < P , 254 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn fabric_index (mut self , value : Option < rs_matter_crate :: im :: FabricIndex >) -> Result < TestFabricScopedBuilder < P , 255usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricIndex" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (254) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } impl < P > TestFabricScopedBuilder < P , 255usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestFabricScopedBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestFabricScoped") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestFabricScopedBuilder < P , F > 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 , "TestFabricScoped") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestFabricScopedBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestFabricScopedBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestFabricScopedArrayBuilder < P > (P) ; impl < P > TestFabricScopedArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestFabricScopedBuilder < TestFabricScopedArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestFabricScopedArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestFabricScopedArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestFabricScoped[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestFabricScopedArrayBuilder < P > 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 , "TestFabricScoped[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestFabricScopedArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestFabricScopedArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct NullablesAndOptionalsStructBuilder < P , const F : usize = 0usize > (P) ; impl < P > NullablesAndOptionalsStructBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > NullablesAndOptionalsStructBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_int (mut self , value : rs_matter_crate :: tlv :: Nullable < u16 >) -> Result < NullablesAndOptionalsStructBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableInt" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > NullablesAndOptionalsStructBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_int (mut self , value : rs_matter_crate :: tlv :: Nullable < u16 >) -> Result < NullablesAndOptionalsStructBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > NullablesAndOptionalsStructBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn optional_int (mut self , value : Option < u16 >) -> Result < NullablesAndOptionalsStructBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalInt" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > NullablesAndOptionalsStructBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn optional_int (mut self , value : Option < u16 >) -> Result < NullablesAndOptionalsStructBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > NullablesAndOptionalsStructBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_int (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u16 > >) -> Result < NullablesAndOptionalsStructBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalInt" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > NullablesAndOptionalsStructBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_int (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u16 > >) -> Result < NullablesAndOptionalsStructBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > NullablesAndOptionalsStructBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_string (mut self , value : rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < NullablesAndOptionalsStructBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableString" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > NullablesAndOptionalsStructBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_string (mut self , value : rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < NullablesAndOptionalsStructBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > NullablesAndOptionalsStructBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn optional_string (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < NullablesAndOptionalsStructBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalString" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > NullablesAndOptionalsStructBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn optional_string (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < NullablesAndOptionalsStructBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > NullablesAndOptionalsStructBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_string (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > > >) -> Result < NullablesAndOptionalsStructBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalString" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > NullablesAndOptionalsStructBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_string (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > > >) -> Result < NullablesAndOptionalsStructBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } impl < P > NullablesAndOptionalsStructBuilder < P , 6 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_struct (self) -> Result < rs_matter_crate :: tlv :: NullableBuilder < NullablesAndOptionalsStructBuilder < P , 7usize > , SimpleStructBuilder < NullablesAndOptionalsStructBuilder < P , 7usize > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NullablesAndOptionalsStructBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (6) ,) } } impl < P > NullablesAndOptionalsStructBuilder < P , 7 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn optional_struct (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < NullablesAndOptionalsStructBuilder < P , 8usize > , SimpleStructBuilder < NullablesAndOptionalsStructBuilder < P , 8usize > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NullablesAndOptionalsStructBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (7) ,) } } impl < P > NullablesAndOptionalsStructBuilder < P , 8 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_optional_struct (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < NullablesAndOptionalsStructBuilder < P , 9usize > , rs_matter_crate :: tlv :: NullableBuilder < NullablesAndOptionalsStructBuilder < P , 9usize > , SimpleStructBuilder < NullablesAndOptionalsStructBuilder < P , 9usize > > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NullablesAndOptionalsStructBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (8) ,) } } impl < P > NullablesAndOptionalsStructBuilder < P , 9 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_list (self) -> Result < rs_matter_crate :: tlv :: NullableBuilder < NullablesAndOptionalsStructBuilder < P , 10usize > , rs_matter_crate :: tlv :: ToTLVArrayBuilder < NullablesAndOptionalsStructBuilder < P , 10usize > , SimpleEnum > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NullablesAndOptionalsStructBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (9) ,) } } impl < P > NullablesAndOptionalsStructBuilder < P , 10 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn optional_list (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < NullablesAndOptionalsStructBuilder < P , 11usize > , rs_matter_crate :: tlv :: ToTLVArrayBuilder < NullablesAndOptionalsStructBuilder < P , 11usize > , SimpleEnum > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NullablesAndOptionalsStructBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (10) ,) } } impl < P > NullablesAndOptionalsStructBuilder < P , 11 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_optional_list (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < NullablesAndOptionalsStructBuilder < P , 12usize > , rs_matter_crate :: tlv :: NullableBuilder < NullablesAndOptionalsStructBuilder < P , 12usize > , rs_matter_crate :: tlv :: ToTLVArrayBuilder < NullablesAndOptionalsStructBuilder < P , 12usize > , SimpleEnum > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NullablesAndOptionalsStructBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (11) ,) } } impl < P > NullablesAndOptionalsStructBuilder < P , 12usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for NullablesAndOptionalsStructBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "NullablesAndOptionalsStruct") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for NullablesAndOptionalsStructBuilder < P , F > 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 , "NullablesAndOptionalsStruct") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for NullablesAndOptionalsStructBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for NullablesAndOptionalsStructBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct NullablesAndOptionalsStructArrayBuilder < P > (P) ; impl < P > NullablesAndOptionalsStructArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < NullablesAndOptionalsStructBuilder < NullablesAndOptionalsStructArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NullablesAndOptionalsStructArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for NullablesAndOptionalsStructArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "NullablesAndOptionalsStruct[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for NullablesAndOptionalsStructArrayBuilder < P > 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 , "NullablesAndOptionalsStruct[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for NullablesAndOptionalsStructArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for NullablesAndOptionalsStructArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct NestedStructBuilder < P , const F : usize = 0usize > (P) ; impl < P > NestedStructBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > NestedStructBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn a (mut self , value : u8) -> Result < NestedStructBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "a" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "a" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (NestedStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > NestedStructBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn a (mut self , value : u8) -> Result < NestedStructBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "a" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (NestedStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > NestedStructBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn b (mut self , value : bool) -> Result < NestedStructBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "b" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "b" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (NestedStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > NestedStructBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn b (mut self , value : bool) -> Result < NestedStructBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "b" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (NestedStructBuilder (self . 0)) } } impl < P > NestedStructBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn c (self) -> Result < SimpleStructBuilder < NestedStructBuilder < P , 3usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NestedStructBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (2) ,) } } impl < P > NestedStructBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn d (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < NestedStructBuilder < P , 4usize > , TestGlobalStructBuilder < NestedStructBuilder < P , 4usize > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NestedStructBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (3) ,) } } impl < P > NestedStructBuilder < P , 4usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for NestedStructBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "NestedStruct") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for NestedStructBuilder < P , F > 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 , "NestedStruct") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for NestedStructBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for NestedStructBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct NestedStructArrayBuilder < P > (P) ; impl < P > NestedStructArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < NestedStructBuilder < NestedStructArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NestedStructArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for NestedStructArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "NestedStruct[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for NestedStructArrayBuilder < P > 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 , "NestedStruct[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for NestedStructArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for NestedStructArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct NestedStructListBuilder < P , const F : usize = 0usize > (P) ; impl < P > NestedStructListBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > NestedStructListBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn a (mut self , value : u8) -> Result < NestedStructListBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "a" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "a" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (NestedStructListBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > NestedStructListBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn a (mut self , value : u8) -> Result < NestedStructListBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "a" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (NestedStructListBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > NestedStructListBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn b (mut self , value : bool) -> Result < NestedStructListBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "b" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "b" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (NestedStructListBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > NestedStructListBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn b (mut self , value : bool) -> Result < NestedStructListBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "b" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (NestedStructListBuilder (self . 0)) } } impl < P > NestedStructListBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn c (self) -> Result < SimpleStructBuilder < NestedStructListBuilder < P , 3usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NestedStructListBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (2) ,) } } impl < P > NestedStructListBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn d (self) -> Result < SimpleStructArrayBuilder < NestedStructListBuilder < P , 4usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NestedStructListBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (3) ,) } } impl < P > NestedStructListBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn e (self) -> Result < rs_matter_crate :: tlv :: ToTLVArrayBuilder < NestedStructListBuilder < P , 5usize > , u32 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NestedStructListBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (4) ,) } } impl < P > NestedStructListBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn f (self) -> Result < rs_matter_crate :: tlv :: OctetsArrayBuilder < NestedStructListBuilder < P , 6usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NestedStructListBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (5) ,) } } impl < P > NestedStructListBuilder < P , 6 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn g (self) -> Result < rs_matter_crate :: tlv :: ToTLVArrayBuilder < NestedStructListBuilder < P , 7usize > , u8 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NestedStructListBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (6) ,) } } impl < P > NestedStructListBuilder < P , 7usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for NestedStructListBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "NestedStructList") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for NestedStructListBuilder < P , F > 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 , "NestedStructList") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for NestedStructListBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for NestedStructListBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct NestedStructListArrayBuilder < P > (P) ; impl < P > NestedStructListArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < NestedStructListBuilder < NestedStructListArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NestedStructListArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for NestedStructListArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "NestedStructList[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for NestedStructListArrayBuilder < P > 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 , "NestedStructList[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for NestedStructListArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for NestedStructListArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct DoubleNestedStructListBuilder < P , const F : usize = 0usize > (P) ; impl < P > DoubleNestedStructListBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > DoubleNestedStructListBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn a (self) -> Result < NestedStructListArrayBuilder < DoubleNestedStructListBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (DoubleNestedStructListBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > DoubleNestedStructListBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for DoubleNestedStructListBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "DoubleNestedStructList") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for DoubleNestedStructListBuilder < P , F > 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 , "DoubleNestedStructList") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for DoubleNestedStructListBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for DoubleNestedStructListBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct DoubleNestedStructListArrayBuilder < P > (P) ; impl < P > DoubleNestedStructListArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < DoubleNestedStructListBuilder < DoubleNestedStructListArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (DoubleNestedStructListArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for DoubleNestedStructListArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "DoubleNestedStructList[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for DoubleNestedStructListArrayBuilder < P > 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 , "DoubleNestedStructList[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for DoubleNestedStructListArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for DoubleNestedStructListArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListStructOctetBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestListStructOctetBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestListStructOctetBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn member_1 (mut self , value : u64) -> Result < TestListStructOctetBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "member1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "member1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestListStructOctetBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestListStructOctetBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn member_1 (mut self , value : u64) -> Result < TestListStructOctetBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "member1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestListStructOctetBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestListStructOctetBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn member_2 (mut self , value : rs_matter_crate :: tlv :: OctetStr < '_ >) -> Result < TestListStructOctetBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "member2" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "member2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestListStructOctetBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestListStructOctetBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn member_2 (mut self , value : rs_matter_crate :: tlv :: OctetStr < '_ >) -> Result < TestListStructOctetBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "member2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestListStructOctetBuilder (self . 0)) } } impl < P > TestListStructOctetBuilder < P , 2usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestListStructOctetBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListStructOctet") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestListStructOctetBuilder < P , F > 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 , "TestListStructOctet") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestListStructOctetBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListStructOctetBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListStructOctetArrayBuilder < P > (P) ; impl < P > TestListStructOctetArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestListStructOctetBuilder < TestListStructOctetArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestListStructOctetArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestListStructOctetArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListStructOctet[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestListStructOctetArrayBuilder < P > 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 , "TestListStructOctet[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestListStructOctetArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListStructOctetArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestSpecificResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestSpecificResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestSpecificResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn return_value (mut self , value : u8) -> Result < TestSpecificResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "returnValue" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "returnValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestSpecificResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestSpecificResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn return_value (mut self , value : u8) -> Result < TestSpecificResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "returnValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestSpecificResponseBuilder (self . 0)) } } impl < P > TestSpecificResponseBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestSpecificResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestSpecificResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestSpecificResponseBuilder < P , F > 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 , "TestSpecificResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestSpecificResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestSpecificResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestSpecificResponseArrayBuilder < P > (P) ; impl < P > TestSpecificResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestSpecificResponseBuilder < TestSpecificResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestSpecificResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestSpecificResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestSpecificResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestSpecificResponseArrayBuilder < P > 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 , "TestSpecificResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestSpecificResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestSpecificResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestAddArgumentsResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestAddArgumentsResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestAddArgumentsResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn return_value (mut self , value : u8) -> Result < TestAddArgumentsResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "returnValue" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "returnValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestAddArgumentsResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestAddArgumentsResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn return_value (mut self , value : u8) -> Result < TestAddArgumentsResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "returnValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestAddArgumentsResponseBuilder (self . 0)) } } impl < P > TestAddArgumentsResponseBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestAddArgumentsResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestAddArgumentsResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestAddArgumentsResponseBuilder < P , F > 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 , "TestAddArgumentsResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestAddArgumentsResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestAddArgumentsResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestAddArgumentsResponseArrayBuilder < P > (P) ; impl < P > TestAddArgumentsResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestAddArgumentsResponseBuilder < TestAddArgumentsResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestAddArgumentsResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestAddArgumentsResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestAddArgumentsResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestAddArgumentsResponseArrayBuilder < P > 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 , "TestAddArgumentsResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestAddArgumentsResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestAddArgumentsResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestSimpleArgumentResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestSimpleArgumentResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestSimpleArgumentResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn return_value (mut self , value : bool) -> Result < TestSimpleArgumentResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "returnValue" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "returnValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestSimpleArgumentResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestSimpleArgumentResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn return_value (mut self , value : bool) -> Result < TestSimpleArgumentResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "returnValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestSimpleArgumentResponseBuilder (self . 0)) } } impl < P > TestSimpleArgumentResponseBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestSimpleArgumentResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestSimpleArgumentResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestSimpleArgumentResponseBuilder < P , F > 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 , "TestSimpleArgumentResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestSimpleArgumentResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestSimpleArgumentResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestSimpleArgumentResponseArrayBuilder < P > (P) ; impl < P > TestSimpleArgumentResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestSimpleArgumentResponseBuilder < TestSimpleArgumentResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestSimpleArgumentResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestSimpleArgumentResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestSimpleArgumentResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestSimpleArgumentResponseArrayBuilder < P > 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 , "TestSimpleArgumentResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestSimpleArgumentResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestSimpleArgumentResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestStructArrayArgumentResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestStructArrayArgumentResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > TestStructArrayArgumentResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < NestedStructListArrayBuilder < TestStructArrayArgumentResponseBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArrayArgumentResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > TestStructArrayArgumentResponseBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_2 (self) -> Result < SimpleStructArrayBuilder < TestStructArrayArgumentResponseBuilder < P , 2usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArrayArgumentResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (1) ,) } } impl < P > TestStructArrayArgumentResponseBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_3 (self) -> Result < rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestStructArrayArgumentResponseBuilder < P , 3usize > , SimpleEnum > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArrayArgumentResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (2) ,) } } impl < P > TestStructArrayArgumentResponseBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_4 (self) -> Result < rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestStructArrayArgumentResponseBuilder < P , 4usize > , bool > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArrayArgumentResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (3) ,) } } # [cfg (feature = "defmt")] impl < P > TestStructArrayArgumentResponseBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_5 (mut self , value : SimpleEnum) -> Result < TestStructArrayArgumentResponseBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg5" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg5" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (TestStructArrayArgumentResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestStructArrayArgumentResponseBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_5 (mut self , value : SimpleEnum) -> Result < TestStructArrayArgumentResponseBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg5" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (TestStructArrayArgumentResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestStructArrayArgumentResponseBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_6 (mut self , value : bool) -> Result < TestStructArrayArgumentResponseBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg6" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg6" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (TestStructArrayArgumentResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestStructArrayArgumentResponseBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_6 (mut self , value : bool) -> Result < TestStructArrayArgumentResponseBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg6" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (TestStructArrayArgumentResponseBuilder (self . 0)) } } impl < P > TestStructArrayArgumentResponseBuilder < P , 6usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestStructArrayArgumentResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestStructArrayArgumentResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestStructArrayArgumentResponseBuilder < P , F > 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 , "TestStructArrayArgumentResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestStructArrayArgumentResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestStructArrayArgumentResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestStructArrayArgumentResponseArrayBuilder < P > (P) ; impl < P > TestStructArrayArgumentResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestStructArrayArgumentResponseBuilder < TestStructArrayArgumentResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArrayArgumentResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestStructArrayArgumentResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestStructArrayArgumentResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestStructArrayArgumentResponseArrayBuilder < P > 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 , "TestStructArrayArgumentResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestStructArrayArgumentResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestStructArrayArgumentResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestAddArgumentsRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestAddArgumentsRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestAddArgumentsRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : u8) -> Result < TestAddArgumentsRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestAddArgumentsRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestAddArgumentsRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : u8) -> Result < TestAddArgumentsRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestAddArgumentsRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestAddArgumentsRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_2 (mut self , value : u8) -> Result < TestAddArgumentsRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestAddArgumentsRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestAddArgumentsRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_2 (mut self , value : u8) -> Result < TestAddArgumentsRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestAddArgumentsRequestBuilder (self . 0)) } } impl < P > TestAddArgumentsRequestBuilder < P , 2usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestAddArgumentsRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestAddArgumentsRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestAddArgumentsRequestBuilder < P , F > 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 , "TestAddArgumentsRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestAddArgumentsRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestAddArgumentsRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestAddArgumentsRequestArrayBuilder < P > (P) ; impl < P > TestAddArgumentsRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestAddArgumentsRequestBuilder < TestAddArgumentsRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestAddArgumentsRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestAddArgumentsRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestAddArgumentsRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestAddArgumentsRequestArrayBuilder < P > 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 , "TestAddArgumentsRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestAddArgumentsRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestAddArgumentsRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListInt8UReverseResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestListInt8UReverseResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > TestListInt8UReverseResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestListInt8UReverseResponseBuilder < P , 1usize > , u8 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestListInt8UReverseResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > TestListInt8UReverseResponseBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestListInt8UReverseResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListInt8UReverseResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestListInt8UReverseResponseBuilder < P , F > 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 , "TestListInt8UReverseResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestListInt8UReverseResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListInt8UReverseResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListInt8UReverseResponseArrayBuilder < P > (P) ; impl < P > TestListInt8UReverseResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestListInt8UReverseResponseBuilder < TestListInt8UReverseResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestListInt8UReverseResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestListInt8UReverseResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListInt8UReverseResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestListInt8UReverseResponseArrayBuilder < P > 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 , "TestListInt8UReverseResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestListInt8UReverseResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListInt8UReverseResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestSimpleArgumentRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestSimpleArgumentRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestSimpleArgumentRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : bool) -> Result < TestSimpleArgumentRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestSimpleArgumentRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestSimpleArgumentRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : bool) -> Result < TestSimpleArgumentRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestSimpleArgumentRequestRequestBuilder (self . 0)) } } impl < P > TestSimpleArgumentRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestSimpleArgumentRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestSimpleArgumentRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestSimpleArgumentRequestRequestBuilder < P , F > 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 , "TestSimpleArgumentRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestSimpleArgumentRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestSimpleArgumentRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestSimpleArgumentRequestRequestArrayBuilder < P > (P) ; impl < P > TestSimpleArgumentRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestSimpleArgumentRequestRequestBuilder < TestSimpleArgumentRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestSimpleArgumentRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestSimpleArgumentRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestSimpleArgumentRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestSimpleArgumentRequestRequestArrayBuilder < P > 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 , "TestSimpleArgumentRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestSimpleArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestSimpleArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEnumsResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestEnumsResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestEnumsResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : u16) -> Result < TestEnumsResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEnumsResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEnumsResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : u16) -> Result < TestEnumsResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEnumsResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestEnumsResponseBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_2 (mut self , value : SimpleEnum) -> Result < TestEnumsResponseBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestEnumsResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEnumsResponseBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_2 (mut self , value : SimpleEnum) -> Result < TestEnumsResponseBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestEnumsResponseBuilder (self . 0)) } } impl < P > TestEnumsResponseBuilder < P , 2usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestEnumsResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEnumsResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestEnumsResponseBuilder < P , F > 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 , "TestEnumsResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestEnumsResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEnumsResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEnumsResponseArrayBuilder < P > (P) ; impl < P > TestEnumsResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestEnumsResponseBuilder < TestEnumsResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestEnumsResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestEnumsResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEnumsResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestEnumsResponseArrayBuilder < P > 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 , "TestEnumsResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestEnumsResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEnumsResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestStructArrayArgumentRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestStructArrayArgumentRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > TestStructArrayArgumentRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < NestedStructListArrayBuilder < TestStructArrayArgumentRequestRequestBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArrayArgumentRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > TestStructArrayArgumentRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_2 (self) -> Result < SimpleStructArrayBuilder < TestStructArrayArgumentRequestRequestBuilder < P , 2usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArrayArgumentRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (1) ,) } } impl < P > TestStructArrayArgumentRequestRequestBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_3 (self) -> Result < rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestStructArrayArgumentRequestRequestBuilder < P , 3usize > , SimpleEnum > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArrayArgumentRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (2) ,) } } impl < P > TestStructArrayArgumentRequestRequestBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_4 (self) -> Result < rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestStructArrayArgumentRequestRequestBuilder < P , 4usize > , bool > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArrayArgumentRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (3) ,) } } # [cfg (feature = "defmt")] impl < P > TestStructArrayArgumentRequestRequestBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_5 (mut self , value : SimpleEnum) -> Result < TestStructArrayArgumentRequestRequestBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg5" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg5" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (TestStructArrayArgumentRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestStructArrayArgumentRequestRequestBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_5 (mut self , value : SimpleEnum) -> Result < TestStructArrayArgumentRequestRequestBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg5" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (TestStructArrayArgumentRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestStructArrayArgumentRequestRequestBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_6 (mut self , value : bool) -> Result < TestStructArrayArgumentRequestRequestBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg6" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg6" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (TestStructArrayArgumentRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestStructArrayArgumentRequestRequestBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_6 (mut self , value : bool) -> Result < TestStructArrayArgumentRequestRequestBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg6" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (TestStructArrayArgumentRequestRequestBuilder (self . 0)) } } impl < P > TestStructArrayArgumentRequestRequestBuilder < P , 6usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestStructArrayArgumentRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestStructArrayArgumentRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestStructArrayArgumentRequestRequestBuilder < P , F > 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 , "TestStructArrayArgumentRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestStructArrayArgumentRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestStructArrayArgumentRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestStructArrayArgumentRequestRequestArrayBuilder < P > (P) ; impl < P > TestStructArrayArgumentRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestStructArrayArgumentRequestRequestBuilder < TestStructArrayArgumentRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArrayArgumentRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestStructArrayArgumentRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestStructArrayArgumentRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestStructArrayArgumentRequestRequestArrayBuilder < P > 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 , "TestStructArrayArgumentRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestStructArrayArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestStructArrayArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestNullableOptionalResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestNullableOptionalResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestNullableOptionalResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn was_present (mut self , value : bool) -> Result < TestNullableOptionalResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "wasPresent" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "wasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestNullableOptionalResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn was_present (mut self , value : bool) -> Result < TestNullableOptionalResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "wasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestNullableOptionalResponseBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn was_null (mut self , value : Option < bool >) -> Result < TestNullableOptionalResponseBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "wasNull" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "wasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestNullableOptionalResponseBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn was_null (mut self , value : Option < bool >) -> Result < TestNullableOptionalResponseBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "wasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestNullableOptionalResponseBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn value (mut self , value : Option < u8 >) -> Result < TestNullableOptionalResponseBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestNullableOptionalResponseBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn value (mut self , value : Option < u8 >) -> Result < TestNullableOptionalResponseBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestNullableOptionalResponseBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn original_value (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u8 > >) -> Result < TestNullableOptionalResponseBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "originalValue" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "originalValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (TestNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestNullableOptionalResponseBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn original_value (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u8 > >) -> Result < TestNullableOptionalResponseBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "originalValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (TestNullableOptionalResponseBuilder (self . 0)) } } impl < P > TestNullableOptionalResponseBuilder < P , 4usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestNullableOptionalResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestNullableOptionalResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestNullableOptionalResponseBuilder < P , F > 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 , "TestNullableOptionalResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestNullableOptionalResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestNullableOptionalResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestNullableOptionalResponseArrayBuilder < P > (P) ; impl < P > TestNullableOptionalResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestNullableOptionalResponseBuilder < TestNullableOptionalResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestNullableOptionalResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestNullableOptionalResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestNullableOptionalResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestNullableOptionalResponseArrayBuilder < P > 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 , "TestNullableOptionalResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestNullableOptionalResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestNullableOptionalResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestStructArgumentRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestStructArgumentRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > TestStructArgumentRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < SimpleStructBuilder < TestStructArgumentRequestRequestBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArgumentRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > TestStructArgumentRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestStructArgumentRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestStructArgumentRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestStructArgumentRequestRequestBuilder < P , F > 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 , "TestStructArgumentRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestStructArgumentRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestStructArgumentRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestStructArgumentRequestRequestArrayBuilder < P > (P) ; impl < P > TestStructArgumentRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestStructArgumentRequestRequestBuilder < TestStructArgumentRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArgumentRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestStructArgumentRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestStructArgumentRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestStructArgumentRequestRequestArrayBuilder < P > 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 , "TestStructArgumentRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestStructArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestStructArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestComplexNullableOptionalResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestComplexNullableOptionalResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_int_was_null (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableIntWasNull" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableIntWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_int_was_null (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableIntWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_int_value (mut self , value : Option < u16 >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableIntValue" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableIntValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_int_value (mut self , value : Option < u16 >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableIntValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn optional_int_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalIntWasPresent" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalIntWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn optional_int_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalIntWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn optional_int_value (mut self , value : Option < u16 >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalIntValue" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalIntValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn optional_int_value (mut self , value : Option < u16 >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalIntValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_int_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalIntWasPresent" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalIntWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_int_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalIntWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_int_was_null (mut self , value : Option < bool >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalIntWasNull" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalIntWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_int_was_null (mut self , value : Option < bool >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalIntWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 6 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_int_value (mut self , value : Option < u16 >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 7usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalIntValue" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalIntValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (6) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 6 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_int_value (mut self , value : Option < u16 >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 7usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalIntValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (6) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 7 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_string_was_null (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 8usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableStringWasNull" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableStringWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (7) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 7 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_string_was_null (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 8usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableStringWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (7) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 8 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_string_value (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 9usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableStringValue" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableStringValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (8) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 8 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_string_value (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 9usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableStringValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (8) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 9 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn optional_string_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 10usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalStringWasPresent" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalStringWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (9) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 9 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn optional_string_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 10usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalStringWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (9) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 10 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn optional_string_value (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 11usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalStringValue" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalStringValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (10) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 10 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn optional_string_value (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 11usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalStringValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (10) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 11 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_string_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 12usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStringWasPresent" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStringWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (11) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 11 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_string_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 12usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStringWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (11) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 12 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_string_was_null (mut self , value : Option < bool >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 13usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStringWasNull" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStringWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (12) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 12 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_string_was_null (mut self , value : Option < bool >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 13usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStringWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (12) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 13 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_string_value (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 14usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStringValue" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStringValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (13) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 13 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_string_value (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 14usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStringValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (13) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 14 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_struct_was_null (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 15usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableStructWasNull" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableStructWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (14) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 14 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_struct_was_null (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 15usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableStructWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (14) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } impl < P > TestComplexNullableOptionalResponseBuilder < P , 15 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_struct_value (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestComplexNullableOptionalResponseBuilder < P , 16usize > , SimpleStructBuilder < TestComplexNullableOptionalResponseBuilder < P , 16usize > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (15) ,) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 16 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn optional_struct_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 17usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalStructWasPresent" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalStructWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (16) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 16 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn optional_struct_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 17usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalStructWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (16) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } impl < P > TestComplexNullableOptionalResponseBuilder < P , 17 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn optional_struct_value (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestComplexNullableOptionalResponseBuilder < P , 18usize > , SimpleStructBuilder < TestComplexNullableOptionalResponseBuilder < P , 18usize > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (17) ,) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 18 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_struct_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 19usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStructWasPresent" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStructWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (18) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 18 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_struct_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 19usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStructWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (18) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 19 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_struct_was_null (mut self , value : Option < bool >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 20usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStructWasNull" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStructWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (19) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 19 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_struct_was_null (mut self , value : Option < bool >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 20usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStructWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (19) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } impl < P > TestComplexNullableOptionalResponseBuilder < P , 20 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_optional_struct_value (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestComplexNullableOptionalResponseBuilder < P , 21usize > , SimpleStructBuilder < TestComplexNullableOptionalResponseBuilder < P , 21usize > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (20) ,) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 21 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_list_was_null (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 22usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableListWasNull" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableListWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (21) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 21 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_list_was_null (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 22usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableListWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (21) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } impl < P > TestComplexNullableOptionalResponseBuilder < P , 22 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_list_value (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestComplexNullableOptionalResponseBuilder < P , 23usize > , rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestComplexNullableOptionalResponseBuilder < P , 23usize > , SimpleEnum > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (22) ,) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 23 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn optional_list_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 24usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalListWasPresent" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalListWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (23) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 23 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn optional_list_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 24usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalListWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (23) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } impl < P > TestComplexNullableOptionalResponseBuilder < P , 24 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn optional_list_value (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestComplexNullableOptionalResponseBuilder < P , 25usize > , rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestComplexNullableOptionalResponseBuilder < P , 25usize > , SimpleEnum > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (24) ,) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 25 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_list_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 26usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalListWasPresent" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalListWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (25) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 25 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_list_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 26usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalListWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (25) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 26 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_list_was_null (mut self , value : Option < bool >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 27usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalListWasNull" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalListWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (26) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 26 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_list_was_null (mut self , value : Option < bool >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 27usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalListWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (26) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } impl < P > TestComplexNullableOptionalResponseBuilder < P , 27 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_optional_list_value (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestComplexNullableOptionalResponseBuilder < P , 28usize > , rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestComplexNullableOptionalResponseBuilder < P , 28usize > , SimpleEnum > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (27) ,) } } impl < P > TestComplexNullableOptionalResponseBuilder < P , 28usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestComplexNullableOptionalResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestComplexNullableOptionalResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestComplexNullableOptionalResponseBuilder < P , F > 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 , "TestComplexNullableOptionalResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestComplexNullableOptionalResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestComplexNullableOptionalResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestComplexNullableOptionalResponseArrayBuilder < P > (P) ; impl < P > TestComplexNullableOptionalResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestComplexNullableOptionalResponseBuilder < TestComplexNullableOptionalResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestComplexNullableOptionalResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestComplexNullableOptionalResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestComplexNullableOptionalResponseArrayBuilder < P > 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 , "TestComplexNullableOptionalResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestComplexNullableOptionalResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestComplexNullableOptionalResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestNestedStructArgumentRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestNestedStructArgumentRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > TestNestedStructArgumentRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < NestedStructBuilder < TestNestedStructArgumentRequestRequestBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestNestedStructArgumentRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > TestNestedStructArgumentRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestNestedStructArgumentRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestNestedStructArgumentRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestNestedStructArgumentRequestRequestBuilder < P , F > 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 , "TestNestedStructArgumentRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestNestedStructArgumentRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestNestedStructArgumentRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestNestedStructArgumentRequestRequestArrayBuilder < P > (P) ; impl < P > TestNestedStructArgumentRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestNestedStructArgumentRequestRequestBuilder < TestNestedStructArgumentRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestNestedStructArgumentRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestNestedStructArgumentRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestNestedStructArgumentRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestNestedStructArgumentRequestRequestArrayBuilder < P > 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 , "TestNestedStructArgumentRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestNestedStructArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestNestedStructArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct BooleanResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > BooleanResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > BooleanResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn value (mut self , value : bool) -> Result < BooleanResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (BooleanResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > BooleanResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn value (mut self , value : bool) -> Result < BooleanResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (BooleanResponseBuilder (self . 0)) } } impl < P > BooleanResponseBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for BooleanResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "BooleanResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for BooleanResponseBuilder < P , F > 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 , "BooleanResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for BooleanResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for BooleanResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct BooleanResponseArrayBuilder < P > (P) ; impl < P > BooleanResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < BooleanResponseBuilder < BooleanResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (BooleanResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for BooleanResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "BooleanResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for BooleanResponseArrayBuilder < P > 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 , "BooleanResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for BooleanResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for BooleanResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListStructArgumentRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestListStructArgumentRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > TestListStructArgumentRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < SimpleStructArrayBuilder < TestListStructArgumentRequestRequestBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestListStructArgumentRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > TestListStructArgumentRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestListStructArgumentRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListStructArgumentRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestListStructArgumentRequestRequestBuilder < P , F > 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 , "TestListStructArgumentRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestListStructArgumentRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListStructArgumentRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListStructArgumentRequestRequestArrayBuilder < P > (P) ; impl < P > TestListStructArgumentRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestListStructArgumentRequestRequestBuilder < TestListStructArgumentRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestListStructArgumentRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestListStructArgumentRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListStructArgumentRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestListStructArgumentRequestRequestArrayBuilder < P > 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 , "TestListStructArgumentRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestListStructArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListStructArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct SimpleStructResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > SimpleStructResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > SimpleStructResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < SimpleStructBuilder < SimpleStructResponseBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (SimpleStructResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > SimpleStructResponseBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for SimpleStructResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "SimpleStructResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for SimpleStructResponseBuilder < P , F > 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 , "SimpleStructResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for SimpleStructResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for SimpleStructResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct SimpleStructResponseArrayBuilder < P > (P) ; impl < P > SimpleStructResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < SimpleStructResponseBuilder < SimpleStructResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (SimpleStructResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for SimpleStructResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "SimpleStructResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for SimpleStructResponseArrayBuilder < P > 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 , "SimpleStructResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for SimpleStructResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for SimpleStructResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListInt8UArgumentRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestListInt8UArgumentRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > TestListInt8UArgumentRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestListInt8UArgumentRequestRequestBuilder < P , 1usize > , u8 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestListInt8UArgumentRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > TestListInt8UArgumentRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestListInt8UArgumentRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListInt8UArgumentRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestListInt8UArgumentRequestRequestBuilder < P , F > 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 , "TestListInt8UArgumentRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestListInt8UArgumentRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListInt8UArgumentRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListInt8UArgumentRequestRequestArrayBuilder < P > (P) ; impl < P > TestListInt8UArgumentRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestListInt8UArgumentRequestRequestBuilder < TestListInt8UArgumentRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestListInt8UArgumentRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestListInt8UArgumentRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListInt8UArgumentRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestListInt8UArgumentRequestRequestArrayBuilder < P > 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 , "TestListInt8UArgumentRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestListInt8UArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListInt8UArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEmitTestEventResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestEmitTestEventResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestEmitTestEventResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn value (mut self , value : u64) -> Result < TestEmitTestEventResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEmitTestEventResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEmitTestEventResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn value (mut self , value : u64) -> Result < TestEmitTestEventResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEmitTestEventResponseBuilder (self . 0)) } } impl < P > TestEmitTestEventResponseBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestEmitTestEventResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEmitTestEventResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestEventResponseBuilder < P , F > 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 , "TestEmitTestEventResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestEmitTestEventResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEmitTestEventResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEmitTestEventResponseArrayBuilder < P > (P) ; impl < P > TestEmitTestEventResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestEmitTestEventResponseBuilder < TestEmitTestEventResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestEmitTestEventResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestEmitTestEventResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEmitTestEventResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestEventResponseArrayBuilder < P > 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 , "TestEmitTestEventResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestEmitTestEventResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEmitTestEventResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestNestedStructListArgumentRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestNestedStructListArgumentRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > TestNestedStructListArgumentRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < NestedStructListBuilder < TestNestedStructListArgumentRequestRequestBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestNestedStructListArgumentRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > TestNestedStructListArgumentRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestNestedStructListArgumentRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestNestedStructListArgumentRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestNestedStructListArgumentRequestRequestBuilder < P , F > 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 , "TestNestedStructListArgumentRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestNestedStructListArgumentRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestNestedStructListArgumentRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestNestedStructListArgumentRequestRequestArrayBuilder < P > (P) ; impl < P > TestNestedStructListArgumentRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestNestedStructListArgumentRequestRequestBuilder < TestNestedStructListArgumentRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestNestedStructListArgumentRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestNestedStructListArgumentRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestNestedStructListArgumentRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestNestedStructListArgumentRequestRequestArrayBuilder < P > 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 , "TestNestedStructListArgumentRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestNestedStructListArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestNestedStructListArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEmitTestFabricScopedEventResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestEmitTestFabricScopedEventResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestEmitTestFabricScopedEventResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn value (mut self , value : u64) -> Result < TestEmitTestFabricScopedEventResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEmitTestFabricScopedEventResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEmitTestFabricScopedEventResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn value (mut self , value : u64) -> Result < TestEmitTestFabricScopedEventResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEmitTestFabricScopedEventResponseBuilder (self . 0)) } } impl < P > TestEmitTestFabricScopedEventResponseBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestEmitTestFabricScopedEventResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEmitTestFabricScopedEventResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestFabricScopedEventResponseBuilder < P , F > 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 , "TestEmitTestFabricScopedEventResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestEmitTestFabricScopedEventResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEmitTestFabricScopedEventResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEmitTestFabricScopedEventResponseArrayBuilder < P > (P) ; impl < P > TestEmitTestFabricScopedEventResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestEmitTestFabricScopedEventResponseBuilder < TestEmitTestFabricScopedEventResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestEmitTestFabricScopedEventResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestEmitTestFabricScopedEventResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEmitTestFabricScopedEventResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestFabricScopedEventResponseArrayBuilder < P > 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 , "TestEmitTestFabricScopedEventResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestEmitTestFabricScopedEventResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEmitTestFabricScopedEventResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListNestedStructListArgumentRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestListNestedStructListArgumentRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > TestListNestedStructListArgumentRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < NestedStructListArrayBuilder < TestListNestedStructListArgumentRequestRequestBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestListNestedStructListArgumentRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > TestListNestedStructListArgumentRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestListNestedStructListArgumentRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListNestedStructListArgumentRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestListNestedStructListArgumentRequestRequestBuilder < P , F > 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 , "TestListNestedStructListArgumentRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestListNestedStructListArgumentRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListNestedStructListArgumentRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListNestedStructListArgumentRequestRequestArrayBuilder < P > (P) ; impl < P > TestListNestedStructListArgumentRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestListNestedStructListArgumentRequestRequestBuilder < TestListNestedStructListArgumentRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestListNestedStructListArgumentRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestListNestedStructListArgumentRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListNestedStructListArgumentRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestListNestedStructListArgumentRequestRequestArrayBuilder < P > 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 , "TestListNestedStructListArgumentRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestListNestedStructListArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListNestedStructListArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestBatchHelperResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestBatchHelperResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestBatchHelperResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn buffer (mut self , value : rs_matter_crate :: tlv :: OctetStr < '_ >) -> Result < TestBatchHelperResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "buffer" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "buffer" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestBatchHelperResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestBatchHelperResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn buffer (mut self , value : rs_matter_crate :: tlv :: OctetStr < '_ >) -> Result < TestBatchHelperResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "buffer" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestBatchHelperResponseBuilder (self . 0)) } } impl < P > TestBatchHelperResponseBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestBatchHelperResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestBatchHelperResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestBatchHelperResponseBuilder < P , F > 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 , "TestBatchHelperResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestBatchHelperResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestBatchHelperResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestBatchHelperResponseArrayBuilder < P > (P) ; impl < P > TestBatchHelperResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestBatchHelperResponseBuilder < TestBatchHelperResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestBatchHelperResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestBatchHelperResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestBatchHelperResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestBatchHelperResponseArrayBuilder < P > 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 , "TestBatchHelperResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestBatchHelperResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestBatchHelperResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListInt8UReverseRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestListInt8UReverseRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > TestListInt8UReverseRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestListInt8UReverseRequestRequestBuilder < P , 1usize > , u8 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestListInt8UReverseRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > TestListInt8UReverseRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestListInt8UReverseRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListInt8UReverseRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestListInt8UReverseRequestRequestBuilder < P , F > 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 , "TestListInt8UReverseRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestListInt8UReverseRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListInt8UReverseRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListInt8UReverseRequestRequestArrayBuilder < P > (P) ; impl < P > TestListInt8UReverseRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestListInt8UReverseRequestRequestBuilder < TestListInt8UReverseRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestListInt8UReverseRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestListInt8UReverseRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListInt8UReverseRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestListInt8UReverseRequestRequestArrayBuilder < P > 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 , "TestListInt8UReverseRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestListInt8UReverseRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListInt8UReverseRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct StringEchoResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > StringEchoResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > StringEchoResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn payload (mut self , value : rs_matter_crate :: tlv :: OctetStr < '_ >) -> Result < StringEchoResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "payload" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "payload" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (StringEchoResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > StringEchoResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn payload (mut self , value : rs_matter_crate :: tlv :: OctetStr < '_ >) -> Result < StringEchoResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "payload" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (StringEchoResponseBuilder (self . 0)) } } impl < P > StringEchoResponseBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for StringEchoResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "StringEchoResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for StringEchoResponseBuilder < P , F > 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 , "StringEchoResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for StringEchoResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for StringEchoResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct StringEchoResponseArrayBuilder < P > (P) ; impl < P > StringEchoResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < StringEchoResponseBuilder < StringEchoResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (StringEchoResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for StringEchoResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "StringEchoResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for StringEchoResponseArrayBuilder < P > 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 , "StringEchoResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for StringEchoResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for StringEchoResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEnumsRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestEnumsRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestEnumsRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : u16) -> Result < TestEnumsRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEnumsRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEnumsRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : u16) -> Result < TestEnumsRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEnumsRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestEnumsRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_2 (mut self , value : SimpleEnum) -> Result < TestEnumsRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestEnumsRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEnumsRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_2 (mut self , value : SimpleEnum) -> Result < TestEnumsRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestEnumsRequestRequestBuilder (self . 0)) } } impl < P > TestEnumsRequestRequestBuilder < P , 2usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestEnumsRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEnumsRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestEnumsRequestRequestBuilder < P , F > 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 , "TestEnumsRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestEnumsRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEnumsRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEnumsRequestRequestArrayBuilder < P > (P) ; impl < P > TestEnumsRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestEnumsRequestRequestBuilder < TestEnumsRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestEnumsRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestEnumsRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEnumsRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestEnumsRequestRequestArrayBuilder < P > 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 , "TestEnumsRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestEnumsRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEnumsRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct GlobalEchoResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > GlobalEchoResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > GlobalEchoResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn field_1 (self) -> Result < TestGlobalStructBuilder < GlobalEchoResponseBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (GlobalEchoResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } # [cfg (feature = "defmt")] impl < P > GlobalEchoResponseBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn field_2 (mut self , value : TestGlobalEnum) -> Result < GlobalEchoResponseBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "field2" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "field2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (GlobalEchoResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > GlobalEchoResponseBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn field_2 (mut self , value : TestGlobalEnum) -> Result < GlobalEchoResponseBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "field2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (GlobalEchoResponseBuilder (self . 0)) } } impl < P > GlobalEchoResponseBuilder < P , 2usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for GlobalEchoResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "GlobalEchoResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for GlobalEchoResponseBuilder < P , F > 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 , "GlobalEchoResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for GlobalEchoResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for GlobalEchoResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct GlobalEchoResponseArrayBuilder < P > (P) ; impl < P > GlobalEchoResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < GlobalEchoResponseBuilder < GlobalEchoResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (GlobalEchoResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for GlobalEchoResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "GlobalEchoResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for GlobalEchoResponseArrayBuilder < P > 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 , "GlobalEchoResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for GlobalEchoResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for GlobalEchoResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestNullableOptionalRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestNullableOptionalRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestNullableOptionalRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u8 > >) -> Result < TestNullableOptionalRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestNullableOptionalRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u8 > >) -> Result < TestNullableOptionalRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestNullableOptionalRequestRequestBuilder (self . 0)) } } impl < P > TestNullableOptionalRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestNullableOptionalRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestNullableOptionalRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestNullableOptionalRequestRequestBuilder < P , F > 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 , "TestNullableOptionalRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestNullableOptionalRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestNullableOptionalRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestNullableOptionalRequestRequestArrayBuilder < P > (P) ; impl < P > TestNullableOptionalRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestNullableOptionalRequestRequestBuilder < TestNullableOptionalRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestNullableOptionalRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestNullableOptionalRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestNullableOptionalRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestNullableOptionalRequestRequestArrayBuilder < P > 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 , "TestNullableOptionalRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestNullableOptionalRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestNullableOptionalRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestComplexNullableOptionalRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestComplexNullableOptionalRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_int (mut self , value : rs_matter_crate :: tlv :: Nullable < u16 >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableInt" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_int (mut self , value : rs_matter_crate :: tlv :: Nullable < u16 >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn optional_int (mut self , value : Option < u16 >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalInt" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn optional_int (mut self , value : Option < u16 >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_int (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u16 > >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalInt" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_int (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u16 > >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_string (mut self , value : rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableString" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_string (mut self , value : rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn optional_string (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalString" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn optional_string (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_string (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > > >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalString" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_string (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > > >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 6 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_struct (self) -> Result < rs_matter_crate :: tlv :: NullableBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 7usize > , SimpleStructBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 7usize > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (6) ,) } } impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 7 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn optional_struct (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 8usize > , SimpleStructBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 8usize > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (7) ,) } } impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 8 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_optional_struct (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 9usize > , rs_matter_crate :: tlv :: NullableBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 9usize > , SimpleStructBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 9usize > > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (8) ,) } } impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 9 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_list (self) -> Result < rs_matter_crate :: tlv :: NullableBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 10usize > , rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 10usize > , SimpleEnum > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (9) ,) } } impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 10 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn optional_list (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 11usize > , rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 11usize > , SimpleEnum > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (10) ,) } } impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 11 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_optional_list (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 12usize > , rs_matter_crate :: tlv :: NullableBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 12usize > , rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 12usize > , SimpleEnum > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (11) ,) } } impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 12usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestComplexNullableOptionalRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestComplexNullableOptionalRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestComplexNullableOptionalRequestRequestBuilder < P , F > 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 , "TestComplexNullableOptionalRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestComplexNullableOptionalRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestComplexNullableOptionalRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestComplexNullableOptionalRequestRequestArrayBuilder < P > (P) ; impl < P > TestComplexNullableOptionalRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestComplexNullableOptionalRequestRequestBuilder < TestComplexNullableOptionalRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestComplexNullableOptionalRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestComplexNullableOptionalRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestComplexNullableOptionalRequestRequestArrayBuilder < P > 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 , "TestComplexNullableOptionalRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestComplexNullableOptionalRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestComplexNullableOptionalRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct SimpleStructEchoRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > SimpleStructEchoRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > SimpleStructEchoRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < SimpleStructBuilder < SimpleStructEchoRequestRequestBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (SimpleStructEchoRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > SimpleStructEchoRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for SimpleStructEchoRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "SimpleStructEchoRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for SimpleStructEchoRequestRequestBuilder < P , F > 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 , "SimpleStructEchoRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for SimpleStructEchoRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for SimpleStructEchoRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct SimpleStructEchoRequestRequestArrayBuilder < P > (P) ; impl < P > SimpleStructEchoRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < SimpleStructEchoRequestRequestBuilder < SimpleStructEchoRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (SimpleStructEchoRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for SimpleStructEchoRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "SimpleStructEchoRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for SimpleStructEchoRequestRequestArrayBuilder < P > 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 , "SimpleStructEchoRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for SimpleStructEchoRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for SimpleStructEchoRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestSimpleOptionalArgumentRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestSimpleOptionalArgumentRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestSimpleOptionalArgumentRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : Option < bool >) -> Result < TestSimpleOptionalArgumentRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestSimpleOptionalArgumentRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestSimpleOptionalArgumentRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : Option < bool >) -> Result < TestSimpleOptionalArgumentRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestSimpleOptionalArgumentRequestRequestBuilder (self . 0)) } } impl < P > TestSimpleOptionalArgumentRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestSimpleOptionalArgumentRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestSimpleOptionalArgumentRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestSimpleOptionalArgumentRequestRequestBuilder < P , F > 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 , "TestSimpleOptionalArgumentRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestSimpleOptionalArgumentRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestSimpleOptionalArgumentRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestSimpleOptionalArgumentRequestRequestArrayBuilder < P > (P) ; impl < P > TestSimpleOptionalArgumentRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestSimpleOptionalArgumentRequestRequestBuilder < TestSimpleOptionalArgumentRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestSimpleOptionalArgumentRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestSimpleOptionalArgumentRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestSimpleOptionalArgumentRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestSimpleOptionalArgumentRequestRequestArrayBuilder < P > 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 , "TestSimpleOptionalArgumentRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestSimpleOptionalArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestSimpleOptionalArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEmitTestEventRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestEmitTestEventRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestEmitTestEventRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : u8) -> Result < TestEmitTestEventRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEmitTestEventRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEmitTestEventRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : u8) -> Result < TestEmitTestEventRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEmitTestEventRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestEmitTestEventRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_2 (mut self , value : SimpleEnum) -> Result < TestEmitTestEventRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestEmitTestEventRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEmitTestEventRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_2 (mut self , value : SimpleEnum) -> Result < TestEmitTestEventRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestEmitTestEventRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestEmitTestEventRequestRequestBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_3 (mut self , value : bool) -> Result < TestEmitTestEventRequestRequestBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg3" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg3" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestEmitTestEventRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEmitTestEventRequestRequestBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_3 (mut self , value : bool) -> Result < TestEmitTestEventRequestRequestBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg3" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestEmitTestEventRequestRequestBuilder (self . 0)) } } impl < P > TestEmitTestEventRequestRequestBuilder < P , 3usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestEmitTestEventRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEmitTestEventRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestEventRequestRequestBuilder < P , F > 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 , "TestEmitTestEventRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestEmitTestEventRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEmitTestEventRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEmitTestEventRequestRequestArrayBuilder < P > (P) ; impl < P > TestEmitTestEventRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestEmitTestEventRequestRequestBuilder < TestEmitTestEventRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestEmitTestEventRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestEmitTestEventRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEmitTestEventRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestEventRequestRequestArrayBuilder < P > 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 , "TestEmitTestEventRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestEmitTestEventRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEmitTestEventRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEmitTestFabricScopedEventRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestEmitTestFabricScopedEventRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestEmitTestFabricScopedEventRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : u8) -> Result < TestEmitTestFabricScopedEventRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEmitTestFabricScopedEventRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEmitTestFabricScopedEventRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : u8) -> Result < TestEmitTestFabricScopedEventRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEmitTestFabricScopedEventRequestRequestBuilder (self . 0)) } } impl < P > TestEmitTestFabricScopedEventRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestEmitTestFabricScopedEventRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEmitTestFabricScopedEventRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestFabricScopedEventRequestRequestBuilder < P , F > 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 , "TestEmitTestFabricScopedEventRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestEmitTestFabricScopedEventRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEmitTestFabricScopedEventRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEmitTestFabricScopedEventRequestRequestArrayBuilder < P > (P) ; impl < P > TestEmitTestFabricScopedEventRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestEmitTestFabricScopedEventRequestRequestBuilder < TestEmitTestFabricScopedEventRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestEmitTestFabricScopedEventRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestEmitTestFabricScopedEventRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEmitTestFabricScopedEventRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestFabricScopedEventRequestRequestArrayBuilder < P > 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 , "TestEmitTestFabricScopedEventRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestEmitTestFabricScopedEventRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEmitTestFabricScopedEventRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestBatchHelperRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestBatchHelperRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestBatchHelperRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn sleep_before_response_time_ms (mut self , value : u16) -> Result < TestBatchHelperRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "sleepBeforeResponseTimeMs" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "sleepBeforeResponseTimeMs" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestBatchHelperRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestBatchHelperRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn sleep_before_response_time_ms (mut self , value : u16) -> Result < TestBatchHelperRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "sleepBeforeResponseTimeMs" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestBatchHelperRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestBatchHelperRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn size_of_response_buffer (mut self , value : u16) -> Result < TestBatchHelperRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "sizeOfResponseBuffer" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "sizeOfResponseBuffer" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestBatchHelperRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestBatchHelperRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn size_of_response_buffer (mut self , value : u16) -> Result < TestBatchHelperRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "sizeOfResponseBuffer" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestBatchHelperRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestBatchHelperRequestRequestBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn fill_character (mut self , value : u8) -> Result < TestBatchHelperRequestRequestBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "fillCharacter" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fillCharacter" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestBatchHelperRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestBatchHelperRequestRequestBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn fill_character (mut self , value : u8) -> Result < TestBatchHelperRequestRequestBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fillCharacter" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestBatchHelperRequestRequestBuilder (self . 0)) } } impl < P > TestBatchHelperRequestRequestBuilder < P , 3usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestBatchHelperRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestBatchHelperRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestBatchHelperRequestRequestBuilder < P , F > 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 , "TestBatchHelperRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestBatchHelperRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestBatchHelperRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestBatchHelperRequestRequestArrayBuilder < P > (P) ; impl < P > TestBatchHelperRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestBatchHelperRequestRequestBuilder < TestBatchHelperRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestBatchHelperRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestBatchHelperRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestBatchHelperRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestBatchHelperRequestRequestArrayBuilder < P > 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 , "TestBatchHelperRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestBatchHelperRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestBatchHelperRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestSecondBatchHelperRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestSecondBatchHelperRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestSecondBatchHelperRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn sleep_before_response_time_ms (mut self , value : u16) -> Result < TestSecondBatchHelperRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "sleepBeforeResponseTimeMs" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "sleepBeforeResponseTimeMs" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestSecondBatchHelperRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestSecondBatchHelperRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn sleep_before_response_time_ms (mut self , value : u16) -> Result < TestSecondBatchHelperRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "sleepBeforeResponseTimeMs" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestSecondBatchHelperRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestSecondBatchHelperRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn size_of_response_buffer (mut self , value : u16) -> Result < TestSecondBatchHelperRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "sizeOfResponseBuffer" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "sizeOfResponseBuffer" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestSecondBatchHelperRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestSecondBatchHelperRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn size_of_response_buffer (mut self , value : u16) -> Result < TestSecondBatchHelperRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "sizeOfResponseBuffer" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestSecondBatchHelperRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestSecondBatchHelperRequestRequestBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn fill_character (mut self , value : u8) -> Result < TestSecondBatchHelperRequestRequestBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "fillCharacter" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fillCharacter" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestSecondBatchHelperRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestSecondBatchHelperRequestRequestBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn fill_character (mut self , value : u8) -> Result < TestSecondBatchHelperRequestRequestBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fillCharacter" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestSecondBatchHelperRequestRequestBuilder (self . 0)) } } impl < P > TestSecondBatchHelperRequestRequestBuilder < P , 3usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestSecondBatchHelperRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestSecondBatchHelperRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestSecondBatchHelperRequestRequestBuilder < P , F > 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 , "TestSecondBatchHelperRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestSecondBatchHelperRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestSecondBatchHelperRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestSecondBatchHelperRequestRequestArrayBuilder < P > (P) ; impl < P > TestSecondBatchHelperRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestSecondBatchHelperRequestRequestBuilder < TestSecondBatchHelperRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestSecondBatchHelperRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestSecondBatchHelperRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestSecondBatchHelperRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestSecondBatchHelperRequestRequestArrayBuilder < P > 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 , "TestSecondBatchHelperRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestSecondBatchHelperRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestSecondBatchHelperRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct StringEchoRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > StringEchoRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > StringEchoRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn payload (mut self , value : rs_matter_crate :: tlv :: OctetStr < '_ >) -> Result < StringEchoRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "payload" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "payload" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (StringEchoRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > StringEchoRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn payload (mut self , value : rs_matter_crate :: tlv :: OctetStr < '_ >) -> Result < StringEchoRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "payload" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (StringEchoRequestRequestBuilder (self . 0)) } } impl < P > StringEchoRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for StringEchoRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "StringEchoRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for StringEchoRequestRequestBuilder < P , F > 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 , "StringEchoRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for StringEchoRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for StringEchoRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct StringEchoRequestRequestArrayBuilder < P > (P) ; impl < P > StringEchoRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < StringEchoRequestRequestBuilder < StringEchoRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (StringEchoRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for StringEchoRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "StringEchoRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for StringEchoRequestRequestArrayBuilder < P > 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 , "StringEchoRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for StringEchoRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for StringEchoRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct GlobalEchoRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > GlobalEchoRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > GlobalEchoRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn field_1 (self) -> Result < TestGlobalStructBuilder < GlobalEchoRequestRequestBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (GlobalEchoRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } # [cfg (feature = "defmt")] impl < P > GlobalEchoRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn field_2 (mut self , value : TestGlobalEnum) -> Result < GlobalEchoRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "field2" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "field2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (GlobalEchoRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > GlobalEchoRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn field_2 (mut self , value : TestGlobalEnum) -> Result < GlobalEchoRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "field2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (GlobalEchoRequestRequestBuilder (self . 0)) } } impl < P > GlobalEchoRequestRequestBuilder < P , 2usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for GlobalEchoRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "GlobalEchoRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for GlobalEchoRequestRequestBuilder < P , F > 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 , "GlobalEchoRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for GlobalEchoRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for GlobalEchoRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct GlobalEchoRequestRequestArrayBuilder < P > (P) ; impl < P > GlobalEchoRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < GlobalEchoRequestRequestBuilder < GlobalEchoRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (GlobalEchoRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for GlobalEchoRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "GlobalEchoRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for GlobalEchoRequestRequestArrayBuilder < P > 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 , "GlobalEchoRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for GlobalEchoRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for GlobalEchoRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestDifferentVendorMeiRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestDifferentVendorMeiRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestDifferentVendorMeiRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : u8) -> Result < TestDifferentVendorMeiRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestDifferentVendorMeiRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestDifferentVendorMeiRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : u8) -> Result < TestDifferentVendorMeiRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestDifferentVendorMeiRequestRequestBuilder (self . 0)) } } impl < P > TestDifferentVendorMeiRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestDifferentVendorMeiRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestDifferentVendorMeiRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestDifferentVendorMeiRequestRequestBuilder < P , F > 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 , "TestDifferentVendorMeiRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestDifferentVendorMeiRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestDifferentVendorMeiRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestDifferentVendorMeiRequestRequestArrayBuilder < P > (P) ; impl < P > TestDifferentVendorMeiRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestDifferentVendorMeiRequestRequestBuilder < TestDifferentVendorMeiRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestDifferentVendorMeiRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestDifferentVendorMeiRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestDifferentVendorMeiRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestDifferentVendorMeiRequestRequestArrayBuilder < P > 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 , "TestDifferentVendorMeiRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestDifferentVendorMeiRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestDifferentVendorMeiRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestDifferentVendorMeiResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestDifferentVendorMeiResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestDifferentVendorMeiResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : u8) -> Result < TestDifferentVendorMeiResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestDifferentVendorMeiResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestDifferentVendorMeiResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : u8) -> Result < TestDifferentVendorMeiResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestDifferentVendorMeiResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestDifferentVendorMeiResponseBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn event_number (mut self , value : u64) -> Result < TestDifferentVendorMeiResponseBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "eventNumber" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "eventNumber" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestDifferentVendorMeiResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestDifferentVendorMeiResponseBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn event_number (mut self , value : u64) -> Result < TestDifferentVendorMeiResponseBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "eventNumber" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestDifferentVendorMeiResponseBuilder (self . 0)) } } impl < P > TestDifferentVendorMeiResponseBuilder < P , 2usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestDifferentVendorMeiResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestDifferentVendorMeiResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestDifferentVendorMeiResponseBuilder < P , F > 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 , "TestDifferentVendorMeiResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestDifferentVendorMeiResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestDifferentVendorMeiResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestDifferentVendorMeiResponseArrayBuilder < P > (P) ; impl < P > TestDifferentVendorMeiResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestDifferentVendorMeiResponseBuilder < TestDifferentVendorMeiResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestDifferentVendorMeiResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestDifferentVendorMeiResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestDifferentVendorMeiResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestDifferentVendorMeiResponseArrayBuilder < P > 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 , "TestDifferentVendorMeiResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestDifferentVendorMeiResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestDifferentVendorMeiResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestEventTag { Arg1 = 1 , Arg2 = 2 , Arg3 = 3 , Arg4 = 4 , Arg5 = 5 , Arg6 = 6 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestFabricScopedEventTag { FabricIndex = 254 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestDifferentVendorMeiEventTag { Arg1 = 1 , } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestEvent < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestEvent < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (1) ?) } pub fn arg_2 (& self) -> Result < SimpleEnum , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (2) ?) } pub fn arg_3 (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (3) ?) } pub fn arg_4 (& self) -> Result < SimpleStruct < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (4) ?) } pub fn arg_5 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleStruct < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (5) ?) } pub fn arg_6 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (6) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestEvent < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestEvent < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestEvent < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestEvent") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } match self . arg_2 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_2" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) ? , } match self . arg_3 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_3" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_3" , e . code ()) ? , } match self . arg_4 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_4" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_4" , e . code ()) ? , } match self . arg_5 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_5" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_5" , e . code ()) ? , } match self . arg_6 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_6" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_6" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestEvent < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestEvent") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } match self . arg_2 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_2" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) , } match self . arg_3 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_3" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_3" , e . code ()) , } match self . arg_4 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_4" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_4" , e . code ()) , } match self . arg_5 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_5" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_5" , e . code ()) , } match self . arg_6 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_6" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_6" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestFabricScopedEvent < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestFabricScopedEvent < 'a > { # [doc = "Create a new instance"] 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 fabric_index (& self) -> Result < Option < rs_matter_crate :: im :: FabricIndex > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (254) ? ; 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 TestFabricScopedEvent < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestFabricScopedEvent < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestFabricScopedEvent < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestFabricScopedEvent") ? ; match self . fabric_index () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "fabric_index" , value) ? , Ok (None) => write ! (f , "{}: None," , "fabric_index") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "fabric_index" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestFabricScopedEvent < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestFabricScopedEvent") ; match self . fabric_index () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "fabric_index" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "fabric_index") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "fabric_index" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestDifferentVendorMeiEvent < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestDifferentVendorMeiEvent < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < u8 , 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 TestDifferentVendorMeiEvent < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestDifferentVendorMeiEvent < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestDifferentVendorMeiEvent < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestDifferentVendorMeiEvent") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestDifferentVendorMeiEvent < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestDifferentVendorMeiEvent") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } pub struct TestEventBuilder < P , const F : usize = 1usize > (P) ; impl < P > TestEventBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestEventBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : u8) -> Result < TestEventBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestEventBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEventBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : u8) -> Result < TestEventBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestEventBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestEventBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_2 (mut self , value : SimpleEnum) -> Result < TestEventBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestEventBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEventBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_2 (mut self , value : SimpleEnum) -> Result < TestEventBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestEventBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestEventBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_3 (mut self , value : bool) -> Result < TestEventBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg3" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg3" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (TestEventBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEventBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_3 (mut self , value : bool) -> Result < TestEventBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg3" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (TestEventBuilder (self . 0)) } } impl < P > TestEventBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_4 (self) -> Result < SimpleStructBuilder < TestEventBuilder < P , 5usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestEventBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (4) ,) } } impl < P > TestEventBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_5 (self) -> Result < SimpleStructArrayBuilder < TestEventBuilder < P , 6usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestEventBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (5) ,) } } impl < P > TestEventBuilder < P , 6 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_6 (self) -> Result < rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestEventBuilder < P , 7usize > , SimpleEnum > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestEventBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (6) ,) } } impl < P > TestEventBuilder < P , 7usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestEventBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEvent") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestEventBuilder < P , F > 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 , "TestEvent") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestEventBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEventBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEventArrayBuilder < P > (P) ; impl < P > TestEventArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestEventBuilder < TestEventArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestEventArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestEventArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEvent[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestEventArrayBuilder < P > 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 , "TestEvent[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestEventArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEventArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestFabricScopedEventBuilder < P , const F : usize = 254usize > (P) ; impl < P > TestFabricScopedEventBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestFabricScopedEventBuilder < P , 254 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn fabric_index (mut self , value : Option < rs_matter_crate :: im :: FabricIndex >) -> Result < TestFabricScopedEventBuilder < P , 255usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricIndex" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricIndex" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (254) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedEventBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestFabricScopedEventBuilder < P , 254 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn fabric_index (mut self , value : Option < rs_matter_crate :: im :: FabricIndex >) -> Result < TestFabricScopedEventBuilder < P , 255usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricIndex" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (254) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedEventBuilder (self . 0)) } } impl < P > TestFabricScopedEventBuilder < P , 255usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestFabricScopedEventBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestFabricScopedEvent") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestFabricScopedEventBuilder < P , F > 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 , "TestFabricScopedEvent") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestFabricScopedEventBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestFabricScopedEventBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestFabricScopedEventArrayBuilder < P > (P) ; impl < P > TestFabricScopedEventArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestFabricScopedEventBuilder < TestFabricScopedEventArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestFabricScopedEventArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestFabricScopedEventArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestFabricScopedEvent[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestFabricScopedEventArrayBuilder < P > 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 , "TestFabricScopedEvent[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestFabricScopedEventArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestFabricScopedEventArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestDifferentVendorMeiEventBuilder < P , const F : usize = 1usize > (P) ; impl < P > TestDifferentVendorMeiEventBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestDifferentVendorMeiEventBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : u8) -> Result < TestDifferentVendorMeiEventBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestDifferentVendorMeiEventBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestDifferentVendorMeiEventBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : u8) -> Result < TestDifferentVendorMeiEventBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestDifferentVendorMeiEventBuilder (self . 0)) } } impl < P > TestDifferentVendorMeiEventBuilder < P , 2usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestDifferentVendorMeiEventBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestDifferentVendorMeiEvent") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestDifferentVendorMeiEventBuilder < P , F > 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 , "TestDifferentVendorMeiEvent") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestDifferentVendorMeiEventBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestDifferentVendorMeiEventBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestDifferentVendorMeiEventArrayBuilder < P > (P) ; impl < P > TestDifferentVendorMeiEventArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestDifferentVendorMeiEventBuilder < TestDifferentVendorMeiEventArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestDifferentVendorMeiEventArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestDifferentVendorMeiEventArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestDifferentVendorMeiEvent[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestDifferentVendorMeiEventArrayBuilder < P > 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 , "TestDifferentVendorMeiEvent[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestDifferentVendorMeiEventArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestDifferentVendorMeiEventArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } impl TestEvent < '_ > { const PRIORITY : rs_matter_crate :: im :: EventPriority = rs_matter_crate :: im :: EventPriority :: Info ; pub fn emit_for < F > (emitter : impl rs_matter_crate :: dm :: EventEmitter , endpoint_id : rs_matter_crate :: dm :: EndptId , f : F) -> Result < rs_matter_crate :: dm :: EventNumber , rs_matter_crate :: error :: Error > where F : FnOnce (TestEventBuilder < rs_matter_crate :: dm :: events :: EventTLVWrite < '_ >>) -> Result < rs_matter_crate :: dm :: events :: EventTLVWrite < '_ > , rs_matter_crate :: error :: Error > , { emitter . emit_event (endpoint_id , 4294048773 , EventId :: TestEvent as _ , Self :: PRIORITY , | tw | { f (TestEventBuilder :: new (tw , & rs_matter_crate :: dm :: events :: EVENT_DATA_TAG) ?) ? ; Ok (()) } ,) } pub fn emit < F > (emitter : impl rs_matter_crate :: dm :: OwnEventEmitter , f : F) -> Result < rs_matter_crate :: dm :: EventNumber , rs_matter_crate :: error :: Error > where F : FnOnce (TestEventBuilder < rs_matter_crate :: dm :: events :: EventTLVWrite < '_ >>) -> Result < rs_matter_crate :: dm :: events :: EventTLVWrite < '_ > , rs_matter_crate :: error :: Error > , { emitter . emit_own_event (EventId :: TestEvent as _ , Self :: PRIORITY , | tw | { f (TestEventBuilder :: new (tw , & rs_matter_crate :: dm :: events :: EVENT_DATA_TAG) ?) ? ; Ok (()) } ,) } } impl TestFabricScopedEvent < '_ > { const PRIORITY : rs_matter_crate :: im :: EventPriority = rs_matter_crate :: im :: EventPriority :: Info ; pub fn emit_for < F > (emitter : impl rs_matter_crate :: dm :: EventEmitter , endpoint_id : rs_matter_crate :: dm :: EndptId , f : F) -> Result < rs_matter_crate :: dm :: EventNumber , rs_matter_crate :: error :: Error > where F : FnOnce (TestFabricScopedEventBuilder < rs_matter_crate :: dm :: events :: EventTLVWrite < '_ >>) -> Result < rs_matter_crate :: dm :: events :: EventTLVWrite < '_ > , rs_matter_crate :: error :: Error > , { emitter . emit_event (endpoint_id , 4294048773 , EventId :: TestFabricScopedEvent as _ , Self :: PRIORITY , | tw | { f (TestFabricScopedEventBuilder :: new (tw , & rs_matter_crate :: dm :: events :: EVENT_DATA_TAG) ?) ? ; Ok (()) } ,) } pub fn emit < F > (emitter : impl rs_matter_crate :: dm :: OwnEventEmitter , f : F) -> Result < rs_matter_crate :: dm :: EventNumber , rs_matter_crate :: error :: Error > where F : FnOnce (TestFabricScopedEventBuilder < rs_matter_crate :: dm :: events :: EventTLVWrite < '_ >>) -> Result < rs_matter_crate :: dm :: events :: EventTLVWrite < '_ > , rs_matter_crate :: error :: Error > , { emitter . emit_own_event (EventId :: TestFabricScopedEvent as _ , Self :: PRIORITY , | tw | { f (TestFabricScopedEventBuilder :: new (tw , & rs_matter_crate :: dm :: events :: EVENT_DATA_TAG) ?) ? ; Ok (()) } ,) } } impl TestDifferentVendorMeiEvent < '_ > { const PRIORITY : rs_matter_crate :: im :: EventPriority = rs_matter_crate :: im :: EventPriority :: Info ; pub fn emit_for < F > (emitter : impl rs_matter_crate :: dm :: EventEmitter , endpoint_id : rs_matter_crate :: dm :: EndptId , f : F) -> Result < rs_matter_crate :: dm :: EventNumber , rs_matter_crate :: error :: Error > where F : FnOnce (TestDifferentVendorMeiEventBuilder < rs_matter_crate :: dm :: events :: EventTLVWrite < '_ >>) -> Result < rs_matter_crate :: dm :: events :: EventTLVWrite < '_ > , rs_matter_crate :: error :: Error > , { emitter . emit_event (endpoint_id , 4294048773 , EventId :: TestDifferentVendorMeiEvent as _ , Self :: PRIORITY , | tw | { f (TestDifferentVendorMeiEventBuilder :: new (tw , & rs_matter_crate :: dm :: events :: EVENT_DATA_TAG) ?) ? ; Ok (()) } ,) } pub fn emit < F > (emitter : impl rs_matter_crate :: dm :: OwnEventEmitter , f : F) -> Result < rs_matter_crate :: dm :: EventNumber , rs_matter_crate :: error :: Error > where F : FnOnce (TestDifferentVendorMeiEventBuilder < rs_matter_crate :: dm :: events :: EventTLVWrite < '_ >>) -> Result < rs_matter_crate :: dm :: events :: EventTLVWrite < '_ > , rs_matter_crate :: error :: Error > , { emitter . emit_own_event (EventId :: TestDifferentVendorMeiEvent as _ , Self :: PRIORITY , | tw | { f (TestDifferentVendorMeiEventBuilder :: new (tw , & rs_matter_crate :: dm :: events :: EVENT_DATA_TAG) ?) ? ; Ok (()) } ,) } } # [doc = "The attribute IDs for the cluster."] # [derive (Copy , Clone , Debug , Eq , PartialEq , Hash , rs_matter_crate :: reexport :: strum :: FromRepr)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u32)] pub enum AttributeId { Boolean = 0 , Bitmap8 = 1 , Bitmap16 = 2 , Bitmap32 = 3 , Bitmap64 = 4 , Int8u = 5 , Int16u = 6 , Int24u = 7 , Int32u = 8 , Int40u = 9 , Int48u = 10 , Int56u = 11 , Int64u = 12 , Int8s = 13 , Int16s = 14 , Int24s = 15 , Int32s = 16 , Int40s = 17 , Int48s = 18 , Int56s = 19 , Int64s = 20 , Enum8 = 21 , Enum16 = 22 , FloatSingle = 23 , FloatDouble = 24 , OctetString = 25 , ListInt8u = 26 , ListOctetString = 27 , ListStructOctetString = 28 , LongOctetString = 29 , CharString = 30 , LongCharString = 31 , EpochUs = 32 , EpochS = 33 , VendorId = 34 , ListNullablesAndOptionalsStruct = 35 , EnumAttr = 36 , StructAttr = 37 , RangeRestrictedInt8u = 38 , RangeRestrictedInt8s = 39 , RangeRestrictedInt16u = 40 , RangeRestrictedInt16s = 41 , ListLongOctetString = 42 , ListFabricScoped = 43 , TimedWriteBoolean = 48 , GeneralErrorBoolean = 49 , ClusterErrorBoolean = 50 , GlobalEnum = 51 , GlobalStruct = 52 , UnsupportedAttributeRequiringAdminPrivilege = 254 , Unsupported = 255 , ReadFailureCode = 12288 , FailureInt32U = 12289 , NullableBoolean = 16384 , NullableBitmap8 = 16385 , NullableBitmap16 = 16386 , NullableBitmap32 = 16387 , NullableBitmap64 = 16388 , NullableInt8u = 16389 , NullableInt16u = 16390 , NullableInt24u = 16391 , NullableInt32u = 16392 , NullableInt40u = 16393 , NullableInt48u = 16394 , NullableInt56u = 16395 , NullableInt64u = 16396 , NullableInt8s = 16397 , NullableInt16s = 16398 , NullableInt24s = 16399 , NullableInt32s = 16400 , NullableInt40s = 16401 , NullableInt48s = 16402 , NullableInt56s = 16403 , NullableInt64s = 16404 , NullableEnum8 = 16405 , NullableEnum16 = 16406 , NullableFloatSingle = 16407 , NullableFloatDouble = 16408 , NullableOctetString = 16409 , NullableCharString = 16414 , NullableEnumAttr = 16420 , NullableStruct = 16421 , NullableRangeRestrictedInt8u = 16422 , NullableRangeRestrictedInt8s = 16423 , NullableRangeRestrictedInt16u = 16424 , NullableRangeRestrictedInt16s = 16425 , WriteOnlyInt8u = 16426 , NullableGlobalEnum = 16435 , NullableGlobalStruct = 16436 , GeneratedCommandList = 65528 , AcceptedCommandList = 65529 , AttributeList = 65531 , FeatureMap = 65532 , ClusterRevision = 65533 , MeiInt8u = 4294070017 } impl core :: convert :: TryFrom < rs_matter_crate :: dm :: AttrId > for AttributeId { type Error = rs_matter_crate :: error :: Error ; fn try_from (id : rs_matter_crate :: dm :: CmdId) -> Result < Self , Self :: Error > { AttributeId :: from_repr (id) . ok_or_else (|| rs_matter_crate :: error :: ErrorCode :: AttributeNotFound . into ()) } } impl core :: fmt :: Debug for MetadataDebug < (AttributeId , bool) > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "Attr::") ? ; match self . 0.0 { AttributeId :: Boolean => write ! (f , "{}(0x{:02x})" , "Boolean" , AttributeId :: Boolean as u32) ? , AttributeId :: Bitmap8 => write ! (f , "{}(0x{:02x})" , "Bitmap8" , AttributeId :: Bitmap8 as u32) ? , AttributeId :: Bitmap16 => write ! (f , "{}(0x{:02x})" , "Bitmap16" , AttributeId :: Bitmap16 as u32) ? , AttributeId :: Bitmap32 => write ! (f , "{}(0x{:02x})" , "Bitmap32" , AttributeId :: Bitmap32 as u32) ? , AttributeId :: Bitmap64 => write ! (f , "{}(0x{:02x})" , "Bitmap64" , AttributeId :: Bitmap64 as u32) ? , AttributeId :: Int8u => write ! (f , "{}(0x{:02x})" , "Int8u" , AttributeId :: Int8u as u32) ? , AttributeId :: Int16u => write ! (f , "{}(0x{:02x})" , "Int16u" , AttributeId :: Int16u as u32) ? , AttributeId :: Int24u => write ! (f , "{}(0x{:02x})" , "Int24u" , AttributeId :: Int24u as u32) ? , AttributeId :: Int32u => write ! (f , "{}(0x{:02x})" , "Int32u" , AttributeId :: Int32u as u32) ? , AttributeId :: Int40u => write ! (f , "{}(0x{:02x})" , "Int40u" , AttributeId :: Int40u as u32) ? , AttributeId :: Int48u => write ! (f , "{}(0x{:02x})" , "Int48u" , AttributeId :: Int48u as u32) ? , AttributeId :: Int56u => write ! (f , "{}(0x{:02x})" , "Int56u" , AttributeId :: Int56u as u32) ? , AttributeId :: Int64u => write ! (f , "{}(0x{:02x})" , "Int64u" , AttributeId :: Int64u as u32) ? , AttributeId :: Int8s => write ! (f , "{}(0x{:02x})" , "Int8s" , AttributeId :: Int8s as u32) ? , AttributeId :: Int16s => write ! (f , "{}(0x{:02x})" , "Int16s" , AttributeId :: Int16s as u32) ? , AttributeId :: Int24s => write ! (f , "{}(0x{:02x})" , "Int24s" , AttributeId :: Int24s as u32) ? , AttributeId :: Int32s => write ! (f , "{}(0x{:02x})" , "Int32s" , AttributeId :: Int32s as u32) ? , AttributeId :: Int40s => write ! (f , "{}(0x{:02x})" , "Int40s" , AttributeId :: Int40s as u32) ? , AttributeId :: Int48s => write ! (f , "{}(0x{:02x})" , "Int48s" , AttributeId :: Int48s as u32) ? , AttributeId :: Int56s => write ! (f , "{}(0x{:02x})" , "Int56s" , AttributeId :: Int56s as u32) ? , AttributeId :: Int64s => write ! (f , "{}(0x{:02x})" , "Int64s" , AttributeId :: Int64s as u32) ? , AttributeId :: Enum8 => write ! (f , "{}(0x{:02x})" , "Enum8" , AttributeId :: Enum8 as u32) ? , AttributeId :: Enum16 => write ! (f , "{}(0x{:02x})" , "Enum16" , AttributeId :: Enum16 as u32) ? , AttributeId :: FloatSingle => write ! (f , "{}(0x{:02x})" , "FloatSingle" , AttributeId :: FloatSingle as u32) ? , AttributeId :: FloatDouble => write ! (f , "{}(0x{:02x})" , "FloatDouble" , AttributeId :: FloatDouble as u32) ? , AttributeId :: OctetString => write ! (f , "{}(0x{:02x})" , "OctetString" , AttributeId :: OctetString as u32) ? , AttributeId :: ListInt8u => write ! (f , "{}(0x{:02x})" , "ListInt8u" , AttributeId :: ListInt8u as u32) ? , AttributeId :: ListOctetString => write ! (f , "{}(0x{:02x})" , "ListOctetString" , AttributeId :: ListOctetString as u32) ? , AttributeId :: ListStructOctetString => write ! (f , "{}(0x{:02x})" , "ListStructOctetString" , AttributeId :: ListStructOctetString as u32) ? , AttributeId :: LongOctetString => write ! (f , "{}(0x{:02x})" , "LongOctetString" , AttributeId :: LongOctetString as u32) ? , AttributeId :: CharString => write ! (f , "{}(0x{:02x})" , "CharString" , AttributeId :: CharString as u32) ? , AttributeId :: LongCharString => write ! (f , "{}(0x{:02x})" , "LongCharString" , AttributeId :: LongCharString as u32) ? , AttributeId :: EpochUs => write ! (f , "{}(0x{:02x})" , "EpochUs" , AttributeId :: EpochUs as u32) ? , AttributeId :: EpochS => write ! (f , "{}(0x{:02x})" , "EpochS" , AttributeId :: EpochS as u32) ? , AttributeId :: VendorId => write ! (f , "{}(0x{:02x})" , "VendorId" , AttributeId :: VendorId as u32) ? , AttributeId :: ListNullablesAndOptionalsStruct => write ! (f , "{}(0x{:02x})" , "ListNullablesAndOptionalsStruct" , AttributeId :: ListNullablesAndOptionalsStruct as u32) ? , AttributeId :: EnumAttr => write ! (f , "{}(0x{:02x})" , "EnumAttr" , AttributeId :: EnumAttr as u32) ? , AttributeId :: StructAttr => write ! (f , "{}(0x{:02x})" , "StructAttr" , AttributeId :: StructAttr as u32) ? , AttributeId :: RangeRestrictedInt8u => write ! (f , "{}(0x{:02x})" , "RangeRestrictedInt8u" , AttributeId :: RangeRestrictedInt8u as u32) ? , AttributeId :: RangeRestrictedInt8s => write ! (f , "{}(0x{:02x})" , "RangeRestrictedInt8s" , AttributeId :: RangeRestrictedInt8s as u32) ? , AttributeId :: RangeRestrictedInt16u => write ! (f , "{}(0x{:02x})" , "RangeRestrictedInt16u" , AttributeId :: RangeRestrictedInt16u as u32) ? , AttributeId :: RangeRestrictedInt16s => write ! (f , "{}(0x{:02x})" , "RangeRestrictedInt16s" , AttributeId :: RangeRestrictedInt16s as u32) ? , AttributeId :: ListLongOctetString => write ! (f , "{}(0x{:02x})" , "ListLongOctetString" , AttributeId :: ListLongOctetString as u32) ? , AttributeId :: ListFabricScoped => write ! (f , "{}(0x{:02x})" , "ListFabricScoped" , AttributeId :: ListFabricScoped as u32) ? , AttributeId :: TimedWriteBoolean => write ! (f , "{}(0x{:02x})" , "TimedWriteBoolean" , AttributeId :: TimedWriteBoolean as u32) ? , AttributeId :: GeneralErrorBoolean => write ! (f , "{}(0x{:02x})" , "GeneralErrorBoolean" , AttributeId :: GeneralErrorBoolean as u32) ? , AttributeId :: ClusterErrorBoolean => write ! (f , "{}(0x{:02x})" , "ClusterErrorBoolean" , AttributeId :: ClusterErrorBoolean as u32) ? , AttributeId :: GlobalEnum => write ! (f , "{}(0x{:02x})" , "GlobalEnum" , AttributeId :: GlobalEnum as u32) ? , AttributeId :: GlobalStruct => write ! (f , "{}(0x{:02x})" , "GlobalStruct" , AttributeId :: GlobalStruct as u32) ? , AttributeId :: UnsupportedAttributeRequiringAdminPrivilege => write ! (f , "{}(0x{:02x})" , "UnsupportedAttributeRequiringAdminPrivilege" , AttributeId :: UnsupportedAttributeRequiringAdminPrivilege as u32) ? , AttributeId :: Unsupported => write ! (f , "{}(0x{:02x})" , "Unsupported" , AttributeId :: Unsupported as u32) ? , AttributeId :: ReadFailureCode => write ! (f , "{}(0x{:02x})" , "ReadFailureCode" , AttributeId :: ReadFailureCode as u32) ? , AttributeId :: FailureInt32U => write ! (f , "{}(0x{:02x})" , "FailureInt32U" , AttributeId :: FailureInt32U as u32) ? , AttributeId :: NullableBoolean => write ! (f , "{}(0x{:02x})" , "NullableBoolean" , AttributeId :: NullableBoolean as u32) ? , AttributeId :: NullableBitmap8 => write ! (f , "{}(0x{:02x})" , "NullableBitmap8" , AttributeId :: NullableBitmap8 as u32) ? , AttributeId :: NullableBitmap16 => write ! (f , "{}(0x{:02x})" , "NullableBitmap16" , AttributeId :: NullableBitmap16 as u32) ? , AttributeId :: NullableBitmap32 => write ! (f , "{}(0x{:02x})" , "NullableBitmap32" , AttributeId :: NullableBitmap32 as u32) ? , AttributeId :: NullableBitmap64 => write ! (f , "{}(0x{:02x})" , "NullableBitmap64" , AttributeId :: NullableBitmap64 as u32) ? , AttributeId :: NullableInt8u => write ! (f , "{}(0x{:02x})" , "NullableInt8u" , AttributeId :: NullableInt8u as u32) ? , AttributeId :: NullableInt16u => write ! (f , "{}(0x{:02x})" , "NullableInt16u" , AttributeId :: NullableInt16u as u32) ? , AttributeId :: NullableInt24u => write ! (f , "{}(0x{:02x})" , "NullableInt24u" , AttributeId :: NullableInt24u as u32) ? , AttributeId :: NullableInt32u => write ! (f , "{}(0x{:02x})" , "NullableInt32u" , AttributeId :: NullableInt32u as u32) ? , AttributeId :: NullableInt40u => write ! (f , "{}(0x{:02x})" , "NullableInt40u" , AttributeId :: NullableInt40u as u32) ? , AttributeId :: NullableInt48u => write ! (f , "{}(0x{:02x})" , "NullableInt48u" , AttributeId :: NullableInt48u as u32) ? , AttributeId :: NullableInt56u => write ! (f , "{}(0x{:02x})" , "NullableInt56u" , AttributeId :: NullableInt56u as u32) ? , AttributeId :: NullableInt64u => write ! (f , "{}(0x{:02x})" , "NullableInt64u" , AttributeId :: NullableInt64u as u32) ? , AttributeId :: NullableInt8s => write ! (f , "{}(0x{:02x})" , "NullableInt8s" , AttributeId :: NullableInt8s as u32) ? , AttributeId :: NullableInt16s => write ! (f , "{}(0x{:02x})" , "NullableInt16s" , AttributeId :: NullableInt16s as u32) ? , AttributeId :: NullableInt24s => write ! (f , "{}(0x{:02x})" , "NullableInt24s" , AttributeId :: NullableInt24s as u32) ? , AttributeId :: NullableInt32s => write ! (f , "{}(0x{:02x})" , "NullableInt32s" , AttributeId :: NullableInt32s as u32) ? , AttributeId :: NullableInt40s => write ! (f , "{}(0x{:02x})" , "NullableInt40s" , AttributeId :: NullableInt40s as u32) ? , AttributeId :: NullableInt48s => write ! (f , "{}(0x{:02x})" , "NullableInt48s" , AttributeId :: NullableInt48s as u32) ? , AttributeId :: NullableInt56s => write ! (f , "{}(0x{:02x})" , "NullableInt56s" , AttributeId :: NullableInt56s as u32) ? , AttributeId :: NullableInt64s => write ! (f , "{}(0x{:02x})" , "NullableInt64s" , AttributeId :: NullableInt64s as u32) ? , AttributeId :: NullableEnum8 => write ! (f , "{}(0x{:02x})" , "NullableEnum8" , AttributeId :: NullableEnum8 as u32) ? , AttributeId :: NullableEnum16 => write ! (f , "{}(0x{:02x})" , "NullableEnum16" , AttributeId :: NullableEnum16 as u32) ? , AttributeId :: NullableFloatSingle => write ! (f , "{}(0x{:02x})" , "NullableFloatSingle" , AttributeId :: NullableFloatSingle as u32) ? , AttributeId :: NullableFloatDouble => write ! (f , "{}(0x{:02x})" , "NullableFloatDouble" , AttributeId :: NullableFloatDouble as u32) ? , AttributeId :: NullableOctetString => write ! (f , "{}(0x{:02x})" , "NullableOctetString" , AttributeId :: NullableOctetString as u32) ? , AttributeId :: NullableCharString => write ! (f , "{}(0x{:02x})" , "NullableCharString" , AttributeId :: NullableCharString as u32) ? , AttributeId :: NullableEnumAttr => write ! (f , "{}(0x{:02x})" , "NullableEnumAttr" , AttributeId :: NullableEnumAttr as u32) ? , AttributeId :: NullableStruct => write ! (f , "{}(0x{:02x})" , "NullableStruct" , AttributeId :: NullableStruct as u32) ? , AttributeId :: NullableRangeRestrictedInt8u => write ! (f , "{}(0x{:02x})" , "NullableRangeRestrictedInt8u" , AttributeId :: NullableRangeRestrictedInt8u as u32) ? , AttributeId :: NullableRangeRestrictedInt8s => write ! (f , "{}(0x{:02x})" , "NullableRangeRestrictedInt8s" , AttributeId :: NullableRangeRestrictedInt8s as u32) ? , AttributeId :: NullableRangeRestrictedInt16u => write ! (f , "{}(0x{:02x})" , "NullableRangeRestrictedInt16u" , AttributeId :: NullableRangeRestrictedInt16u as u32) ? , AttributeId :: NullableRangeRestrictedInt16s => write ! (f , "{}(0x{:02x})" , "NullableRangeRestrictedInt16s" , AttributeId :: NullableRangeRestrictedInt16s as u32) ? , AttributeId :: WriteOnlyInt8u => write ! (f , "{}(0x{:02x})" , "WriteOnlyInt8u" , AttributeId :: WriteOnlyInt8u as u32) ? , AttributeId :: NullableGlobalEnum => write ! (f , "{}(0x{:02x})" , "NullableGlobalEnum" , AttributeId :: NullableGlobalEnum as u32) ? , AttributeId :: NullableGlobalStruct => write ! (f , "{}(0x{:02x})" , "NullableGlobalStruct" , AttributeId :: NullableGlobalStruct as u32) ? , AttributeId :: GeneratedCommandList => write ! (f , "{}(0x{:02x})" , "GeneratedCommandList" , AttributeId :: GeneratedCommandList as u32) ? , AttributeId :: AcceptedCommandList => write ! (f , "{}(0x{:02x})" , "AcceptedCommandList" , AttributeId :: AcceptedCommandList as u32) ? , AttributeId :: AttributeList => write ! (f , "{}(0x{:02x})" , "AttributeList" , AttributeId :: AttributeList as u32) ? , AttributeId :: FeatureMap => write ! (f , "{}(0x{:02x})" , "FeatureMap" , AttributeId :: FeatureMap as u32) ? , AttributeId :: ClusterRevision => write ! (f , "{}(0x{:02x})" , "ClusterRevision" , AttributeId :: ClusterRevision as u32) ? , AttributeId :: MeiInt8u => write ! (f , "{}(0x{:02x})" , "MeiInt8u" , AttributeId :: MeiInt8u as u32) ? , } if self . 0.1 { write ! (f , "::Write") } else { write ! (f , "::Read") } } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for MetadataDebug < (AttributeId , bool) > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "Attr::") ; match self . 0.0 { AttributeId :: Boolean => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Boolean" , AttributeId :: Boolean as u32) , AttributeId :: Bitmap8 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Bitmap8" , AttributeId :: Bitmap8 as u32) , AttributeId :: Bitmap16 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Bitmap16" , AttributeId :: Bitmap16 as u32) , AttributeId :: Bitmap32 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Bitmap32" , AttributeId :: Bitmap32 as u32) , AttributeId :: Bitmap64 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Bitmap64" , AttributeId :: Bitmap64 as u32) , AttributeId :: Int8u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int8u" , AttributeId :: Int8u as u32) , AttributeId :: Int16u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int16u" , AttributeId :: Int16u as u32) , AttributeId :: Int24u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int24u" , AttributeId :: Int24u as u32) , AttributeId :: Int32u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int32u" , AttributeId :: Int32u as u32) , AttributeId :: Int40u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int40u" , AttributeId :: Int40u as u32) , AttributeId :: Int48u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int48u" , AttributeId :: Int48u as u32) , AttributeId :: Int56u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int56u" , AttributeId :: Int56u as u32) , AttributeId :: Int64u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int64u" , AttributeId :: Int64u as u32) , AttributeId :: Int8s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int8s" , AttributeId :: Int8s as u32) , AttributeId :: Int16s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int16s" , AttributeId :: Int16s as u32) , AttributeId :: Int24s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int24s" , AttributeId :: Int24s as u32) , AttributeId :: Int32s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int32s" , AttributeId :: Int32s as u32) , AttributeId :: Int40s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int40s" , AttributeId :: Int40s as u32) , AttributeId :: Int48s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int48s" , AttributeId :: Int48s as u32) , AttributeId :: Int56s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int56s" , AttributeId :: Int56s as u32) , AttributeId :: Int64s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int64s" , AttributeId :: Int64s as u32) , AttributeId :: Enum8 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Enum8" , AttributeId :: Enum8 as u32) , AttributeId :: Enum16 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Enum16" , AttributeId :: Enum16 as u32) , AttributeId :: FloatSingle => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "FloatSingle" , AttributeId :: FloatSingle as u32) , AttributeId :: FloatDouble => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "FloatDouble" , AttributeId :: FloatDouble as u32) , AttributeId :: OctetString => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "OctetString" , AttributeId :: OctetString as u32) , AttributeId :: ListInt8u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "ListInt8u" , AttributeId :: ListInt8u as u32) , AttributeId :: ListOctetString => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "ListOctetString" , AttributeId :: ListOctetString as u32) , AttributeId :: ListStructOctetString => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "ListStructOctetString" , AttributeId :: ListStructOctetString as u32) , AttributeId :: LongOctetString => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "LongOctetString" , AttributeId :: LongOctetString as u32) , AttributeId :: CharString => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "CharString" , AttributeId :: CharString as u32) , AttributeId :: LongCharString => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "LongCharString" , AttributeId :: LongCharString as u32) , AttributeId :: EpochUs => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "EpochUs" , AttributeId :: EpochUs as u32) , AttributeId :: EpochS => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "EpochS" , AttributeId :: EpochS as u32) , AttributeId :: VendorId => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "VendorId" , AttributeId :: VendorId as u32) , AttributeId :: ListNullablesAndOptionalsStruct => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "ListNullablesAndOptionalsStruct" , AttributeId :: ListNullablesAndOptionalsStruct as u32) , AttributeId :: EnumAttr => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "EnumAttr" , AttributeId :: EnumAttr as u32) , AttributeId :: StructAttr => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "StructAttr" , AttributeId :: StructAttr as u32) , AttributeId :: RangeRestrictedInt8u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "RangeRestrictedInt8u" , AttributeId :: RangeRestrictedInt8u as u32) , AttributeId :: RangeRestrictedInt8s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "RangeRestrictedInt8s" , AttributeId :: RangeRestrictedInt8s as u32) , AttributeId :: RangeRestrictedInt16u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "RangeRestrictedInt16u" , AttributeId :: RangeRestrictedInt16u as u32) , AttributeId :: RangeRestrictedInt16s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "RangeRestrictedInt16s" , AttributeId :: RangeRestrictedInt16s as u32) , AttributeId :: ListLongOctetString => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "ListLongOctetString" , AttributeId :: ListLongOctetString as u32) , AttributeId :: ListFabricScoped => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "ListFabricScoped" , AttributeId :: ListFabricScoped as u32) , AttributeId :: TimedWriteBoolean => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TimedWriteBoolean" , AttributeId :: TimedWriteBoolean as u32) , AttributeId :: GeneralErrorBoolean => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "GeneralErrorBoolean" , AttributeId :: GeneralErrorBoolean as u32) , AttributeId :: ClusterErrorBoolean => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "ClusterErrorBoolean" , AttributeId :: ClusterErrorBoolean as u32) , AttributeId :: GlobalEnum => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "GlobalEnum" , AttributeId :: GlobalEnum as u32) , AttributeId :: GlobalStruct => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "GlobalStruct" , AttributeId :: GlobalStruct as u32) , AttributeId :: UnsupportedAttributeRequiringAdminPrivilege => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "UnsupportedAttributeRequiringAdminPrivilege" , AttributeId :: UnsupportedAttributeRequiringAdminPrivilege as u32) , AttributeId :: Unsupported => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Unsupported" , AttributeId :: Unsupported as u32) , AttributeId :: ReadFailureCode => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "ReadFailureCode" , AttributeId :: ReadFailureCode as u32) , AttributeId :: FailureInt32U => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "FailureInt32U" , AttributeId :: FailureInt32U as u32) , AttributeId :: NullableBoolean => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableBoolean" , AttributeId :: NullableBoolean as u32) , AttributeId :: NullableBitmap8 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableBitmap8" , AttributeId :: NullableBitmap8 as u32) , AttributeId :: NullableBitmap16 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableBitmap16" , AttributeId :: NullableBitmap16 as u32) , AttributeId :: NullableBitmap32 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableBitmap32" , AttributeId :: NullableBitmap32 as u32) , AttributeId :: NullableBitmap64 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableBitmap64" , AttributeId :: NullableBitmap64 as u32) , AttributeId :: NullableInt8u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt8u" , AttributeId :: NullableInt8u as u32) , AttributeId :: NullableInt16u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt16u" , AttributeId :: NullableInt16u as u32) , AttributeId :: NullableInt24u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt24u" , AttributeId :: NullableInt24u as u32) , AttributeId :: NullableInt32u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt32u" , AttributeId :: NullableInt32u as u32) , AttributeId :: NullableInt40u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt40u" , AttributeId :: NullableInt40u as u32) , AttributeId :: NullableInt48u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt48u" , AttributeId :: NullableInt48u as u32) , AttributeId :: NullableInt56u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt56u" , AttributeId :: NullableInt56u as u32) , AttributeId :: NullableInt64u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt64u" , AttributeId :: NullableInt64u as u32) , AttributeId :: NullableInt8s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt8s" , AttributeId :: NullableInt8s as u32) , AttributeId :: NullableInt16s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt16s" , AttributeId :: NullableInt16s as u32) , AttributeId :: NullableInt24s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt24s" , AttributeId :: NullableInt24s as u32) , AttributeId :: NullableInt32s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt32s" , AttributeId :: NullableInt32s as u32) , AttributeId :: NullableInt40s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt40s" , AttributeId :: NullableInt40s as u32) , AttributeId :: NullableInt48s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt48s" , AttributeId :: NullableInt48s as u32) , AttributeId :: NullableInt56s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt56s" , AttributeId :: NullableInt56s as u32) , AttributeId :: NullableInt64s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt64s" , AttributeId :: NullableInt64s as u32) , AttributeId :: NullableEnum8 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableEnum8" , AttributeId :: NullableEnum8 as u32) , AttributeId :: NullableEnum16 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableEnum16" , AttributeId :: NullableEnum16 as u32) , AttributeId :: NullableFloatSingle => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableFloatSingle" , AttributeId :: NullableFloatSingle as u32) , AttributeId :: NullableFloatDouble => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableFloatDouble" , AttributeId :: NullableFloatDouble as u32) , AttributeId :: NullableOctetString => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableOctetString" , AttributeId :: NullableOctetString as u32) , AttributeId :: NullableCharString => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableCharString" , AttributeId :: NullableCharString as u32) , AttributeId :: NullableEnumAttr => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableEnumAttr" , AttributeId :: NullableEnumAttr as u32) , AttributeId :: NullableStruct => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableStruct" , AttributeId :: NullableStruct as u32) , AttributeId :: NullableRangeRestrictedInt8u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableRangeRestrictedInt8u" , AttributeId :: NullableRangeRestrictedInt8u as u32) , AttributeId :: NullableRangeRestrictedInt8s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableRangeRestrictedInt8s" , AttributeId :: NullableRangeRestrictedInt8s as u32) , AttributeId :: NullableRangeRestrictedInt16u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableRangeRestrictedInt16u" , AttributeId :: NullableRangeRestrictedInt16u as u32) , AttributeId :: NullableRangeRestrictedInt16s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableRangeRestrictedInt16s" , AttributeId :: NullableRangeRestrictedInt16s as u32) , AttributeId :: WriteOnlyInt8u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "WriteOnlyInt8u" , AttributeId :: WriteOnlyInt8u as u32) , AttributeId :: NullableGlobalEnum => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableGlobalEnum" , AttributeId :: NullableGlobalEnum as u32) , AttributeId :: NullableGlobalStruct => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableGlobalStruct" , AttributeId :: NullableGlobalStruct as u32) , AttributeId :: GeneratedCommandList => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "GeneratedCommandList" , AttributeId :: GeneratedCommandList as u32) , AttributeId :: AcceptedCommandList => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "AcceptedCommandList" , AttributeId :: AcceptedCommandList as u32) , AttributeId :: AttributeList => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "AttributeList" , AttributeId :: AttributeList as u32) , AttributeId :: FeatureMap => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "FeatureMap" , AttributeId :: FeatureMap as u32) , AttributeId :: ClusterRevision => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "ClusterRevision" , AttributeId :: ClusterRevision as u32) , AttributeId :: MeiInt8u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "MeiInt8u" , AttributeId :: MeiInt8u as u32) , } if self . 0.1 { rs_matter_crate :: reexport :: defmt :: write ! (f , "::Write") } else { rs_matter_crate :: reexport :: defmt :: write ! (f , "::Read") } } } # [doc = "The command IDs for the cluster."] # [derive (Copy , Clone , Debug , Eq , PartialEq , Hash , rs_matter_crate :: reexport :: strum :: FromRepr)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u32)] pub enum CommandId { Test = 0 , TestNotHandled = 1 , TestSpecific = 2 , TestUnknownCommand = 3 , TestAddArguments = 4 , TestSimpleArgumentRequest = 5 , TestStructArrayArgumentRequest = 6 , TestStructArgumentRequest = 7 , TestNestedStructArgumentRequest = 8 , TestListStructArgumentRequest = 9 , TestListInt8UArgumentRequest = 10 , TestNestedStructListArgumentRequest = 11 , TestListNestedStructListArgumentRequest = 12 , TestListInt8UReverseRequest = 13 , TestEnumsRequest = 14 , TestNullableOptionalRequest = 15 , TestComplexNullableOptionalRequest = 16 , SimpleStructEchoRequest = 17 , TimedInvokeRequest = 18 , TestSimpleOptionalArgumentRequest = 19 , TestEmitTestEventRequest = 20 , TestEmitTestFabricScopedEventRequest = 21 , TestBatchHelperRequest = 22 , TestSecondBatchHelperRequest = 23 , StringEchoRequest = 24 , GlobalEchoRequest = 25 , TestCheckCommandFlags = 26 , TestDifferentVendorMeiRequest = 4294049962 } impl core :: convert :: TryFrom < rs_matter_crate :: dm :: CmdId > for CommandId { type Error = rs_matter_crate :: error :: Error ; fn try_from (id : rs_matter_crate :: dm :: CmdId) -> Result < Self , Self :: Error > { CommandId :: from_repr (id) . ok_or_else (|| rs_matter_crate :: error :: ErrorCode :: CommandNotFound . into ()) } } impl core :: fmt :: Debug for MetadataDebug < CommandId > { # [allow (unreachable_code)] fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "Cmd::") ? ; match self . 0 { CommandId :: Test => write ! (f , "{}(0x{:02x})" , "Test" , CommandId :: Test as u32) ? , CommandId :: TestNotHandled => write ! (f , "{}(0x{:02x})" , "TestNotHandled" , CommandId :: TestNotHandled as u32) ? , CommandId :: TestSpecific => write ! (f , "{}(0x{:02x})" , "TestSpecific" , CommandId :: TestSpecific as u32) ? , CommandId :: TestUnknownCommand => write ! (f , "{}(0x{:02x})" , "TestUnknownCommand" , CommandId :: TestUnknownCommand as u32) ? , CommandId :: TestAddArguments => write ! (f , "{}(0x{:02x})" , "TestAddArguments" , CommandId :: TestAddArguments as u32) ? , CommandId :: TestSimpleArgumentRequest => write ! (f , "{}(0x{:02x})" , "TestSimpleArgumentRequest" , CommandId :: TestSimpleArgumentRequest as u32) ? , CommandId :: TestStructArrayArgumentRequest => write ! (f , "{}(0x{:02x})" , "TestStructArrayArgumentRequest" , CommandId :: TestStructArrayArgumentRequest as u32) ? , CommandId :: TestStructArgumentRequest => write ! (f , "{}(0x{:02x})" , "TestStructArgumentRequest" , CommandId :: TestStructArgumentRequest as u32) ? , CommandId :: TestNestedStructArgumentRequest => write ! (f , "{}(0x{:02x})" , "TestNestedStructArgumentRequest" , CommandId :: TestNestedStructArgumentRequest as u32) ? , CommandId :: TestListStructArgumentRequest => write ! (f , "{}(0x{:02x})" , "TestListStructArgumentRequest" , CommandId :: TestListStructArgumentRequest as u32) ? , CommandId :: TestListInt8UArgumentRequest => write ! (f , "{}(0x{:02x})" , "TestListInt8UArgumentRequest" , CommandId :: TestListInt8UArgumentRequest as u32) ? , CommandId :: TestNestedStructListArgumentRequest => write ! (f , "{}(0x{:02x})" , "TestNestedStructListArgumentRequest" , CommandId :: TestNestedStructListArgumentRequest as u32) ? , CommandId :: TestListNestedStructListArgumentRequest => write ! (f , "{}(0x{:02x})" , "TestListNestedStructListArgumentRequest" , CommandId :: TestListNestedStructListArgumentRequest as u32) ? , CommandId :: TestListInt8UReverseRequest => write ! (f , "{}(0x{:02x})" , "TestListInt8UReverseRequest" , CommandId :: TestListInt8UReverseRequest as u32) ? , CommandId :: TestEnumsRequest => write ! (f , "{}(0x{:02x})" , "TestEnumsRequest" , CommandId :: TestEnumsRequest as u32) ? , CommandId :: TestNullableOptionalRequest => write ! (f , "{}(0x{:02x})" , "TestNullableOptionalRequest" , CommandId :: TestNullableOptionalRequest as u32) ? , CommandId :: TestComplexNullableOptionalRequest => write ! (f , "{}(0x{:02x})" , "TestComplexNullableOptionalRequest" , CommandId :: TestComplexNullableOptionalRequest as u32) ? , CommandId :: SimpleStructEchoRequest => write ! (f , "{}(0x{:02x})" , "SimpleStructEchoRequest" , CommandId :: SimpleStructEchoRequest as u32) ? , CommandId :: TimedInvokeRequest => write ! (f , "{}(0x{:02x})" , "TimedInvokeRequest" , CommandId :: TimedInvokeRequest as u32) ? , CommandId :: TestSimpleOptionalArgumentRequest => write ! (f , "{}(0x{:02x})" , "TestSimpleOptionalArgumentRequest" , CommandId :: TestSimpleOptionalArgumentRequest as u32) ? , CommandId :: TestEmitTestEventRequest => write ! (f , "{}(0x{:02x})" , "TestEmitTestEventRequest" , CommandId :: TestEmitTestEventRequest as u32) ? , CommandId :: TestEmitTestFabricScopedEventRequest => write ! (f , "{}(0x{:02x})" , "TestEmitTestFabricScopedEventRequest" , CommandId :: TestEmitTestFabricScopedEventRequest as u32) ? , CommandId :: TestBatchHelperRequest => write ! (f , "{}(0x{:02x})" , "TestBatchHelperRequest" , CommandId :: TestBatchHelperRequest as u32) ? , CommandId :: TestSecondBatchHelperRequest => write ! (f , "{}(0x{:02x})" , "TestSecondBatchHelperRequest" , CommandId :: TestSecondBatchHelperRequest as u32) ? , CommandId :: StringEchoRequest => write ! (f , "{}(0x{:02x})" , "StringEchoRequest" , CommandId :: StringEchoRequest as u32) ? , CommandId :: GlobalEchoRequest => write ! (f , "{}(0x{:02x})" , "GlobalEchoRequest" , CommandId :: GlobalEchoRequest as u32) ? , CommandId :: TestCheckCommandFlags => write ! (f , "{}(0x{:02x})" , "TestCheckCommandFlags" , CommandId :: TestCheckCommandFlags as u32) ? , CommandId :: TestDifferentVendorMeiRequest => write ! (f , "{}(0x{:02x})" , "TestDifferentVendorMeiRequest" , CommandId :: TestDifferentVendorMeiRequest as u32) ? , } write ! (f , "::Invoke") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for MetadataDebug < CommandId > { # [allow (unreachable_code)] fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "Cmd::") ; match self . 0 { CommandId :: Test => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Test" , CommandId :: Test as u32) , CommandId :: TestNotHandled => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestNotHandled" , CommandId :: TestNotHandled as u32) , CommandId :: TestSpecific => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestSpecific" , CommandId :: TestSpecific as u32) , CommandId :: TestUnknownCommand => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestUnknownCommand" , CommandId :: TestUnknownCommand as u32) , CommandId :: TestAddArguments => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestAddArguments" , CommandId :: TestAddArguments as u32) , CommandId :: TestSimpleArgumentRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestSimpleArgumentRequest" , CommandId :: TestSimpleArgumentRequest as u32) , CommandId :: TestStructArrayArgumentRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestStructArrayArgumentRequest" , CommandId :: TestStructArrayArgumentRequest as u32) , CommandId :: TestStructArgumentRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestStructArgumentRequest" , CommandId :: TestStructArgumentRequest as u32) , CommandId :: TestNestedStructArgumentRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestNestedStructArgumentRequest" , CommandId :: TestNestedStructArgumentRequest as u32) , CommandId :: TestListStructArgumentRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestListStructArgumentRequest" , CommandId :: TestListStructArgumentRequest as u32) , CommandId :: TestListInt8UArgumentRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestListInt8UArgumentRequest" , CommandId :: TestListInt8UArgumentRequest as u32) , CommandId :: TestNestedStructListArgumentRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestNestedStructListArgumentRequest" , CommandId :: TestNestedStructListArgumentRequest as u32) , CommandId :: TestListNestedStructListArgumentRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestListNestedStructListArgumentRequest" , CommandId :: TestListNestedStructListArgumentRequest as u32) , CommandId :: TestListInt8UReverseRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestListInt8UReverseRequest" , CommandId :: TestListInt8UReverseRequest as u32) , CommandId :: TestEnumsRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestEnumsRequest" , CommandId :: TestEnumsRequest as u32) , CommandId :: TestNullableOptionalRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestNullableOptionalRequest" , CommandId :: TestNullableOptionalRequest as u32) , CommandId :: TestComplexNullableOptionalRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestComplexNullableOptionalRequest" , CommandId :: TestComplexNullableOptionalRequest as u32) , CommandId :: SimpleStructEchoRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "SimpleStructEchoRequest" , CommandId :: SimpleStructEchoRequest as u32) , CommandId :: TimedInvokeRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TimedInvokeRequest" , CommandId :: TimedInvokeRequest as u32) , CommandId :: TestSimpleOptionalArgumentRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestSimpleOptionalArgumentRequest" , CommandId :: TestSimpleOptionalArgumentRequest as u32) , CommandId :: TestEmitTestEventRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestEmitTestEventRequest" , CommandId :: TestEmitTestEventRequest as u32) , CommandId :: TestEmitTestFabricScopedEventRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestEmitTestFabricScopedEventRequest" , CommandId :: TestEmitTestFabricScopedEventRequest as u32) , CommandId :: TestBatchHelperRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestBatchHelperRequest" , CommandId :: TestBatchHelperRequest as u32) , CommandId :: TestSecondBatchHelperRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestSecondBatchHelperRequest" , CommandId :: TestSecondBatchHelperRequest as u32) , CommandId :: StringEchoRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "StringEchoRequest" , CommandId :: StringEchoRequest as u32) , CommandId :: GlobalEchoRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "GlobalEchoRequest" , CommandId :: GlobalEchoRequest as u32) , CommandId :: TestCheckCommandFlags => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestCheckCommandFlags" , CommandId :: TestCheckCommandFlags as u32) , CommandId :: TestDifferentVendorMeiRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestDifferentVendorMeiRequest" , CommandId :: TestDifferentVendorMeiRequest as u32) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "::Invoke") } } # [doc = "The command response IDs for the cluster."] # [derive (Copy , Clone , Debug , Eq , PartialEq , Hash , rs_matter_crate :: reexport :: strum :: FromRepr)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u32)] pub enum CommandResponseId { TestSpecificResponse = 0 , TestAddArgumentsResponse = 1 , TestSimpleArgumentResponse = 2 , TestStructArrayArgumentResponse = 3 , TestListInt8UReverseResponse = 4 , TestEnumsResponse = 5 , TestNullableOptionalResponse = 6 , TestComplexNullableOptionalResponse = 7 , BooleanResponse = 8 , SimpleStructResponse = 9 , TestEmitTestEventResponse = 10 , TestEmitTestFabricScopedEventResponse = 11 , TestBatchHelperResponse = 12 , StringEchoResponse = 13 , GlobalEchoResponse = 14 , TestDifferentVendorMeiResponse = 4294049979 } impl core :: fmt :: Debug for MetadataDebug < CommandResponseId > { # [allow (unreachable_code)] fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "Cmd::") ? ; match self . 0 { CommandResponseId :: TestSpecificResponse => write ! (f , "{}(0x{:02x})" , "TestSpecificResponse" , CommandResponseId :: TestSpecificResponse as u32) ? , CommandResponseId :: TestAddArgumentsResponse => write ! (f , "{}(0x{:02x})" , "TestAddArgumentsResponse" , CommandResponseId :: TestAddArgumentsResponse as u32) ? , CommandResponseId :: TestSimpleArgumentResponse => write ! (f , "{}(0x{:02x})" , "TestSimpleArgumentResponse" , CommandResponseId :: TestSimpleArgumentResponse as u32) ? , CommandResponseId :: TestStructArrayArgumentResponse => write ! (f , "{}(0x{:02x})" , "TestStructArrayArgumentResponse" , CommandResponseId :: TestStructArrayArgumentResponse as u32) ? , CommandResponseId :: TestListInt8UReverseResponse => write ! (f , "{}(0x{:02x})" , "TestListInt8UReverseResponse" , CommandResponseId :: TestListInt8UReverseResponse as u32) ? , CommandResponseId :: TestEnumsResponse => write ! (f , "{}(0x{:02x})" , "TestEnumsResponse" , CommandResponseId :: TestEnumsResponse as u32) ? , CommandResponseId :: TestNullableOptionalResponse => write ! (f , "{}(0x{:02x})" , "TestNullableOptionalResponse" , CommandResponseId :: TestNullableOptionalResponse as u32) ? , CommandResponseId :: TestComplexNullableOptionalResponse => write ! (f , "{}(0x{:02x})" , "TestComplexNullableOptionalResponse" , CommandResponseId :: TestComplexNullableOptionalResponse as u32) ? , CommandResponseId :: BooleanResponse => write ! (f , "{}(0x{:02x})" , "BooleanResponse" , CommandResponseId :: BooleanResponse as u32) ? , CommandResponseId :: SimpleStructResponse => write ! (f , "{}(0x{:02x})" , "SimpleStructResponse" , CommandResponseId :: SimpleStructResponse as u32) ? , CommandResponseId :: TestEmitTestEventResponse => write ! (f , "{}(0x{:02x})" , "TestEmitTestEventResponse" , CommandResponseId :: TestEmitTestEventResponse as u32) ? , CommandResponseId :: TestEmitTestFabricScopedEventResponse => write ! (f , "{}(0x{:02x})" , "TestEmitTestFabricScopedEventResponse" , CommandResponseId :: TestEmitTestFabricScopedEventResponse as u32) ? , CommandResponseId :: TestBatchHelperResponse => write ! (f , "{}(0x{:02x})" , "TestBatchHelperResponse" , CommandResponseId :: TestBatchHelperResponse as u32) ? , CommandResponseId :: StringEchoResponse => write ! (f , "{}(0x{:02x})" , "StringEchoResponse" , CommandResponseId :: StringEchoResponse as u32) ? , CommandResponseId :: GlobalEchoResponse => write ! (f , "{}(0x{:02x})" , "GlobalEchoResponse" , CommandResponseId :: GlobalEchoResponse as u32) ? , CommandResponseId :: TestDifferentVendorMeiResponse => write ! (f , "{}(0x{:02x})" , "TestDifferentVendorMeiResponse" , CommandResponseId :: TestDifferentVendorMeiResponse as u32) ? , } write ! (f , "::Response") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for MetadataDebug < CommandResponseId > { # [allow (unreachable_code)] fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "Cmd::") ; match self . 0 { CommandResponseId :: TestSpecificResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestSpecificResponse" , CommandResponseId :: TestSpecificResponse as u32) , CommandResponseId :: TestAddArgumentsResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestAddArgumentsResponse" , CommandResponseId :: TestAddArgumentsResponse as u32) , CommandResponseId :: TestSimpleArgumentResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestSimpleArgumentResponse" , CommandResponseId :: TestSimpleArgumentResponse as u32) , CommandResponseId :: TestStructArrayArgumentResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestStructArrayArgumentResponse" , CommandResponseId :: TestStructArrayArgumentResponse as u32) , CommandResponseId :: TestListInt8UReverseResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestListInt8UReverseResponse" , CommandResponseId :: TestListInt8UReverseResponse as u32) , CommandResponseId :: TestEnumsResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestEnumsResponse" , CommandResponseId :: TestEnumsResponse as u32) , CommandResponseId :: TestNullableOptionalResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestNullableOptionalResponse" , CommandResponseId :: TestNullableOptionalResponse as u32) , CommandResponseId :: TestComplexNullableOptionalResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestComplexNullableOptionalResponse" , CommandResponseId :: TestComplexNullableOptionalResponse as u32) , CommandResponseId :: BooleanResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "BooleanResponse" , CommandResponseId :: BooleanResponse as u32) , CommandResponseId :: SimpleStructResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "SimpleStructResponse" , CommandResponseId :: SimpleStructResponse as u32) , CommandResponseId :: TestEmitTestEventResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestEmitTestEventResponse" , CommandResponseId :: TestEmitTestEventResponse as u32) , CommandResponseId :: TestEmitTestFabricScopedEventResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestEmitTestFabricScopedEventResponse" , CommandResponseId :: TestEmitTestFabricScopedEventResponse as u32) , CommandResponseId :: TestBatchHelperResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestBatchHelperResponse" , CommandResponseId :: TestBatchHelperResponse as u32) , CommandResponseId :: StringEchoResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "StringEchoResponse" , CommandResponseId :: StringEchoResponse as u32) , CommandResponseId :: GlobalEchoResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "GlobalEchoResponse" , CommandResponseId :: GlobalEchoResponse as u32) , CommandResponseId :: TestDifferentVendorMeiResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestDifferentVendorMeiResponse" , CommandResponseId :: TestDifferentVendorMeiResponse as u32) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "::Response") } } impl core :: convert :: TryFrom < rs_matter_crate :: dm :: CmdId > for CommandResponseId { type Error = rs_matter_crate :: error :: Error ; fn try_from (id : rs_matter_crate :: dm :: CmdId) -> Result < Self , Self :: Error > { CommandResponseId :: from_repr (id) . ok_or_else (|| rs_matter_crate :: error :: ErrorCode :: CommandNotFound . into ()) } } # [doc = "The event IDs for the cluster."] # [derive (Copy , Clone , Debug , Eq , PartialEq , Hash , rs_matter_crate :: reexport :: strum :: FromRepr)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u32)] pub enum EventId { TestEvent = 1 , TestFabricScopedEvent = 2 , TestDifferentVendorMeiEvent = 4294050030 } impl core :: convert :: TryFrom < rs_matter_crate :: dm :: EventId > for EventId { type Error = rs_matter_crate :: error :: Error ; fn try_from (id : rs_matter_crate :: dm :: EventId) -> Result < Self , Self :: Error > { EventId :: from_repr (id) . ok_or_else (|| rs_matter_crate :: error :: ErrorCode :: EventNotFound . into ()) } } impl core :: fmt :: Debug for MetadataDebug < EventId > { # [allow (unreachable_code)] fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "Event::") ? ; match self . 0 { EventId :: TestEvent => write ! (f , "{}(0x{:02x})" , "TestEvent" , EventId :: TestEvent as u32) ? , EventId :: TestFabricScopedEvent => write ! (f , "{}(0x{:02x})" , "TestFabricScopedEvent" , EventId :: TestFabricScopedEvent as u32) ? , EventId :: TestDifferentVendorMeiEvent => write ! (f , "{}(0x{:02x})" , "TestDifferentVendorMeiEvent" , EventId :: TestDifferentVendorMeiEvent as u32) ? , } write ! (f , "::Emit") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for MetadataDebug < EventId > { # [allow (unreachable_code)] fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "Event::") ; match self . 0 { EventId :: TestEvent => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestEvent" , EventId :: TestEvent as u32) , EventId :: TestFabricScopedEvent => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestFabricScopedEvent" , EventId :: TestFabricScopedEvent as u32) , EventId :: TestDifferentVendorMeiEvent => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestDifferentVendorMeiEvent" , EventId :: TestDifferentVendorMeiEvent as u32) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "::Emit") } } use rs_matter_crate :: dm :: clusters :: decl :: globals :: * ; # [doc = "The cluster metadata. By default, all cluster attributes, commands and events are allowed, and the revision is the latest one. Use `Cluster::with_*` to reconfigure."] pub const FULL_CLUSTER : rs_matter_crate :: dm :: Cluster < 'static > = rs_matter_crate :: dm :: Cluster :: new (4294048773 , 1 , 0 , & [rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Boolean as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Bitmap8 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Bitmap16 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Bitmap32 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Bitmap64 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int8u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int16u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int24u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int32u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int40u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int48u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int56u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int64u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int8s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int16s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int24s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int32s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int40s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int48s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int56s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int64s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Enum8 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Enum16 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: FloatSingle as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: FloatDouble as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: OctetString as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: ListInt8u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: A) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: ListOctetString as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: A) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: ListStructOctetString as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: A) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: LongOctetString as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: CharString as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: LongCharString as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: EpochUs as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: EpochS as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: VendorId as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: ListNullablesAndOptionalsStruct as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: A) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: EnumAttr as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: StructAttr as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: RangeRestrictedInt8u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: RangeRestrictedInt8s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: RangeRestrictedInt16u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: RangeRestrictedInt16s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: ListLongOctetString as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: A) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: ListFabricScoped as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: A) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: TimedWriteBoolean as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) . union (rs_matter_crate :: dm :: Access :: TIMED_ONLY) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: GeneralErrorBoolean as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: ClusterErrorBoolean as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: GlobalEnum as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: GlobalStruct as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: UnsupportedAttributeRequiringAdminPrivilege as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN) , rs_matter_crate :: dm :: Quality :: O) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Unsupported as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: O) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: ReadFailureCode as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: O) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: FailureInt32U as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: O) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableBoolean as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableBitmap8 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableBitmap16 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableBitmap32 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableBitmap64 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt8u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt16u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt24u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt32u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt40u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt48u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt56u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt64u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt8s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt16s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt24s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt32s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt40s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt48s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt56s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt64s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableEnum8 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableEnum16 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableFloatSingle as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableFloatDouble as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableOctetString as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableCharString as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableEnumAttr as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableStruct as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableRangeRestrictedInt8u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableRangeRestrictedInt8s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableRangeRestrictedInt16u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableRangeRestrictedInt16s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: WriteOnlyInt8u as _ , rs_matter_crate :: dm :: Access :: WRITE . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN))) , rs_matter_crate :: dm :: Quality :: O) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableGlobalEnum as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableGlobalStruct as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: GeneratedCommandList as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: NEED_VIEW) , rs_matter_crate :: dm :: Quality :: A) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: AcceptedCommandList as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: NEED_VIEW) , rs_matter_crate :: dm :: Quality :: A) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: AttributeList as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: NEED_VIEW) , rs_matter_crate :: dm :: Quality :: A) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: FeatureMap as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: NEED_VIEW) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: ClusterRevision as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: NEED_VIEW) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: MeiInt8u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) ,] , & [rs_matter_crate :: dm :: Command :: new (CommandId :: Test as _ , None , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestNotHandled as _ , None , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestSpecific as _ , Some (CommandResponseId :: TestSpecificResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestUnknownCommand as _ , None , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestAddArguments as _ , Some (CommandResponseId :: TestAddArgumentsResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestSimpleArgumentRequest as _ , Some (CommandResponseId :: TestSimpleArgumentResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestStructArrayArgumentRequest as _ , Some (CommandResponseId :: TestStructArrayArgumentResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestStructArgumentRequest as _ , Some (CommandResponseId :: BooleanResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestNestedStructArgumentRequest as _ , Some (CommandResponseId :: BooleanResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestListStructArgumentRequest as _ , Some (CommandResponseId :: BooleanResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestListInt8UArgumentRequest as _ , Some (CommandResponseId :: BooleanResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestNestedStructListArgumentRequest as _ , Some (CommandResponseId :: BooleanResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestListNestedStructListArgumentRequest as _ , Some (CommandResponseId :: BooleanResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestListInt8UReverseRequest as _ , Some (CommandResponseId :: TestListInt8UReverseResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestEnumsRequest as _ , Some (CommandResponseId :: TestEnumsResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestNullableOptionalRequest as _ , Some (CommandResponseId :: TestNullableOptionalResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestComplexNullableOptionalRequest as _ , Some (CommandResponseId :: TestComplexNullableOptionalResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: SimpleStructEchoRequest as _ , Some (CommandResponseId :: SimpleStructResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TimedInvokeRequest as _ , None , rs_matter_crate :: dm :: Access :: WO . union (rs_matter_crate :: dm :: Access :: TIMED_ONLY) ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestSimpleOptionalArgumentRequest as _ , None , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestEmitTestEventRequest as _ , Some (CommandResponseId :: TestEmitTestEventResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestEmitTestFabricScopedEventRequest as _ , Some (CommandResponseId :: TestEmitTestFabricScopedEventResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestBatchHelperRequest as _ , Some (CommandResponseId :: TestBatchHelperResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestSecondBatchHelperRequest as _ , Some (CommandResponseId :: TestBatchHelperResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: StringEchoRequest as _ , Some (CommandResponseId :: StringEchoResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: GlobalEchoRequest as _ , Some (CommandResponseId :: GlobalEchoResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestCheckCommandFlags as _ , None , rs_matter_crate :: dm :: Access :: WO . union (rs_matter_crate :: dm :: Access :: TIMED_ONLY) . union (rs_matter_crate :: dm :: Access :: FAB_SCOPED) ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestDifferentVendorMeiRequest as _ , Some (CommandResponseId :: TestDifferentVendorMeiResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) ,] , & [rs_matter_crate :: dm :: Event :: new (EventId :: TestEvent as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: NEED_VIEW) ,) , rs_matter_crate :: dm :: Event :: new (EventId :: TestFabricScopedEvent as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: NEED_VIEW) . union (rs_matter_crate :: dm :: Access :: FAB_SENSITIVE) ,) , rs_matter_crate :: dm :: Event :: new (EventId :: TestDifferentVendorMeiEvent as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: NEED_VIEW) ,) ,] , | _ , _ , _ | true , | _ , _ , _ | true , | _ , _ , _ | true ,) ; # [doc = "A helper struct to generate the cluster debug info."] struct MetadataDebug < T > (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) ; fn boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > ; fn bitmap_8 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < Bitmap8MaskMap , rs_matter_crate :: error :: Error > ; fn bitmap_16 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < Bitmap16MaskMap , rs_matter_crate :: error :: Error > ; fn bitmap_32 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < Bitmap32MaskMap , rs_matter_crate :: error :: Error > ; fn bitmap_64 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < Bitmap64MaskMap , rs_matter_crate :: error :: Error > ; fn int_8_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u8 , rs_matter_crate :: error :: Error > ; fn int_16_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u16 , rs_matter_crate :: error :: Error > ; fn int_24_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u32 , rs_matter_crate :: error :: Error > ; fn int_32_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u32 , rs_matter_crate :: error :: Error > ; fn int_40_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u64 , rs_matter_crate :: error :: Error > ; fn int_48_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u64 , rs_matter_crate :: error :: Error > ; fn int_56_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u64 , rs_matter_crate :: error :: Error > ; fn int_64_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u64 , rs_matter_crate :: error :: Error > ; fn int_8_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i8 , rs_matter_crate :: error :: Error > ; fn int_16_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i16 , rs_matter_crate :: error :: Error > ; fn int_24_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i32 , rs_matter_crate :: error :: Error > ; fn int_32_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i32 , rs_matter_crate :: error :: Error > ; fn int_40_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i64 , rs_matter_crate :: error :: Error > ; fn int_48_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i64 , rs_matter_crate :: error :: Error > ; fn int_56_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i64 , rs_matter_crate :: error :: Error > ; fn int_64_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i64 , rs_matter_crate :: error :: Error > ; fn enum_8 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u8 , rs_matter_crate :: error :: Error > ; fn enum_16 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u16 , rs_matter_crate :: error :: Error > ; fn float_single (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < f32 , rs_matter_crate :: error :: Error > ; fn float_double (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < f64 , rs_matter_crate :: error :: Error > ; fn octet_string < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: tlv :: OctetsBuilder < P >) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > >) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > >) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > >) -> Result < P , rs_matter_crate :: error :: Error > ; 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 >) -> Result < P , rs_matter_crate :: error :: Error > ; fn char_string < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: tlv :: Utf8StrBuilder < P >) -> Result < P , rs_matter_crate :: error :: Error > ; 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 >) -> Result < P , rs_matter_crate :: error :: Error > ; fn epoch_us (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u64 , rs_matter_crate :: error :: Error > ; fn epoch_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u32 , rs_matter_crate :: error :: Error > ; fn vendor_id (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u16 , rs_matter_crate :: error :: Error > ; 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 > >) -> Result < P , rs_matter_crate :: error :: Error > ; fn enum_attr (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < SimpleEnum , rs_matter_crate :: error :: Error > ; fn struct_attr < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : SimpleStructBuilder < P >) -> Result < P , rs_matter_crate :: error :: Error > ; fn range_restricted_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u8 , rs_matter_crate :: error :: Error > ; fn range_restricted_int_8_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i8 , rs_matter_crate :: error :: Error > ; fn range_restricted_int_16_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u16 , rs_matter_crate :: error :: Error > ; fn range_restricted_int_16_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i16 , rs_matter_crate :: error :: Error > ; 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 > >) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > >) -> Result < P , rs_matter_crate :: error :: Error > ; fn timed_write_boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > ; fn general_error_boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > ; fn cluster_error_boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > ; fn global_enum (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < TestGlobalEnum , rs_matter_crate :: error :: Error > ; fn global_struct < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : TestGlobalStructBuilder < P >) -> Result < P , rs_matter_crate :: error :: Error > ; fn unsupported_attribute_requiring_admin_privilege (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > { Err (rs_matter_crate :: error :: ErrorCode :: AttributeNotFound . into ()) } fn unsupported (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > { Err (rs_matter_crate :: error :: ErrorCode :: AttributeNotFound . into ()) } fn read_failure_code (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u8 , rs_matter_crate :: error :: Error > { Err (rs_matter_crate :: error :: ErrorCode :: AttributeNotFound . into ()) } fn failure_int_32_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u32 , rs_matter_crate :: error :: Error > { Err (rs_matter_crate :: error :: ErrorCode :: AttributeNotFound . into ()) } fn nullable_boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < bool > , rs_matter_crate :: error :: Error > ; fn nullable_bitmap_8 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < Bitmap8MaskMap > , rs_matter_crate :: error :: Error > ; fn nullable_bitmap_16 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < Bitmap16MaskMap > , rs_matter_crate :: error :: Error > ; fn nullable_bitmap_32 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < Bitmap32MaskMap > , rs_matter_crate :: error :: Error > ; fn nullable_bitmap_64 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < Bitmap64MaskMap > , rs_matter_crate :: error :: Error > ; fn nullable_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u8 > , rs_matter_crate :: error :: Error > ; fn nullable_int_16_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u16 > , rs_matter_crate :: error :: Error > ; fn nullable_int_24_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u32 > , rs_matter_crate :: error :: Error > ; fn nullable_int_32_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u32 > , rs_matter_crate :: error :: Error > ; fn nullable_int_40_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u64 > , rs_matter_crate :: error :: Error > ; fn nullable_int_48_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u64 > , rs_matter_crate :: error :: Error > ; fn nullable_int_56_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u64 > , rs_matter_crate :: error :: Error > ; fn nullable_int_64_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u64 > , rs_matter_crate :: error :: Error > ; fn nullable_int_8_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < i8 > , rs_matter_crate :: error :: Error > ; fn nullable_int_16_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < i16 > , rs_matter_crate :: error :: Error > ; fn nullable_int_24_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < i32 > , rs_matter_crate :: error :: Error > ; fn nullable_int_32_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < i32 > , rs_matter_crate :: error :: Error > ; fn nullable_int_40_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < i64 > , rs_matter_crate :: error :: Error > ; fn nullable_int_48_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < i64 > , rs_matter_crate :: error :: Error > ; fn nullable_int_56_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < i64 > , rs_matter_crate :: error :: Error > ; fn nullable_int_64_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < i64 > , rs_matter_crate :: error :: Error > ; fn nullable_enum_8 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u8 > , rs_matter_crate :: error :: Error > ; fn nullable_enum_16 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u16 > , rs_matter_crate :: error :: Error > ; fn nullable_float_single (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < f32 > , rs_matter_crate :: error :: Error > ; fn nullable_float_double (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < f64 > , rs_matter_crate :: error :: Error > ; 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 > >) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > >) -> Result < P , rs_matter_crate :: error :: Error > ; fn nullable_enum_attr (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < SimpleEnum > , rs_matter_crate :: error :: Error > ; 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 > >) -> Result < P , rs_matter_crate :: error :: Error > ; fn nullable_range_restricted_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u8 > , rs_matter_crate :: error :: Error > ; fn nullable_range_restricted_int_8_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < i8 > , rs_matter_crate :: error :: Error > ; fn nullable_range_restricted_int_16_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u16 > , rs_matter_crate :: error :: Error > ; fn nullable_range_restricted_int_16_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < i16 > , rs_matter_crate :: error :: Error > ; fn nullable_global_enum (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < TestGlobalEnum > , rs_matter_crate :: error :: Error > ; fn nullable_global_struct < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: tlv :: NullableBuilder < P , TestGlobalStructBuilder < P > >) -> Result < P , rs_matter_crate :: error :: Error > ; fn mei_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u8 , rs_matter_crate :: error :: Error > ; fn set_boolean (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : bool) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_bitmap_8 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : Bitmap8MaskMap) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_bitmap_16 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : Bitmap16MaskMap) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_bitmap_32 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : Bitmap32MaskMap) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u8) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u32) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u64) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u64) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : i8) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : i32) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : i64) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : i64) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u8) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_enum_16 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u16) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_float_single (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : f32) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_float_double (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : f64) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& 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 > ; 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 > ; 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 > ; 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 (& 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Utf8Str < '_ >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_epoch_us (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u64) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_epoch_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u32) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& 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 > ; fn set_enum_attr (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : SimpleEnum) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u8) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u16) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& 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 > ; 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 > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : bool) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_cluster_error_boolean (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : bool) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_global_enum (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : TestGlobalEnum) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_global_struct (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : TestGlobalStruct < '_ >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_unsupported_attribute_requiring_admin_privilege (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : bool) -> Result < () , rs_matter_crate :: error :: Error > { Err (rs_matter_crate :: error :: ErrorCode :: AttributeNotFound . into ()) } 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 :: AttributeNotFound . into ()) } fn set_read_failure_code (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u8) -> Result < () , rs_matter_crate :: error :: Error > { Err (rs_matter_crate :: error :: ErrorCode :: AttributeNotFound . into ()) } fn set_failure_int_32_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u32) -> Result < () , rs_matter_crate :: error :: Error > { Err (rs_matter_crate :: error :: ErrorCode :: AttributeNotFound . into ()) } fn set_nullable_boolean (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < bool >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_bitmap_8 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < Bitmap8MaskMap >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_bitmap_16 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < Bitmap16MaskMap >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_bitmap_32 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < Bitmap32MaskMap >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_bitmap_64 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < Bitmap64MaskMap >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u8 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_16_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u16 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_24_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u32 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_32_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u32 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_40_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u64 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_48_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u64 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_56_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u64 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_64_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u64 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_8_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i8 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_16_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i16 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_24_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i32 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_32_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i32 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_40_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i64 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_48_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i64 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_56_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i64 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_64_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i64 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_enum_8 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u8 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_enum_16 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u16 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_float_single (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < f32 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_float_double (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < f64 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_octet_string (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: OctetStr < '_ > >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_char_string (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_enum_attr (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < SimpleEnum >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_struct (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < SimpleStruct < '_ > >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_range_restricted_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u8 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_range_restricted_int_8_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i8 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_range_restricted_int_16_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u16 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_range_restricted_int_16_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i16 >) -> Result < () , rs_matter_crate :: error :: Error > ; 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 :: AttributeNotFound . into ()) } fn set_nullable_global_enum (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < TestGlobalEnum >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_global_struct (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < TestGlobalStruct < '_ > >) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext ,) -> Result < () , rs_matter_crate :: error :: Error > ; fn handle_test_not_handled (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext ,) -> Result < () , rs_matter_crate :: error :: Error > ; fn handle_test_specific < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , response : TestSpecificResponseBuilder < P > ,) -> Result < P , rs_matter_crate :: error :: Error > ; fn handle_test_unknown_command (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext ,) -> Result < () , rs_matter_crate :: error :: Error > ; fn handle_test_add_arguments < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestAddArgumentsRequest < '_ > , response : TestAddArgumentsResponseBuilder < P > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; fn handle_test_enums_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestEnumsRequestRequest < '_ > , response : TestEnumsResponseBuilder < P > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestSimpleOptionalArgumentRequestRequest < '_ > ,) -> Result < () , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; fn handle_string_echo_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : StringEchoRequestRequest < '_ > , response : StringEchoResponseBuilder < P > ,) -> Result < P , rs_matter_crate :: error :: Error > ; fn handle_global_echo_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : GlobalEchoRequestRequest < '_ > , response : GlobalEchoResponseBuilder < P > ,) -> Result < P , rs_matter_crate :: error :: Error > ; fn handle_test_check_command_flags (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext ,) -> Result < () , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; } impl < T > ClusterHandler for & T where T : ClusterHandler { const CLUSTER : rs_matter_crate :: dm :: Cluster < 'static > = T :: CLUSTER ; fn dataver (& self) -> u32 { T :: dataver (self) } fn dataver_changed (& self) { T :: dataver_changed (self) } fn boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > { T :: boolean (self , ctx) } fn bitmap_8 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < Bitmap8MaskMap , rs_matter_crate :: error :: Error > { T :: bitmap_8 (self , ctx) } fn bitmap_16 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < Bitmap16MaskMap , rs_matter_crate :: error :: Error > { T :: bitmap_16 (self , ctx) } fn bitmap_32 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < Bitmap32MaskMap , rs_matter_crate :: error :: Error > { T :: bitmap_32 (self , ctx) } fn bitmap_64 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < Bitmap64MaskMap , rs_matter_crate :: error :: Error > { T :: bitmap_64 (self , ctx) } fn int_8_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u8 , rs_matter_crate :: error :: Error > { T :: int_8_u (self , ctx) } fn int_16_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u16 , rs_matter_crate :: error :: Error > { T :: int_16_u (self , ctx) } fn int_24_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u32 , rs_matter_crate :: error :: Error > { T :: int_24_u (self , ctx) } fn int_32_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u32 , rs_matter_crate :: error :: Error > { T :: int_32_u (self , ctx) } fn int_40_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u64 , rs_matter_crate :: error :: Error > { T :: int_40_u (self , ctx) } fn int_48_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u64 , rs_matter_crate :: error :: Error > { T :: int_48_u (self , ctx) } fn int_56_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u64 , rs_matter_crate :: error :: Error > { T :: int_56_u (self , ctx) } fn int_64_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u64 , rs_matter_crate :: error :: Error > { T :: int_64_u (self , ctx) } fn int_8_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i8 , rs_matter_crate :: error :: Error > { T :: int_8_s (self , ctx) } fn int_16_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i16 , rs_matter_crate :: error :: Error > { T :: int_16_s (self , ctx) } fn int_24_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i32 , rs_matter_crate :: error :: Error > { T :: int_24_s (self , ctx) } fn int_32_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i32 , rs_matter_crate :: error :: Error > { T :: int_32_s (self , ctx) } fn int_40_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i64 , rs_matter_crate :: error :: Error > { T :: int_40_s (self , ctx) } fn int_48_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i64 , rs_matter_crate :: error :: Error > { T :: int_48_s (self , ctx) } fn int_56_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i64 , rs_matter_crate :: error :: Error > { T :: int_56_s (self , ctx) } fn int_64_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i64 , rs_matter_crate :: error :: Error > { T :: int_64_s (self , ctx) } fn enum_8 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u8 , rs_matter_crate :: error :: Error > { T :: enum_8 (self , ctx) } fn enum_16 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u16 , rs_matter_crate :: error :: Error > { T :: enum_16 (self , ctx) } fn float_single (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < f32 , rs_matter_crate :: error :: Error > { T :: float_single (self , ctx) } fn float_double (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < f64 , rs_matter_crate :: error :: Error > { T :: float_double (self , ctx) } fn octet_string < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: tlv :: OctetsBuilder < P >) -> Result < P , rs_matter_crate :: error :: Error > { T :: octet_string (self , ctx , builder) } 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 > >) -> Result < P , rs_matter_crate :: error :: Error > { T :: list_int_8_u (self , ctx , builder) } 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 > >) -> Result < P , rs_matter_crate :: error :: Error > { T :: list_octet_string (self , ctx , builder) } 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 > >) -> Result < P , rs_matter_crate :: error :: Error > { T :: list_struct_octet_string (self , ctx , builder) } 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 >) -> Result < P , rs_matter_crate :: error :: Error > { T :: long_octet_string (self , ctx , builder) } fn char_string < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: tlv :: Utf8StrBuilder < P >) -> Result < P , rs_matter_crate :: error :: Error > { T :: char_string (self , ctx , builder) } 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 >) -> Result < P , rs_matter_crate :: error :: Error > { T :: long_char_string (self , ctx , builder) } fn epoch_us (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u64 , rs_matter_crate :: error :: Error > { T :: epoch_us (self , ctx) } fn epoch_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u32 , rs_matter_crate :: error :: Error > { T :: epoch_s (self , ctx) } fn vendor_id (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u16 , rs_matter_crate :: error :: Error > { T :: vendor_id (self , ctx) } 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 > >) -> Result < P , rs_matter_crate :: error :: Error > { T :: list_nullables_and_optionals_struct (self , ctx , builder) } fn enum_attr (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < SimpleEnum , rs_matter_crate :: error :: Error > { T :: enum_attr (self , ctx) } fn struct_attr < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : SimpleStructBuilder < P >) -> Result < P , rs_matter_crate :: error :: Error > { T :: struct_attr (self , ctx , builder) } fn range_restricted_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u8 , rs_matter_crate :: error :: Error > { T :: range_restricted_int_8_u (self , ctx) } fn range_restricted_int_8_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i8 , rs_matter_crate :: error :: Error > { T :: range_restricted_int_8_s (self , ctx) } fn range_restricted_int_16_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u16 , rs_matter_crate :: error :: Error > { T :: range_restricted_int_16_u (self , ctx) } fn range_restricted_int_16_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i16 , rs_matter_crate :: error :: Error > { T :: range_restricted_int_16_s (self , ctx) } 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 > >) -> Result < P , rs_matter_crate :: error :: Error > { T :: list_long_octet_string (self , ctx , builder) } 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 > >) -> Result < P , rs_matter_crate :: error :: Error > { T :: list_fabric_scoped (self , ctx , builder) } fn timed_write_boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > { T :: timed_write_boolean (self , ctx) } fn general_error_boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > { T :: general_error_boolean (self , ctx) } fn cluster_error_boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > { T :: cluster_error_boolean (self , ctx) } fn global_enum (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < TestGlobalEnum , rs_matter_crate :: error :: Error > { T :: global_enum (self , ctx) } fn global_struct < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : TestGlobalStructBuilder < P >) -> Result < P , rs_matter_crate :: error :: Error > { T :: global_struct (self , ctx , builder) } fn unsupported_attribute_requiring_admin_privilege (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > { T :: unsupported_attribute_requiring_admin_privilege (self , ctx) } fn unsupported (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > { T :: unsupported (self , ctx) } fn read_failure_code (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u8 , rs_matter_crate :: error :: Error > { T :: read_failure_code (self , ctx) } fn failure_int_32_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u32 , rs_matter_crate :: error :: Error > { T :: failure_int_32_u (self , ctx) } fn nullable_boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < bool > , 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 :: tlv :: Nullable < Bitmap8MaskMap > , 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 :: tlv :: Nullable < Bitmap16MaskMap > , 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 :: tlv :: Nullable < Bitmap32MaskMap > , 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 :: tlv :: Nullable < Bitmap64MaskMap > , 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 :: tlv :: Nullable < u8 > , 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 :: tlv :: Nullable < u16 > , 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 :: tlv :: Nullable < u32 > , 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 :: tlv :: Nullable < u32 > , 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 :: tlv :: Nullable < u64 > , 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 :: tlv :: Nullable < u64 > , 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 :: tlv :: Nullable < u64 > , 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 :: tlv :: Nullable < u64 > , 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 :: tlv :: Nullable < i8 > , 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 :: tlv :: Nullable < i16 > , 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 :: tlv :: Nullable < i32 > , 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 :: tlv :: Nullable < i32 > , 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 :: tlv :: Nullable < i64 > , 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 :: tlv :: Nullable < i64 > , 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 :: tlv :: Nullable < i64 > , 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 :: tlv :: Nullable < i64 > , 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 :: tlv :: Nullable < u8 > , 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 :: tlv :: Nullable < u16 > , 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 :: tlv :: Nullable < f32 > , 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 :: tlv :: Nullable < f64 > , rs_matter_crate :: error :: Error > { T :: nullable_float_double (self , ctx) } 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 > >) -> Result < P , rs_matter_crate :: error :: Error > { T :: nullable_octet_string (self , ctx , builder) } 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 > >) -> Result < P , rs_matter_crate :: error :: Error > { T :: nullable_char_string (self , ctx , builder) } fn nullable_enum_attr (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < SimpleEnum > , rs_matter_crate :: error :: Error > { T :: nullable_enum_attr (self , ctx) } 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 > >) -> Result < P , rs_matter_crate :: error :: Error > { 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 :: tlv :: Nullable < u8 > , 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 :: tlv :: Nullable < i8 > , 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 :: tlv :: Nullable < u16 > , 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 :: tlv :: Nullable < i16 > , rs_matter_crate :: error :: Error > { T :: nullable_range_restricted_int_16_s (self , ctx) } fn nullable_global_enum (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < TestGlobalEnum > , rs_matter_crate :: error :: Error > { T :: nullable_global_enum (self , ctx) } fn nullable_global_struct < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: tlv :: NullableBuilder < P , TestGlobalStructBuilder < P > >) -> Result < P , rs_matter_crate :: error :: Error > { T :: nullable_global_struct (self , ctx , builder) } fn mei_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u8 , rs_matter_crate :: error :: Error > { T :: mei_int_8_u (self , ctx) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } fn set_global_enum (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : TestGlobalEnum) -> Result < () , rs_matter_crate :: error :: Error > { T :: set_global_enum (self , ctx , value) } fn set_global_struct (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : TestGlobalStruct < '_ >) -> Result < () , rs_matter_crate :: error :: Error > { T :: set_global_struct (self , ctx , value) } fn set_unsupported_attribute_requiring_admin_privilege (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : bool) -> Result < () , rs_matter_crate :: error :: Error > { T :: set_unsupported_attribute_requiring_admin_privilege (self , ctx , value) } 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) } fn set_read_failure_code (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u8) -> Result < () , rs_matter_crate :: error :: Error > { T :: set_read_failure_code (self , ctx , value) } fn set_failure_int_32_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u32) -> Result < () , rs_matter_crate :: error :: Error > { T :: set_failure_int_32_u (self , ctx , value) } fn set_nullable_boolean (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < bool >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < Bitmap8MaskMap >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < Bitmap16MaskMap >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < Bitmap32MaskMap >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < Bitmap64MaskMap >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u8 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u16 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u32 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u32 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u64 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u64 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u64 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u64 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < i8 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < i16 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < i32 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < i32 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < i64 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < i64 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < i64 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < i64 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u8 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u16 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < f32 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < f64 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < rs_matter_crate :: tlv :: OctetStr < '_ > >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < SimpleEnum >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < SimpleStruct < '_ > >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u8 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < i8 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u16 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < i16 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 > { T :: set_write_only_int_8_u (self , ctx , value) } fn set_nullable_global_enum (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < TestGlobalEnum >) -> Result < () , rs_matter_crate :: error :: Error > { T :: set_nullable_global_enum (self , ctx , value) } fn set_nullable_global_struct (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < TestGlobalStruct < '_ > >) -> Result < () , rs_matter_crate :: error :: Error > { T :: set_nullable_global_struct (self , ctx , value) } 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) } fn handle_test (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext ,) -> Result < () , rs_matter_crate :: error :: Error > { T :: handle_test (self , ctx) } 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) } fn handle_test_specific < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , response : TestSpecificResponseBuilder < P > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: 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 > { T :: handle_test_unknown_command (self , ctx) } fn handle_test_add_arguments < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestAddArgumentsRequest < '_ > , response : TestAddArgumentsResponseBuilder < P > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_add_arguments (self , ctx , request , response) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_simple_argument_request (self , ctx , request , response) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_struct_array_argument_request (self , ctx , request , response) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_struct_argument_request (self , ctx , request , response) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_nested_struct_argument_request (self , ctx , request , response) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_list_struct_argument_request (self , ctx , request , response) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: 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 < P > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: 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 < P > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_list_nested_struct_list_argument_request (self , ctx , request , response) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_list_int_8_u_reverse_request (self , ctx , request , response) } fn handle_test_enums_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestEnumsRequestRequest < '_ > , response : TestEnumsResponseBuilder < P > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_enums_request (self , ctx , request , response) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: 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 < P > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_complex_nullable_optional_request (self , ctx , request , response) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: 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 > { T :: 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 > { T :: handle_test_simple_optional_argument_request (self , ctx , request) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: 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 < P > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_emit_test_fabric_scoped_event_request (self , ctx , request , response) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_batch_helper_request (self , ctx , request , response) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_second_batch_helper_request (self , ctx , request , response) } fn handle_string_echo_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : StringEchoRequestRequest < '_ > , response : StringEchoResponseBuilder < P > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_string_echo_request (self , ctx , request , response) } fn handle_global_echo_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : GlobalEchoRequestRequest < '_ > , response : GlobalEchoResponseBuilder < P > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_global_echo_request (self , ctx , request , response) } fn handle_test_check_command_flags (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext ,) -> Result < () , rs_matter_crate :: error :: Error > { T :: handle_test_check_command_flags (self , ctx) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { 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."] # [derive (Debug , Copy , Clone , Eq , PartialEq , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] pub struct HandlerAdaptor < T > (pub T) ; impl < T > rs_matter_crate :: dm :: Handler for HandlerAdaptor < T > where T : ClusterHandler , { # [allow (unreachable_code)] fn read (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , reply : impl rs_matter_crate :: dm :: ReadReply ,) -> Result < () , rs_matter_crate :: error :: Error > { if let Some (mut writer) = reply . with_dataver (self . 0 . dataver ()) ? { if ctx . attr () . is_system () { ctx . attr () . cluster (ctx . metadata () , | cluster | cluster . read (ctx . attr () , writer)) } else { match AttributeId :: try_from (ctx . attr () . attr_id) ? { AttributeId :: Boolean => { let attr_read_result = self . 0. boolean (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Boolean , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Boolean , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Bitmap8 => { let attr_read_result = self . 0. bitmap_8 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap8 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap8 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Bitmap16 => { let attr_read_result = self . 0. bitmap_16 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap16 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap16 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Bitmap32 => { let attr_read_result = self . 0. bitmap_32 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap32 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap32 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Bitmap64 => { let attr_read_result = self . 0. bitmap_64 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap64 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap64 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int8u => { let attr_read_result = self . 0. int_8_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int8u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int8u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int16u => { let attr_read_result = self . 0. int_16_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int16u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int16u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int24u => { let attr_read_result = self . 0. int_24_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int24u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int24u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int32u => { let attr_read_result = self . 0. int_32_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int32u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int32u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int40u => { let attr_read_result = self . 0. int_40_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int40u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int40u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int48u => { let attr_read_result = self . 0. int_48_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int48u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int48u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int56u => { let attr_read_result = self . 0. int_56_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int56u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int56u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int64u => { let attr_read_result = self . 0. int_64_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int64u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int64u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int8s => { let attr_read_result = self . 0. int_8_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int8s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int8s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int16s => { let attr_read_result = self . 0. int_16_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int16s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int16s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int24s => { let attr_read_result = self . 0. int_24_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int24s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int24s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int32s => { let attr_read_result = self . 0. int_32_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int32s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int32s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int40s => { let attr_read_result = self . 0. int_40_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int40s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int40s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int48s => { let attr_read_result = self . 0. int_48_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int48s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int48s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int56s => { let attr_read_result = self . 0. int_56_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int56s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int56s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int64s => { let attr_read_result = self . 0. int_64_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int64s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int64s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Enum8 => { let attr_read_result = self . 0. enum_8 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Enum8 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Enum8 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Enum16 => { let attr_read_result = self . 0. enum_16 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Enum16 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Enum16 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: FloatSingle => { let attr_read_result = self . 0. float_single (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FloatSingle , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FloatSingle , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: FloatDouble => { let attr_read_result = self . 0. float_double (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FloatDouble , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FloatDouble , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: OctetString => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: OctetString , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: OctetString , 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. 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: OctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: OctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: ListInt8u => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListInt8u , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListInt8u , 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. 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 ,) ? ,) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListInt8u , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListInt8u , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: ListOctetString => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListOctetString , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListOctetString , 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. 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 ,) ? ,) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListOctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListOctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: ListStructOctetString => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListStructOctetString , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListStructOctetString , 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. 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 , MetadataDebug ((AttributeId :: ListStructOctetString , false)))) , tw) , tag ,) ? ,) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListStructOctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListStructOctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: LongOctetString => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongOctetString , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongOctetString , 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. 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongOctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongOctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: CharString => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: CharString , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: CharString , 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. 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: CharString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: CharString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: LongCharString => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongCharString , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongCharString , 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. 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongCharString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongCharString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: EpochUs => { let attr_read_result = self . 0. epoch_us (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EpochUs , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EpochUs , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: EpochS => { let attr_read_result = self . 0. epoch_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EpochS , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EpochS , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: VendorId => { let attr_read_result = self . 0. vendor_id (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: VendorId , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: VendorId , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: ListNullablesAndOptionalsStruct => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListNullablesAndOptionalsStruct , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListNullablesAndOptionalsStruct , 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. 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 , MetadataDebug ((AttributeId :: ListNullablesAndOptionalsStruct , false)))) , tw) , tag ,) ? ,) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListNullablesAndOptionalsStruct , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListNullablesAndOptionalsStruct , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: EnumAttr => { let attr_read_result = self . 0. enum_attr (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EnumAttr , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EnumAttr , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: StructAttr => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: StructAttr , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: StructAttr , 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. 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: StructAttr , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: StructAttr , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: RangeRestrictedInt8u => { let attr_read_result = self . 0. range_restricted_int_8_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt8u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt8u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: RangeRestrictedInt8s => { let attr_read_result = self . 0. range_restricted_int_8_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt8s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt8s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: RangeRestrictedInt16u => { let attr_read_result = self . 0. range_restricted_int_16_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt16u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt16u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: RangeRestrictedInt16s => { let attr_read_result = self . 0. range_restricted_int_16_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt16s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt16s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: ListLongOctetString => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListLongOctetString , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListLongOctetString , 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. 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 , MetadataDebug ((AttributeId :: ListLongOctetString , false)))) , tw) , tag ,) ? ,) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListLongOctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListLongOctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: ListFabricScoped => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListFabricScoped , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListFabricScoped , 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. 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 ,) ? ,) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListFabricScoped , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListFabricScoped , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: TimedWriteBoolean => { let attr_read_result = self . 0. timed_write_boolean (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: TimedWriteBoolean , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: TimedWriteBoolean , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: GeneralErrorBoolean => { let attr_read_result = self . 0. general_error_boolean (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GeneralErrorBoolean , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GeneralErrorBoolean , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: ClusterErrorBoolean => { let attr_read_result = self . 0. cluster_error_boolean (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ClusterErrorBoolean , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ClusterErrorBoolean , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: GlobalEnum => { let attr_read_result = self . 0. global_enum (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GlobalEnum , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GlobalEnum , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: GlobalStruct => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GlobalStruct , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GlobalStruct , 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. global_struct (& ctx , rs_matter_crate :: tlv :: TLVBuilder :: new (rs_matter_crate :: tlv :: TLVWriteParent :: new (MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GlobalStruct , false)))) , tw) , tag ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GlobalStruct , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GlobalStruct , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: UnsupportedAttributeRequiringAdminPrivilege => { let attr_read_result = self . 0. unsupported_attribute_requiring_admin_privilege (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: UnsupportedAttributeRequiringAdminPrivilege , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: UnsupportedAttributeRequiringAdminPrivilege , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Unsupported => { let attr_read_result = self . 0. unsupported (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Unsupported , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Unsupported , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: ReadFailureCode => { let attr_read_result = self . 0. read_failure_code (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ReadFailureCode , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ReadFailureCode , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: FailureInt32U => { let attr_read_result = self . 0. failure_int_32_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FailureInt32U , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FailureInt32U , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableBoolean => { let attr_read_result = self . 0. nullable_boolean (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBoolean , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBoolean , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableBitmap8 => { let attr_read_result = self . 0. nullable_bitmap_8 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap8 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap8 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableBitmap16 => { let attr_read_result = self . 0. nullable_bitmap_16 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap16 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap16 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableBitmap32 => { let attr_read_result = self . 0. nullable_bitmap_32 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap32 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap32 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableBitmap64 => { let attr_read_result = self . 0. nullable_bitmap_64 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap64 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap64 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt8u => { let attr_read_result = self . 0. nullable_int_8_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt8u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt8u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt16u => { let attr_read_result = self . 0. nullable_int_16_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt16u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt16u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt24u => { let attr_read_result = self . 0. nullable_int_24_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt24u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt24u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt32u => { let attr_read_result = self . 0. nullable_int_32_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt32u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt32u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt40u => { let attr_read_result = self . 0. nullable_int_40_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt40u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt40u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt48u => { let attr_read_result = self . 0. nullable_int_48_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt48u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt48u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt56u => { let attr_read_result = self . 0. nullable_int_56_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt56u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt56u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt64u => { let attr_read_result = self . 0. nullable_int_64_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt64u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt64u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt8s => { let attr_read_result = self . 0. nullable_int_8_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt8s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt8s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt16s => { let attr_read_result = self . 0. nullable_int_16_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt16s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt16s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt24s => { let attr_read_result = self . 0. nullable_int_24_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt24s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt24s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt32s => { let attr_read_result = self . 0. nullable_int_32_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt32s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt32s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt40s => { let attr_read_result = self . 0. nullable_int_40_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt40s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt40s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt48s => { let attr_read_result = self . 0. nullable_int_48_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt48s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt48s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt56s => { let attr_read_result = self . 0. nullable_int_56_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt56s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt56s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt64s => { let attr_read_result = self . 0. nullable_int_64_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt64s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt64s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableEnum8 => { let attr_read_result = self . 0. nullable_enum_8 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnum8 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnum8 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableEnum16 => { let attr_read_result = self . 0. nullable_enum_16 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnum16 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnum16 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableFloatSingle => { let attr_read_result = self . 0. nullable_float_single (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableFloatSingle , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableFloatSingle , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableFloatDouble => { let attr_read_result = self . 0. nullable_float_double (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableFloatDouble , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableFloatDouble , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableOctetString => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableOctetString , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , 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 = 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)))) , tw) , tag ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableOctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableOctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: NullableCharString => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableCharString , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableCharString , 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_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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableCharString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableCharString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: NullableEnumAttr => { let attr_read_result = self . 0. nullable_enum_attr (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnumAttr , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnumAttr , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableStruct => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableStruct , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableStruct , 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_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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableStruct , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableStruct , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: NullableRangeRestrictedInt8u => { let attr_read_result = self . 0. nullable_range_restricted_int_8_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt8u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt8u , false)))) , attr_read_result) ; 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) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt8s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt8s , false)))) , attr_read_result) ; 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) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt16u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt16u , false)))) , attr_read_result) ; 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) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt16s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt16s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableGlobalEnum => { let attr_read_result = self . 0. nullable_global_enum (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableGlobalEnum , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableGlobalEnum , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableGlobalStruct => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableGlobalStruct , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableGlobalStruct , 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_global_struct (& ctx , rs_matter_crate :: tlv :: TLVBuilder :: new (rs_matter_crate :: tlv :: TLVWriteParent :: new (MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableGlobalStruct , false)))) , tw) , tag ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableGlobalStruct , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableGlobalStruct , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: MeiInt8u => { let attr_read_result = self . 0. mei_int_8_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: MeiInt8u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: MeiInt8u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } # [allow (unreachable_code)] other => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: error ! ("Attribute {:?} not supported" , other) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: error ! ("Attribute {:?} not supported" , other) ; Err (rs_matter_crate :: error :: ErrorCode :: AttributeNotFound . into ()) } } } } else { Ok (()) } } # [allow (unreachable_code)] fn write (& self , ctx : impl rs_matter_crate :: dm :: WriteContext ,) -> Result < () , rs_matter_crate :: error :: Error > { ctx . attr () . check_dataver (self . 0 . dataver ()) ? ; if ctx . attr () . is_system () { return Err (rs_matter_crate :: error :: ErrorCode :: InvalidAction . into ()) } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Boolean , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Boolean , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap8 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap8 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap16 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap16 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap32 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap32 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap64 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap64 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int8u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int8u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int16u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int16u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int24u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int24u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int32u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int32u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int40u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int40u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int48u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int48u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int56u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int56u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int64u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int64u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int8s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int8s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int16s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int16s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int24s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int24s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int32s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int32s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int40s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int40s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int48s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int48s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int56s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int56s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int64s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int64s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Enum8 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Enum8 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Enum16 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Enum16 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FloatSingle , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FloatSingle , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FloatDouble , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FloatDouble , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: OctetString , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: OctetString , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: ListInt8u => { let attr_data = rs_matter_crate :: dm :: ArrayAttributeWrite :: new (ctx . attr () . list_index . clone () , ctx . data ()) ? ; let attr_write_result = self . 0. set_list_int_8_u (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListInt8u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListInt8u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: ListOctetString => { let attr_data = rs_matter_crate :: dm :: ArrayAttributeWrite :: new (ctx . attr () . list_index . clone () , ctx . data ()) ? ; let attr_write_result = self . 0. set_list_octet_string (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListOctetString , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListOctetString , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: ListStructOctetString => { let attr_data = rs_matter_crate :: dm :: ArrayAttributeWrite :: new (ctx . attr () . list_index . clone () , ctx . data ()) ? ; let attr_write_result = self . 0. set_list_struct_octet_string (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListStructOctetString , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListStructOctetString , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongOctetString , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongOctetString , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: CharString , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: CharString , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongCharString , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongCharString , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EpochUs , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EpochUs , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EpochS , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EpochS , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: VendorId , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: VendorId , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: ListNullablesAndOptionalsStruct => { let attr_data = rs_matter_crate :: dm :: ArrayAttributeWrite :: new (ctx . attr () . list_index . clone () , ctx . data ()) ? ; let attr_write_result = self . 0. set_list_nullables_and_optionals_struct (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListNullablesAndOptionalsStruct , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListNullablesAndOptionalsStruct , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EnumAttr , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EnumAttr , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: StructAttr , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: StructAttr , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt8u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt8u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt8s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt8s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt16u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt16u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt16s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt16s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: ListLongOctetString => { let attr_data = rs_matter_crate :: dm :: ArrayAttributeWrite :: new (ctx . attr () . list_index . clone () , ctx . data ()) ? ; let attr_write_result = self . 0. set_list_long_octet_string (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListLongOctetString , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListLongOctetString , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: ListFabricScoped => { let attr_data = rs_matter_crate :: dm :: ArrayAttributeWrite :: new (ctx . attr () . list_index . clone () , ctx . data ()) ? ; let attr_write_result = self . 0. set_list_fabric_scoped (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListFabricScoped , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListFabricScoped , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: TimedWriteBoolean , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: TimedWriteBoolean , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GeneralErrorBoolean , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GeneralErrorBoolean , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ClusterErrorBoolean , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ClusterErrorBoolean , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: GlobalEnum => { let attr_data : TestGlobalEnum = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_global_enum (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GlobalEnum , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GlobalEnum , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: GlobalStruct => { let attr_data : TestGlobalStruct < '_ > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_global_struct (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GlobalStruct , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GlobalStruct , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: UnsupportedAttributeRequiringAdminPrivilege => { let attr_data : bool = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_unsupported_attribute_requiring_admin_privilege (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: UnsupportedAttributeRequiringAdminPrivilege , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: UnsupportedAttributeRequiringAdminPrivilege , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Unsupported , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Unsupported , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: ReadFailureCode => { let attr_data : u8 = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_read_failure_code (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ReadFailureCode , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ReadFailureCode , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: FailureInt32U => { let attr_data : u32 = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_failure_int_32_u (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FailureInt32U , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FailureInt32U , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableBoolean => { let attr_data : rs_matter_crate :: tlv :: Nullable < bool > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_boolean (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBoolean , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBoolean , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableBitmap8 => { let attr_data : rs_matter_crate :: tlv :: Nullable < Bitmap8MaskMap > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_bitmap_8 (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap8 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap8 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableBitmap16 => { let attr_data : rs_matter_crate :: tlv :: Nullable < Bitmap16MaskMap > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_bitmap_16 (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap16 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap16 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableBitmap32 => { let attr_data : rs_matter_crate :: tlv :: Nullable < Bitmap32MaskMap > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_bitmap_32 (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap32 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap32 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableBitmap64 => { let attr_data : rs_matter_crate :: tlv :: Nullable < Bitmap64MaskMap > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_bitmap_64 (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap64 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap64 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt8u => { let attr_data : rs_matter_crate :: tlv :: Nullable < u8 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_8_u (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt8u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt8u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt16u => { let attr_data : rs_matter_crate :: tlv :: Nullable < u16 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_16_u (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt16u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt16u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt24u => { let attr_data : rs_matter_crate :: tlv :: Nullable < u32 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_24_u (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt24u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt24u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt32u => { let attr_data : rs_matter_crate :: tlv :: Nullable < u32 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_32_u (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt32u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt32u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt40u => { let attr_data : rs_matter_crate :: tlv :: Nullable < u64 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_40_u (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt40u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt40u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt48u => { let attr_data : rs_matter_crate :: tlv :: Nullable < u64 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_48_u (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt48u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt48u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt56u => { let attr_data : rs_matter_crate :: tlv :: Nullable < u64 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_56_u (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt56u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt56u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt64u => { let attr_data : rs_matter_crate :: tlv :: Nullable < u64 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_64_u (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt64u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt64u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt8s => { let attr_data : rs_matter_crate :: tlv :: Nullable < i8 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_8_s (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt8s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt8s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt16s => { let attr_data : rs_matter_crate :: tlv :: Nullable < i16 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_16_s (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt16s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt16s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt24s => { let attr_data : rs_matter_crate :: tlv :: Nullable < i32 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_24_s (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt24s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt24s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt32s => { let attr_data : rs_matter_crate :: tlv :: Nullable < i32 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_32_s (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt32s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt32s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt40s => { let attr_data : rs_matter_crate :: tlv :: Nullable < i64 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_40_s (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt40s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt40s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt48s => { let attr_data : rs_matter_crate :: tlv :: Nullable < i64 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_48_s (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt48s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt48s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt56s => { let attr_data : rs_matter_crate :: tlv :: Nullable < i64 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_56_s (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt56s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt56s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt64s => { let attr_data : rs_matter_crate :: tlv :: Nullable < i64 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_64_s (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt64s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt64s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableEnum8 => { let attr_data : rs_matter_crate :: tlv :: Nullable < u8 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_enum_8 (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnum8 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnum8 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableEnum16 => { let attr_data : rs_matter_crate :: tlv :: Nullable < u16 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_enum_16 (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnum16 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnum16 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableFloatSingle => { let attr_data : rs_matter_crate :: tlv :: Nullable < f32 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_float_single (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableFloatSingle , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableFloatSingle , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableFloatDouble => { let attr_data : rs_matter_crate :: tlv :: Nullable < f64 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_float_double (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableFloatDouble , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableFloatDouble , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableOctetString => { 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableOctetString , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableOctetString , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableCharString => { 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableCharString , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableCharString , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableEnumAttr => { let attr_data : rs_matter_crate :: tlv :: Nullable < SimpleEnum > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_enum_attr (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnumAttr , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnumAttr , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableStruct => { let attr_data : rs_matter_crate :: tlv :: Nullable < SimpleStruct < '_ > > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_struct (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableStruct , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableStruct , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableRangeRestrictedInt8u => { let attr_data : rs_matter_crate :: tlv :: Nullable < u8 > = 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt8u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt8u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableRangeRestrictedInt8s => { let attr_data : rs_matter_crate :: tlv :: Nullable < i8 > = 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt8s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt8s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableRangeRestrictedInt16u => { let attr_data : rs_matter_crate :: tlv :: Nullable < u16 > = 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt16u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt16u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableRangeRestrictedInt16s => { let attr_data : rs_matter_crate :: tlv :: Nullable < i16 > = 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt16s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt16s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: WriteOnlyInt8u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: WriteOnlyInt8u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableGlobalEnum => { let attr_data : rs_matter_crate :: tlv :: Nullable < TestGlobalEnum > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_global_enum (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableGlobalEnum , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableGlobalEnum , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableGlobalStruct => { let attr_data : rs_matter_crate :: tlv :: Nullable < TestGlobalStruct < '_ > > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_global_struct (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableGlobalStruct , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableGlobalStruct , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: MeiInt8u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: MeiInt8u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } other => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: error ! ("Attribute {:?} not supported" , other) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: error ! ("Attribute {:?} not supported" , other) ; return Err (rs_matter_crate :: error :: ErrorCode :: AttributeNotFound . into ()) ; } } Ok (()) } # [allow (unreachable_code)] 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) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: Test))) , cmd_invoke_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: Test))) , cmd_invoke_result) ; cmd_invoke_result ? ; } CommandId :: TestNotHandled => { let cmd_invoke_result = self . 0. handle_test_not_handled (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNotHandled))) , cmd_invoke_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNotHandled))) , cmd_invoke_result) ; cmd_invoke_result ? ; } CommandId :: TestSpecific => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSpecific)))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSpecific)))) ; 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 ,) ? ,) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSpecific))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSpecific))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestUnknownCommand => { let cmd_invoke_result = self . 0. handle_test_unknown_command (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestUnknownCommand))) , cmd_invoke_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestUnknownCommand))) , cmd_invoke_result) ; cmd_invoke_result ? ; } CommandId :: TestAddArguments => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestAddArguments))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestAddArguments))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestAddArguments))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestAddArguments))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestSimpleArgumentRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSimpleArgumentRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSimpleArgumentRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSimpleArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSimpleArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestStructArrayArgumentRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestStructArrayArgumentRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestStructArrayArgumentRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestStructArrayArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestStructArrayArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestStructArgumentRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestStructArgumentRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestStructArgumentRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestStructArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestStructArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestNestedStructArgumentRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNestedStructArgumentRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNestedStructArgumentRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNestedStructArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNestedStructArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestListStructArgumentRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListStructArgumentRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListStructArgumentRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListStructArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListStructArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestListInt8UArgumentRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListInt8UArgumentRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListInt8UArgumentRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListInt8UArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListInt8UArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestNestedStructListArgumentRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNestedStructListArgumentRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNestedStructListArgumentRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNestedStructListArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNestedStructListArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestListNestedStructListArgumentRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListNestedStructListArgumentRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListNestedStructListArgumentRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListNestedStructListArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListNestedStructListArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestListInt8UReverseRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListInt8UReverseRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListInt8UReverseRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListInt8UReverseRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListInt8UReverseRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestEnumsRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEnumsRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEnumsRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEnumsRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEnumsRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestNullableOptionalRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNullableOptionalRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNullableOptionalRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNullableOptionalRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNullableOptionalRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestComplexNullableOptionalRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestComplexNullableOptionalRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestComplexNullableOptionalRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestComplexNullableOptionalRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestComplexNullableOptionalRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: SimpleStructEchoRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: SimpleStructEchoRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: SimpleStructEchoRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: SimpleStructEchoRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: SimpleStructEchoRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TimedInvokeRequest => { let cmd_invoke_result = self . 0. handle_timed_invoke_request (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TimedInvokeRequest))) , cmd_invoke_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TimedInvokeRequest))) , cmd_invoke_result) ; cmd_invoke_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSimpleOptionalArgumentRequest))) , cmd_data , cmd_invoke_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSimpleOptionalArgumentRequest))) , cmd_data , cmd_invoke_result) ; cmd_invoke_result ? ; } CommandId :: TestEmitTestEventRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEmitTestEventRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEmitTestEventRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEmitTestEventRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEmitTestEventRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestEmitTestFabricScopedEventRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEmitTestFabricScopedEventRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEmitTestFabricScopedEventRequest))) , cmd_data) ; 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 (& ctx , cmd_data , rs_matter_crate :: tlv :: TLVBuilder :: new (rs_matter_crate :: tlv :: TLVWriteParent :: new (MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEmitTestFabricScopedEventRequest))) , tw) , tag ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEmitTestFabricScopedEventRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEmitTestFabricScopedEventRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestBatchHelperRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestBatchHelperRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestBatchHelperRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestBatchHelperRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestBatchHelperRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestSecondBatchHelperRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSecondBatchHelperRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSecondBatchHelperRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSecondBatchHelperRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSecondBatchHelperRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: StringEchoRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: StringEchoRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: StringEchoRequest))) , cmd_data) ; let mut writer = reply . with_command (13u32) ? ; 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_string_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 :: StringEchoRequest))) , tw) , tag ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: StringEchoRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: StringEchoRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: GlobalEchoRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: GlobalEchoRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: GlobalEchoRequest))) , cmd_data) ; let mut writer = reply . with_command (14u32) ? ; 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_global_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 :: GlobalEchoRequest))) , tw) , tag ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: GlobalEchoRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: GlobalEchoRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestCheckCommandFlags => { let cmd_invoke_result = self . 0. handle_test_check_command_flags (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestCheckCommandFlags))) , cmd_invoke_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestCheckCommandFlags))) , cmd_invoke_result) ; cmd_invoke_result ? ; } CommandId :: TestDifferentVendorMeiRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestDifferentVendorMeiRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestDifferentVendorMeiRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestDifferentVendorMeiRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestDifferentVendorMeiRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } other => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: error ! ("Command {:?} not supported" , other) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: error ! ("Command {:?} not supported" , other) ; return Err (rs_matter_crate :: error :: ErrorCode :: CommandNotFound . into ()) ; } } Ok (()) } fn bump_dataver (& self , ctx : impl rs_matter_crate :: dm :: MatchContext) { if ctx . cluster () . map (| c | c == 4294048773u32) . unwrap_or (true) { self . 0 . dataver_changed () ; } } } impl < T , Q > core :: fmt :: Debug for MetadataDebug < (u16 , & HandlerAdaptor < T > , Q) > where T : ClusterHandler , Q : core :: fmt :: Debug , { # [allow (unreachable_code)] fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "Endpt(0x{:02x})::Cluster::{}(0x{:04x})::{:?}" , self . 0.0 , "UnitTesting" , 4294048773u32 , self . 0.2) } } # [cfg (feature = "defmt")] impl < T , Q > rs_matter_crate :: reexport :: defmt :: Format for MetadataDebug < (u16 , & HandlerAdaptor < T > , Q) > where T : ClusterHandler , Q : rs_matter_crate :: reexport :: defmt :: Format , { # [allow (unreachable_code)] fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "Endpt(0x{:02x})::Cluster::{}(0x{:04x})::{:?}" , self . 0.0 , "UnitTesting" , 4294048773u32 , self . 0.2) } } impl < T > rs_matter_crate :: dm :: NonBlockingHandler for HandlerAdaptor < T > where T : ClusterHandler , { } # [doc = "Cluster-scoped view onto a [`rs_matter_crate::im::CmdDataArrayBuilder`] for the `UnitTesting` cluster. Empty-request commands push and return `Self`; parameterized commands return the codegen-emitted typed request builder (whose parent chain bypasses the view — close back to the array via Data + CmdData `.end()?`s). `.end()` closes the wrapped array. Command names that would collide with the view's own inherent methods (see `RESERVED_VIEW_METHOD_NAMES` in the codegen — currently `end`, which the WebRTC cluster uses) get a `cmd_` prefix."] pub struct UnitTestingCmdRequestsView < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { array : rs_matter_crate :: im :: CmdDataArrayBuilder < P > , } impl < P > UnitTestingCmdRequestsView < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn test (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; let array = self . array . push () ? . path (endpoint , 4294048773 , 0) ? . data (| w | { w . start_struct (& rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: CmdDataTag :: Data as u8 ,)) ? ; w . end_container () }) ? . end () ? ; Ok (Self { array }) } pub fn test_not_handled (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; let array = self . array . push () ? . path (endpoint , 4294048773 , 1) ? . data (| w | { w . start_struct (& rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: CmdDataTag :: Data as u8 ,)) ? ; w . end_container () }) ? . end () ? ; Ok (Self { array }) } pub fn test_specific (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; let array = self . array . push () ? . path (endpoint , 4294048773 , 2) ? . data (| w | { w . start_struct (& rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: CmdDataTag :: Data as u8 ,)) ? ; w . end_container () }) ? . end () ? ; Ok (Self { array }) } pub fn test_unknown_command (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; let array = self . array . push () ? . path (endpoint , 4294048773 , 3) ? . data (| w | { w . start_struct (& rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: CmdDataTag :: Data as u8 ,)) ? ; w . end_container () }) ? . end () ? ; Ok (Self { array }) } pub fn test_add_arguments (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestAddArgumentsRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 4) ? . data_builder () } pub fn test_simple_argument_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestSimpleArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 5) ? . data_builder () } pub fn test_struct_array_argument_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestStructArrayArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 6) ? . data_builder () } pub fn test_struct_argument_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestStructArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 7) ? . data_builder () } pub fn test_nested_struct_argument_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestNestedStructArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 8) ? . data_builder () } pub fn test_list_struct_argument_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestListStructArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 9) ? . data_builder () } pub fn test_list_int_8_u_argument_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestListInt8UArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 10) ? . data_builder () } pub fn test_nested_struct_list_argument_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestNestedStructListArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 11) ? . data_builder () } pub fn test_list_nested_struct_list_argument_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestListNestedStructListArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 12) ? . data_builder () } pub fn test_list_int_8_u_reverse_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestListInt8UReverseRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 13) ? . data_builder () } pub fn test_enums_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestEnumsRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 14) ? . data_builder () } pub fn test_nullable_optional_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestNullableOptionalRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 15) ? . data_builder () } pub fn test_complex_nullable_optional_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestComplexNullableOptionalRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 16) ? . data_builder () } pub fn simple_struct_echo_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < SimpleStructEchoRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 17) ? . data_builder () } pub fn timed_invoke_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; let array = self . array . push () ? . path (endpoint , 4294048773 , 18) ? . data (| w | { w . start_struct (& rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: CmdDataTag :: Data as u8 ,)) ? ; w . end_container () }) ? . end () ? ; Ok (Self { array }) } pub fn test_simple_optional_argument_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestSimpleOptionalArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 19) ? . data_builder () } pub fn test_emit_test_event_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestEmitTestEventRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 20) ? . data_builder () } pub fn test_emit_test_fabric_scoped_event_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestEmitTestFabricScopedEventRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 21) ? . data_builder () } pub fn test_batch_helper_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestBatchHelperRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 22) ? . data_builder () } pub fn test_second_batch_helper_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestSecondBatchHelperRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 23) ? . data_builder () } pub fn string_echo_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < StringEchoRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 24) ? . data_builder () } pub fn global_echo_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < GlobalEchoRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 25) ? . data_builder () } pub fn test_check_command_flags (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; let array = self . array . push () ? . path (endpoint , 4294048773 , 26) ? . data (| w | { w . start_struct (& rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: CmdDataTag :: Data as u8 ,)) ? ; w . end_container () }) ? . end () ? ; Ok (Self { array }) } pub fn test_different_vendor_mei_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestDifferentVendorMeiRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 4294049962) ? . data_builder () } # [doc = r" Close the wrapped array and return its parent."] pub fn end (self) -> Result < P , rs_matter_crate :: error :: Error > { self . array . end () } } # [doc = "IM-client extension trait for the `UnitTesting` cluster's commands. `use` this trait to call `.unit_testing_inv()` on a [`rs_matter_crate::im::CmdDataArrayBuilder`]; the returned [`UnitTestingCmdRequestsView`] exposes one method per command (cluster-prefix-free). `.end()` on the view closes the wrapped array."] pub trait UnitTestingCmdRequests < P > : Sized where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn unit_testing_inv (self) -> UnitTestingCmdRequestsView < P > ; } impl < P > UnitTestingCmdRequests < P > for rs_matter_crate :: im :: CmdDataArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn unit_testing_inv (self) -> UnitTestingCmdRequestsView < P > { UnitTestingCmdRequestsView { array : self } } } # [doc = "Cluster-scoped view onto an [`rs_matter_crate::im::AttrPathArrayBuilder`] for the `UnitTesting` cluster. Each method pushes one `AttrPath` (cluster ID baked in) and returns `Self` for chaining; `.end()` closes the underlying array. Attribute names that would collide with the view's own inherent methods (see `RESERVED_VIEW_METHOD_NAMES` in the codegen) get an `attr_` prefix."] pub struct UnitTestingAttrReadsView < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { array : rs_matter_crate :: im :: AttrPathArrayBuilder < P > , } impl < P > UnitTestingAttrReadsView < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn boolean (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (0) ? . end () ? ; Ok (Self { array }) } pub fn bitmap_8 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (1) ? . end () ? ; Ok (Self { array }) } pub fn bitmap_16 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (2) ? . end () ? ; Ok (Self { array }) } pub fn bitmap_32 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (3) ? . end () ? ; Ok (Self { array }) } pub fn bitmap_64 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (4) ? . end () ? ; Ok (Self { array }) } pub fn int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (5) ? . end () ? ; Ok (Self { array }) } pub fn int_16_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (6) ? . end () ? ; Ok (Self { array }) } pub fn int_24_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (7) ? . end () ? ; Ok (Self { array }) } pub fn int_32_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (8) ? . end () ? ; Ok (Self { array }) } pub fn int_40_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (9) ? . end () ? ; Ok (Self { array }) } pub fn int_48_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (10) ? . end () ? ; Ok (Self { array }) } pub fn int_56_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (11) ? . end () ? ; Ok (Self { array }) } pub fn int_64_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (12) ? . end () ? ; Ok (Self { array }) } pub fn int_8_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (13) ? . end () ? ; Ok (Self { array }) } pub fn int_16_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (14) ? . end () ? ; Ok (Self { array }) } pub fn int_24_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (15) ? . end () ? ; Ok (Self { array }) } pub fn int_32_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16) ? . end () ? ; Ok (Self { array }) } pub fn int_40_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (17) ? . end () ? ; Ok (Self { array }) } pub fn int_48_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (18) ? . end () ? ; Ok (Self { array }) } pub fn int_56_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (19) ? . end () ? ; Ok (Self { array }) } pub fn int_64_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (20) ? . end () ? ; Ok (Self { array }) } pub fn enum_8 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (21) ? . end () ? ; Ok (Self { array }) } pub fn enum_16 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (22) ? . end () ? ; Ok (Self { array }) } pub fn float_single (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (23) ? . end () ? ; Ok (Self { array }) } pub fn float_double (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (24) ? . end () ? ; Ok (Self { array }) } pub fn octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (25) ? . end () ? ; Ok (Self { array }) } pub fn list_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (26) ? . end () ? ; Ok (Self { array }) } pub fn list_octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (27) ? . end () ? ; Ok (Self { array }) } pub fn list_struct_octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (28) ? . end () ? ; Ok (Self { array }) } pub fn long_octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (29) ? . end () ? ; Ok (Self { array }) } pub fn char_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (30) ? . end () ? ; Ok (Self { array }) } pub fn long_char_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (31) ? . end () ? ; Ok (Self { array }) } pub fn epoch_us (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (32) ? . end () ? ; Ok (Self { array }) } pub fn epoch_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (33) ? . end () ? ; Ok (Self { array }) } pub fn vendor_id (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (34) ? . end () ? ; Ok (Self { array }) } pub fn list_nullables_and_optionals_struct (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (35) ? . end () ? ; Ok (Self { array }) } pub fn enum_attr (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (36) ? . end () ? ; Ok (Self { array }) } pub fn struct_attr (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (37) ? . end () ? ; Ok (Self { array }) } pub fn range_restricted_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (38) ? . end () ? ; Ok (Self { array }) } pub fn range_restricted_int_8_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (39) ? . end () ? ; Ok (Self { array }) } pub fn range_restricted_int_16_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (40) ? . end () ? ; Ok (Self { array }) } pub fn range_restricted_int_16_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (41) ? . end () ? ; Ok (Self { array }) } pub fn list_long_octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (42) ? . end () ? ; Ok (Self { array }) } pub fn list_fabric_scoped (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (43) ? . end () ? ; Ok (Self { array }) } pub fn timed_write_boolean (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (48) ? . end () ? ; Ok (Self { array }) } pub fn general_error_boolean (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (49) ? . end () ? ; Ok (Self { array }) } pub fn cluster_error_boolean (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (50) ? . end () ? ; Ok (Self { array }) } pub fn global_enum (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (51) ? . end () ? ; Ok (Self { array }) } pub fn global_struct (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (52) ? . end () ? ; Ok (Self { array }) } pub fn unsupported_attribute_requiring_admin_privilege (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (254) ? . end () ? ; Ok (Self { array }) } pub fn unsupported (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (255) ? . end () ? ; Ok (Self { array }) } pub fn read_failure_code (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (12288) ? . end () ? ; Ok (Self { array }) } pub fn failure_int_32_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (12289) ? . end () ? ; Ok (Self { array }) } pub fn nullable_boolean (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16384) ? . end () ? ; Ok (Self { array }) } pub fn nullable_bitmap_8 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16385) ? . end () ? ; Ok (Self { array }) } pub fn nullable_bitmap_16 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16386) ? . end () ? ; Ok (Self { array }) } pub fn nullable_bitmap_32 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16387) ? . end () ? ; Ok (Self { array }) } pub fn nullable_bitmap_64 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16388) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16389) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_16_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16390) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_24_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16391) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_32_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16392) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_40_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16393) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_48_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16394) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_56_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16395) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_64_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16396) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_8_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16397) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_16_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16398) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_24_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16399) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_32_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16400) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_40_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16401) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_48_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16402) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_56_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16403) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_64_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16404) ? . end () ? ; Ok (Self { array }) } pub fn nullable_enum_8 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16405) ? . end () ? ; Ok (Self { array }) } pub fn nullable_enum_16 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16406) ? . end () ? ; Ok (Self { array }) } pub fn nullable_float_single (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16407) ? . end () ? ; Ok (Self { array }) } pub fn nullable_float_double (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16408) ? . end () ? ; Ok (Self { array }) } pub fn nullable_octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16409) ? . end () ? ; Ok (Self { array }) } pub fn nullable_char_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16414) ? . end () ? ; Ok (Self { array }) } pub fn nullable_enum_attr (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16420) ? . end () ? ; Ok (Self { array }) } pub fn nullable_struct (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16421) ? . end () ? ; Ok (Self { array }) } pub fn nullable_range_restricted_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16422) ? . end () ? ; Ok (Self { array }) } pub fn nullable_range_restricted_int_8_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16423) ? . end () ? ; Ok (Self { array }) } pub fn nullable_range_restricted_int_16_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16424) ? . end () ? ; Ok (Self { array }) } pub fn nullable_range_restricted_int_16_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16425) ? . end () ? ; Ok (Self { array }) } pub fn write_only_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16426) ? . end () ? ; Ok (Self { array }) } pub fn nullable_global_enum (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16435) ? . end () ? ; Ok (Self { array }) } pub fn nullable_global_struct (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16436) ? . end () ? ; Ok (Self { array }) } pub fn generated_command_list (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (65528) ? . end () ? ; Ok (Self { array }) } pub fn accepted_command_list (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (65529) ? . end () ? ; Ok (Self { array }) } pub fn attribute_list (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (65531) ? . end () ? ; Ok (Self { array }) } pub fn feature_map (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (65532) ? . end () ? ; Ok (Self { array }) } pub fn cluster_revision (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (65533) ? . end () ? ; Ok (Self { array }) } pub fn mei_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (4294070017) ? . end () ? ; Ok (Self { array }) } # [doc = r" Close the wrapped array and return its parent."] pub fn end (self) -> Result < P , rs_matter_crate :: error :: Error > { self . array . end () } } # [doc = "IM-client extension trait for the `UnitTesting` cluster's attribute reads. `use` this trait to call `.unit_testing_read()` on an [`rs_matter_crate::im::AttrPathArrayBuilder`]; the returned [`UnitTestingAttrReadsView`] exposes one method per attribute (cluster-prefix-free). `.end()` on the view closes the wrapped array."] pub trait UnitTestingAttrReads < P > : Sized where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn unit_testing_read (self) -> UnitTestingAttrReadsView < P > ; } impl < P > UnitTestingAttrReads < P > for rs_matter_crate :: im :: AttrPathArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn unit_testing_read (self) -> UnitTestingAttrReadsView < P > { UnitTestingAttrReadsView { array : self } } } # [doc = "Cluster-scoped view onto an [`rs_matter_crate::im::AttrDataArrayBuilder`] for the `UnitTesting` cluster. Scalar-valued attrs push and return `Self` for chaining; struct/list-valued attrs return the codegen-emitted typed value builder (whose parent chain bypasses the view — close back to the array via Data + AttrData `.end()?`s). `.end()` closes the wrapped array. Attribute names that would collide with the view's own inherent methods (see `RESERVED_VIEW_METHOD_NAMES` in the codegen) get an `attr_` prefix."] pub struct UnitTestingAttrWritesView < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { array : rs_matter_crate :: im :: AttrDataArrayBuilder < P > , } impl < P > UnitTestingAttrWritesView < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn boolean (self , endpoint : rs_matter_crate :: dm :: EndptId , value : bool ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 0) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn bitmap_8 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : Bitmap8MaskMap ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 1) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn bitmap_16 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : Bitmap16MaskMap ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 2) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn bitmap_32 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : Bitmap32MaskMap ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 3) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn bitmap_64 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : Bitmap64MaskMap ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 4) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u8 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 5) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_16_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u16 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 6) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_24_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u32 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 7) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_32_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u32 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 8) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_40_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u64 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 9) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_48_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u64 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 10) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_56_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u64 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 11) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_64_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u64 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 12) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_8_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : i8 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 13) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_16_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : i16 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 14) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_24_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : i32 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 15) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_32_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : i32 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_40_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : i64 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 17) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_48_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : i64 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 18) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_56_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : i64 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 19) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_64_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : i64 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 20) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn enum_8 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u8 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 21) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn enum_16 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u16 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 22) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn float_single (self , endpoint : rs_matter_crate :: dm :: EndptId , value : f32 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 23) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn float_double (self , endpoint : rs_matter_crate :: dm :: EndptId , value : f64 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 24) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: OctetStr < '_ > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 25) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn list_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < rs_matter_crate :: tlv :: ToTLVArrayBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > , u8 > , rs_matter_crate :: error :: Error > { self . array . push () ? . path (endpoint , 4294048773 , 26) ? . data_builder () } pub fn list_octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < rs_matter_crate :: tlv :: OctetsArrayBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > > , rs_matter_crate :: error :: Error > { self . array . push () ? . path (endpoint , 4294048773 , 27) ? . data_builder () } pub fn list_struct_octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestListStructOctetArrayBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > > , rs_matter_crate :: error :: Error > { self . array . push () ? . path (endpoint , 4294048773 , 28) ? . data_builder () } pub fn long_octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: OctetStr < '_ > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 29) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn char_string (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Utf8Str < '_ > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 30) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn long_char_string (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Utf8Str < '_ > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 31) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn epoch_us (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u64 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 32) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn epoch_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u32 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 33) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn vendor_id (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u16 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 34) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn list_nullables_and_optionals_struct (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < NullablesAndOptionalsStructArrayBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > > , rs_matter_crate :: error :: Error > { self . array . push () ? . path (endpoint , 4294048773 , 35) ? . data_builder () } pub fn enum_attr (self , endpoint : rs_matter_crate :: dm :: EndptId , value : SimpleEnum ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 36) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn struct_attr (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < SimpleStructBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > > , rs_matter_crate :: error :: Error > { self . array . push () ? . path (endpoint , 4294048773 , 37) ? . data_builder () } pub fn range_restricted_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u8 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 38) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn range_restricted_int_8_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : i8 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 39) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn range_restricted_int_16_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u16 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 40) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn range_restricted_int_16_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : i16 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 41) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn list_long_octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < rs_matter_crate :: tlv :: OctetsArrayBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > > , rs_matter_crate :: error :: Error > { self . array . push () ? . path (endpoint , 4294048773 , 42) ? . data_builder () } pub fn list_fabric_scoped (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestFabricScopedArrayBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > > , rs_matter_crate :: error :: Error > { self . array . push () ? . path (endpoint , 4294048773 , 43) ? . data_builder () } pub fn timed_write_boolean (self , endpoint : rs_matter_crate :: dm :: EndptId , value : bool ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 48) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn general_error_boolean (self , endpoint : rs_matter_crate :: dm :: EndptId , value : bool ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 49) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn cluster_error_boolean (self , endpoint : rs_matter_crate :: dm :: EndptId , value : bool ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 50) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn global_enum (self , endpoint : rs_matter_crate :: dm :: EndptId , value : TestGlobalEnum ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 51) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn global_struct (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestGlobalStructBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > > , rs_matter_crate :: error :: Error > { self . array . push () ? . path (endpoint , 4294048773 , 52) ? . data_builder () } pub fn unsupported_attribute_requiring_admin_privilege (self , endpoint : rs_matter_crate :: dm :: EndptId , value : bool ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 254) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn unsupported (self , endpoint : rs_matter_crate :: dm :: EndptId , value : bool ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 255) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn read_failure_code (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u8 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 12288) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn failure_int_32_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u32 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 12289) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_boolean (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < bool > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16384) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_bitmap_8 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < Bitmap8MaskMap > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16385) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_bitmap_16 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < Bitmap16MaskMap > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16386) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_bitmap_32 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < Bitmap32MaskMap > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16387) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_bitmap_64 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < Bitmap64MaskMap > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16388) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u8 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16389) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_16_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u16 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16390) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_24_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u32 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16391) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_32_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u32 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16392) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_40_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u64 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16393) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_48_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u64 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16394) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_56_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u64 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16395) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_64_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u64 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16396) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_8_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < i8 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16397) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_16_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < i16 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16398) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_24_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < i32 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16399) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_32_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < i32 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16400) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_40_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < i64 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16401) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_48_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < i64 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16402) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_56_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < i64 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16403) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_64_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < i64 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16404) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_enum_8 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u8 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16405) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_enum_16 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u16 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16406) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_float_single (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < f32 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16407) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_float_double (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < f64 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16408) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: OctetStr < '_ > > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16409) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_char_string (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16414) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_enum_attr (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < SimpleEnum > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16420) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_struct (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < rs_matter_crate :: tlv :: NullableBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > , SimpleStructBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > > > , rs_matter_crate :: error :: Error > { self . array . push () ? . path (endpoint , 4294048773 , 16421) ? . data_builder () } pub fn nullable_range_restricted_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u8 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16422) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_range_restricted_int_8_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < i8 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16423) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_range_restricted_int_16_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u16 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16424) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_range_restricted_int_16_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < i16 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16425) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn write_only_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u8 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16426) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_global_enum (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < TestGlobalEnum > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16435) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_global_struct (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < rs_matter_crate :: tlv :: NullableBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > , TestGlobalStructBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > > > , rs_matter_crate :: error :: Error > { self . array . push () ? . path (endpoint , 4294048773 , 16436) ? . data_builder () } pub fn mei_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u8 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 4294070017) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } # [doc = r" Close the wrapped array and return its parent."] pub fn end (self) -> Result < P , rs_matter_crate :: error :: Error > { self . array . end () } } # [doc = "IM-client extension trait for the `UnitTesting` cluster's attribute writes. `use` this trait to call `.unit_testing_write()` on an [`rs_matter_crate::im::AttrDataArrayBuilder`]; the returned [`UnitTestingAttrWritesView`] exposes one method per writable attribute (cluster-prefix-free). `.end()` on the view closes the wrapped array."] pub trait UnitTestingAttrWrites < P > : Sized where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn unit_testing_write (self) -> UnitTestingAttrWritesView < P > ; } impl < P > UnitTestingAttrWrites < P > for rs_matter_crate :: im :: AttrDataArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn unit_testing_write (self) -> UnitTestingAttrWritesView < P > { UnitTestingAttrWritesView { array : self } } } # [doc = "Cluster-scoped response view onto a [`rs_matter_crate::im::InvokeResp`] for the `UnitTesting` cluster. Each method returns an iterator of `(EndptId, Result)` over the entries in `invoke_responses` whose path matches that command. Command names that would collide with the view's own inherent methods (see `RESERVED_VIEW_METHOD_NAMES` in the codegen) get a `cmd_` prefix."] pub struct UnitTestingCmdResponsesView < 'a , 'r > { resp : & 'r rs_matter_crate :: im :: InvokeResp < 'a > , } impl < 'a , 'r > UnitTestingCmdResponsesView < 'a , 'r > { pub fn test (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 0) } pub fn test_not_handled (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 1) } pub fn test_specific (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestSpecificResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestSpecificResponse < 'a >> (4294048773 , 2) } pub fn test_unknown_command (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 3) } pub fn test_add_arguments (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestAddArgumentsResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestAddArgumentsResponse < 'a >> (4294048773 , 4) } pub fn test_simple_argument_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestSimpleArgumentResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestSimpleArgumentResponse < 'a >> (4294048773 , 5) } pub fn test_struct_array_argument_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestStructArrayArgumentResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestStructArrayArgumentResponse < 'a >> (4294048773 , 6) } pub fn test_struct_argument_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < BooleanResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < BooleanResponse < 'a >> (4294048773 , 7) } pub fn test_nested_struct_argument_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < BooleanResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < BooleanResponse < 'a >> (4294048773 , 8) } pub fn test_list_struct_argument_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < BooleanResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < BooleanResponse < 'a >> (4294048773 , 9) } pub fn test_list_int_8_u_argument_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < BooleanResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < BooleanResponse < 'a >> (4294048773 , 10) } pub fn test_nested_struct_list_argument_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < BooleanResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < BooleanResponse < 'a >> (4294048773 , 11) } pub fn test_list_nested_struct_list_argument_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < BooleanResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < BooleanResponse < 'a >> (4294048773 , 12) } pub fn test_list_int_8_u_reverse_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestListInt8UReverseResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestListInt8UReverseResponse < 'a >> (4294048773 , 13) } pub fn test_enums_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestEnumsResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestEnumsResponse < 'a >> (4294048773 , 14) } pub fn test_nullable_optional_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestNullableOptionalResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestNullableOptionalResponse < 'a >> (4294048773 , 15) } pub fn test_complex_nullable_optional_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestComplexNullableOptionalResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestComplexNullableOptionalResponse < 'a >> (4294048773 , 16) } pub fn simple_struct_echo_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < SimpleStructResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < SimpleStructResponse < 'a >> (4294048773 , 17) } pub fn timed_invoke_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 18) } pub fn test_simple_optional_argument_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 19) } pub fn test_emit_test_event_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestEmitTestEventResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestEmitTestEventResponse < 'a >> (4294048773 , 20) } pub fn test_emit_test_fabric_scoped_event_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestEmitTestFabricScopedEventResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestEmitTestFabricScopedEventResponse < 'a >> (4294048773 , 21) } pub fn test_batch_helper_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestBatchHelperResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestBatchHelperResponse < 'a >> (4294048773 , 22) } pub fn test_second_batch_helper_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestBatchHelperResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestBatchHelperResponse < 'a >> (4294048773 , 23) } pub fn string_echo_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < StringEchoResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < StringEchoResponse < 'a >> (4294048773 , 24) } pub fn global_echo_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < GlobalEchoResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < GlobalEchoResponse < 'a >> (4294048773 , 25) } pub fn test_check_command_flags (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 26) } pub fn test_different_vendor_mei_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestDifferentVendorMeiResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestDifferentVendorMeiResponse < 'a >> (4294048773 , 4294049962) } } # [doc = "IM-client extension trait for extracting `UnitTesting`-cluster command responses out of a generic [`rs_matter_crate::im::InvokeResp`]. `use` this trait to call `.unit_testing_inv_resp()` on an `InvokeResp`; the returned [`UnitTestingCmdResponsesView`] exposes one iterator method per command, each yielding `(EndptId, Result<, Error>)` — see [`rs_matter_crate::im::InvokeResp::responses`] / [`rs_matter_crate::im::InvokeResp::statuses`] for the per-entry semantics."] pub trait UnitTestingCmdResponses < 'a > { fn unit_testing_inv_resp (& self) -> UnitTestingCmdResponsesView < 'a , '_ > ; } impl < 'a > UnitTestingCmdResponses < 'a > for rs_matter_crate :: im :: InvokeResp < 'a > { fn unit_testing_inv_resp (& self) -> UnitTestingCmdResponsesView < 'a , '_ > { UnitTestingCmdResponsesView { resp : self } } } # [doc = "Cluster-scoped response view onto a [`rs_matter_crate::im::ReportDataResp`] for the `UnitTesting` cluster. Each method returns an iterator of `(EndptId, Result)` over the entries in `attr_reports` whose path matches that attribute. Attribute names that would collide with the view's own inherent methods (see `RESERVED_VIEW_METHOD_NAMES` in the codegen) get an `attr_` prefix."] pub struct UnitTestingAttrResponsesView < 'a , 'r > { resp : & 'r rs_matter_crate :: im :: ReportDataResp < 'a > , } impl < 'a , 'r > UnitTestingAttrResponsesView < 'a , 'r > { pub fn boolean (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < bool , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < bool > (4294048773 , 0) } pub fn bitmap_8 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < Bitmap8MaskMap , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < Bitmap8MaskMap > (4294048773 , 1) } pub fn bitmap_16 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < Bitmap16MaskMap , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < Bitmap16MaskMap > (4294048773 , 2) } pub fn bitmap_32 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < Bitmap32MaskMap , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < Bitmap32MaskMap > (4294048773 , 3) } pub fn bitmap_64 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < Bitmap64MaskMap , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < Bitmap64MaskMap > (4294048773 , 4) } pub fn int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u8 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u8 > (4294048773 , 5) } pub fn int_16_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u16 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u16 > (4294048773 , 6) } pub fn int_24_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u32 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u32 > (4294048773 , 7) } pub fn int_32_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u32 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u32 > (4294048773 , 8) } pub fn int_40_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u64 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u64 > (4294048773 , 9) } pub fn int_48_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u64 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u64 > (4294048773 , 10) } pub fn int_56_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u64 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u64 > (4294048773 , 11) } pub fn int_64_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u64 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u64 > (4294048773 , 12) } pub fn int_8_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < i8 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < i8 > (4294048773 , 13) } pub fn int_16_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < i16 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < i16 > (4294048773 , 14) } pub fn int_24_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < i32 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < i32 > (4294048773 , 15) } pub fn int_32_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < i32 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < i32 > (4294048773 , 16) } pub fn int_40_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < i64 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < i64 > (4294048773 , 17) } pub fn int_48_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < i64 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < i64 > (4294048773 , 18) } pub fn int_56_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < i64 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < i64 > (4294048773 , 19) } pub fn int_64_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < i64 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < i64 > (4294048773 , 20) } pub fn enum_8 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u8 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u8 > (4294048773 , 21) } pub fn enum_16 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u16 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u16 > (4294048773 , 22) } pub fn float_single (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < f32 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < f32 > (4294048773 , 23) } pub fn float_double (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < f64 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < f64 > (4294048773 , 24) } pub fn octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: OctetStr < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: OctetStr < 'a > > (4294048773 , 25) } pub fn list_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: TLVArray < 'a , u8 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: TLVArray < 'a , u8 > > (4294048773 , 26) } pub fn list_octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: TLVArray < 'a , rs_matter_crate :: tlv :: OctetStr < 'a > > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: TLVArray < 'a , rs_matter_crate :: tlv :: OctetStr < 'a > > > (4294048773 , 27) } pub fn list_struct_octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: TLVArray < 'a , TestListStructOctet < 'a > > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: TLVArray < 'a , TestListStructOctet < 'a > > > (4294048773 , 28) } pub fn long_octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: OctetStr < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: OctetStr < 'a > > (4294048773 , 29) } pub fn char_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Utf8Str < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Utf8Str < 'a > > (4294048773 , 30) } pub fn long_char_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Utf8Str < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Utf8Str < 'a > > (4294048773 , 31) } pub fn epoch_us (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u64 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u64 > (4294048773 , 32) } pub fn epoch_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u32 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u32 > (4294048773 , 33) } pub fn vendor_id (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u16 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u16 > (4294048773 , 34) } pub fn list_nullables_and_optionals_struct (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: TLVArray < 'a , NullablesAndOptionalsStruct < 'a > > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: TLVArray < 'a , NullablesAndOptionalsStruct < 'a > > > (4294048773 , 35) } pub fn enum_attr (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < SimpleEnum , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < SimpleEnum > (4294048773 , 36) } pub fn struct_attr (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < SimpleStruct < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < SimpleStruct < 'a > > (4294048773 , 37) } pub fn range_restricted_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u8 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u8 > (4294048773 , 38) } pub fn range_restricted_int_8_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < i8 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < i8 > (4294048773 , 39) } pub fn range_restricted_int_16_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u16 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u16 > (4294048773 , 40) } pub fn range_restricted_int_16_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < i16 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < i16 > (4294048773 , 41) } pub fn list_long_octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: TLVArray < 'a , rs_matter_crate :: tlv :: OctetStr < 'a > > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: TLVArray < 'a , rs_matter_crate :: tlv :: OctetStr < 'a > > > (4294048773 , 42) } pub fn list_fabric_scoped (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: TLVArray < 'a , TestFabricScoped < 'a > > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: TLVArray < 'a , TestFabricScoped < 'a > > > (4294048773 , 43) } pub fn timed_write_boolean (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < bool , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < bool > (4294048773 , 48) } pub fn general_error_boolean (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < bool , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < bool > (4294048773 , 49) } pub fn cluster_error_boolean (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < bool , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < bool > (4294048773 , 50) } pub fn global_enum (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestGlobalEnum , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < TestGlobalEnum > (4294048773 , 51) } pub fn global_struct (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestGlobalStruct < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < TestGlobalStruct < 'a > > (4294048773 , 52) } pub fn unsupported_attribute_requiring_admin_privilege (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < bool , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < bool > (4294048773 , 254) } pub fn unsupported (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < bool , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < bool > (4294048773 , 255) } pub fn read_failure_code (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u8 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u8 > (4294048773 , 12288) } pub fn failure_int_32_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u32 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u32 > (4294048773 , 12289) } pub fn nullable_boolean (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < bool > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < bool > > (4294048773 , 16384) } pub fn nullable_bitmap_8 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < Bitmap8MaskMap > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < Bitmap8MaskMap > > (4294048773 , 16385) } pub fn nullable_bitmap_16 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < Bitmap16MaskMap > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < Bitmap16MaskMap > > (4294048773 , 16386) } pub fn nullable_bitmap_32 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < Bitmap32MaskMap > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < Bitmap32MaskMap > > (4294048773 , 16387) } pub fn nullable_bitmap_64 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < Bitmap64MaskMap > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < Bitmap64MaskMap > > (4294048773 , 16388) } pub fn nullable_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u8 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u8 > > (4294048773 , 16389) } pub fn nullable_int_16_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u16 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u16 > > (4294048773 , 16390) } pub fn nullable_int_24_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u32 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u32 > > (4294048773 , 16391) } pub fn nullable_int_32_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u32 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u32 > > (4294048773 , 16392) } pub fn nullable_int_40_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u64 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u64 > > (4294048773 , 16393) } pub fn nullable_int_48_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u64 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u64 > > (4294048773 , 16394) } pub fn nullable_int_56_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u64 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u64 > > (4294048773 , 16395) } pub fn nullable_int_64_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u64 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u64 > > (4294048773 , 16396) } pub fn nullable_int_8_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < i8 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < i8 > > (4294048773 , 16397) } pub fn nullable_int_16_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < i16 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < i16 > > (4294048773 , 16398) } pub fn nullable_int_24_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < i32 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < i32 > > (4294048773 , 16399) } pub fn nullable_int_32_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < i32 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < i32 > > (4294048773 , 16400) } pub fn nullable_int_40_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < i64 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < i64 > > (4294048773 , 16401) } pub fn nullable_int_48_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < i64 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < i64 > > (4294048773 , 16402) } pub fn nullable_int_56_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < i64 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < i64 > > (4294048773 , 16403) } pub fn nullable_int_64_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < i64 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < i64 > > (4294048773 , 16404) } pub fn nullable_enum_8 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u8 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u8 > > (4294048773 , 16405) } pub fn nullable_enum_16 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u16 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u16 > > (4294048773 , 16406) } pub fn nullable_float_single (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < f32 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < f32 > > (4294048773 , 16407) } pub fn nullable_float_double (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < f64 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < f64 > > (4294048773 , 16408) } pub fn nullable_octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: OctetStr < 'a > > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: OctetStr < 'a > > > (4294048773 , 16409) } pub fn nullable_char_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < 'a > > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < 'a > > > (4294048773 , 16414) } pub fn nullable_enum_attr (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < SimpleEnum > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < SimpleEnum > > (4294048773 , 16420) } pub fn nullable_struct (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < SimpleStruct < 'a > > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < SimpleStruct < 'a > > > (4294048773 , 16421) } pub fn nullable_range_restricted_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u8 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u8 > > (4294048773 , 16422) } pub fn nullable_range_restricted_int_8_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < i8 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < i8 > > (4294048773 , 16423) } pub fn nullable_range_restricted_int_16_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u16 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u16 > > (4294048773 , 16424) } pub fn nullable_range_restricted_int_16_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < i16 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < i16 > > (4294048773 , 16425) } pub fn write_only_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u8 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u8 > (4294048773 , 16426) } pub fn nullable_global_enum (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < TestGlobalEnum > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < TestGlobalEnum > > (4294048773 , 16435) } pub fn nullable_global_struct (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < TestGlobalStruct < 'a > > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < TestGlobalStruct < 'a > > > (4294048773 , 16436) } pub fn generated_command_list (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: TLVArray < 'a , rs_matter_crate :: im :: CmdId > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: TLVArray < 'a , rs_matter_crate :: im :: CmdId > > (4294048773 , 65528) } pub fn accepted_command_list (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: TLVArray < 'a , rs_matter_crate :: im :: CmdId > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: TLVArray < 'a , rs_matter_crate :: im :: CmdId > > (4294048773 , 65529) } pub fn attribute_list (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: TLVArray < 'a , rs_matter_crate :: im :: AttrId > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: TLVArray < 'a , rs_matter_crate :: im :: AttrId > > (4294048773 , 65531) } pub fn feature_map (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u32 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u32 > (4294048773 , 65532) } pub fn cluster_revision (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u16 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u16 > (4294048773 , 65533) } pub fn mei_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u8 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u8 > (4294048773 , 4294070017) } } # [doc = "IM-client extension trait for extracting `UnitTesting`-cluster attribute reports out of a generic [`rs_matter_crate::im::ReportDataResp`]. `use` this trait to call `.unit_testing_read_resp()` on a `ReportDataResp`; the returned [`UnitTestingAttrResponsesView`] exposes one iterator method per attribute (scalar, string, struct and list alike), each yielding `(EndptId, Result)`. The item type borrows the response, so string/struct/list attributes come back as `Utf8Str<'a>`/`OctetStr<'a>`, the codegen struct wrapper `Foo<'a>`, or `TLVArray<'a, _>` respectively."] pub trait UnitTestingAttrResponses < 'a > { fn unit_testing_read_resp (& self) -> UnitTestingAttrResponsesView < 'a , '_ > ; } impl < 'a > UnitTestingAttrResponses < 'a > for rs_matter_crate :: im :: ReportDataResp < 'a > { fn unit_testing_read_resp (& self) -> UnitTestingAttrResponsesView < 'a , '_ > { UnitTestingAttrResponsesView { resp : self } } } # [doc = "Cluster-scoped write-status view onto a [`rs_matter_crate::im::WriteResp`] for the `UnitTesting` cluster. Each method returns an iterator of `(EndptId, Result<(), Error>)` over the entries in `write_responses` whose path matches that attribute. Attribute names that would collide with the view's own inherent methods (see `RESERVED_VIEW_METHOD_NAMES` in the codegen) get an `attr_` prefix."] pub struct UnitTestingWriteResponsesView < 'a , 'r > { resp : & 'r rs_matter_crate :: im :: WriteResp < 'a > , } impl < 'a , 'r > UnitTestingWriteResponsesView < 'a , 'r > { pub fn boolean (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 0) } pub fn bitmap_8 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 1) } pub fn bitmap_16 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 2) } pub fn bitmap_32 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 3) } pub fn bitmap_64 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 4) } pub fn int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 5) } pub fn int_16_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 6) } pub fn int_24_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 7) } pub fn int_32_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 8) } pub fn int_40_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 9) } pub fn int_48_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 10) } pub fn int_56_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 11) } pub fn int_64_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 12) } pub fn int_8_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 13) } pub fn int_16_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 14) } pub fn int_24_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 15) } pub fn int_32_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16) } pub fn int_40_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 17) } pub fn int_48_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 18) } pub fn int_56_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 19) } pub fn int_64_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 20) } pub fn enum_8 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 21) } pub fn enum_16 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 22) } pub fn float_single (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 23) } pub fn float_double (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 24) } pub fn octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 25) } pub fn list_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 26) } pub fn list_octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 27) } pub fn list_struct_octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 28) } pub fn long_octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 29) } pub fn char_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 30) } pub fn long_char_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 31) } pub fn epoch_us (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 32) } pub fn epoch_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 33) } pub fn vendor_id (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 34) } pub fn list_nullables_and_optionals_struct (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 35) } pub fn enum_attr (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 36) } pub fn struct_attr (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 37) } pub fn range_restricted_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 38) } pub fn range_restricted_int_8_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 39) } pub fn range_restricted_int_16_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 40) } pub fn range_restricted_int_16_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 41) } pub fn list_long_octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 42) } pub fn list_fabric_scoped (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 43) } pub fn timed_write_boolean (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 48) } pub fn general_error_boolean (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 49) } pub fn cluster_error_boolean (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 50) } pub fn global_enum (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 51) } pub fn global_struct (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 52) } pub fn unsupported_attribute_requiring_admin_privilege (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 254) } pub fn unsupported (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 255) } pub fn read_failure_code (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 12288) } pub fn failure_int_32_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 12289) } pub fn nullable_boolean (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16384) } pub fn nullable_bitmap_8 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16385) } pub fn nullable_bitmap_16 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16386) } pub fn nullable_bitmap_32 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16387) } pub fn nullable_bitmap_64 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16388) } pub fn nullable_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16389) } pub fn nullable_int_16_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16390) } pub fn nullable_int_24_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16391) } pub fn nullable_int_32_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16392) } pub fn nullable_int_40_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16393) } pub fn nullable_int_48_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16394) } pub fn nullable_int_56_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16395) } pub fn nullable_int_64_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16396) } pub fn nullable_int_8_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16397) } pub fn nullable_int_16_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16398) } pub fn nullable_int_24_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16399) } pub fn nullable_int_32_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16400) } pub fn nullable_int_40_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16401) } pub fn nullable_int_48_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16402) } pub fn nullable_int_56_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16403) } pub fn nullable_int_64_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16404) } pub fn nullable_enum_8 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16405) } pub fn nullable_enum_16 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16406) } pub fn nullable_float_single (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16407) } pub fn nullable_float_double (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16408) } pub fn nullable_octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16409) } pub fn nullable_char_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16414) } pub fn nullable_enum_attr (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16420) } pub fn nullable_struct (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16421) } pub fn nullable_range_restricted_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16422) } pub fn nullable_range_restricted_int_8_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16423) } pub fn nullable_range_restricted_int_16_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16424) } pub fn nullable_range_restricted_int_16_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16425) } pub fn write_only_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16426) } pub fn nullable_global_enum (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16435) } pub fn nullable_global_struct (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16436) } pub fn mei_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 4294070017) } } # [doc = "IM-client extension trait for extracting `UnitTesting`-cluster per-attribute write statuses out of a generic [`rs_matter_crate::im::WriteResp`]. `use` this trait to call `.unit_testing_write_resp()` on a `WriteResp`; the returned [`UnitTestingWriteResponsesView`] exposes one iterator method per writable attribute, each yielding `(EndptId, Result<(), Error>)`."] pub trait UnitTestingWriteResponses < 'a > { fn unit_testing_write_resp (& self) -> UnitTestingWriteResponsesView < 'a , '_ > ; } impl < 'a > UnitTestingWriteResponses < 'a > for rs_matter_crate :: im :: WriteResp < 'a > { fn unit_testing_write_resp (& self) -> UnitTestingWriteResponsesView < 'a , '_ > { UnitTestingWriteResponsesView { resp : self } } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestSpecificResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestSpecificResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestSpecificResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestSpecificResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestSpecificResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestAddArgumentsResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestAddArgumentsResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestAddArgumentsResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestAddArgumentsResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestAddArgumentsResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestSimpleArgumentResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestSimpleArgumentResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestSimpleArgumentResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestSimpleArgumentResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestSimpleArgumentResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestStructArrayArgumentResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestStructArrayArgumentResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestStructArrayArgumentResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestStructArrayArgumentResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestStructArrayArgumentResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `BooleanResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`BooleanResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct BooleanResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > BooleanResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < BooleanResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestListInt8UReverseResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestListInt8UReverseResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestListInt8UReverseResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestListInt8UReverseResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestListInt8UReverseResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestEnumsResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestEnumsResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestEnumsResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestEnumsResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestEnumsResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestNullableOptionalResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestNullableOptionalResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestNullableOptionalResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestNullableOptionalResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestNullableOptionalResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestComplexNullableOptionalResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestComplexNullableOptionalResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestComplexNullableOptionalResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestComplexNullableOptionalResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestComplexNullableOptionalResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `SimpleStructResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`SimpleStructResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct SimpleStructResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > SimpleStructResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < SimpleStructResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestEmitTestEventResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestEmitTestEventResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestEmitTestEventResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestEmitTestEventResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestEmitTestEventResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestEmitTestFabricScopedEventResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestEmitTestFabricScopedEventResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestEmitTestFabricScopedEventResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestEmitTestFabricScopedEventResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestEmitTestFabricScopedEventResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestBatchHelperResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestBatchHelperResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestBatchHelperResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestBatchHelperResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestBatchHelperResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `StringEchoResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`StringEchoResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct StringEchoResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > StringEchoResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < StringEchoResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `GlobalEchoResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`GlobalEchoResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct GlobalEchoResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > GlobalEchoResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < GlobalEchoResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestDifferentVendorMeiResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestDifferentVendorMeiResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestDifferentVendorMeiResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestDifferentVendorMeiResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestDifferentVendorMeiResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Per-exchange view onto the `UnitTesting` cluster's client operations. Returned by [`UnitTestingClient::unit_testing`]. Each method consumes the view (and therefore the underlying [`rs_matter_crate::transport::exchange::Exchange`]) — one exchange is one IM transaction."] pub struct UnitTestingClientView < 'a > { exchange : rs_matter_crate :: transport :: exchange :: Exchange < 'a > , } impl < 'a > UnitTestingClientView < 'a > { pub async fn test (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < () , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let mut chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { msg . invoke_requests () ? . unit_testing_inv () . test (endpoint) ? . end () ? . end () }) . await ? ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } pub async fn test_not_handled (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < () , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let mut chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { msg . invoke_requests () ? . unit_testing_inv () . test_not_handled (endpoint) ? . end () ? . end () }) . await ? ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } pub async fn test_specific (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestSpecificResponseHandle < 'a > , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { msg . invoke_requests () ? . unit_testing_inv () . test_specific (endpoint) ? . end () ? . end () }) . await ? ; Ok (TestSpecificResponseHandle { chunk }) } pub async fn test_unknown_command (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < () , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let mut chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { msg . invoke_requests () ? . unit_testing_inv () . test_unknown_command (endpoint) ? . end () ? . end () }) . await ? ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } pub async fn test_add_arguments < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestAddArgumentsResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestAddArgumentsRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_add_arguments (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestAddArgumentsResponseHandle { chunk }) } pub async fn test_simple_argument_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestSimpleArgumentResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestSimpleArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_simple_argument_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestSimpleArgumentResponseHandle { chunk }) } pub async fn test_struct_array_argument_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestStructArrayArgumentResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestStructArrayArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_struct_array_argument_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestStructArrayArgumentResponseHandle { chunk }) } pub async fn test_struct_argument_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < BooleanResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestStructArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_struct_argument_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (BooleanResponseHandle { chunk }) } pub async fn test_nested_struct_argument_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < BooleanResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestNestedStructArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_nested_struct_argument_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (BooleanResponseHandle { chunk }) } pub async fn test_list_struct_argument_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < BooleanResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestListStructArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_list_struct_argument_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (BooleanResponseHandle { chunk }) } pub async fn test_list_int_8_u_argument_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < BooleanResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestListInt8UArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_list_int_8_u_argument_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (BooleanResponseHandle { chunk }) } pub async fn test_nested_struct_list_argument_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < BooleanResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestNestedStructListArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_nested_struct_list_argument_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (BooleanResponseHandle { chunk }) } pub async fn test_list_nested_struct_list_argument_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < BooleanResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestListNestedStructListArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_list_nested_struct_list_argument_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (BooleanResponseHandle { chunk }) } pub async fn test_list_int_8_u_reverse_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestListInt8UReverseResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestListInt8UReverseRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_list_int_8_u_reverse_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestListInt8UReverseResponseHandle { chunk }) } pub async fn test_enums_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestEnumsResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestEnumsRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_enums_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestEnumsResponseHandle { chunk }) } pub async fn test_nullable_optional_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestNullableOptionalResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestNullableOptionalRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_nullable_optional_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestNullableOptionalResponseHandle { chunk }) } pub async fn test_complex_nullable_optional_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestComplexNullableOptionalResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestComplexNullableOptionalRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_complex_nullable_optional_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestComplexNullableOptionalResponseHandle { chunk }) } pub async fn simple_struct_echo_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < SimpleStructResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (SimpleStructEchoRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . simple_struct_echo_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (SimpleStructResponseHandle { chunk }) } pub async fn timed_invoke_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < () , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let mut chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { msg . invoke_requests () ? . unit_testing_inv () . timed_invoke_request (endpoint) ? . end () ? . end () }) . await ? ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } pub async fn test_simple_optional_argument_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < () , rs_matter_crate :: error :: Error > where F : FnMut (TestSimpleOptionalArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let mut chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_simple_optional_argument_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } pub async fn test_emit_test_event_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestEmitTestEventResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestEmitTestEventRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_emit_test_event_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestEmitTestEventResponseHandle { chunk }) } pub async fn test_emit_test_fabric_scoped_event_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestEmitTestFabricScopedEventResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestEmitTestFabricScopedEventRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_emit_test_fabric_scoped_event_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestEmitTestFabricScopedEventResponseHandle { chunk }) } pub async fn test_batch_helper_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestBatchHelperResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestBatchHelperRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_batch_helper_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestBatchHelperResponseHandle { chunk }) } pub async fn test_second_batch_helper_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestBatchHelperResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestSecondBatchHelperRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_second_batch_helper_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestBatchHelperResponseHandle { chunk }) } pub async fn string_echo_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < StringEchoResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (StringEchoRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . string_echo_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (StringEchoResponseHandle { chunk }) } pub async fn global_echo_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < GlobalEchoResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (GlobalEchoRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . global_echo_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (GlobalEchoResponseHandle { chunk }) } pub async fn test_check_command_flags (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < () , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let mut chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { msg . invoke_requests () ? . unit_testing_inv () . test_check_command_flags (endpoint) ? . end () ? . end () }) . await ? ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } pub async fn test_different_vendor_mei_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestDifferentVendorMeiResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestDifferentVendorMeiRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_different_vendor_mei_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestDifferentVendorMeiResponseHandle { chunk }) } pub async fn boolean_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < bool , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . boolean (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < bool , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn bitmap_8_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Bitmap8MaskMap , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . bitmap_8 (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < Bitmap8MaskMap , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn bitmap_16_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Bitmap16MaskMap , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . bitmap_16 (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < Bitmap16MaskMap , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn bitmap_32_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Bitmap32MaskMap , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . bitmap_32 (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < Bitmap32MaskMap , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn bitmap_64_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Bitmap64MaskMap , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . bitmap_64 (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < Bitmap64MaskMap , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_8_u_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < u8 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_8_u (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < u8 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_16_u_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < u16 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_16_u (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < u16 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_24_u_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < u32 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_24_u (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < u32 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_32_u_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < u32 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_32_u (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < u32 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_40_u_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < u64 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_40_u (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < u64 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_48_u_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < u64 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_48_u (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < u64 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_56_u_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < u64 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_56_u (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < u64 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_64_u_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < u64 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_64_u (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < u64 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_8_s_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < i8 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_8_s (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < i8 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_16_s_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < i16 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_16_s (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < i16 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_24_s_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < i32 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_24_s (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < i32 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_32_s_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < i32 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_32_s (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < i32 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_40_s_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < i64 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_40_s (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < i64 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_48_s_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < i64 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_48_s (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < i64 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_56_s_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < i64 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_56_s (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < i64 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_64_s_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < i64 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_64_s (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < i64 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn enum_8_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < u8 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . enum_8 (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < u8 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn enum_16_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < u16 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . enum_16 (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < u16 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn float_single_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < f32 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . float_single (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < f32 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn float_double_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < f64 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . float_double (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < f64 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } # [doc = "Read a non-scalar attribute (string, octet string, struct or list) \ +# [doc = "This module contains generated Rust types for the \"UnitTesting\" cluster"] # [allow (async_fn_in_trait)] # [allow (unknown_lints)] # [allow (clippy :: uninlined_format_args)] # [allow (unexpected_cfgs)] pub mod unit_testing { # [cfg (not (feature = "defmt"))] rs_matter_crate :: reexport :: bitflags :: bitflags ! { # [repr (transparent)] # [derive (Default , Debug , Copy , Clone , Eq , PartialEq , Hash)] pub struct Bitmap16MaskMap : u16 { const MASK_VAL_1 = 1 ; const MASK_VAL_2 = 2 ; const MASK_VAL_3 = 4 ; const MASK_VAL_4 = 16384 ; const _INTERNAL_ALL_BITS = ! 0 ; } } # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: bitflags ! { # [repr (transparent)] # [derive (Default)] pub struct Bitmap16MaskMap : u16 { const MASK_VAL_1 = 1 ; const MASK_VAL_2 = 2 ; const MASK_VAL_3 = 4 ; const MASK_VAL_4 = 16384 ; const _INTERNAL_ALL_BITS = ! 0 ; } } rs_matter_crate :: bitflags_tlv ! (Bitmap16MaskMap , u16) ; # [cfg (not (feature = "defmt"))] rs_matter_crate :: reexport :: bitflags :: bitflags ! { # [repr (transparent)] # [derive (Default , Debug , Copy , Clone , Eq , PartialEq , Hash)] pub struct Bitmap32MaskMap : u32 { const MASK_VAL_1 = 1 ; const MASK_VAL_2 = 2 ; const MASK_VAL_3 = 4 ; const MASK_VAL_4 = 1073741824 ; const _INTERNAL_ALL_BITS = ! 0 ; } } # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: bitflags ! { # [repr (transparent)] # [derive (Default)] pub struct Bitmap32MaskMap : u32 { const MASK_VAL_1 = 1 ; const MASK_VAL_2 = 2 ; const MASK_VAL_3 = 4 ; const MASK_VAL_4 = 1073741824 ; const _INTERNAL_ALL_BITS = ! 0 ; } } rs_matter_crate :: bitflags_tlv ! (Bitmap32MaskMap , u32) ; # [cfg (not (feature = "defmt"))] rs_matter_crate :: reexport :: bitflags :: bitflags ! { # [repr (transparent)] # [derive (Default , Debug , Copy , Clone , Eq , PartialEq , Hash)] pub struct Bitmap64MaskMap : u64 { const MASK_VAL_1 = 1 ; const MASK_VAL_2 = 2 ; const MASK_VAL_3 = 4 ; const MASK_VAL_4 = 4611686018427387904 ; const _INTERNAL_ALL_BITS = ! 0 ; } } # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: bitflags ! { # [repr (transparent)] # [derive (Default)] pub struct Bitmap64MaskMap : u64 { const MASK_VAL_1 = 1 ; const MASK_VAL_2 = 2 ; const MASK_VAL_3 = 4 ; const MASK_VAL_4 = 4611686018427387904 ; const _INTERNAL_ALL_BITS = ! 0 ; } } rs_matter_crate :: bitflags_tlv ! (Bitmap64MaskMap , u64) ; # [cfg (not (feature = "defmt"))] rs_matter_crate :: reexport :: bitflags :: bitflags ! { # [repr (transparent)] # [derive (Default , Debug , Copy , Clone , Eq , PartialEq , Hash)] pub struct Bitmap8MaskMap : u8 { const MASK_VAL_1 = 1 ; const MASK_VAL_2 = 2 ; const MASK_VAL_3 = 4 ; const MASK_VAL_4 = 64 ; const _INTERNAL_ALL_BITS = ! 0 ; } } # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: bitflags ! { # [repr (transparent)] # [derive (Default)] pub struct Bitmap8MaskMap : u8 { const MASK_VAL_1 = 1 ; const MASK_VAL_2 = 2 ; const MASK_VAL_3 = 4 ; const MASK_VAL_4 = 64 ; const _INTERNAL_ALL_BITS = ! 0 ; } } rs_matter_crate :: bitflags_tlv ! (Bitmap8MaskMap , u8) ; # [cfg (not (feature = "defmt"))] rs_matter_crate :: reexport :: bitflags :: bitflags ! { # [repr (transparent)] # [derive (Default , Debug , Copy , Clone , Eq , PartialEq , Hash)] pub struct SimpleBitmap : u8 { const VALUE_A = 1 ; const VALUE_B = 2 ; const VALUE_C = 4 ; const _INTERNAL_ALL_BITS = ! 0 ; } } # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: bitflags ! { # [repr (transparent)] # [derive (Default)] pub struct SimpleBitmap : u8 { const VALUE_A = 1 ; const VALUE_B = 2 ; const VALUE_C = 4 ; const _INTERNAL_ALL_BITS = ! 0 ; } } rs_matter_crate :: bitflags_tlv ! (SimpleBitmap , u8) ; # [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 SimpleEnum { # [enumval (0)] Unspecified = 0 , # [enumval (1)] ValueA = 1 , # [enumval (2)] ValueB = 2 , # [enumval (3)] ValueC = 3 } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum SimpleStructTag { A = 0 , B = 1 , C = 2 , D = 3 , E = 4 , F = 5 , G = 6 , H = 7 , I = 8 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestFabricScopedTag { FabricSensitiveInt8U = 1 , OptionalFabricSensitiveInt8U = 2 , NullableFabricSensitiveInt8U = 3 , NullableOptionalFabricSensitiveInt8U = 4 , FabricSensitiveCharString = 5 , FabricSensitiveStruct = 6 , FabricSensitiveInt8UList = 7 , FabricIndex = 254 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum NullablesAndOptionalsStructTag { NullableInt = 0 , OptionalInt = 1 , NullableOptionalInt = 2 , NullableString = 3 , OptionalString = 4 , NullableOptionalString = 5 , NullableStruct = 6 , OptionalStruct = 7 , NullableOptionalStruct = 8 , NullableList = 9 , OptionalList = 10 , NullableOptionalList = 11 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum NestedStructTag { A = 0 , B = 1 , C = 2 , D = 3 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum NestedStructListTag { A = 0 , B = 1 , C = 2 , D = 3 , E = 4 , F = 5 , G = 6 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum DoubleNestedStructListTag { A = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestListStructOctetTag { Member1 = 0 , Member2 = 1 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestSpecificResponseTag { ReturnValue = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestAddArgumentsResponseTag { ReturnValue = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestSimpleArgumentResponseTag { ReturnValue = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestStructArrayArgumentResponseTag { Arg1 = 0 , Arg2 = 1 , Arg3 = 2 , Arg4 = 3 , Arg5 = 4 , Arg6 = 5 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestAddArgumentsRequestTag { Arg1 = 0 , Arg2 = 1 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestListInt8UReverseResponseTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestSimpleArgumentRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestEnumsResponseTag { Arg1 = 0 , Arg2 = 1 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestStructArrayArgumentRequestRequestTag { Arg1 = 0 , Arg2 = 1 , Arg3 = 2 , Arg4 = 3 , Arg5 = 4 , Arg6 = 5 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestNullableOptionalResponseTag { WasPresent = 0 , WasNull = 1 , Value = 2 , OriginalValue = 3 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestStructArgumentRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestComplexNullableOptionalResponseTag { NullableIntWasNull = 0 , NullableIntValue = 1 , OptionalIntWasPresent = 2 , OptionalIntValue = 3 , NullableOptionalIntWasPresent = 4 , NullableOptionalIntWasNull = 5 , NullableOptionalIntValue = 6 , NullableStringWasNull = 7 , NullableStringValue = 8 , OptionalStringWasPresent = 9 , OptionalStringValue = 10 , NullableOptionalStringWasPresent = 11 , NullableOptionalStringWasNull = 12 , NullableOptionalStringValue = 13 , NullableStructWasNull = 14 , NullableStructValue = 15 , OptionalStructWasPresent = 16 , OptionalStructValue = 17 , NullableOptionalStructWasPresent = 18 , NullableOptionalStructWasNull = 19 , NullableOptionalStructValue = 20 , NullableListWasNull = 21 , NullableListValue = 22 , OptionalListWasPresent = 23 , OptionalListValue = 24 , NullableOptionalListWasPresent = 25 , NullableOptionalListWasNull = 26 , NullableOptionalListValue = 27 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestNestedStructArgumentRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum BooleanResponseTag { Value = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestListStructArgumentRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum SimpleStructResponseTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestListInt8UArgumentRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestEmitTestEventResponseTag { Value = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestNestedStructListArgumentRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestEmitTestFabricScopedEventResponseTag { Value = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestListNestedStructListArgumentRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestBatchHelperResponseTag { Buffer = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestListInt8UReverseRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum StringEchoResponseTag { Payload = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestEnumsRequestRequestTag { Arg1 = 0 , Arg2 = 1 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum GlobalEchoResponseTag { Field1 = 0 , Field2 = 1 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestNullableOptionalRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestComplexNullableOptionalRequestRequestTag { NullableInt = 0 , OptionalInt = 1 , NullableOptionalInt = 2 , NullableString = 3 , OptionalString = 4 , NullableOptionalString = 5 , NullableStruct = 6 , OptionalStruct = 7 , NullableOptionalStruct = 8 , NullableList = 9 , OptionalList = 10 , NullableOptionalList = 11 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum SimpleStructEchoRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestSimpleOptionalArgumentRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestEmitTestEventRequestRequestTag { Arg1 = 0 , Arg2 = 1 , Arg3 = 2 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestEmitTestFabricScopedEventRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestBatchHelperRequestRequestTag { SleepBeforeResponseTimeMs = 0 , SizeOfResponseBuffer = 1 , FillCharacter = 2 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestSecondBatchHelperRequestRequestTag { SleepBeforeResponseTimeMs = 0 , SizeOfResponseBuffer = 1 , FillCharacter = 2 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum StringEchoRequestRequestTag { Payload = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum GlobalEchoRequestRequestTag { Field1 = 0 , Field2 = 1 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestDifferentVendorMeiRequestRequestTag { Arg1 = 0 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestDifferentVendorMeiResponseTag { Arg1 = 0 , EventNumber = 1 , } # [derive (PartialEq , Eq , Clone , Hash)] pub struct SimpleStruct < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > SimpleStruct < 'a > { # [doc = "Create a new instance"] 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 a (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn b (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (1) ?) } pub fn c (& self) -> Result < SimpleEnum , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (2) ?) } pub fn d (& self) -> Result < rs_matter_crate :: tlv :: OctetStr < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (3) ?) } pub fn e (& self) -> Result < rs_matter_crate :: tlv :: Utf8Str < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (4) ?) } pub fn f (& self) -> Result < SimpleBitmap , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (5) ?) } pub fn g (& self) -> Result < f32 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (6) ?) } pub fn h (& self) -> Result < f64 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (7) ?) } pub fn i (& self) -> Result < Option < TestGlobalEnum > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (8) ? ; 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 SimpleStruct < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for SimpleStruct < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for SimpleStruct < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "SimpleStruct") ? ; match self . a () { Ok (value) => write ! (f , "{}: {:?}," , "a" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "a" , e . code ()) ? , } match self . b () { Ok (value) => write ! (f , "{}: {:?}," , "b" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "b" , e . code ()) ? , } match self . c () { Ok (value) => write ! (f , "{}: {:?}," , "c" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "c" , e . code ()) ? , } match self . d () { Ok (value) => write ! (f , "{}: {:?}," , "d" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "d" , e . code ()) ? , } match self . e () { Ok (value) => write ! (f , "{}: {:?}," , "e" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "e" , e . code ()) ? , } match self . f () { Ok (value) => write ! (f , "{}: {:?}," , "f" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "f" , e . code ()) ? , } match self . g () { Ok (value) => write ! (f , "{}: {:?}," , "g" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "g" , e . code ()) ? , } match self . h () { Ok (value) => write ! (f , "{}: {:?}," , "h" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "h" , e . code ()) ? , } match self . i () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "i" , value) ? , Ok (None) => write ! (f , "{}: None," , "i") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "i" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for SimpleStruct < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "SimpleStruct") ; match self . a () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "a" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "a" , e . code ()) , } match self . b () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "b" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "b" , e . code ()) , } match self . c () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "c" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "c" , e . code ()) , } match self . d () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "d" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "d" , e . code ()) , } match self . e () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "e" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "e" , e . code ()) , } match self . f () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "f" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "f" , e . code ()) , } match self . g () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "g" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "g" , e . code ()) , } match self . h () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "h" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "h" , e . code ()) , } match self . i () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "i" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "i") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "i" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestFabricScoped < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestFabricScoped < 'a > { # [doc = "Create a new instance"] 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 fabric_sensitive_int_8_u (& self) -> Result < Option < u8 > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (1) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn optional_fabric_sensitive_int_8_u (& self) -> Result < Option < u8 > , 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) ?)) } } pub fn nullable_fabric_sensitive_int_8_u (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < u8 > > , 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) ?)) } } pub fn nullable_optional_fabric_sensitive_int_8_u (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < u8 > > , 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) ?)) } } pub fn fabric_sensitive_char_string (& self) -> Result < Option < rs_matter_crate :: tlv :: Utf8Str < '_ > > , 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) ?)) } } pub fn fabric_sensitive_struct (& self) -> Result < Option < SimpleStruct < '_ > > , 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) ?)) } } pub fn fabric_sensitive_int_8_u_list (& self) -> Result < Option < rs_matter_crate :: tlv :: TLVArray < '_ , u8 > > , 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) ?)) } } pub fn fabric_index (& self) -> Result < Option < rs_matter_crate :: im :: FabricIndex > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (254) ? ; 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 TestFabricScoped < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestFabricScoped < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestFabricScoped < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestFabricScoped") ? ; match self . fabric_sensitive_int_8_u () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "fabric_sensitive_int_8_u" , value) ? , Ok (None) => write ! (f , "{}: None," , "fabric_sensitive_int_8_u") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "fabric_sensitive_int_8_u" , e . code ()) ? , } match self . optional_fabric_sensitive_int_8_u () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_fabric_sensitive_int_8_u" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_fabric_sensitive_int_8_u") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_fabric_sensitive_int_8_u" , e . code ()) ? , } match self . nullable_fabric_sensitive_int_8_u () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_fabric_sensitive_int_8_u" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_fabric_sensitive_int_8_u") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_fabric_sensitive_int_8_u" , e . code ()) ? , } match self . nullable_optional_fabric_sensitive_int_8_u () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_fabric_sensitive_int_8_u" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_fabric_sensitive_int_8_u") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_fabric_sensitive_int_8_u" , e . code ()) ? , } match self . fabric_sensitive_char_string () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "fabric_sensitive_char_string" , value) ? , Ok (None) => write ! (f , "{}: None," , "fabric_sensitive_char_string") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "fabric_sensitive_char_string" , e . code ()) ? , } match self . fabric_sensitive_struct () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "fabric_sensitive_struct" , value) ? , Ok (None) => write ! (f , "{}: None," , "fabric_sensitive_struct") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "fabric_sensitive_struct" , e . code ()) ? , } match self . fabric_sensitive_int_8_u_list () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "fabric_sensitive_int_8_u_list" , value) ? , Ok (None) => write ! (f , "{}: None," , "fabric_sensitive_int_8_u_list") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "fabric_sensitive_int_8_u_list" , e . code ()) ? , } match self . fabric_index () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "fabric_index" , value) ? , Ok (None) => write ! (f , "{}: None," , "fabric_index") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "fabric_index" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestFabricScoped < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestFabricScoped") ; match self . fabric_sensitive_int_8_u () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "fabric_sensitive_int_8_u" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "fabric_sensitive_int_8_u") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "fabric_sensitive_int_8_u" , e . code ()) , } match self . optional_fabric_sensitive_int_8_u () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_fabric_sensitive_int_8_u" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_fabric_sensitive_int_8_u") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_fabric_sensitive_int_8_u" , e . code ()) , } match self . nullable_fabric_sensitive_int_8_u () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_fabric_sensitive_int_8_u" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_fabric_sensitive_int_8_u") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_fabric_sensitive_int_8_u" , e . code ()) , } match self . nullable_optional_fabric_sensitive_int_8_u () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_fabric_sensitive_int_8_u" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_fabric_sensitive_int_8_u") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_fabric_sensitive_int_8_u" , e . code ()) , } match self . fabric_sensitive_char_string () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "fabric_sensitive_char_string" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "fabric_sensitive_char_string") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "fabric_sensitive_char_string" , e . code ()) , } match self . fabric_sensitive_struct () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "fabric_sensitive_struct" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "fabric_sensitive_struct") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "fabric_sensitive_struct" , e . code ()) , } match self . fabric_sensitive_int_8_u_list () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "fabric_sensitive_int_8_u_list" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "fabric_sensitive_int_8_u_list") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "fabric_sensitive_int_8_u_list" , e . code ()) , } match self . fabric_index () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "fabric_index" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "fabric_index") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "fabric_index" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct NullablesAndOptionalsStruct < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > NullablesAndOptionalsStruct < 'a > { # [doc = "Create a new instance"] 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 nullable_int (& self) -> Result < rs_matter_crate :: tlv :: Nullable < u16 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn optional_int (& self) -> Result < Option < u16 > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (1) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_optional_int (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < u16 > > , 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) ?)) } } pub fn nullable_string (& self) -> Result < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (3) ?) } pub fn optional_string (& self) -> Result < Option < rs_matter_crate :: tlv :: Utf8Str < '_ > > , 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) ?)) } } pub fn nullable_optional_string (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > > > , 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) ?)) } } pub fn nullable_struct (& self) -> Result < rs_matter_crate :: tlv :: Nullable < SimpleStruct < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (6) ?) } pub fn optional_struct (& self) -> Result < Option < SimpleStruct < '_ > > , 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) ?)) } } pub fn nullable_optional_struct (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < SimpleStruct < '_ > > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (8) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_list (& self) -> Result < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (9) ?) } pub fn optional_list (& self) -> Result < Option < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (10) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_optional_list (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (11) ? ; 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 NullablesAndOptionalsStruct < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for NullablesAndOptionalsStruct < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for NullablesAndOptionalsStruct < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "NullablesAndOptionalsStruct") ? ; match self . nullable_int () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_int" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_int" , e . code ()) ? , } match self . optional_int () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_int" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_int") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_int" , e . code ()) ? , } match self . nullable_optional_int () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_int" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_int") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_int" , e . code ()) ? , } match self . nullable_string () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_string" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_string" , e . code ()) ? , } match self . optional_string () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_string" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_string") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_string" , e . code ()) ? , } match self . nullable_optional_string () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_string" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_string") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_string" , e . code ()) ? , } match self . nullable_struct () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_struct" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_struct" , e . code ()) ? , } match self . optional_struct () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_struct" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_struct") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_struct" , e . code ()) ? , } match self . nullable_optional_struct () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_struct" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_struct") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_struct" , e . code ()) ? , } match self . nullable_list () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_list" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_list" , e . code ()) ? , } match self . optional_list () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_list" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_list") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_list" , e . code ()) ? , } match self . nullable_optional_list () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_list" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_list") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_list" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for NullablesAndOptionalsStruct < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "NullablesAndOptionalsStruct") ; match self . nullable_int () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_int" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_int" , e . code ()) , } match self . optional_int () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_int" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_int") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_int" , e . code ()) , } match self . nullable_optional_int () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_int" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_int") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_int" , e . code ()) , } match self . nullable_string () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_string" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_string" , e . code ()) , } match self . optional_string () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_string" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_string") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_string" , e . code ()) , } match self . nullable_optional_string () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_string" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_string") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_string" , e . code ()) , } match self . nullable_struct () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_struct" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_struct" , e . code ()) , } match self . optional_struct () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_struct" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_struct") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_struct" , e . code ()) , } match self . nullable_optional_struct () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_struct" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_struct") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_struct" , e . code ()) , } match self . nullable_list () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_list" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_list" , e . code ()) , } match self . optional_list () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_list" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_list") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_list" , e . code ()) , } match self . nullable_optional_list () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_list" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_list") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_list" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct NestedStruct < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > NestedStruct < 'a > { # [doc = "Create a new instance"] 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 a (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn b (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (1) ?) } pub fn c (& self) -> Result < SimpleStruct < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (2) ?) } pub fn d (& self) -> Result < Option < TestGlobalStruct < '_ > > , 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) ?)) } } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for NestedStruct < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for NestedStruct < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for NestedStruct < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "NestedStruct") ? ; match self . a () { Ok (value) => write ! (f , "{}: {:?}," , "a" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "a" , e . code ()) ? , } match self . b () { Ok (value) => write ! (f , "{}: {:?}," , "b" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "b" , e . code ()) ? , } match self . c () { Ok (value) => write ! (f , "{}: {:?}," , "c" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "c" , e . code ()) ? , } match self . d () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "d" , value) ? , Ok (None) => write ! (f , "{}: None," , "d") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "d" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for NestedStruct < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "NestedStruct") ; match self . a () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "a" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "a" , e . code ()) , } match self . b () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "b" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "b" , e . code ()) , } match self . c () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "c" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "c" , e . code ()) , } match self . d () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "d" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "d") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "d" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct NestedStructList < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > NestedStructList < 'a > { # [doc = "Create a new instance"] 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 a (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn b (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (1) ?) } pub fn c (& self) -> Result < SimpleStruct < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (2) ?) } pub fn d (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleStruct < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (3) ?) } pub fn e (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , u32 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (4) ?) } pub fn f (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , rs_matter_crate :: tlv :: OctetStr < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (5) ?) } pub fn g (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , u8 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (6) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for NestedStructList < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for NestedStructList < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for NestedStructList < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "NestedStructList") ? ; match self . a () { Ok (value) => write ! (f , "{}: {:?}," , "a" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "a" , e . code ()) ? , } match self . b () { Ok (value) => write ! (f , "{}: {:?}," , "b" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "b" , e . code ()) ? , } match self . c () { Ok (value) => write ! (f , "{}: {:?}," , "c" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "c" , e . code ()) ? , } match self . d () { Ok (value) => write ! (f , "{}: {:?}," , "d" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "d" , e . code ()) ? , } match self . e () { Ok (value) => write ! (f , "{}: {:?}," , "e" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "e" , e . code ()) ? , } match self . f () { Ok (value) => write ! (f , "{}: {:?}," , "f" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "f" , e . code ()) ? , } match self . g () { Ok (value) => write ! (f , "{}: {:?}," , "g" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "g" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for NestedStructList < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "NestedStructList") ; match self . a () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "a" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "a" , e . code ()) , } match self . b () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "b" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "b" , e . code ()) , } match self . c () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "c" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "c" , e . code ()) , } match self . d () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "d" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "d" , e . code ()) , } match self . e () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "e" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "e" , e . code ()) , } match self . f () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "f" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "f" , e . code ()) , } match self . g () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "g" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "g" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct DoubleNestedStructList < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > DoubleNestedStructList < 'a > { # [doc = "Create a new instance"] 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 a (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , NestedStructList < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for DoubleNestedStructList < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for DoubleNestedStructList < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for DoubleNestedStructList < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "DoubleNestedStructList") ? ; match self . a () { Ok (value) => write ! (f , "{}: {:?}," , "a" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "a" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for DoubleNestedStructList < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "DoubleNestedStructList") ; match self . a () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "a" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "a" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestListStructOctet < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestListStructOctet < 'a > { # [doc = "Create a new instance"] 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 member_1 (& self) -> Result < u64 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn member_2 (& self) -> Result < rs_matter_crate :: tlv :: OctetStr < '_ > , 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 TestListStructOctet < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestListStructOctet < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestListStructOctet < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestListStructOctet") ? ; match self . member_1 () { Ok (value) => write ! (f , "{}: {:?}," , "member_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "member_1" , e . code ()) ? , } match self . member_2 () { Ok (value) => write ! (f , "{}: {:?}," , "member_2" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "member_2" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestListStructOctet < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestListStructOctet") ; match self . member_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "member_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "member_1" , e . code ()) , } match self . member_2 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "member_2" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "member_2" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestSpecificResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestSpecificResponse < 'a > { # [doc = "Create a new instance"] 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 return_value (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestSpecificResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestSpecificResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestSpecificResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestSpecificResponse") ? ; match self . return_value () { Ok (value) => write ! (f , "{}: {:?}," , "return_value" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "return_value" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestSpecificResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestSpecificResponse") ; match self . return_value () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "return_value" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "return_value" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestAddArgumentsResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestAddArgumentsResponse < 'a > { # [doc = "Create a new instance"] 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 return_value (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestAddArgumentsResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestAddArgumentsResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestAddArgumentsResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestAddArgumentsResponse") ? ; match self . return_value () { Ok (value) => write ! (f , "{}: {:?}," , "return_value" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "return_value" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestAddArgumentsResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestAddArgumentsResponse") ; match self . return_value () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "return_value" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "return_value" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestSimpleArgumentResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestSimpleArgumentResponse < 'a > { # [doc = "Create a new instance"] 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 return_value (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestSimpleArgumentResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestSimpleArgumentResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestSimpleArgumentResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestSimpleArgumentResponse") ? ; match self . return_value () { Ok (value) => write ! (f , "{}: {:?}," , "return_value" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "return_value" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestSimpleArgumentResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestSimpleArgumentResponse") ; match self . return_value () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "return_value" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "return_value" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestStructArrayArgumentResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestStructArrayArgumentResponse < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , NestedStructList < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn arg_2 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleStruct < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (1) ?) } pub fn arg_3 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (2) ?) } pub fn arg_4 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , bool > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (3) ?) } pub fn arg_5 (& self) -> Result < SimpleEnum , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (4) ?) } pub fn arg_6 (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (5) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestStructArrayArgumentResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestStructArrayArgumentResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestStructArrayArgumentResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestStructArrayArgumentResponse") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } match self . arg_2 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_2" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) ? , } match self . arg_3 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_3" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_3" , e . code ()) ? , } match self . arg_4 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_4" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_4" , e . code ()) ? , } match self . arg_5 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_5" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_5" , e . code ()) ? , } match self . arg_6 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_6" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_6" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestStructArrayArgumentResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestStructArrayArgumentResponse") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } match self . arg_2 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_2" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) , } match self . arg_3 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_3" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_3" , e . code ()) , } match self . arg_4 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_4" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_4" , e . code ()) , } match self . arg_5 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_5" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_5" , e . code ()) , } match self . arg_6 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_6" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_6" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestAddArgumentsRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestAddArgumentsRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn arg_2 (& self) -> Result < u8 , 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 TestAddArgumentsRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestAddArgumentsRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestAddArgumentsRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestAddArgumentsRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } match self . arg_2 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_2" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestAddArgumentsRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestAddArgumentsRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } match self . arg_2 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_2" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestListInt8UReverseResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestListInt8UReverseResponse < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , u8 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestListInt8UReverseResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestListInt8UReverseResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestListInt8UReverseResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestListInt8UReverseResponse") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestListInt8UReverseResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestListInt8UReverseResponse") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestSimpleArgumentRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestSimpleArgumentRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestSimpleArgumentRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestSimpleArgumentRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestSimpleArgumentRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestSimpleArgumentRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestSimpleArgumentRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestSimpleArgumentRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestEnumsResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestEnumsResponse < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < u16 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn arg_2 (& self) -> Result < SimpleEnum , 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 TestEnumsResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestEnumsResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestEnumsResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestEnumsResponse") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } match self . arg_2 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_2" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestEnumsResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestEnumsResponse") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } match self . arg_2 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_2" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestStructArrayArgumentRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestStructArrayArgumentRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , NestedStructList < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn arg_2 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleStruct < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (1) ?) } pub fn arg_3 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (2) ?) } pub fn arg_4 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , bool > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (3) ?) } pub fn arg_5 (& self) -> Result < SimpleEnum , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (4) ?) } pub fn arg_6 (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (5) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestStructArrayArgumentRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestStructArrayArgumentRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestStructArrayArgumentRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestStructArrayArgumentRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } match self . arg_2 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_2" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) ? , } match self . arg_3 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_3" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_3" , e . code ()) ? , } match self . arg_4 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_4" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_4" , e . code ()) ? , } match self . arg_5 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_5" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_5" , e . code ()) ? , } match self . arg_6 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_6" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_6" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestStructArrayArgumentRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestStructArrayArgumentRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } match self . arg_2 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_2" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) , } match self . arg_3 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_3" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_3" , e . code ()) , } match self . arg_4 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_4" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_4" , e . code ()) , } match self . arg_5 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_5" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_5" , e . code ()) , } match self . arg_6 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_6" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_6" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestNullableOptionalResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestNullableOptionalResponse < 'a > { # [doc = "Create a new instance"] 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 was_present (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn was_null (& self) -> Result < Option < bool > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (1) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn value (& self) -> Result < Option < u8 > , 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) ?)) } } pub fn original_value (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < u8 > > , 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) ?)) } } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestNullableOptionalResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestNullableOptionalResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestNullableOptionalResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestNullableOptionalResponse") ? ; match self . was_present () { Ok (value) => write ! (f , "{}: {:?}," , "was_present" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "was_present" , e . code ()) ? , } match self . was_null () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "was_null" , value) ? , Ok (None) => write ! (f , "{}: None," , "was_null") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "was_null" , e . code ()) ? , } match self . value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "value" , value) ? , Ok (None) => write ! (f , "{}: None," , "value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "value" , e . code ()) ? , } match self . original_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "original_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "original_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "original_value" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestNullableOptionalResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestNullableOptionalResponse") ; match self . was_present () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "was_present" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "was_present" , e . code ()) , } match self . was_null () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "was_null" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "was_null") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "was_null" , e . code ()) , } match self . value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "value" , e . code ()) , } match self . original_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "original_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "original_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "original_value" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestStructArgumentRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestStructArgumentRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < SimpleStruct < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestStructArgumentRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestStructArgumentRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestStructArgumentRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestStructArgumentRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestStructArgumentRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestStructArgumentRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestComplexNullableOptionalResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestComplexNullableOptionalResponse < 'a > { # [doc = "Create a new instance"] 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 nullable_int_was_null (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn nullable_int_value (& self) -> Result < Option < u16 > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (1) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn optional_int_was_present (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (2) ?) } pub fn optional_int_value (& self) -> Result < Option < u16 > , 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) ?)) } } pub fn nullable_optional_int_was_present (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (4) ?) } pub fn nullable_optional_int_was_null (& self) -> Result < Option < bool > , 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) ?)) } } pub fn nullable_optional_int_value (& self) -> Result < Option < u16 > , 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) ?)) } } pub fn nullable_string_was_null (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (7) ?) } pub fn nullable_string_value (& self) -> Result < Option < rs_matter_crate :: tlv :: Utf8Str < '_ > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (8) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn optional_string_was_present (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (9) ?) } pub fn optional_string_value (& self) -> Result < Option < rs_matter_crate :: tlv :: Utf8Str < '_ > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (10) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_optional_string_was_present (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (11) ?) } pub fn nullable_optional_string_was_null (& self) -> Result < Option < bool > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (12) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_optional_string_value (& self) -> Result < Option < rs_matter_crate :: tlv :: Utf8Str < '_ > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (13) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_struct_was_null (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (14) ?) } pub fn nullable_struct_value (& self) -> Result < Option < SimpleStruct < '_ > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (15) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn optional_struct_was_present (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (16) ?) } pub fn optional_struct_value (& self) -> Result < Option < SimpleStruct < '_ > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (17) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_optional_struct_was_present (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (18) ?) } pub fn nullable_optional_struct_was_null (& self) -> Result < Option < bool > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (19) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_optional_struct_value (& self) -> Result < Option < SimpleStruct < '_ > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (20) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_list_was_null (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (21) ?) } pub fn nullable_list_value (& self) -> Result < Option < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (22) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn optional_list_was_present (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (23) ?) } pub fn optional_list_value (& self) -> Result < Option < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (24) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_optional_list_was_present (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (25) ?) } pub fn nullable_optional_list_was_null (& self) -> Result < Option < bool > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (26) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_optional_list_value (& self) -> Result < Option < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (27) ? ; 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 TestComplexNullableOptionalResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestComplexNullableOptionalResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestComplexNullableOptionalResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestComplexNullableOptionalResponse") ? ; match self . nullable_int_was_null () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_int_was_null" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_int_was_null" , e . code ()) ? , } match self . nullable_int_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_int_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_int_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_int_value" , e . code ()) ? , } match self . optional_int_was_present () { Ok (value) => write ! (f , "{}: {:?}," , "optional_int_was_present" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_int_was_present" , e . code ()) ? , } match self . optional_int_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_int_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_int_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_int_value" , e . code ()) ? , } match self . nullable_optional_int_was_present () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_optional_int_was_present" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_int_was_present" , e . code ()) ? , } match self . nullable_optional_int_was_null () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_int_was_null" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_int_was_null") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_int_was_null" , e . code ()) ? , } match self . nullable_optional_int_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_int_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_int_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_int_value" , e . code ()) ? , } match self . nullable_string_was_null () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_string_was_null" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_string_was_null" , e . code ()) ? , } match self . nullable_string_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_string_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_string_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_string_value" , e . code ()) ? , } match self . optional_string_was_present () { Ok (value) => write ! (f , "{}: {:?}," , "optional_string_was_present" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_string_was_present" , e . code ()) ? , } match self . optional_string_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_string_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_string_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_string_value" , e . code ()) ? , } match self . nullable_optional_string_was_present () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_optional_string_was_present" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_string_was_present" , e . code ()) ? , } match self . nullable_optional_string_was_null () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_string_was_null" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_string_was_null") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_string_was_null" , e . code ()) ? , } match self . nullable_optional_string_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_string_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_string_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_string_value" , e . code ()) ? , } match self . nullable_struct_was_null () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_struct_was_null" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_struct_was_null" , e . code ()) ? , } match self . nullable_struct_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_struct_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_struct_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_struct_value" , e . code ()) ? , } match self . optional_struct_was_present () { Ok (value) => write ! (f , "{}: {:?}," , "optional_struct_was_present" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_struct_was_present" , e . code ()) ? , } match self . optional_struct_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_struct_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_struct_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_struct_value" , e . code ()) ? , } match self . nullable_optional_struct_was_present () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_optional_struct_was_present" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_struct_was_present" , e . code ()) ? , } match self . nullable_optional_struct_was_null () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_struct_was_null" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_struct_was_null") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_struct_was_null" , e . code ()) ? , } match self . nullable_optional_struct_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_struct_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_struct_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_struct_value" , e . code ()) ? , } match self . nullable_list_was_null () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_list_was_null" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_list_was_null" , e . code ()) ? , } match self . nullable_list_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_list_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_list_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_list_value" , e . code ()) ? , } match self . optional_list_was_present () { Ok (value) => write ! (f , "{}: {:?}," , "optional_list_was_present" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_list_was_present" , e . code ()) ? , } match self . optional_list_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_list_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_list_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_list_value" , e . code ()) ? , } match self . nullable_optional_list_was_present () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_optional_list_was_present" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_list_was_present" , e . code ()) ? , } match self . nullable_optional_list_was_null () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_list_was_null" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_list_was_null") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_list_was_null" , e . code ()) ? , } match self . nullable_optional_list_value () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_list_value" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_list_value") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_list_value" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestComplexNullableOptionalResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestComplexNullableOptionalResponse") ; match self . nullable_int_was_null () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_int_was_null" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_int_was_null" , e . code ()) , } match self . nullable_int_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_int_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_int_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_int_value" , e . code ()) , } match self . optional_int_was_present () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "optional_int_was_present" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_int_was_present" , e . code ()) , } match self . optional_int_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_int_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_int_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_int_value" , e . code ()) , } match self . nullable_optional_int_was_present () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_optional_int_was_present" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_int_was_present" , e . code ()) , } match self . nullable_optional_int_was_null () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_int_was_null" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_int_was_null") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_int_was_null" , e . code ()) , } match self . nullable_optional_int_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_int_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_int_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_int_value" , e . code ()) , } match self . nullable_string_was_null () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_string_was_null" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_string_was_null" , e . code ()) , } match self . nullable_string_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_string_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_string_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_string_value" , e . code ()) , } match self . optional_string_was_present () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "optional_string_was_present" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_string_was_present" , e . code ()) , } match self . optional_string_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_string_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_string_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_string_value" , e . code ()) , } match self . nullable_optional_string_was_present () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_optional_string_was_present" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_string_was_present" , e . code ()) , } match self . nullable_optional_string_was_null () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_string_was_null" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_string_was_null") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_string_was_null" , e . code ()) , } match self . nullable_optional_string_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_string_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_string_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_string_value" , e . code ()) , } match self . nullable_struct_was_null () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_struct_was_null" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_struct_was_null" , e . code ()) , } match self . nullable_struct_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_struct_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_struct_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_struct_value" , e . code ()) , } match self . optional_struct_was_present () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "optional_struct_was_present" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_struct_was_present" , e . code ()) , } match self . optional_struct_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_struct_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_struct_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_struct_value" , e . code ()) , } match self . nullable_optional_struct_was_present () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_optional_struct_was_present" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_struct_was_present" , e . code ()) , } match self . nullable_optional_struct_was_null () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_struct_was_null" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_struct_was_null") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_struct_was_null" , e . code ()) , } match self . nullable_optional_struct_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_struct_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_struct_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_struct_value" , e . code ()) , } match self . nullable_list_was_null () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_list_was_null" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_list_was_null" , e . code ()) , } match self . nullable_list_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_list_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_list_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_list_value" , e . code ()) , } match self . optional_list_was_present () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "optional_list_was_present" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_list_was_present" , e . code ()) , } match self . optional_list_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_list_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_list_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_list_value" , e . code ()) , } match self . nullable_optional_list_was_present () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_optional_list_was_present" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_list_was_present" , e . code ()) , } match self . nullable_optional_list_was_null () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_list_was_null" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_list_was_null") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_list_was_null" , e . code ()) , } match self . nullable_optional_list_value () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_list_value" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_list_value") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_list_value" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestNestedStructArgumentRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestNestedStructArgumentRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < NestedStruct < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestNestedStructArgumentRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestNestedStructArgumentRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestNestedStructArgumentRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestNestedStructArgumentRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestNestedStructArgumentRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestNestedStructArgumentRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct BooleanResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > BooleanResponse < 'a > { # [doc = "Create a new instance"] 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 value (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for BooleanResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for BooleanResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for BooleanResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "BooleanResponse") ? ; match self . value () { Ok (value) => write ! (f , "{}: {:?}," , "value" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "value" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for BooleanResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "BooleanResponse") ; match self . value () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "value" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "value" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestListStructArgumentRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestListStructArgumentRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleStruct < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestListStructArgumentRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestListStructArgumentRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestListStructArgumentRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestListStructArgumentRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestListStructArgumentRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestListStructArgumentRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct SimpleStructResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > SimpleStructResponse < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < SimpleStruct < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for SimpleStructResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for SimpleStructResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for SimpleStructResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "SimpleStructResponse") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for SimpleStructResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "SimpleStructResponse") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestListInt8UArgumentRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestListInt8UArgumentRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , u8 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestListInt8UArgumentRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestListInt8UArgumentRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestListInt8UArgumentRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestListInt8UArgumentRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestListInt8UArgumentRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestListInt8UArgumentRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestEmitTestEventResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestEmitTestEventResponse < 'a > { # [doc = "Create a new instance"] 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 value (& self) -> Result < u64 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestEmitTestEventResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestEmitTestEventResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestEmitTestEventResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestEmitTestEventResponse") ? ; match self . value () { Ok (value) => write ! (f , "{}: {:?}," , "value" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "value" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestEventResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestEmitTestEventResponse") ; match self . value () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "value" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "value" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestNestedStructListArgumentRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestNestedStructListArgumentRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < NestedStructList < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestNestedStructListArgumentRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestNestedStructListArgumentRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestNestedStructListArgumentRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestNestedStructListArgumentRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestNestedStructListArgumentRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestNestedStructListArgumentRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestEmitTestFabricScopedEventResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestEmitTestFabricScopedEventResponse < 'a > { # [doc = "Create a new instance"] 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 value (& self) -> Result < u64 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestEmitTestFabricScopedEventResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestEmitTestFabricScopedEventResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestEmitTestFabricScopedEventResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestEmitTestFabricScopedEventResponse") ? ; match self . value () { Ok (value) => write ! (f , "{}: {:?}," , "value" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "value" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestFabricScopedEventResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestEmitTestFabricScopedEventResponse") ; match self . value () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "value" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "value" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestListNestedStructListArgumentRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestListNestedStructListArgumentRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , NestedStructList < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestListNestedStructListArgumentRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestListNestedStructListArgumentRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestListNestedStructListArgumentRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestListNestedStructListArgumentRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestListNestedStructListArgumentRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestListNestedStructListArgumentRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestBatchHelperResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestBatchHelperResponse < 'a > { # [doc = "Create a new instance"] 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 buffer (& self) -> Result < rs_matter_crate :: tlv :: OctetStr < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestBatchHelperResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestBatchHelperResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestBatchHelperResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestBatchHelperResponse") ? ; match self . buffer () { Ok (value) => write ! (f , "{}: {:?}," , "buffer" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "buffer" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestBatchHelperResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestBatchHelperResponse") ; match self . buffer () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "buffer" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "buffer" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestListInt8UReverseRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestListInt8UReverseRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , u8 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestListInt8UReverseRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestListInt8UReverseRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestListInt8UReverseRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestListInt8UReverseRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestListInt8UReverseRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestListInt8UReverseRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct StringEchoResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > StringEchoResponse < 'a > { # [doc = "Create a new instance"] 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 payload (& self) -> Result < rs_matter_crate :: tlv :: OctetStr < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for StringEchoResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for StringEchoResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for StringEchoResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "StringEchoResponse") ? ; match self . payload () { Ok (value) => write ! (f , "{}: {:?}," , "payload" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "payload" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for StringEchoResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "StringEchoResponse") ; match self . payload () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "payload" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "payload" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestEnumsRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestEnumsRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < u16 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn arg_2 (& self) -> Result < SimpleEnum , 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 TestEnumsRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestEnumsRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestEnumsRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestEnumsRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } match self . arg_2 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_2" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestEnumsRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestEnumsRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } match self . arg_2 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_2" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct GlobalEchoResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > GlobalEchoResponse < 'a > { # [doc = "Create a new instance"] 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 field_1 (& self) -> Result < TestGlobalStruct < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn field_2 (& self) -> Result < TestGlobalEnum , 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 GlobalEchoResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for GlobalEchoResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for GlobalEchoResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "GlobalEchoResponse") ? ; match self . field_1 () { Ok (value) => write ! (f , "{}: {:?}," , "field_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "field_1" , e . code ()) ? , } match self . field_2 () { Ok (value) => write ! (f , "{}: {:?}," , "field_2" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "field_2" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for GlobalEchoResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "GlobalEchoResponse") ; match self . field_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "field_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "field_1" , e . code ()) , } match self . field_2 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "field_2" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "field_2" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestNullableOptionalRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestNullableOptionalRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < u8 > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (0) ? ; 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 TestNullableOptionalRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestNullableOptionalRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestNullableOptionalRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestNullableOptionalRequestRequest") ? ; match self . arg_1 () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "arg_1" , value) ? , Ok (None) => write ! (f , "{}: None," , "arg_1") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestNullableOptionalRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestNullableOptionalRequestRequest") ; match self . arg_1 () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "arg_1" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "arg_1") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestComplexNullableOptionalRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestComplexNullableOptionalRequestRequest < 'a > { # [doc = "Create a new instance"] 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 nullable_int (& self) -> Result < rs_matter_crate :: tlv :: Nullable < u16 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn optional_int (& self) -> Result < Option < u16 > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (1) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_optional_int (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < u16 > > , 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) ?)) } } pub fn nullable_string (& self) -> Result < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (3) ?) } pub fn optional_string (& self) -> Result < Option < rs_matter_crate :: tlv :: Utf8Str < '_ > > , 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) ?)) } } pub fn nullable_optional_string (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > > > , 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) ?)) } } pub fn nullable_struct (& self) -> Result < rs_matter_crate :: tlv :: Nullable < SimpleStruct < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (6) ?) } pub fn optional_struct (& self) -> Result < Option < SimpleStruct < '_ > > , 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) ?)) } } pub fn nullable_optional_struct (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < SimpleStruct < '_ > > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (8) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_list (& self) -> Result < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (9) ?) } pub fn optional_list (& self) -> Result < Option < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (10) ? ; if element . is_empty () { Ok (None) } else { Ok (Some (rs_matter_crate :: tlv :: FromTLV :: from_tlv (& element) ?)) } } pub fn nullable_optional_list (& self) -> Result < Option < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > > > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (11) ? ; 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 TestComplexNullableOptionalRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestComplexNullableOptionalRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestComplexNullableOptionalRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestComplexNullableOptionalRequestRequest") ? ; match self . nullable_int () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_int" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_int" , e . code ()) ? , } match self . optional_int () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_int" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_int") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_int" , e . code ()) ? , } match self . nullable_optional_int () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_int" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_int") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_int" , e . code ()) ? , } match self . nullable_string () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_string" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_string" , e . code ()) ? , } match self . optional_string () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_string" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_string") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_string" , e . code ()) ? , } match self . nullable_optional_string () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_string" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_string") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_string" , e . code ()) ? , } match self . nullable_struct () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_struct" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_struct" , e . code ()) ? , } match self . optional_struct () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_struct" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_struct") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_struct" , e . code ()) ? , } match self . nullable_optional_struct () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_struct" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_struct") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_struct" , e . code ()) ? , } match self . nullable_list () { Ok (value) => write ! (f , "{}: {:?}," , "nullable_list" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_list" , e . code ()) ? , } match self . optional_list () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "optional_list" , value) ? , Ok (None) => write ! (f , "{}: None," , "optional_list") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "optional_list" , e . code ()) ? , } match self . nullable_optional_list () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "nullable_optional_list" , value) ? , Ok (None) => write ! (f , "{}: None," , "nullable_optional_list") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "nullable_optional_list" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestComplexNullableOptionalRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestComplexNullableOptionalRequestRequest") ; match self . nullable_int () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_int" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_int" , e . code ()) , } match self . optional_int () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_int" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_int") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_int" , e . code ()) , } match self . nullable_optional_int () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_int" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_int") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_int" , e . code ()) , } match self . nullable_string () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_string" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_string" , e . code ()) , } match self . optional_string () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_string" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_string") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_string" , e . code ()) , } match self . nullable_optional_string () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_string" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_string") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_string" , e . code ()) , } match self . nullable_struct () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_struct" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_struct" , e . code ()) , } match self . optional_struct () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_struct" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_struct") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_struct" , e . code ()) , } match self . nullable_optional_struct () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_struct" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_struct") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_struct" , e . code ()) , } match self . nullable_list () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "nullable_list" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_list" , e . code ()) , } match self . optional_list () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "optional_list" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "optional_list") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "optional_list" , e . code ()) , } match self . nullable_optional_list () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "nullable_optional_list" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "nullable_optional_list") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "nullable_optional_list" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct SimpleStructEchoRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > SimpleStructEchoRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < SimpleStruct < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for SimpleStructEchoRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for SimpleStructEchoRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for SimpleStructEchoRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "SimpleStructEchoRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for SimpleStructEchoRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "SimpleStructEchoRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestSimpleOptionalArgumentRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestSimpleOptionalArgumentRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < Option < bool > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (0) ? ; 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 TestSimpleOptionalArgumentRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestSimpleOptionalArgumentRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestSimpleOptionalArgumentRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestSimpleOptionalArgumentRequestRequest") ? ; match self . arg_1 () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "arg_1" , value) ? , Ok (None) => write ! (f , "{}: None," , "arg_1") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestSimpleOptionalArgumentRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestSimpleOptionalArgumentRequestRequest") ; match self . arg_1 () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "arg_1" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "arg_1") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestEmitTestEventRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestEmitTestEventRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn arg_2 (& self) -> Result < SimpleEnum , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (1) ?) } pub fn arg_3 (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (2) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestEmitTestEventRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestEmitTestEventRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestEmitTestEventRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestEmitTestEventRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } match self . arg_2 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_2" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) ? , } match self . arg_3 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_3" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_3" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestEventRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestEmitTestEventRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } match self . arg_2 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_2" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) , } match self . arg_3 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_3" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_3" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestEmitTestFabricScopedEventRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestEmitTestFabricScopedEventRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestEmitTestFabricScopedEventRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestEmitTestFabricScopedEventRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestEmitTestFabricScopedEventRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestEmitTestFabricScopedEventRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestFabricScopedEventRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestEmitTestFabricScopedEventRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestBatchHelperRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestBatchHelperRequestRequest < 'a > { # [doc = "Create a new instance"] 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 sleep_before_response_time_ms (& self) -> Result < u16 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn size_of_response_buffer (& self) -> Result < u16 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (1) ?) } pub fn fill_character (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (2) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestBatchHelperRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestBatchHelperRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestBatchHelperRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestBatchHelperRequestRequest") ? ; match self . sleep_before_response_time_ms () { Ok (value) => write ! (f , "{}: {:?}," , "sleep_before_response_time_ms" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "sleep_before_response_time_ms" , e . code ()) ? , } match self . size_of_response_buffer () { Ok (value) => write ! (f , "{}: {:?}," , "size_of_response_buffer" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "size_of_response_buffer" , e . code ()) ? , } match self . fill_character () { Ok (value) => write ! (f , "{}: {:?}," , "fill_character" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "fill_character" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestBatchHelperRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestBatchHelperRequestRequest") ; match self . sleep_before_response_time_ms () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "sleep_before_response_time_ms" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "sleep_before_response_time_ms" , e . code ()) , } match self . size_of_response_buffer () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "size_of_response_buffer" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "size_of_response_buffer" , e . code ()) , } match self . fill_character () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "fill_character" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "fill_character" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestSecondBatchHelperRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestSecondBatchHelperRequestRequest < 'a > { # [doc = "Create a new instance"] 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 sleep_before_response_time_ms (& self) -> Result < u16 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn size_of_response_buffer (& self) -> Result < u16 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (1) ?) } pub fn fill_character (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (2) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestSecondBatchHelperRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestSecondBatchHelperRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestSecondBatchHelperRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestSecondBatchHelperRequestRequest") ? ; match self . sleep_before_response_time_ms () { Ok (value) => write ! (f , "{}: {:?}," , "sleep_before_response_time_ms" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "sleep_before_response_time_ms" , e . code ()) ? , } match self . size_of_response_buffer () { Ok (value) => write ! (f , "{}: {:?}," , "size_of_response_buffer" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "size_of_response_buffer" , e . code ()) ? , } match self . fill_character () { Ok (value) => write ! (f , "{}: {:?}," , "fill_character" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "fill_character" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestSecondBatchHelperRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestSecondBatchHelperRequestRequest") ; match self . sleep_before_response_time_ms () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "sleep_before_response_time_ms" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "sleep_before_response_time_ms" , e . code ()) , } match self . size_of_response_buffer () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "size_of_response_buffer" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "size_of_response_buffer" , e . code ()) , } match self . fill_character () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "fill_character" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "fill_character" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct StringEchoRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > StringEchoRequestRequest < 'a > { # [doc = "Create a new instance"] 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 payload (& self) -> Result < rs_matter_crate :: tlv :: OctetStr < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for StringEchoRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for StringEchoRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for StringEchoRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "StringEchoRequestRequest") ? ; match self . payload () { Ok (value) => write ! (f , "{}: {:?}," , "payload" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "payload" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for StringEchoRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "StringEchoRequestRequest") ; match self . payload () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "payload" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "payload" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct GlobalEchoRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > GlobalEchoRequestRequest < 'a > { # [doc = "Create a new instance"] 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 field_1 (& self) -> Result < TestGlobalStruct < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn field_2 (& self) -> Result < TestGlobalEnum , 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 GlobalEchoRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for GlobalEchoRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for GlobalEchoRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "GlobalEchoRequestRequest") ? ; match self . field_1 () { Ok (value) => write ! (f , "{}: {:?}," , "field_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "field_1" , e . code ()) ? , } match self . field_2 () { Ok (value) => write ! (f , "{}: {:?}," , "field_2" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "field_2" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for GlobalEchoRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "GlobalEchoRequestRequest") ; match self . field_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "field_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "field_1" , e . code ()) , } match self . field_2 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "field_2" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "field_2" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestDifferentVendorMeiRequestRequest < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestDifferentVendorMeiRequestRequest < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestDifferentVendorMeiRequestRequest < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestDifferentVendorMeiRequestRequest < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestDifferentVendorMeiRequestRequest < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestDifferentVendorMeiRequestRequest") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestDifferentVendorMeiRequestRequest < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestDifferentVendorMeiRequestRequest") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestDifferentVendorMeiResponse < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestDifferentVendorMeiResponse < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (0) ?) } pub fn event_number (& self) -> Result < u64 , 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 TestDifferentVendorMeiResponse < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestDifferentVendorMeiResponse < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestDifferentVendorMeiResponse < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestDifferentVendorMeiResponse") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } match self . event_number () { Ok (value) => write ! (f , "{}: {:?}," , "event_number" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "event_number" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestDifferentVendorMeiResponse < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestDifferentVendorMeiResponse") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } match self . event_number () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "event_number" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "event_number" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } pub struct SimpleStructBuilder < P , const F : usize = 0usize > (P) ; impl < P > SimpleStructBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > SimpleStructBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn a (mut self , value : u8) -> Result < SimpleStructBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "a" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "a" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > SimpleStructBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn a (mut self , value : u8) -> Result < SimpleStructBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "a" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > SimpleStructBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn b (mut self , value : bool) -> Result < SimpleStructBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "b" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "b" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > SimpleStructBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn b (mut self , value : bool) -> Result < SimpleStructBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "b" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > SimpleStructBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn c (mut self , value : SimpleEnum) -> Result < SimpleStructBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "c" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "c" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > SimpleStructBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn c (mut self , value : SimpleEnum) -> Result < SimpleStructBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "c" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > SimpleStructBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn d (mut self , value : rs_matter_crate :: tlv :: OctetStr < '_ >) -> Result < SimpleStructBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "d" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "d" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > SimpleStructBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn d (mut self , value : rs_matter_crate :: tlv :: OctetStr < '_ >) -> Result < SimpleStructBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "d" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > SimpleStructBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn e (mut self , value : rs_matter_crate :: tlv :: Utf8Str < '_ >) -> Result < SimpleStructBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "e" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "e" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > SimpleStructBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn e (mut self , value : rs_matter_crate :: tlv :: Utf8Str < '_ >) -> Result < SimpleStructBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "e" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > SimpleStructBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn f (mut self , value : SimpleBitmap) -> Result < SimpleStructBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "f" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "f" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > SimpleStructBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn f (mut self , value : SimpleBitmap) -> Result < SimpleStructBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "f" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > SimpleStructBuilder < P , 6 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn g (mut self , value : f32) -> Result < SimpleStructBuilder < P , 7usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "g" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "g" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (6) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > SimpleStructBuilder < P , 6 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn g (mut self , value : f32) -> Result < SimpleStructBuilder < P , 7usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "g" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (6) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > SimpleStructBuilder < P , 7 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn h (mut self , value : f64) -> Result < SimpleStructBuilder < P , 8usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "h" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "h" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (7) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > SimpleStructBuilder < P , 7 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn h (mut self , value : f64) -> Result < SimpleStructBuilder < P , 8usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "h" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (7) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > SimpleStructBuilder < P , 8 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn i (mut self , value : Option < TestGlobalEnum >) -> Result < SimpleStructBuilder < P , 9usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "i" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "i" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (8) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > SimpleStructBuilder < P , 8 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn i (mut self , value : Option < TestGlobalEnum >) -> Result < SimpleStructBuilder < P , 9usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "i" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (8) , self . 0 . writer () ,) ? ; Ok (SimpleStructBuilder (self . 0)) } } impl < P > SimpleStructBuilder < P , 9usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for SimpleStructBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "SimpleStruct") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for SimpleStructBuilder < P , F > 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 , "SimpleStruct") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for SimpleStructBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for SimpleStructBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct SimpleStructArrayBuilder < P > (P) ; impl < P > SimpleStructArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < SimpleStructBuilder < SimpleStructArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (SimpleStructArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for SimpleStructArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "SimpleStruct[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for SimpleStructArrayBuilder < P > 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 , "SimpleStruct[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for SimpleStructArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for SimpleStructArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestFabricScopedBuilder < P , const F : usize = 1usize > (P) ; impl < P > TestFabricScopedBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestFabricScopedBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn fabric_sensitive_int_8_u (mut self , value : Option < u8 >) -> Result < TestFabricScopedBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricSensitiveInt8u" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricSensitiveInt8u" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestFabricScopedBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn fabric_sensitive_int_8_u (mut self , value : Option < u8 >) -> Result < TestFabricScopedBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricSensitiveInt8u" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestFabricScopedBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn optional_fabric_sensitive_int_8_u (mut self , value : Option < u8 >) -> Result < TestFabricScopedBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalFabricSensitiveInt8u" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalFabricSensitiveInt8u" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestFabricScopedBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn optional_fabric_sensitive_int_8_u (mut self , value : Option < u8 >) -> Result < TestFabricScopedBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalFabricSensitiveInt8u" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestFabricScopedBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_fabric_sensitive_int_8_u (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u8 > >) -> Result < TestFabricScopedBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableFabricSensitiveInt8u" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableFabricSensitiveInt8u" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestFabricScopedBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_fabric_sensitive_int_8_u (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u8 > >) -> Result < TestFabricScopedBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableFabricSensitiveInt8u" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestFabricScopedBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_fabric_sensitive_int_8_u (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u8 > >) -> Result < TestFabricScopedBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalFabricSensitiveInt8u" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalFabricSensitiveInt8u" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestFabricScopedBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_fabric_sensitive_int_8_u (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u8 > >) -> Result < TestFabricScopedBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalFabricSensitiveInt8u" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestFabricScopedBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn fabric_sensitive_char_string (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestFabricScopedBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricSensitiveCharString" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricSensitiveCharString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestFabricScopedBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn fabric_sensitive_char_string (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestFabricScopedBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricSensitiveCharString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } impl < P > TestFabricScopedBuilder < P , 6 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn fabric_sensitive_struct (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestFabricScopedBuilder < P , 7usize > , SimpleStructBuilder < TestFabricScopedBuilder < P , 7usize > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestFabricScopedBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (6) ,) } } impl < P > TestFabricScopedBuilder < P , 7 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn fabric_sensitive_int_8_u_list (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestFabricScopedBuilder < P , 254usize > , rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestFabricScopedBuilder < P , 254usize > , u8 > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestFabricScopedBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (7) ,) } } # [cfg (feature = "defmt")] impl < P > TestFabricScopedBuilder < P , 254 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn fabric_index (mut self , value : Option < rs_matter_crate :: im :: FabricIndex >) -> Result < TestFabricScopedBuilder < P , 255usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricIndex" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricIndex" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (254) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestFabricScopedBuilder < P , 254 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn fabric_index (mut self , value : Option < rs_matter_crate :: im :: FabricIndex >) -> Result < TestFabricScopedBuilder < P , 255usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricIndex" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (254) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedBuilder (self . 0)) } } impl < P > TestFabricScopedBuilder < P , 255usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestFabricScopedBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestFabricScoped") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestFabricScopedBuilder < P , F > 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 , "TestFabricScoped") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestFabricScopedBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestFabricScopedBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestFabricScopedArrayBuilder < P > (P) ; impl < P > TestFabricScopedArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestFabricScopedBuilder < TestFabricScopedArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestFabricScopedArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestFabricScopedArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestFabricScoped[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestFabricScopedArrayBuilder < P > 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 , "TestFabricScoped[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestFabricScopedArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestFabricScopedArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct NullablesAndOptionalsStructBuilder < P , const F : usize = 0usize > (P) ; impl < P > NullablesAndOptionalsStructBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > NullablesAndOptionalsStructBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_int (mut self , value : rs_matter_crate :: tlv :: Nullable < u16 >) -> Result < NullablesAndOptionalsStructBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableInt" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > NullablesAndOptionalsStructBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_int (mut self , value : rs_matter_crate :: tlv :: Nullable < u16 >) -> Result < NullablesAndOptionalsStructBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > NullablesAndOptionalsStructBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn optional_int (mut self , value : Option < u16 >) -> Result < NullablesAndOptionalsStructBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalInt" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > NullablesAndOptionalsStructBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn optional_int (mut self , value : Option < u16 >) -> Result < NullablesAndOptionalsStructBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > NullablesAndOptionalsStructBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_int (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u16 > >) -> Result < NullablesAndOptionalsStructBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalInt" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > NullablesAndOptionalsStructBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_int (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u16 > >) -> Result < NullablesAndOptionalsStructBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > NullablesAndOptionalsStructBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_string (mut self , value : rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < NullablesAndOptionalsStructBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableString" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > NullablesAndOptionalsStructBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_string (mut self , value : rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < NullablesAndOptionalsStructBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > NullablesAndOptionalsStructBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn optional_string (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < NullablesAndOptionalsStructBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalString" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > NullablesAndOptionalsStructBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn optional_string (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < NullablesAndOptionalsStructBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > NullablesAndOptionalsStructBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_string (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > > >) -> Result < NullablesAndOptionalsStructBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalString" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > NullablesAndOptionalsStructBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_string (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > > >) -> Result < NullablesAndOptionalsStructBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (NullablesAndOptionalsStructBuilder (self . 0)) } } impl < P > NullablesAndOptionalsStructBuilder < P , 6 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_struct (self) -> Result < rs_matter_crate :: tlv :: NullableBuilder < NullablesAndOptionalsStructBuilder < P , 7usize > , SimpleStructBuilder < NullablesAndOptionalsStructBuilder < P , 7usize > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NullablesAndOptionalsStructBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (6) ,) } } impl < P > NullablesAndOptionalsStructBuilder < P , 7 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn optional_struct (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < NullablesAndOptionalsStructBuilder < P , 8usize > , SimpleStructBuilder < NullablesAndOptionalsStructBuilder < P , 8usize > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NullablesAndOptionalsStructBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (7) ,) } } impl < P > NullablesAndOptionalsStructBuilder < P , 8 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_optional_struct (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < NullablesAndOptionalsStructBuilder < P , 9usize > , rs_matter_crate :: tlv :: NullableBuilder < NullablesAndOptionalsStructBuilder < P , 9usize > , SimpleStructBuilder < NullablesAndOptionalsStructBuilder < P , 9usize > > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NullablesAndOptionalsStructBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (8) ,) } } impl < P > NullablesAndOptionalsStructBuilder < P , 9 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_list (self) -> Result < rs_matter_crate :: tlv :: NullableBuilder < NullablesAndOptionalsStructBuilder < P , 10usize > , rs_matter_crate :: tlv :: ToTLVArrayBuilder < NullablesAndOptionalsStructBuilder < P , 10usize > , SimpleEnum > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NullablesAndOptionalsStructBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (9) ,) } } impl < P > NullablesAndOptionalsStructBuilder < P , 10 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn optional_list (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < NullablesAndOptionalsStructBuilder < P , 11usize > , rs_matter_crate :: tlv :: ToTLVArrayBuilder < NullablesAndOptionalsStructBuilder < P , 11usize > , SimpleEnum > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NullablesAndOptionalsStructBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (10) ,) } } impl < P > NullablesAndOptionalsStructBuilder < P , 11 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_optional_list (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < NullablesAndOptionalsStructBuilder < P , 12usize > , rs_matter_crate :: tlv :: NullableBuilder < NullablesAndOptionalsStructBuilder < P , 12usize > , rs_matter_crate :: tlv :: ToTLVArrayBuilder < NullablesAndOptionalsStructBuilder < P , 12usize > , SimpleEnum > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NullablesAndOptionalsStructBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (11) ,) } } impl < P > NullablesAndOptionalsStructBuilder < P , 12usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for NullablesAndOptionalsStructBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "NullablesAndOptionalsStruct") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for NullablesAndOptionalsStructBuilder < P , F > 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 , "NullablesAndOptionalsStruct") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for NullablesAndOptionalsStructBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for NullablesAndOptionalsStructBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct NullablesAndOptionalsStructArrayBuilder < P > (P) ; impl < P > NullablesAndOptionalsStructArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < NullablesAndOptionalsStructBuilder < NullablesAndOptionalsStructArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NullablesAndOptionalsStructArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for NullablesAndOptionalsStructArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "NullablesAndOptionalsStruct[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for NullablesAndOptionalsStructArrayBuilder < P > 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 , "NullablesAndOptionalsStruct[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for NullablesAndOptionalsStructArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for NullablesAndOptionalsStructArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct NestedStructBuilder < P , const F : usize = 0usize > (P) ; impl < P > NestedStructBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > NestedStructBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn a (mut self , value : u8) -> Result < NestedStructBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "a" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "a" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (NestedStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > NestedStructBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn a (mut self , value : u8) -> Result < NestedStructBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "a" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (NestedStructBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > NestedStructBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn b (mut self , value : bool) -> Result < NestedStructBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "b" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "b" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (NestedStructBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > NestedStructBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn b (mut self , value : bool) -> Result < NestedStructBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "b" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (NestedStructBuilder (self . 0)) } } impl < P > NestedStructBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn c (self) -> Result < SimpleStructBuilder < NestedStructBuilder < P , 3usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NestedStructBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (2) ,) } } impl < P > NestedStructBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn d (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < NestedStructBuilder < P , 4usize > , TestGlobalStructBuilder < NestedStructBuilder < P , 4usize > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NestedStructBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (3) ,) } } impl < P > NestedStructBuilder < P , 4usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for NestedStructBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "NestedStruct") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for NestedStructBuilder < P , F > 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 , "NestedStruct") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for NestedStructBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for NestedStructBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct NestedStructArrayBuilder < P > (P) ; impl < P > NestedStructArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < NestedStructBuilder < NestedStructArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NestedStructArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for NestedStructArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "NestedStruct[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for NestedStructArrayBuilder < P > 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 , "NestedStruct[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for NestedStructArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for NestedStructArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct NestedStructListBuilder < P , const F : usize = 0usize > (P) ; impl < P > NestedStructListBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > NestedStructListBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn a (mut self , value : u8) -> Result < NestedStructListBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "a" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "a" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (NestedStructListBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > NestedStructListBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn a (mut self , value : u8) -> Result < NestedStructListBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "a" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (NestedStructListBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > NestedStructListBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn b (mut self , value : bool) -> Result < NestedStructListBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "b" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "b" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (NestedStructListBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > NestedStructListBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn b (mut self , value : bool) -> Result < NestedStructListBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "b" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (NestedStructListBuilder (self . 0)) } } impl < P > NestedStructListBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn c (self) -> Result < SimpleStructBuilder < NestedStructListBuilder < P , 3usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NestedStructListBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (2) ,) } } impl < P > NestedStructListBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn d (self) -> Result < SimpleStructArrayBuilder < NestedStructListBuilder < P , 4usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NestedStructListBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (3) ,) } } impl < P > NestedStructListBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn e (self) -> Result < rs_matter_crate :: tlv :: ToTLVArrayBuilder < NestedStructListBuilder < P , 5usize > , u32 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NestedStructListBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (4) ,) } } impl < P > NestedStructListBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn f (self) -> Result < rs_matter_crate :: tlv :: OctetsArrayBuilder < NestedStructListBuilder < P , 6usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NestedStructListBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (5) ,) } } impl < P > NestedStructListBuilder < P , 6 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn g (self) -> Result < rs_matter_crate :: tlv :: ToTLVArrayBuilder < NestedStructListBuilder < P , 7usize > , u8 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NestedStructListBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (6) ,) } } impl < P > NestedStructListBuilder < P , 7usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for NestedStructListBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "NestedStructList") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for NestedStructListBuilder < P , F > 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 , "NestedStructList") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for NestedStructListBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for NestedStructListBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct NestedStructListArrayBuilder < P > (P) ; impl < P > NestedStructListArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < NestedStructListBuilder < NestedStructListArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (NestedStructListArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for NestedStructListArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "NestedStructList[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for NestedStructListArrayBuilder < P > 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 , "NestedStructList[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for NestedStructListArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for NestedStructListArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct DoubleNestedStructListBuilder < P , const F : usize = 0usize > (P) ; impl < P > DoubleNestedStructListBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > DoubleNestedStructListBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn a (self) -> Result < NestedStructListArrayBuilder < DoubleNestedStructListBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (DoubleNestedStructListBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > DoubleNestedStructListBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for DoubleNestedStructListBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "DoubleNestedStructList") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for DoubleNestedStructListBuilder < P , F > 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 , "DoubleNestedStructList") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for DoubleNestedStructListBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for DoubleNestedStructListBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct DoubleNestedStructListArrayBuilder < P > (P) ; impl < P > DoubleNestedStructListArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < DoubleNestedStructListBuilder < DoubleNestedStructListArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (DoubleNestedStructListArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for DoubleNestedStructListArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "DoubleNestedStructList[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for DoubleNestedStructListArrayBuilder < P > 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 , "DoubleNestedStructList[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for DoubleNestedStructListArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for DoubleNestedStructListArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListStructOctetBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestListStructOctetBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestListStructOctetBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn member_1 (mut self , value : u64) -> Result < TestListStructOctetBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "member1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "member1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestListStructOctetBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestListStructOctetBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn member_1 (mut self , value : u64) -> Result < TestListStructOctetBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "member1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestListStructOctetBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestListStructOctetBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn member_2 (mut self , value : rs_matter_crate :: tlv :: OctetStr < '_ >) -> Result < TestListStructOctetBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "member2" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "member2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestListStructOctetBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestListStructOctetBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn member_2 (mut self , value : rs_matter_crate :: tlv :: OctetStr < '_ >) -> Result < TestListStructOctetBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "member2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestListStructOctetBuilder (self . 0)) } } impl < P > TestListStructOctetBuilder < P , 2usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestListStructOctetBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListStructOctet") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestListStructOctetBuilder < P , F > 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 , "TestListStructOctet") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestListStructOctetBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListStructOctetBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListStructOctetArrayBuilder < P > (P) ; impl < P > TestListStructOctetArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestListStructOctetBuilder < TestListStructOctetArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestListStructOctetArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestListStructOctetArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListStructOctet[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestListStructOctetArrayBuilder < P > 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 , "TestListStructOctet[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestListStructOctetArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListStructOctetArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestSpecificResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestSpecificResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestSpecificResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn return_value (mut self , value : u8) -> Result < TestSpecificResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "returnValue" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "returnValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestSpecificResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestSpecificResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn return_value (mut self , value : u8) -> Result < TestSpecificResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "returnValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestSpecificResponseBuilder (self . 0)) } } impl < P > TestSpecificResponseBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestSpecificResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestSpecificResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestSpecificResponseBuilder < P , F > 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 , "TestSpecificResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestSpecificResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestSpecificResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestSpecificResponseArrayBuilder < P > (P) ; impl < P > TestSpecificResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestSpecificResponseBuilder < TestSpecificResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestSpecificResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestSpecificResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestSpecificResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestSpecificResponseArrayBuilder < P > 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 , "TestSpecificResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestSpecificResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestSpecificResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestAddArgumentsResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestAddArgumentsResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestAddArgumentsResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn return_value (mut self , value : u8) -> Result < TestAddArgumentsResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "returnValue" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "returnValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestAddArgumentsResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestAddArgumentsResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn return_value (mut self , value : u8) -> Result < TestAddArgumentsResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "returnValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestAddArgumentsResponseBuilder (self . 0)) } } impl < P > TestAddArgumentsResponseBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestAddArgumentsResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestAddArgumentsResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestAddArgumentsResponseBuilder < P , F > 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 , "TestAddArgumentsResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestAddArgumentsResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestAddArgumentsResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestAddArgumentsResponseArrayBuilder < P > (P) ; impl < P > TestAddArgumentsResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestAddArgumentsResponseBuilder < TestAddArgumentsResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestAddArgumentsResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestAddArgumentsResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestAddArgumentsResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestAddArgumentsResponseArrayBuilder < P > 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 , "TestAddArgumentsResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestAddArgumentsResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestAddArgumentsResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestSimpleArgumentResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestSimpleArgumentResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestSimpleArgumentResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn return_value (mut self , value : bool) -> Result < TestSimpleArgumentResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "returnValue" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "returnValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestSimpleArgumentResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestSimpleArgumentResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn return_value (mut self , value : bool) -> Result < TestSimpleArgumentResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "returnValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestSimpleArgumentResponseBuilder (self . 0)) } } impl < P > TestSimpleArgumentResponseBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestSimpleArgumentResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestSimpleArgumentResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestSimpleArgumentResponseBuilder < P , F > 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 , "TestSimpleArgumentResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestSimpleArgumentResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestSimpleArgumentResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestSimpleArgumentResponseArrayBuilder < P > (P) ; impl < P > TestSimpleArgumentResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestSimpleArgumentResponseBuilder < TestSimpleArgumentResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestSimpleArgumentResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestSimpleArgumentResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestSimpleArgumentResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestSimpleArgumentResponseArrayBuilder < P > 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 , "TestSimpleArgumentResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestSimpleArgumentResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestSimpleArgumentResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestStructArrayArgumentResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestStructArrayArgumentResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > TestStructArrayArgumentResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < NestedStructListArrayBuilder < TestStructArrayArgumentResponseBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArrayArgumentResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > TestStructArrayArgumentResponseBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_2 (self) -> Result < SimpleStructArrayBuilder < TestStructArrayArgumentResponseBuilder < P , 2usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArrayArgumentResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (1) ,) } } impl < P > TestStructArrayArgumentResponseBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_3 (self) -> Result < rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestStructArrayArgumentResponseBuilder < P , 3usize > , SimpleEnum > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArrayArgumentResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (2) ,) } } impl < P > TestStructArrayArgumentResponseBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_4 (self) -> Result < rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestStructArrayArgumentResponseBuilder < P , 4usize > , bool > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArrayArgumentResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (3) ,) } } # [cfg (feature = "defmt")] impl < P > TestStructArrayArgumentResponseBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_5 (mut self , value : SimpleEnum) -> Result < TestStructArrayArgumentResponseBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg5" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg5" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (TestStructArrayArgumentResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestStructArrayArgumentResponseBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_5 (mut self , value : SimpleEnum) -> Result < TestStructArrayArgumentResponseBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg5" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (TestStructArrayArgumentResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestStructArrayArgumentResponseBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_6 (mut self , value : bool) -> Result < TestStructArrayArgumentResponseBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg6" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg6" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (TestStructArrayArgumentResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestStructArrayArgumentResponseBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_6 (mut self , value : bool) -> Result < TestStructArrayArgumentResponseBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg6" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (TestStructArrayArgumentResponseBuilder (self . 0)) } } impl < P > TestStructArrayArgumentResponseBuilder < P , 6usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestStructArrayArgumentResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestStructArrayArgumentResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestStructArrayArgumentResponseBuilder < P , F > 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 , "TestStructArrayArgumentResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestStructArrayArgumentResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestStructArrayArgumentResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestStructArrayArgumentResponseArrayBuilder < P > (P) ; impl < P > TestStructArrayArgumentResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestStructArrayArgumentResponseBuilder < TestStructArrayArgumentResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArrayArgumentResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestStructArrayArgumentResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestStructArrayArgumentResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestStructArrayArgumentResponseArrayBuilder < P > 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 , "TestStructArrayArgumentResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestStructArrayArgumentResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestStructArrayArgumentResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestAddArgumentsRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestAddArgumentsRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestAddArgumentsRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : u8) -> Result < TestAddArgumentsRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestAddArgumentsRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestAddArgumentsRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : u8) -> Result < TestAddArgumentsRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestAddArgumentsRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestAddArgumentsRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_2 (mut self , value : u8) -> Result < TestAddArgumentsRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestAddArgumentsRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestAddArgumentsRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_2 (mut self , value : u8) -> Result < TestAddArgumentsRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestAddArgumentsRequestBuilder (self . 0)) } } impl < P > TestAddArgumentsRequestBuilder < P , 2usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestAddArgumentsRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestAddArgumentsRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestAddArgumentsRequestBuilder < P , F > 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 , "TestAddArgumentsRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestAddArgumentsRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestAddArgumentsRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestAddArgumentsRequestArrayBuilder < P > (P) ; impl < P > TestAddArgumentsRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestAddArgumentsRequestBuilder < TestAddArgumentsRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestAddArgumentsRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestAddArgumentsRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestAddArgumentsRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestAddArgumentsRequestArrayBuilder < P > 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 , "TestAddArgumentsRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestAddArgumentsRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestAddArgumentsRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListInt8UReverseResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestListInt8UReverseResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > TestListInt8UReverseResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestListInt8UReverseResponseBuilder < P , 1usize > , u8 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestListInt8UReverseResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > TestListInt8UReverseResponseBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestListInt8UReverseResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListInt8UReverseResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestListInt8UReverseResponseBuilder < P , F > 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 , "TestListInt8UReverseResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestListInt8UReverseResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListInt8UReverseResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListInt8UReverseResponseArrayBuilder < P > (P) ; impl < P > TestListInt8UReverseResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestListInt8UReverseResponseBuilder < TestListInt8UReverseResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestListInt8UReverseResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestListInt8UReverseResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListInt8UReverseResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestListInt8UReverseResponseArrayBuilder < P > 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 , "TestListInt8UReverseResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestListInt8UReverseResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListInt8UReverseResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestSimpleArgumentRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestSimpleArgumentRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestSimpleArgumentRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : bool) -> Result < TestSimpleArgumentRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestSimpleArgumentRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestSimpleArgumentRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : bool) -> Result < TestSimpleArgumentRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestSimpleArgumentRequestRequestBuilder (self . 0)) } } impl < P > TestSimpleArgumentRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestSimpleArgumentRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestSimpleArgumentRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestSimpleArgumentRequestRequestBuilder < P , F > 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 , "TestSimpleArgumentRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestSimpleArgumentRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestSimpleArgumentRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestSimpleArgumentRequestRequestArrayBuilder < P > (P) ; impl < P > TestSimpleArgumentRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestSimpleArgumentRequestRequestBuilder < TestSimpleArgumentRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestSimpleArgumentRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestSimpleArgumentRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestSimpleArgumentRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestSimpleArgumentRequestRequestArrayBuilder < P > 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 , "TestSimpleArgumentRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestSimpleArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestSimpleArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEnumsResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestEnumsResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestEnumsResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : u16) -> Result < TestEnumsResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEnumsResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEnumsResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : u16) -> Result < TestEnumsResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEnumsResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestEnumsResponseBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_2 (mut self , value : SimpleEnum) -> Result < TestEnumsResponseBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestEnumsResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEnumsResponseBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_2 (mut self , value : SimpleEnum) -> Result < TestEnumsResponseBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestEnumsResponseBuilder (self . 0)) } } impl < P > TestEnumsResponseBuilder < P , 2usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestEnumsResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEnumsResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestEnumsResponseBuilder < P , F > 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 , "TestEnumsResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestEnumsResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEnumsResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEnumsResponseArrayBuilder < P > (P) ; impl < P > TestEnumsResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestEnumsResponseBuilder < TestEnumsResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestEnumsResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestEnumsResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEnumsResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestEnumsResponseArrayBuilder < P > 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 , "TestEnumsResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestEnumsResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEnumsResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestStructArrayArgumentRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestStructArrayArgumentRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > TestStructArrayArgumentRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < NestedStructListArrayBuilder < TestStructArrayArgumentRequestRequestBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArrayArgumentRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > TestStructArrayArgumentRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_2 (self) -> Result < SimpleStructArrayBuilder < TestStructArrayArgumentRequestRequestBuilder < P , 2usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArrayArgumentRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (1) ,) } } impl < P > TestStructArrayArgumentRequestRequestBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_3 (self) -> Result < rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestStructArrayArgumentRequestRequestBuilder < P , 3usize > , SimpleEnum > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArrayArgumentRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (2) ,) } } impl < P > TestStructArrayArgumentRequestRequestBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_4 (self) -> Result < rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestStructArrayArgumentRequestRequestBuilder < P , 4usize > , bool > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArrayArgumentRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (3) ,) } } # [cfg (feature = "defmt")] impl < P > TestStructArrayArgumentRequestRequestBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_5 (mut self , value : SimpleEnum) -> Result < TestStructArrayArgumentRequestRequestBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg5" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg5" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (TestStructArrayArgumentRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestStructArrayArgumentRequestRequestBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_5 (mut self , value : SimpleEnum) -> Result < TestStructArrayArgumentRequestRequestBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg5" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (TestStructArrayArgumentRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestStructArrayArgumentRequestRequestBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_6 (mut self , value : bool) -> Result < TestStructArrayArgumentRequestRequestBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg6" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg6" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (TestStructArrayArgumentRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestStructArrayArgumentRequestRequestBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_6 (mut self , value : bool) -> Result < TestStructArrayArgumentRequestRequestBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg6" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (TestStructArrayArgumentRequestRequestBuilder (self . 0)) } } impl < P > TestStructArrayArgumentRequestRequestBuilder < P , 6usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestStructArrayArgumentRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestStructArrayArgumentRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestStructArrayArgumentRequestRequestBuilder < P , F > 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 , "TestStructArrayArgumentRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestStructArrayArgumentRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestStructArrayArgumentRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestStructArrayArgumentRequestRequestArrayBuilder < P > (P) ; impl < P > TestStructArrayArgumentRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestStructArrayArgumentRequestRequestBuilder < TestStructArrayArgumentRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArrayArgumentRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestStructArrayArgumentRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestStructArrayArgumentRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestStructArrayArgumentRequestRequestArrayBuilder < P > 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 , "TestStructArrayArgumentRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestStructArrayArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestStructArrayArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestNullableOptionalResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestNullableOptionalResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestNullableOptionalResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn was_present (mut self , value : bool) -> Result < TestNullableOptionalResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "wasPresent" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "wasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestNullableOptionalResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn was_present (mut self , value : bool) -> Result < TestNullableOptionalResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "wasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestNullableOptionalResponseBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn was_null (mut self , value : Option < bool >) -> Result < TestNullableOptionalResponseBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "wasNull" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "wasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestNullableOptionalResponseBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn was_null (mut self , value : Option < bool >) -> Result < TestNullableOptionalResponseBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "wasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestNullableOptionalResponseBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn value (mut self , value : Option < u8 >) -> Result < TestNullableOptionalResponseBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestNullableOptionalResponseBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn value (mut self , value : Option < u8 >) -> Result < TestNullableOptionalResponseBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestNullableOptionalResponseBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn original_value (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u8 > >) -> Result < TestNullableOptionalResponseBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "originalValue" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "originalValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (TestNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestNullableOptionalResponseBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn original_value (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u8 > >) -> Result < TestNullableOptionalResponseBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "originalValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (TestNullableOptionalResponseBuilder (self . 0)) } } impl < P > TestNullableOptionalResponseBuilder < P , 4usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestNullableOptionalResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestNullableOptionalResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestNullableOptionalResponseBuilder < P , F > 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 , "TestNullableOptionalResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestNullableOptionalResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestNullableOptionalResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestNullableOptionalResponseArrayBuilder < P > (P) ; impl < P > TestNullableOptionalResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestNullableOptionalResponseBuilder < TestNullableOptionalResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestNullableOptionalResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestNullableOptionalResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestNullableOptionalResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestNullableOptionalResponseArrayBuilder < P > 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 , "TestNullableOptionalResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestNullableOptionalResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestNullableOptionalResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestStructArgumentRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestStructArgumentRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > TestStructArgumentRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < SimpleStructBuilder < TestStructArgumentRequestRequestBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArgumentRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > TestStructArgumentRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestStructArgumentRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestStructArgumentRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestStructArgumentRequestRequestBuilder < P , F > 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 , "TestStructArgumentRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestStructArgumentRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestStructArgumentRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestStructArgumentRequestRequestArrayBuilder < P > (P) ; impl < P > TestStructArgumentRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestStructArgumentRequestRequestBuilder < TestStructArgumentRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestStructArgumentRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestStructArgumentRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestStructArgumentRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestStructArgumentRequestRequestArrayBuilder < P > 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 , "TestStructArgumentRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestStructArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestStructArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestComplexNullableOptionalResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestComplexNullableOptionalResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_int_was_null (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableIntWasNull" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableIntWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_int_was_null (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableIntWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_int_value (mut self , value : Option < u16 >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableIntValue" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableIntValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_int_value (mut self , value : Option < u16 >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableIntValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn optional_int_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalIntWasPresent" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalIntWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn optional_int_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalIntWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn optional_int_value (mut self , value : Option < u16 >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalIntValue" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalIntValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn optional_int_value (mut self , value : Option < u16 >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalIntValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_int_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalIntWasPresent" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalIntWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_int_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalIntWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_int_was_null (mut self , value : Option < bool >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalIntWasNull" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalIntWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_int_was_null (mut self , value : Option < bool >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalIntWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 6 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_int_value (mut self , value : Option < u16 >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 7usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalIntValue" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalIntValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (6) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 6 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_int_value (mut self , value : Option < u16 >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 7usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalIntValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (6) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 7 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_string_was_null (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 8usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableStringWasNull" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableStringWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (7) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 7 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_string_was_null (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 8usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableStringWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (7) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 8 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_string_value (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 9usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableStringValue" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableStringValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (8) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 8 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_string_value (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 9usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableStringValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (8) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 9 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn optional_string_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 10usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalStringWasPresent" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalStringWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (9) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 9 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn optional_string_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 10usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalStringWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (9) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 10 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn optional_string_value (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 11usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalStringValue" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalStringValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (10) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 10 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn optional_string_value (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 11usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalStringValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (10) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 11 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_string_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 12usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStringWasPresent" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStringWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (11) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 11 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_string_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 12usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStringWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (11) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 12 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_string_was_null (mut self , value : Option < bool >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 13usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStringWasNull" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStringWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (12) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 12 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_string_was_null (mut self , value : Option < bool >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 13usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStringWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (12) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 13 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_string_value (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 14usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStringValue" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStringValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (13) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 13 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_string_value (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 14usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStringValue" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (13) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 14 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_struct_was_null (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 15usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableStructWasNull" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableStructWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (14) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 14 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_struct_was_null (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 15usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableStructWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (14) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } impl < P > TestComplexNullableOptionalResponseBuilder < P , 15 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_struct_value (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestComplexNullableOptionalResponseBuilder < P , 16usize > , SimpleStructBuilder < TestComplexNullableOptionalResponseBuilder < P , 16usize > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (15) ,) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 16 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn optional_struct_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 17usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalStructWasPresent" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalStructWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (16) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 16 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn optional_struct_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 17usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalStructWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (16) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } impl < P > TestComplexNullableOptionalResponseBuilder < P , 17 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn optional_struct_value (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestComplexNullableOptionalResponseBuilder < P , 18usize > , SimpleStructBuilder < TestComplexNullableOptionalResponseBuilder < P , 18usize > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (17) ,) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 18 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_struct_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 19usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStructWasPresent" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStructWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (18) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 18 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_struct_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 19usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStructWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (18) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 19 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_struct_was_null (mut self , value : Option < bool >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 20usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStructWasNull" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStructWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (19) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 19 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_struct_was_null (mut self , value : Option < bool >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 20usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalStructWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (19) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } impl < P > TestComplexNullableOptionalResponseBuilder < P , 20 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_optional_struct_value (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestComplexNullableOptionalResponseBuilder < P , 21usize > , SimpleStructBuilder < TestComplexNullableOptionalResponseBuilder < P , 21usize > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (20) ,) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 21 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_list_was_null (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 22usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableListWasNull" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableListWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (21) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 21 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_list_was_null (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 22usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableListWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (21) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } impl < P > TestComplexNullableOptionalResponseBuilder < P , 22 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_list_value (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestComplexNullableOptionalResponseBuilder < P , 23usize > , rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestComplexNullableOptionalResponseBuilder < P , 23usize > , SimpleEnum > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (22) ,) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 23 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn optional_list_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 24usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalListWasPresent" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalListWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (23) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 23 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn optional_list_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 24usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalListWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (23) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } impl < P > TestComplexNullableOptionalResponseBuilder < P , 24 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn optional_list_value (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestComplexNullableOptionalResponseBuilder < P , 25usize > , rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestComplexNullableOptionalResponseBuilder < P , 25usize > , SimpleEnum > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (24) ,) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 25 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_list_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 26usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalListWasPresent" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalListWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (25) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 25 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_list_was_present (mut self , value : bool) -> Result < TestComplexNullableOptionalResponseBuilder < P , 26usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalListWasPresent" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (25) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalResponseBuilder < P , 26 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_list_was_null (mut self , value : Option < bool >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 27usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalListWasNull" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalListWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (26) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalResponseBuilder < P , 26 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_list_was_null (mut self , value : Option < bool >) -> Result < TestComplexNullableOptionalResponseBuilder < P , 27usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalListWasNull" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (26) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalResponseBuilder (self . 0)) } } impl < P > TestComplexNullableOptionalResponseBuilder < P , 27 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_optional_list_value (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestComplexNullableOptionalResponseBuilder < P , 28usize > , rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestComplexNullableOptionalResponseBuilder < P , 28usize > , SimpleEnum > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (27) ,) } } impl < P > TestComplexNullableOptionalResponseBuilder < P , 28usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestComplexNullableOptionalResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestComplexNullableOptionalResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestComplexNullableOptionalResponseBuilder < P , F > 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 , "TestComplexNullableOptionalResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestComplexNullableOptionalResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestComplexNullableOptionalResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestComplexNullableOptionalResponseArrayBuilder < P > (P) ; impl < P > TestComplexNullableOptionalResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestComplexNullableOptionalResponseBuilder < TestComplexNullableOptionalResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestComplexNullableOptionalResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestComplexNullableOptionalResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestComplexNullableOptionalResponseArrayBuilder < P > 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 , "TestComplexNullableOptionalResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestComplexNullableOptionalResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestComplexNullableOptionalResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestNestedStructArgumentRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestNestedStructArgumentRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > TestNestedStructArgumentRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < NestedStructBuilder < TestNestedStructArgumentRequestRequestBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestNestedStructArgumentRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > TestNestedStructArgumentRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestNestedStructArgumentRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestNestedStructArgumentRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestNestedStructArgumentRequestRequestBuilder < P , F > 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 , "TestNestedStructArgumentRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestNestedStructArgumentRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestNestedStructArgumentRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestNestedStructArgumentRequestRequestArrayBuilder < P > (P) ; impl < P > TestNestedStructArgumentRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestNestedStructArgumentRequestRequestBuilder < TestNestedStructArgumentRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestNestedStructArgumentRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestNestedStructArgumentRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestNestedStructArgumentRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestNestedStructArgumentRequestRequestArrayBuilder < P > 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 , "TestNestedStructArgumentRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestNestedStructArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestNestedStructArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct BooleanResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > BooleanResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > BooleanResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn value (mut self , value : bool) -> Result < BooleanResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (BooleanResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > BooleanResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn value (mut self , value : bool) -> Result < BooleanResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (BooleanResponseBuilder (self . 0)) } } impl < P > BooleanResponseBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for BooleanResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "BooleanResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for BooleanResponseBuilder < P , F > 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 , "BooleanResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for BooleanResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for BooleanResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct BooleanResponseArrayBuilder < P > (P) ; impl < P > BooleanResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < BooleanResponseBuilder < BooleanResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (BooleanResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for BooleanResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "BooleanResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for BooleanResponseArrayBuilder < P > 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 , "BooleanResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for BooleanResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for BooleanResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListStructArgumentRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestListStructArgumentRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > TestListStructArgumentRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < SimpleStructArrayBuilder < TestListStructArgumentRequestRequestBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestListStructArgumentRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > TestListStructArgumentRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestListStructArgumentRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListStructArgumentRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestListStructArgumentRequestRequestBuilder < P , F > 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 , "TestListStructArgumentRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestListStructArgumentRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListStructArgumentRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListStructArgumentRequestRequestArrayBuilder < P > (P) ; impl < P > TestListStructArgumentRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestListStructArgumentRequestRequestBuilder < TestListStructArgumentRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestListStructArgumentRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestListStructArgumentRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListStructArgumentRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestListStructArgumentRequestRequestArrayBuilder < P > 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 , "TestListStructArgumentRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestListStructArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListStructArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct SimpleStructResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > SimpleStructResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > SimpleStructResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < SimpleStructBuilder < SimpleStructResponseBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (SimpleStructResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > SimpleStructResponseBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for SimpleStructResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "SimpleStructResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for SimpleStructResponseBuilder < P , F > 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 , "SimpleStructResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for SimpleStructResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for SimpleStructResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct SimpleStructResponseArrayBuilder < P > (P) ; impl < P > SimpleStructResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < SimpleStructResponseBuilder < SimpleStructResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (SimpleStructResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for SimpleStructResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "SimpleStructResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for SimpleStructResponseArrayBuilder < P > 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 , "SimpleStructResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for SimpleStructResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for SimpleStructResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListInt8UArgumentRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestListInt8UArgumentRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > TestListInt8UArgumentRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestListInt8UArgumentRequestRequestBuilder < P , 1usize > , u8 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestListInt8UArgumentRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > TestListInt8UArgumentRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestListInt8UArgumentRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListInt8UArgumentRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestListInt8UArgumentRequestRequestBuilder < P , F > 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 , "TestListInt8UArgumentRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestListInt8UArgumentRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListInt8UArgumentRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListInt8UArgumentRequestRequestArrayBuilder < P > (P) ; impl < P > TestListInt8UArgumentRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestListInt8UArgumentRequestRequestBuilder < TestListInt8UArgumentRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestListInt8UArgumentRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestListInt8UArgumentRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListInt8UArgumentRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestListInt8UArgumentRequestRequestArrayBuilder < P > 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 , "TestListInt8UArgumentRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestListInt8UArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListInt8UArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEmitTestEventResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestEmitTestEventResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestEmitTestEventResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn value (mut self , value : u64) -> Result < TestEmitTestEventResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEmitTestEventResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEmitTestEventResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn value (mut self , value : u64) -> Result < TestEmitTestEventResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEmitTestEventResponseBuilder (self . 0)) } } impl < P > TestEmitTestEventResponseBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestEmitTestEventResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEmitTestEventResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestEventResponseBuilder < P , F > 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 , "TestEmitTestEventResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestEmitTestEventResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEmitTestEventResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEmitTestEventResponseArrayBuilder < P > (P) ; impl < P > TestEmitTestEventResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestEmitTestEventResponseBuilder < TestEmitTestEventResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestEmitTestEventResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestEmitTestEventResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEmitTestEventResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestEventResponseArrayBuilder < P > 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 , "TestEmitTestEventResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestEmitTestEventResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEmitTestEventResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestNestedStructListArgumentRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestNestedStructListArgumentRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > TestNestedStructListArgumentRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < NestedStructListBuilder < TestNestedStructListArgumentRequestRequestBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestNestedStructListArgumentRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > TestNestedStructListArgumentRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestNestedStructListArgumentRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestNestedStructListArgumentRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestNestedStructListArgumentRequestRequestBuilder < P , F > 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 , "TestNestedStructListArgumentRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestNestedStructListArgumentRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestNestedStructListArgumentRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestNestedStructListArgumentRequestRequestArrayBuilder < P > (P) ; impl < P > TestNestedStructListArgumentRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestNestedStructListArgumentRequestRequestBuilder < TestNestedStructListArgumentRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestNestedStructListArgumentRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestNestedStructListArgumentRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestNestedStructListArgumentRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestNestedStructListArgumentRequestRequestArrayBuilder < P > 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 , "TestNestedStructListArgumentRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestNestedStructListArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestNestedStructListArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEmitTestFabricScopedEventResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestEmitTestFabricScopedEventResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestEmitTestFabricScopedEventResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn value (mut self , value : u64) -> Result < TestEmitTestFabricScopedEventResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEmitTestFabricScopedEventResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEmitTestFabricScopedEventResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn value (mut self , value : u64) -> Result < TestEmitTestFabricScopedEventResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "value" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEmitTestFabricScopedEventResponseBuilder (self . 0)) } } impl < P > TestEmitTestFabricScopedEventResponseBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestEmitTestFabricScopedEventResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEmitTestFabricScopedEventResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestFabricScopedEventResponseBuilder < P , F > 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 , "TestEmitTestFabricScopedEventResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestEmitTestFabricScopedEventResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEmitTestFabricScopedEventResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEmitTestFabricScopedEventResponseArrayBuilder < P > (P) ; impl < P > TestEmitTestFabricScopedEventResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestEmitTestFabricScopedEventResponseBuilder < TestEmitTestFabricScopedEventResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestEmitTestFabricScopedEventResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestEmitTestFabricScopedEventResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEmitTestFabricScopedEventResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestFabricScopedEventResponseArrayBuilder < P > 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 , "TestEmitTestFabricScopedEventResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestEmitTestFabricScopedEventResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEmitTestFabricScopedEventResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListNestedStructListArgumentRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestListNestedStructListArgumentRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > TestListNestedStructListArgumentRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < NestedStructListArrayBuilder < TestListNestedStructListArgumentRequestRequestBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestListNestedStructListArgumentRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > TestListNestedStructListArgumentRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestListNestedStructListArgumentRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListNestedStructListArgumentRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestListNestedStructListArgumentRequestRequestBuilder < P , F > 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 , "TestListNestedStructListArgumentRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestListNestedStructListArgumentRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListNestedStructListArgumentRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListNestedStructListArgumentRequestRequestArrayBuilder < P > (P) ; impl < P > TestListNestedStructListArgumentRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestListNestedStructListArgumentRequestRequestBuilder < TestListNestedStructListArgumentRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestListNestedStructListArgumentRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestListNestedStructListArgumentRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListNestedStructListArgumentRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestListNestedStructListArgumentRequestRequestArrayBuilder < P > 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 , "TestListNestedStructListArgumentRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestListNestedStructListArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListNestedStructListArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestBatchHelperResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestBatchHelperResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestBatchHelperResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn buffer (mut self , value : rs_matter_crate :: tlv :: OctetStr < '_ >) -> Result < TestBatchHelperResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "buffer" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "buffer" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestBatchHelperResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestBatchHelperResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn buffer (mut self , value : rs_matter_crate :: tlv :: OctetStr < '_ >) -> Result < TestBatchHelperResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "buffer" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestBatchHelperResponseBuilder (self . 0)) } } impl < P > TestBatchHelperResponseBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestBatchHelperResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestBatchHelperResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestBatchHelperResponseBuilder < P , F > 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 , "TestBatchHelperResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestBatchHelperResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestBatchHelperResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestBatchHelperResponseArrayBuilder < P > (P) ; impl < P > TestBatchHelperResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestBatchHelperResponseBuilder < TestBatchHelperResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestBatchHelperResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestBatchHelperResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestBatchHelperResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestBatchHelperResponseArrayBuilder < P > 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 , "TestBatchHelperResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestBatchHelperResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestBatchHelperResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListInt8UReverseRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestListInt8UReverseRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > TestListInt8UReverseRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestListInt8UReverseRequestRequestBuilder < P , 1usize > , u8 > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestListInt8UReverseRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > TestListInt8UReverseRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestListInt8UReverseRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListInt8UReverseRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestListInt8UReverseRequestRequestBuilder < P , F > 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 , "TestListInt8UReverseRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestListInt8UReverseRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListInt8UReverseRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestListInt8UReverseRequestRequestArrayBuilder < P > (P) ; impl < P > TestListInt8UReverseRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestListInt8UReverseRequestRequestBuilder < TestListInt8UReverseRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestListInt8UReverseRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestListInt8UReverseRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestListInt8UReverseRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestListInt8UReverseRequestRequestArrayBuilder < P > 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 , "TestListInt8UReverseRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestListInt8UReverseRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestListInt8UReverseRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct StringEchoResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > StringEchoResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > StringEchoResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn payload (mut self , value : rs_matter_crate :: tlv :: OctetStr < '_ >) -> Result < StringEchoResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "payload" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "payload" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (StringEchoResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > StringEchoResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn payload (mut self , value : rs_matter_crate :: tlv :: OctetStr < '_ >) -> Result < StringEchoResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "payload" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (StringEchoResponseBuilder (self . 0)) } } impl < P > StringEchoResponseBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for StringEchoResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "StringEchoResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for StringEchoResponseBuilder < P , F > 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 , "StringEchoResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for StringEchoResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for StringEchoResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct StringEchoResponseArrayBuilder < P > (P) ; impl < P > StringEchoResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < StringEchoResponseBuilder < StringEchoResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (StringEchoResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for StringEchoResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "StringEchoResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for StringEchoResponseArrayBuilder < P > 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 , "StringEchoResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for StringEchoResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for StringEchoResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEnumsRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestEnumsRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestEnumsRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : u16) -> Result < TestEnumsRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEnumsRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEnumsRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : u16) -> Result < TestEnumsRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEnumsRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestEnumsRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_2 (mut self , value : SimpleEnum) -> Result < TestEnumsRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestEnumsRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEnumsRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_2 (mut self , value : SimpleEnum) -> Result < TestEnumsRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestEnumsRequestRequestBuilder (self . 0)) } } impl < P > TestEnumsRequestRequestBuilder < P , 2usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestEnumsRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEnumsRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestEnumsRequestRequestBuilder < P , F > 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 , "TestEnumsRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestEnumsRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEnumsRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEnumsRequestRequestArrayBuilder < P > (P) ; impl < P > TestEnumsRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestEnumsRequestRequestBuilder < TestEnumsRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestEnumsRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestEnumsRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEnumsRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestEnumsRequestRequestArrayBuilder < P > 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 , "TestEnumsRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestEnumsRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEnumsRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct GlobalEchoResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > GlobalEchoResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > GlobalEchoResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn field_1 (self) -> Result < TestGlobalStructBuilder < GlobalEchoResponseBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (GlobalEchoResponseBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } # [cfg (feature = "defmt")] impl < P > GlobalEchoResponseBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn field_2 (mut self , value : TestGlobalEnum) -> Result < GlobalEchoResponseBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "field2" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "field2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (GlobalEchoResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > GlobalEchoResponseBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn field_2 (mut self , value : TestGlobalEnum) -> Result < GlobalEchoResponseBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "field2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (GlobalEchoResponseBuilder (self . 0)) } } impl < P > GlobalEchoResponseBuilder < P , 2usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for GlobalEchoResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "GlobalEchoResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for GlobalEchoResponseBuilder < P , F > 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 , "GlobalEchoResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for GlobalEchoResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for GlobalEchoResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct GlobalEchoResponseArrayBuilder < P > (P) ; impl < P > GlobalEchoResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < GlobalEchoResponseBuilder < GlobalEchoResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (GlobalEchoResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for GlobalEchoResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "GlobalEchoResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for GlobalEchoResponseArrayBuilder < P > 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 , "GlobalEchoResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for GlobalEchoResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for GlobalEchoResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestNullableOptionalRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestNullableOptionalRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestNullableOptionalRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u8 > >) -> Result < TestNullableOptionalRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestNullableOptionalRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u8 > >) -> Result < TestNullableOptionalRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestNullableOptionalRequestRequestBuilder (self . 0)) } } impl < P > TestNullableOptionalRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestNullableOptionalRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestNullableOptionalRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestNullableOptionalRequestRequestBuilder < P , F > 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 , "TestNullableOptionalRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestNullableOptionalRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestNullableOptionalRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestNullableOptionalRequestRequestArrayBuilder < P > (P) ; impl < P > TestNullableOptionalRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestNullableOptionalRequestRequestBuilder < TestNullableOptionalRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestNullableOptionalRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestNullableOptionalRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestNullableOptionalRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestNullableOptionalRequestRequestArrayBuilder < P > 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 , "TestNullableOptionalRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestNullableOptionalRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestNullableOptionalRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestComplexNullableOptionalRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestComplexNullableOptionalRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_int (mut self , value : rs_matter_crate :: tlv :: Nullable < u16 >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableInt" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_int (mut self , value : rs_matter_crate :: tlv :: Nullable < u16 >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn optional_int (mut self , value : Option < u16 >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalInt" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn optional_int (mut self , value : Option < u16 >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_int (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u16 > >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalInt" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_int (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < u16 > >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalInt" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_string (mut self , value : rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableString" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_string (mut self , value : rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn optional_string (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalString" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn optional_string (mut self , value : Option < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 5usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "optionalString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (4) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn nullable_optional_string (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > > >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalString" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn nullable_optional_string (mut self , value : Option < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > > >) -> Result < TestComplexNullableOptionalRequestRequestBuilder < P , 6usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "nullableOptionalString" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (5) , self . 0 . writer () ,) ? ; Ok (TestComplexNullableOptionalRequestRequestBuilder (self . 0)) } } impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 6 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_struct (self) -> Result < rs_matter_crate :: tlv :: NullableBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 7usize > , SimpleStructBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 7usize > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (6) ,) } } impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 7 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn optional_struct (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 8usize > , SimpleStructBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 8usize > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (7) ,) } } impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 8 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_optional_struct (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 9usize > , rs_matter_crate :: tlv :: NullableBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 9usize > , SimpleStructBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 9usize > > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (8) ,) } } impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 9 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_list (self) -> Result < rs_matter_crate :: tlv :: NullableBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 10usize > , rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 10usize > , SimpleEnum > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (9) ,) } } impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 10 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn optional_list (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 11usize > , rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 11usize > , SimpleEnum > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (10) ,) } } impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 11 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn nullable_optional_list (self) -> Result < rs_matter_crate :: tlv :: OptionalBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 12usize > , rs_matter_crate :: tlv :: NullableBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 12usize > , rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestComplexNullableOptionalRequestRequestBuilder < P , 12usize > , SimpleEnum > > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (11) ,) } } impl < P > TestComplexNullableOptionalRequestRequestBuilder < P , 12usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestComplexNullableOptionalRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestComplexNullableOptionalRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestComplexNullableOptionalRequestRequestBuilder < P , F > 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 , "TestComplexNullableOptionalRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestComplexNullableOptionalRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestComplexNullableOptionalRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestComplexNullableOptionalRequestRequestArrayBuilder < P > (P) ; impl < P > TestComplexNullableOptionalRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestComplexNullableOptionalRequestRequestBuilder < TestComplexNullableOptionalRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestComplexNullableOptionalRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestComplexNullableOptionalRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestComplexNullableOptionalRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestComplexNullableOptionalRequestRequestArrayBuilder < P > 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 , "TestComplexNullableOptionalRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestComplexNullableOptionalRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestComplexNullableOptionalRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct SimpleStructEchoRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > SimpleStructEchoRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > SimpleStructEchoRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_1 (self) -> Result < SimpleStructBuilder < SimpleStructEchoRequestRequestBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (SimpleStructEchoRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } impl < P > SimpleStructEchoRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for SimpleStructEchoRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "SimpleStructEchoRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for SimpleStructEchoRequestRequestBuilder < P , F > 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 , "SimpleStructEchoRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for SimpleStructEchoRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for SimpleStructEchoRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct SimpleStructEchoRequestRequestArrayBuilder < P > (P) ; impl < P > SimpleStructEchoRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < SimpleStructEchoRequestRequestBuilder < SimpleStructEchoRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (SimpleStructEchoRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for SimpleStructEchoRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "SimpleStructEchoRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for SimpleStructEchoRequestRequestArrayBuilder < P > 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 , "SimpleStructEchoRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for SimpleStructEchoRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for SimpleStructEchoRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestSimpleOptionalArgumentRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestSimpleOptionalArgumentRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestSimpleOptionalArgumentRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : Option < bool >) -> Result < TestSimpleOptionalArgumentRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestSimpleOptionalArgumentRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestSimpleOptionalArgumentRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : Option < bool >) -> Result < TestSimpleOptionalArgumentRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestSimpleOptionalArgumentRequestRequestBuilder (self . 0)) } } impl < P > TestSimpleOptionalArgumentRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestSimpleOptionalArgumentRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestSimpleOptionalArgumentRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestSimpleOptionalArgumentRequestRequestBuilder < P , F > 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 , "TestSimpleOptionalArgumentRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestSimpleOptionalArgumentRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestSimpleOptionalArgumentRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestSimpleOptionalArgumentRequestRequestArrayBuilder < P > (P) ; impl < P > TestSimpleOptionalArgumentRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestSimpleOptionalArgumentRequestRequestBuilder < TestSimpleOptionalArgumentRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestSimpleOptionalArgumentRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestSimpleOptionalArgumentRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestSimpleOptionalArgumentRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestSimpleOptionalArgumentRequestRequestArrayBuilder < P > 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 , "TestSimpleOptionalArgumentRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestSimpleOptionalArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestSimpleOptionalArgumentRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEmitTestEventRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestEmitTestEventRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestEmitTestEventRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : u8) -> Result < TestEmitTestEventRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEmitTestEventRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEmitTestEventRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : u8) -> Result < TestEmitTestEventRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEmitTestEventRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestEmitTestEventRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_2 (mut self , value : SimpleEnum) -> Result < TestEmitTestEventRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestEmitTestEventRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEmitTestEventRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_2 (mut self , value : SimpleEnum) -> Result < TestEmitTestEventRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestEmitTestEventRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestEmitTestEventRequestRequestBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_3 (mut self , value : bool) -> Result < TestEmitTestEventRequestRequestBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg3" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg3" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestEmitTestEventRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEmitTestEventRequestRequestBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_3 (mut self , value : bool) -> Result < TestEmitTestEventRequestRequestBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg3" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestEmitTestEventRequestRequestBuilder (self . 0)) } } impl < P > TestEmitTestEventRequestRequestBuilder < P , 3usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestEmitTestEventRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEmitTestEventRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestEventRequestRequestBuilder < P , F > 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 , "TestEmitTestEventRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestEmitTestEventRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEmitTestEventRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEmitTestEventRequestRequestArrayBuilder < P > (P) ; impl < P > TestEmitTestEventRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestEmitTestEventRequestRequestBuilder < TestEmitTestEventRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestEmitTestEventRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestEmitTestEventRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEmitTestEventRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestEventRequestRequestArrayBuilder < P > 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 , "TestEmitTestEventRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestEmitTestEventRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEmitTestEventRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEmitTestFabricScopedEventRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestEmitTestFabricScopedEventRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestEmitTestFabricScopedEventRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : u8) -> Result < TestEmitTestFabricScopedEventRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEmitTestFabricScopedEventRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEmitTestFabricScopedEventRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : u8) -> Result < TestEmitTestFabricScopedEventRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestEmitTestFabricScopedEventRequestRequestBuilder (self . 0)) } } impl < P > TestEmitTestFabricScopedEventRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestEmitTestFabricScopedEventRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEmitTestFabricScopedEventRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestFabricScopedEventRequestRequestBuilder < P , F > 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 , "TestEmitTestFabricScopedEventRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestEmitTestFabricScopedEventRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEmitTestFabricScopedEventRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEmitTestFabricScopedEventRequestRequestArrayBuilder < P > (P) ; impl < P > TestEmitTestFabricScopedEventRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestEmitTestFabricScopedEventRequestRequestBuilder < TestEmitTestFabricScopedEventRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestEmitTestFabricScopedEventRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestEmitTestFabricScopedEventRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEmitTestFabricScopedEventRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestEmitTestFabricScopedEventRequestRequestArrayBuilder < P > 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 , "TestEmitTestFabricScopedEventRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestEmitTestFabricScopedEventRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEmitTestFabricScopedEventRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestBatchHelperRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestBatchHelperRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestBatchHelperRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn sleep_before_response_time_ms (mut self , value : u16) -> Result < TestBatchHelperRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "sleepBeforeResponseTimeMs" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "sleepBeforeResponseTimeMs" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestBatchHelperRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestBatchHelperRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn sleep_before_response_time_ms (mut self , value : u16) -> Result < TestBatchHelperRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "sleepBeforeResponseTimeMs" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestBatchHelperRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestBatchHelperRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn size_of_response_buffer (mut self , value : u16) -> Result < TestBatchHelperRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "sizeOfResponseBuffer" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "sizeOfResponseBuffer" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestBatchHelperRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestBatchHelperRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn size_of_response_buffer (mut self , value : u16) -> Result < TestBatchHelperRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "sizeOfResponseBuffer" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestBatchHelperRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestBatchHelperRequestRequestBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn fill_character (mut self , value : u8) -> Result < TestBatchHelperRequestRequestBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "fillCharacter" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fillCharacter" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestBatchHelperRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestBatchHelperRequestRequestBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn fill_character (mut self , value : u8) -> Result < TestBatchHelperRequestRequestBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fillCharacter" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestBatchHelperRequestRequestBuilder (self . 0)) } } impl < P > TestBatchHelperRequestRequestBuilder < P , 3usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestBatchHelperRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestBatchHelperRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestBatchHelperRequestRequestBuilder < P , F > 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 , "TestBatchHelperRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestBatchHelperRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestBatchHelperRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestBatchHelperRequestRequestArrayBuilder < P > (P) ; impl < P > TestBatchHelperRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestBatchHelperRequestRequestBuilder < TestBatchHelperRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestBatchHelperRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestBatchHelperRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestBatchHelperRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestBatchHelperRequestRequestArrayBuilder < P > 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 , "TestBatchHelperRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestBatchHelperRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestBatchHelperRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestSecondBatchHelperRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestSecondBatchHelperRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestSecondBatchHelperRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn sleep_before_response_time_ms (mut self , value : u16) -> Result < TestSecondBatchHelperRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "sleepBeforeResponseTimeMs" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "sleepBeforeResponseTimeMs" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestSecondBatchHelperRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestSecondBatchHelperRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn sleep_before_response_time_ms (mut self , value : u16) -> Result < TestSecondBatchHelperRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "sleepBeforeResponseTimeMs" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestSecondBatchHelperRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestSecondBatchHelperRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn size_of_response_buffer (mut self , value : u16) -> Result < TestSecondBatchHelperRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "sizeOfResponseBuffer" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "sizeOfResponseBuffer" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestSecondBatchHelperRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestSecondBatchHelperRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn size_of_response_buffer (mut self , value : u16) -> Result < TestSecondBatchHelperRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "sizeOfResponseBuffer" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestSecondBatchHelperRequestRequestBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestSecondBatchHelperRequestRequestBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn fill_character (mut self , value : u8) -> Result < TestSecondBatchHelperRequestRequestBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "fillCharacter" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fillCharacter" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestSecondBatchHelperRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestSecondBatchHelperRequestRequestBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn fill_character (mut self , value : u8) -> Result < TestSecondBatchHelperRequestRequestBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fillCharacter" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestSecondBatchHelperRequestRequestBuilder (self . 0)) } } impl < P > TestSecondBatchHelperRequestRequestBuilder < P , 3usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestSecondBatchHelperRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestSecondBatchHelperRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestSecondBatchHelperRequestRequestBuilder < P , F > 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 , "TestSecondBatchHelperRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestSecondBatchHelperRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestSecondBatchHelperRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestSecondBatchHelperRequestRequestArrayBuilder < P > (P) ; impl < P > TestSecondBatchHelperRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestSecondBatchHelperRequestRequestBuilder < TestSecondBatchHelperRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestSecondBatchHelperRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestSecondBatchHelperRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestSecondBatchHelperRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestSecondBatchHelperRequestRequestArrayBuilder < P > 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 , "TestSecondBatchHelperRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestSecondBatchHelperRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestSecondBatchHelperRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct StringEchoRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > StringEchoRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > StringEchoRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn payload (mut self , value : rs_matter_crate :: tlv :: OctetStr < '_ >) -> Result < StringEchoRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "payload" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "payload" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (StringEchoRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > StringEchoRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn payload (mut self , value : rs_matter_crate :: tlv :: OctetStr < '_ >) -> Result < StringEchoRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "payload" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (StringEchoRequestRequestBuilder (self . 0)) } } impl < P > StringEchoRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for StringEchoRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "StringEchoRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for StringEchoRequestRequestBuilder < P , F > 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 , "StringEchoRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for StringEchoRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for StringEchoRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct StringEchoRequestRequestArrayBuilder < P > (P) ; impl < P > StringEchoRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < StringEchoRequestRequestBuilder < StringEchoRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (StringEchoRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for StringEchoRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "StringEchoRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for StringEchoRequestRequestArrayBuilder < P > 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 , "StringEchoRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for StringEchoRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for StringEchoRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct GlobalEchoRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > GlobalEchoRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } impl < P > GlobalEchoRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn field_1 (self) -> Result < TestGlobalStructBuilder < GlobalEchoRequestRequestBuilder < P , 1usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (GlobalEchoRequestRequestBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (0) ,) } } # [cfg (feature = "defmt")] impl < P > GlobalEchoRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn field_2 (mut self , value : TestGlobalEnum) -> Result < GlobalEchoRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "field2" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "field2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (GlobalEchoRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > GlobalEchoRequestRequestBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn field_2 (mut self , value : TestGlobalEnum) -> Result < GlobalEchoRequestRequestBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "field2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (GlobalEchoRequestRequestBuilder (self . 0)) } } impl < P > GlobalEchoRequestRequestBuilder < P , 2usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for GlobalEchoRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "GlobalEchoRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for GlobalEchoRequestRequestBuilder < P , F > 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 , "GlobalEchoRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for GlobalEchoRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for GlobalEchoRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct GlobalEchoRequestRequestArrayBuilder < P > (P) ; impl < P > GlobalEchoRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < GlobalEchoRequestRequestBuilder < GlobalEchoRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (GlobalEchoRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for GlobalEchoRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "GlobalEchoRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for GlobalEchoRequestRequestArrayBuilder < P > 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 , "GlobalEchoRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for GlobalEchoRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for GlobalEchoRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestDifferentVendorMeiRequestRequestBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestDifferentVendorMeiRequestRequestBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestDifferentVendorMeiRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : u8) -> Result < TestDifferentVendorMeiRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestDifferentVendorMeiRequestRequestBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestDifferentVendorMeiRequestRequestBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : u8) -> Result < TestDifferentVendorMeiRequestRequestBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestDifferentVendorMeiRequestRequestBuilder (self . 0)) } } impl < P > TestDifferentVendorMeiRequestRequestBuilder < P , 1usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestDifferentVendorMeiRequestRequestBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestDifferentVendorMeiRequestRequest") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestDifferentVendorMeiRequestRequestBuilder < P , F > 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 , "TestDifferentVendorMeiRequestRequest") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestDifferentVendorMeiRequestRequestBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestDifferentVendorMeiRequestRequestBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestDifferentVendorMeiRequestRequestArrayBuilder < P > (P) ; impl < P > TestDifferentVendorMeiRequestRequestArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestDifferentVendorMeiRequestRequestBuilder < TestDifferentVendorMeiRequestRequestArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestDifferentVendorMeiRequestRequestArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestDifferentVendorMeiRequestRequestArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestDifferentVendorMeiRequestRequest[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestDifferentVendorMeiRequestRequestArrayBuilder < P > 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 , "TestDifferentVendorMeiRequestRequest[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestDifferentVendorMeiRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestDifferentVendorMeiRequestRequestArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestDifferentVendorMeiResponseBuilder < P , const F : usize = 0usize > (P) ; impl < P > TestDifferentVendorMeiResponseBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestDifferentVendorMeiResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : u8) -> Result < TestDifferentVendorMeiResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestDifferentVendorMeiResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestDifferentVendorMeiResponseBuilder < P , 0 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : u8) -> Result < TestDifferentVendorMeiResponseBuilder < P , 1usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (0) , self . 0 . writer () ,) ? ; Ok (TestDifferentVendorMeiResponseBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestDifferentVendorMeiResponseBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn event_number (mut self , value : u64) -> Result < TestDifferentVendorMeiResponseBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "eventNumber" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "eventNumber" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestDifferentVendorMeiResponseBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestDifferentVendorMeiResponseBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn event_number (mut self , value : u64) -> Result < TestDifferentVendorMeiResponseBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "eventNumber" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestDifferentVendorMeiResponseBuilder (self . 0)) } } impl < P > TestDifferentVendorMeiResponseBuilder < P , 2usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestDifferentVendorMeiResponseBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestDifferentVendorMeiResponse") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestDifferentVendorMeiResponseBuilder < P , F > 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 , "TestDifferentVendorMeiResponse") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestDifferentVendorMeiResponseBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestDifferentVendorMeiResponseBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestDifferentVendorMeiResponseArrayBuilder < P > (P) ; impl < P > TestDifferentVendorMeiResponseArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestDifferentVendorMeiResponseBuilder < TestDifferentVendorMeiResponseArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestDifferentVendorMeiResponseArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestDifferentVendorMeiResponseArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestDifferentVendorMeiResponse[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestDifferentVendorMeiResponseArrayBuilder < P > 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 , "TestDifferentVendorMeiResponse[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestDifferentVendorMeiResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestDifferentVendorMeiResponseArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestEventTag { Arg1 = 1 , Arg2 = 2 , Arg3 = 3 , Arg4 = 4 , Arg5 = 5 , Arg6 = 6 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestFabricScopedEventTag { FabricIndex = 254 , } # [derive (Debug , PartialEq , Eq , Copy , Clone , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u8)] pub enum TestDifferentVendorMeiEventTag { Arg1 = 1 , } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestEvent < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestEvent < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < u8 , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (1) ?) } pub fn arg_2 (& self) -> Result < SimpleEnum , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (2) ?) } pub fn arg_3 (& self) -> Result < bool , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (3) ?) } pub fn arg_4 (& self) -> Result < SimpleStruct < '_ > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (4) ?) } pub fn arg_5 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleStruct < '_ > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (5) ?) } pub fn arg_6 (& self) -> Result < rs_matter_crate :: tlv :: TLVArray < '_ , SimpleEnum > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& self . 0 . structure () ? . ctx (6) ?) } } impl < 'a > rs_matter_crate :: tlv :: FromTLV < 'a > for TestEvent < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestEvent < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestEvent < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestEvent") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } match self . arg_2 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_2" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) ? , } match self . arg_3 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_3" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_3" , e . code ()) ? , } match self . arg_4 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_4" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_4" , e . code ()) ? , } match self . arg_5 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_5" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_5" , e . code ()) ? , } match self . arg_6 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_6" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_6" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestEvent < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestEvent") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } match self . arg_2 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_2" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_2" , e . code ()) , } match self . arg_3 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_3" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_3" , e . code ()) , } match self . arg_4 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_4" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_4" , e . code ()) , } match self . arg_5 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_5" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_5" , e . code ()) , } match self . arg_6 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_6" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_6" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestFabricScopedEvent < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestFabricScopedEvent < 'a > { # [doc = "Create a new instance"] 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 fabric_index (& self) -> Result < Option < rs_matter_crate :: im :: FabricIndex > , rs_matter_crate :: error :: Error > { let element = self . 0 . structure () ? . find_ctx (254) ? ; 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 TestFabricScopedEvent < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestFabricScopedEvent < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestFabricScopedEvent < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestFabricScopedEvent") ? ; match self . fabric_index () { Ok (Some (value)) => write ! (f , "{}: Some({:?})," , "fabric_index" , value) ? , Ok (None) => write ! (f , "{}: None," , "fabric_index") ? , Err (e) => write ! (f , "{}: ??? {:?}," , "fabric_index" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestFabricScopedEvent < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestFabricScopedEvent") ; match self . fabric_index () { Ok (Some (value)) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: Some({:?})," , "fabric_index" , value) , Ok (None) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: None," , "fabric_index") , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "fabric_index" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } # [derive (PartialEq , Eq , Clone , Hash)] pub struct TestDifferentVendorMeiEvent < 'a > (rs_matter_crate :: tlv :: TLVElement < 'a >) ; impl < 'a > TestDifferentVendorMeiEvent < 'a > { # [doc = "Create a new instance"] 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 arg_1 (& self) -> Result < u8 , 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 TestDifferentVendorMeiEvent < 'a > { fn from_tlv (element : & rs_matter_crate :: tlv :: TLVElement < 'a >) -> Result < Self , rs_matter_crate :: error :: Error > { Ok (Self :: new (element . clone ())) } } impl rs_matter_crate :: tlv :: ToTLV for TestDifferentVendorMeiEvent < '_ > { fn to_tlv < W : rs_matter_crate :: tlv :: TLVWrite > (& 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 < Item = Result < rs_matter_crate :: tlv :: TLV , rs_matter_crate :: error :: Error >> { self . 0 . tlv_iter (tag) } } impl core :: fmt :: Debug for TestDifferentVendorMeiEvent < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{} {{" , "TestDifferentVendorMeiEvent") ? ; match self . arg_1 () { Ok (value) => write ! (f , "{}: {:?}," , "arg_1" , value) ? , Err (e) => write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) ? , } write ! (f , "}}") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for TestDifferentVendorMeiEvent < '_ > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "{} {{" , "TestDifferentVendorMeiEvent") ; match self . arg_1 () { Ok (value) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: {:?}," , "arg_1" , value) , Err (e) => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}: ??? {:?}," , "arg_1" , e . code ()) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "}}") } } pub struct TestEventBuilder < P , const F : usize = 1usize > (P) ; impl < P > TestEventBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestEventBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : u8) -> Result < TestEventBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestEventBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEventBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : u8) -> Result < TestEventBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestEventBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestEventBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_2 (mut self , value : SimpleEnum) -> Result < TestEventBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestEventBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEventBuilder < P , 2 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_2 (mut self , value : SimpleEnum) -> Result < TestEventBuilder < P , 3usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg2" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (2) , self . 0 . writer () ,) ? ; Ok (TestEventBuilder (self . 0)) } } # [cfg (feature = "defmt")] impl < P > TestEventBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_3 (mut self , value : bool) -> Result < TestEventBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg3" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg3" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (TestEventBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestEventBuilder < P , 3 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_3 (mut self , value : bool) -> Result < TestEventBuilder < P , 4usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg3" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (3) , self . 0 . writer () ,) ? ; Ok (TestEventBuilder (self . 0)) } } impl < P > TestEventBuilder < P , 4 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_4 (self) -> Result < SimpleStructBuilder < TestEventBuilder < P , 5usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestEventBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (4) ,) } } impl < P > TestEventBuilder < P , 5 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_5 (self) -> Result < SimpleStructArrayBuilder < TestEventBuilder < P , 6usize > > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestEventBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (5) ,) } } impl < P > TestEventBuilder < P , 6 > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn arg_6 (self) -> Result < rs_matter_crate :: tlv :: ToTLVArrayBuilder < TestEventBuilder < P , 7usize > , SimpleEnum > , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestEventBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Context (6) ,) } } impl < P > TestEventBuilder < P , 7usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestEventBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEvent") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestEventBuilder < P , F > 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 , "TestEvent") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestEventBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEventBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestEventArrayBuilder < P > (P) ; impl < P > TestEventArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestEventBuilder < TestEventArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestEventArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestEventArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestEvent[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestEventArrayBuilder < P > 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 , "TestEvent[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestEventArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestEventArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestFabricScopedEventBuilder < P , const F : usize = 254usize > (P) ; impl < P > TestFabricScopedEventBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestFabricScopedEventBuilder < P , 254 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn fabric_index (mut self , value : Option < rs_matter_crate :: im :: FabricIndex >) -> Result < TestFabricScopedEventBuilder < P , 255usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricIndex" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricIndex" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (254) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedEventBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestFabricScopedEventBuilder < P , 254 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn fabric_index (mut self , value : Option < rs_matter_crate :: im :: FabricIndex >) -> Result < TestFabricScopedEventBuilder < P , 255usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "fabricIndex" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (254) , self . 0 . writer () ,) ? ; Ok (TestFabricScopedEventBuilder (self . 0)) } } impl < P > TestFabricScopedEventBuilder < P , 255usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestFabricScopedEventBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestFabricScopedEvent") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestFabricScopedEventBuilder < P , F > 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 , "TestFabricScopedEvent") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestFabricScopedEventBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestFabricScopedEventBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestFabricScopedEventArrayBuilder < P > (P) ; impl < P > TestFabricScopedEventArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestFabricScopedEventBuilder < TestFabricScopedEventArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestFabricScopedEventArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestFabricScopedEventArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestFabricScopedEvent[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestFabricScopedEventArrayBuilder < P > 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 , "TestFabricScopedEvent[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestFabricScopedEventArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestFabricScopedEventArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestDifferentVendorMeiEventBuilder < P , const F : usize = 1usize > (P) ; impl < P > TestDifferentVendorMeiEventBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; parent . writer () . start_struct (tag) ? ; Ok (Self (parent)) } } # [cfg (feature = "defmt")] impl < P > TestDifferentVendorMeiEventBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug + rs_matter_crate :: reexport :: defmt :: Format , { pub fn arg_1 (mut self , value : u8) -> Result < TestDifferentVendorMeiEventBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestDifferentVendorMeiEventBuilder (self . 0)) } } # [cfg (not (feature = "defmt"))] impl < P > TestDifferentVendorMeiEventBuilder < P , 1 > where P : rs_matter_crate :: tlv :: TLVBuilderParent + core :: fmt :: Debug , { pub fn arg_1 (mut self , value : u8) -> Result < TestDifferentVendorMeiEventBuilder < P , 2usize > , rs_matter_crate :: error :: Error > { # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}::{} -> {:?} +" , self , "arg1" , value) ; rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (1) , self . 0 . writer () ,) ? ; Ok (TestDifferentVendorMeiEventBuilder (self . 0)) } } impl < P > TestDifferentVendorMeiEventBuilder < P , 2usize > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { # [doc = "Finish the struct and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P , const F : usize > core :: fmt :: Debug for TestDifferentVendorMeiEventBuilder < P , F > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestDifferentVendorMeiEvent") } } # [cfg (feature = "defmt")] impl < P , const F : usize > rs_matter_crate :: reexport :: defmt :: Format for TestDifferentVendorMeiEventBuilder < P , F > 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 , "TestDifferentVendorMeiEvent") } } impl < P , const F : usize > rs_matter_crate :: tlv :: TLVBuilderParent for TestDifferentVendorMeiEventBuilder < P , F > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestDifferentVendorMeiEventBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } pub struct TestDifferentVendorMeiEventArrayBuilder < P > (P) ; impl < P > TestDifferentVendorMeiEventArrayBuilder < P > 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 < Self , rs_matter_crate :: error :: Error > { 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 < TestDifferentVendorMeiEventBuilder < TestDifferentVendorMeiEventArrayBuilder < P >> , rs_matter_crate :: error :: Error > { rs_matter_crate :: tlv :: TLVBuilder :: new (TestDifferentVendorMeiEventArrayBuilder (self . 0) , & rs_matter_crate :: tlv :: TLVTag :: Anonymous) } # [doc = "Finish the array and return the parent"] pub fn end (mut self) -> Result < P , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; self . 0 . writer () . end_container () ? ; Ok (self . 0) } } impl < P > core :: fmt :: Debug for TestDifferentVendorMeiEventArrayBuilder < P > where P : core :: fmt :: Debug , { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "{:?}::{}" , self . 0 , "TestDifferentVendorMeiEvent[]") } } # [cfg (feature = "defmt")] impl < P > rs_matter_crate :: reexport :: defmt :: Format for TestDifferentVendorMeiEventArrayBuilder < P > 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 , "TestDifferentVendorMeiEvent[]") } } impl < P > rs_matter_crate :: tlv :: TLVBuilderParent for TestDifferentVendorMeiEventArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { type Write = P :: Write ; fn writer (& mut self) -> & mut P :: Write { self . 0 . writer () } } impl < P > rs_matter_crate :: tlv :: TLVBuilder < P > for TestDifferentVendorMeiEventArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn new (parent : P , tag : & rs_matter_crate :: tlv :: TLVTag) -> Result < Self , rs_matter_crate :: error :: Error > { Self :: new (parent , tag) } fn unchecked_into_parent (self) -> P { self . 0 } } impl TestEvent < '_ > { const PRIORITY : rs_matter_crate :: im :: EventPriority = rs_matter_crate :: im :: EventPriority :: Info ; pub fn emit_for < F > (emitter : impl rs_matter_crate :: dm :: EventEmitter , endpoint_id : rs_matter_crate :: dm :: EndptId , f : F) -> Result < rs_matter_crate :: dm :: EventNumber , rs_matter_crate :: error :: Error > where F : FnOnce (TestEventBuilder < rs_matter_crate :: im :: events :: EventTLVWrite < '_ >>) -> Result < rs_matter_crate :: im :: events :: EventTLVWrite < '_ > , rs_matter_crate :: error :: Error > , { emitter . emit_event (endpoint_id , 4294048773 , EventId :: TestEvent as _ , Self :: PRIORITY , | tw | { f (TestEventBuilder :: new (tw , & rs_matter_crate :: im :: events :: EVENT_DATA_TAG) ?) ? ; Ok (()) } ,) } pub fn emit < F > (emitter : impl rs_matter_crate :: dm :: OwnEventEmitter , f : F) -> Result < rs_matter_crate :: dm :: EventNumber , rs_matter_crate :: error :: Error > where F : FnOnce (TestEventBuilder < rs_matter_crate :: im :: events :: EventTLVWrite < '_ >>) -> Result < rs_matter_crate :: im :: events :: EventTLVWrite < '_ > , rs_matter_crate :: error :: Error > , { emitter . emit_own_event (EventId :: TestEvent as _ , Self :: PRIORITY , | tw | { f (TestEventBuilder :: new (tw , & rs_matter_crate :: im :: events :: EVENT_DATA_TAG) ?) ? ; Ok (()) } ,) } } impl TestFabricScopedEvent < '_ > { const PRIORITY : rs_matter_crate :: im :: EventPriority = rs_matter_crate :: im :: EventPriority :: Info ; pub fn emit_for < F > (emitter : impl rs_matter_crate :: dm :: EventEmitter , endpoint_id : rs_matter_crate :: dm :: EndptId , f : F) -> Result < rs_matter_crate :: dm :: EventNumber , rs_matter_crate :: error :: Error > where F : FnOnce (TestFabricScopedEventBuilder < rs_matter_crate :: im :: events :: EventTLVWrite < '_ >>) -> Result < rs_matter_crate :: im :: events :: EventTLVWrite < '_ > , rs_matter_crate :: error :: Error > , { emitter . emit_event (endpoint_id , 4294048773 , EventId :: TestFabricScopedEvent as _ , Self :: PRIORITY , | tw | { f (TestFabricScopedEventBuilder :: new (tw , & rs_matter_crate :: im :: events :: EVENT_DATA_TAG) ?) ? ; Ok (()) } ,) } pub fn emit < F > (emitter : impl rs_matter_crate :: dm :: OwnEventEmitter , f : F) -> Result < rs_matter_crate :: dm :: EventNumber , rs_matter_crate :: error :: Error > where F : FnOnce (TestFabricScopedEventBuilder < rs_matter_crate :: im :: events :: EventTLVWrite < '_ >>) -> Result < rs_matter_crate :: im :: events :: EventTLVWrite < '_ > , rs_matter_crate :: error :: Error > , { emitter . emit_own_event (EventId :: TestFabricScopedEvent as _ , Self :: PRIORITY , | tw | { f (TestFabricScopedEventBuilder :: new (tw , & rs_matter_crate :: im :: events :: EVENT_DATA_TAG) ?) ? ; Ok (()) } ,) } } impl TestDifferentVendorMeiEvent < '_ > { const PRIORITY : rs_matter_crate :: im :: EventPriority = rs_matter_crate :: im :: EventPriority :: Info ; pub fn emit_for < F > (emitter : impl rs_matter_crate :: dm :: EventEmitter , endpoint_id : rs_matter_crate :: dm :: EndptId , f : F) -> Result < rs_matter_crate :: dm :: EventNumber , rs_matter_crate :: error :: Error > where F : FnOnce (TestDifferentVendorMeiEventBuilder < rs_matter_crate :: im :: events :: EventTLVWrite < '_ >>) -> Result < rs_matter_crate :: im :: events :: EventTLVWrite < '_ > , rs_matter_crate :: error :: Error > , { emitter . emit_event (endpoint_id , 4294048773 , EventId :: TestDifferentVendorMeiEvent as _ , Self :: PRIORITY , | tw | { f (TestDifferentVendorMeiEventBuilder :: new (tw , & rs_matter_crate :: im :: events :: EVENT_DATA_TAG) ?) ? ; Ok (()) } ,) } pub fn emit < F > (emitter : impl rs_matter_crate :: dm :: OwnEventEmitter , f : F) -> Result < rs_matter_crate :: dm :: EventNumber , rs_matter_crate :: error :: Error > where F : FnOnce (TestDifferentVendorMeiEventBuilder < rs_matter_crate :: im :: events :: EventTLVWrite < '_ >>) -> Result < rs_matter_crate :: im :: events :: EventTLVWrite < '_ > , rs_matter_crate :: error :: Error > , { emitter . emit_own_event (EventId :: TestDifferentVendorMeiEvent as _ , Self :: PRIORITY , | tw | { f (TestDifferentVendorMeiEventBuilder :: new (tw , & rs_matter_crate :: im :: events :: EVENT_DATA_TAG) ?) ? ; Ok (()) } ,) } } # [doc = "The attribute IDs for the cluster."] # [derive (Copy , Clone , Debug , Eq , PartialEq , Hash , rs_matter_crate :: reexport :: strum :: FromRepr)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u32)] pub enum AttributeId { Boolean = 0 , Bitmap8 = 1 , Bitmap16 = 2 , Bitmap32 = 3 , Bitmap64 = 4 , Int8u = 5 , Int16u = 6 , Int24u = 7 , Int32u = 8 , Int40u = 9 , Int48u = 10 , Int56u = 11 , Int64u = 12 , Int8s = 13 , Int16s = 14 , Int24s = 15 , Int32s = 16 , Int40s = 17 , Int48s = 18 , Int56s = 19 , Int64s = 20 , Enum8 = 21 , Enum16 = 22 , FloatSingle = 23 , FloatDouble = 24 , OctetString = 25 , ListInt8u = 26 , ListOctetString = 27 , ListStructOctetString = 28 , LongOctetString = 29 , CharString = 30 , LongCharString = 31 , EpochUs = 32 , EpochS = 33 , VendorId = 34 , ListNullablesAndOptionalsStruct = 35 , EnumAttr = 36 , StructAttr = 37 , RangeRestrictedInt8u = 38 , RangeRestrictedInt8s = 39 , RangeRestrictedInt16u = 40 , RangeRestrictedInt16s = 41 , ListLongOctetString = 42 , ListFabricScoped = 43 , TimedWriteBoolean = 48 , GeneralErrorBoolean = 49 , ClusterErrorBoolean = 50 , GlobalEnum = 51 , GlobalStruct = 52 , UnsupportedAttributeRequiringAdminPrivilege = 254 , Unsupported = 255 , ReadFailureCode = 12288 , FailureInt32U = 12289 , NullableBoolean = 16384 , NullableBitmap8 = 16385 , NullableBitmap16 = 16386 , NullableBitmap32 = 16387 , NullableBitmap64 = 16388 , NullableInt8u = 16389 , NullableInt16u = 16390 , NullableInt24u = 16391 , NullableInt32u = 16392 , NullableInt40u = 16393 , NullableInt48u = 16394 , NullableInt56u = 16395 , NullableInt64u = 16396 , NullableInt8s = 16397 , NullableInt16s = 16398 , NullableInt24s = 16399 , NullableInt32s = 16400 , NullableInt40s = 16401 , NullableInt48s = 16402 , NullableInt56s = 16403 , NullableInt64s = 16404 , NullableEnum8 = 16405 , NullableEnum16 = 16406 , NullableFloatSingle = 16407 , NullableFloatDouble = 16408 , NullableOctetString = 16409 , NullableCharString = 16414 , NullableEnumAttr = 16420 , NullableStruct = 16421 , NullableRangeRestrictedInt8u = 16422 , NullableRangeRestrictedInt8s = 16423 , NullableRangeRestrictedInt16u = 16424 , NullableRangeRestrictedInt16s = 16425 , WriteOnlyInt8u = 16426 , NullableGlobalEnum = 16435 , NullableGlobalStruct = 16436 , GeneratedCommandList = 65528 , AcceptedCommandList = 65529 , AttributeList = 65531 , FeatureMap = 65532 , ClusterRevision = 65533 , MeiInt8u = 4294070017 } impl core :: convert :: TryFrom < rs_matter_crate :: dm :: AttrId > for AttributeId { type Error = rs_matter_crate :: error :: Error ; fn try_from (id : rs_matter_crate :: dm :: CmdId) -> Result < Self , Self :: Error > { AttributeId :: from_repr (id) . ok_or_else (|| rs_matter_crate :: error :: ErrorCode :: AttributeNotFound . into ()) } } impl core :: fmt :: Debug for MetadataDebug < (AttributeId , bool) > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "Attr::") ? ; match self . 0.0 { AttributeId :: Boolean => write ! (f , "{}(0x{:02x})" , "Boolean" , AttributeId :: Boolean as u32) ? , AttributeId :: Bitmap8 => write ! (f , "{}(0x{:02x})" , "Bitmap8" , AttributeId :: Bitmap8 as u32) ? , AttributeId :: Bitmap16 => write ! (f , "{}(0x{:02x})" , "Bitmap16" , AttributeId :: Bitmap16 as u32) ? , AttributeId :: Bitmap32 => write ! (f , "{}(0x{:02x})" , "Bitmap32" , AttributeId :: Bitmap32 as u32) ? , AttributeId :: Bitmap64 => write ! (f , "{}(0x{:02x})" , "Bitmap64" , AttributeId :: Bitmap64 as u32) ? , AttributeId :: Int8u => write ! (f , "{}(0x{:02x})" , "Int8u" , AttributeId :: Int8u as u32) ? , AttributeId :: Int16u => write ! (f , "{}(0x{:02x})" , "Int16u" , AttributeId :: Int16u as u32) ? , AttributeId :: Int24u => write ! (f , "{}(0x{:02x})" , "Int24u" , AttributeId :: Int24u as u32) ? , AttributeId :: Int32u => write ! (f , "{}(0x{:02x})" , "Int32u" , AttributeId :: Int32u as u32) ? , AttributeId :: Int40u => write ! (f , "{}(0x{:02x})" , "Int40u" , AttributeId :: Int40u as u32) ? , AttributeId :: Int48u => write ! (f , "{}(0x{:02x})" , "Int48u" , AttributeId :: Int48u as u32) ? , AttributeId :: Int56u => write ! (f , "{}(0x{:02x})" , "Int56u" , AttributeId :: Int56u as u32) ? , AttributeId :: Int64u => write ! (f , "{}(0x{:02x})" , "Int64u" , AttributeId :: Int64u as u32) ? , AttributeId :: Int8s => write ! (f , "{}(0x{:02x})" , "Int8s" , AttributeId :: Int8s as u32) ? , AttributeId :: Int16s => write ! (f , "{}(0x{:02x})" , "Int16s" , AttributeId :: Int16s as u32) ? , AttributeId :: Int24s => write ! (f , "{}(0x{:02x})" , "Int24s" , AttributeId :: Int24s as u32) ? , AttributeId :: Int32s => write ! (f , "{}(0x{:02x})" , "Int32s" , AttributeId :: Int32s as u32) ? , AttributeId :: Int40s => write ! (f , "{}(0x{:02x})" , "Int40s" , AttributeId :: Int40s as u32) ? , AttributeId :: Int48s => write ! (f , "{}(0x{:02x})" , "Int48s" , AttributeId :: Int48s as u32) ? , AttributeId :: Int56s => write ! (f , "{}(0x{:02x})" , "Int56s" , AttributeId :: Int56s as u32) ? , AttributeId :: Int64s => write ! (f , "{}(0x{:02x})" , "Int64s" , AttributeId :: Int64s as u32) ? , AttributeId :: Enum8 => write ! (f , "{}(0x{:02x})" , "Enum8" , AttributeId :: Enum8 as u32) ? , AttributeId :: Enum16 => write ! (f , "{}(0x{:02x})" , "Enum16" , AttributeId :: Enum16 as u32) ? , AttributeId :: FloatSingle => write ! (f , "{}(0x{:02x})" , "FloatSingle" , AttributeId :: FloatSingle as u32) ? , AttributeId :: FloatDouble => write ! (f , "{}(0x{:02x})" , "FloatDouble" , AttributeId :: FloatDouble as u32) ? , AttributeId :: OctetString => write ! (f , "{}(0x{:02x})" , "OctetString" , AttributeId :: OctetString as u32) ? , AttributeId :: ListInt8u => write ! (f , "{}(0x{:02x})" , "ListInt8u" , AttributeId :: ListInt8u as u32) ? , AttributeId :: ListOctetString => write ! (f , "{}(0x{:02x})" , "ListOctetString" , AttributeId :: ListOctetString as u32) ? , AttributeId :: ListStructOctetString => write ! (f , "{}(0x{:02x})" , "ListStructOctetString" , AttributeId :: ListStructOctetString as u32) ? , AttributeId :: LongOctetString => write ! (f , "{}(0x{:02x})" , "LongOctetString" , AttributeId :: LongOctetString as u32) ? , AttributeId :: CharString => write ! (f , "{}(0x{:02x})" , "CharString" , AttributeId :: CharString as u32) ? , AttributeId :: LongCharString => write ! (f , "{}(0x{:02x})" , "LongCharString" , AttributeId :: LongCharString as u32) ? , AttributeId :: EpochUs => write ! (f , "{}(0x{:02x})" , "EpochUs" , AttributeId :: EpochUs as u32) ? , AttributeId :: EpochS => write ! (f , "{}(0x{:02x})" , "EpochS" , AttributeId :: EpochS as u32) ? , AttributeId :: VendorId => write ! (f , "{}(0x{:02x})" , "VendorId" , AttributeId :: VendorId as u32) ? , AttributeId :: ListNullablesAndOptionalsStruct => write ! (f , "{}(0x{:02x})" , "ListNullablesAndOptionalsStruct" , AttributeId :: ListNullablesAndOptionalsStruct as u32) ? , AttributeId :: EnumAttr => write ! (f , "{}(0x{:02x})" , "EnumAttr" , AttributeId :: EnumAttr as u32) ? , AttributeId :: StructAttr => write ! (f , "{}(0x{:02x})" , "StructAttr" , AttributeId :: StructAttr as u32) ? , AttributeId :: RangeRestrictedInt8u => write ! (f , "{}(0x{:02x})" , "RangeRestrictedInt8u" , AttributeId :: RangeRestrictedInt8u as u32) ? , AttributeId :: RangeRestrictedInt8s => write ! (f , "{}(0x{:02x})" , "RangeRestrictedInt8s" , AttributeId :: RangeRestrictedInt8s as u32) ? , AttributeId :: RangeRestrictedInt16u => write ! (f , "{}(0x{:02x})" , "RangeRestrictedInt16u" , AttributeId :: RangeRestrictedInt16u as u32) ? , AttributeId :: RangeRestrictedInt16s => write ! (f , "{}(0x{:02x})" , "RangeRestrictedInt16s" , AttributeId :: RangeRestrictedInt16s as u32) ? , AttributeId :: ListLongOctetString => write ! (f , "{}(0x{:02x})" , "ListLongOctetString" , AttributeId :: ListLongOctetString as u32) ? , AttributeId :: ListFabricScoped => write ! (f , "{}(0x{:02x})" , "ListFabricScoped" , AttributeId :: ListFabricScoped as u32) ? , AttributeId :: TimedWriteBoolean => write ! (f , "{}(0x{:02x})" , "TimedWriteBoolean" , AttributeId :: TimedWriteBoolean as u32) ? , AttributeId :: GeneralErrorBoolean => write ! (f , "{}(0x{:02x})" , "GeneralErrorBoolean" , AttributeId :: GeneralErrorBoolean as u32) ? , AttributeId :: ClusterErrorBoolean => write ! (f , "{}(0x{:02x})" , "ClusterErrorBoolean" , AttributeId :: ClusterErrorBoolean as u32) ? , AttributeId :: GlobalEnum => write ! (f , "{}(0x{:02x})" , "GlobalEnum" , AttributeId :: GlobalEnum as u32) ? , AttributeId :: GlobalStruct => write ! (f , "{}(0x{:02x})" , "GlobalStruct" , AttributeId :: GlobalStruct as u32) ? , AttributeId :: UnsupportedAttributeRequiringAdminPrivilege => write ! (f , "{}(0x{:02x})" , "UnsupportedAttributeRequiringAdminPrivilege" , AttributeId :: UnsupportedAttributeRequiringAdminPrivilege as u32) ? , AttributeId :: Unsupported => write ! (f , "{}(0x{:02x})" , "Unsupported" , AttributeId :: Unsupported as u32) ? , AttributeId :: ReadFailureCode => write ! (f , "{}(0x{:02x})" , "ReadFailureCode" , AttributeId :: ReadFailureCode as u32) ? , AttributeId :: FailureInt32U => write ! (f , "{}(0x{:02x})" , "FailureInt32U" , AttributeId :: FailureInt32U as u32) ? , AttributeId :: NullableBoolean => write ! (f , "{}(0x{:02x})" , "NullableBoolean" , AttributeId :: NullableBoolean as u32) ? , AttributeId :: NullableBitmap8 => write ! (f , "{}(0x{:02x})" , "NullableBitmap8" , AttributeId :: NullableBitmap8 as u32) ? , AttributeId :: NullableBitmap16 => write ! (f , "{}(0x{:02x})" , "NullableBitmap16" , AttributeId :: NullableBitmap16 as u32) ? , AttributeId :: NullableBitmap32 => write ! (f , "{}(0x{:02x})" , "NullableBitmap32" , AttributeId :: NullableBitmap32 as u32) ? , AttributeId :: NullableBitmap64 => write ! (f , "{}(0x{:02x})" , "NullableBitmap64" , AttributeId :: NullableBitmap64 as u32) ? , AttributeId :: NullableInt8u => write ! (f , "{}(0x{:02x})" , "NullableInt8u" , AttributeId :: NullableInt8u as u32) ? , AttributeId :: NullableInt16u => write ! (f , "{}(0x{:02x})" , "NullableInt16u" , AttributeId :: NullableInt16u as u32) ? , AttributeId :: NullableInt24u => write ! (f , "{}(0x{:02x})" , "NullableInt24u" , AttributeId :: NullableInt24u as u32) ? , AttributeId :: NullableInt32u => write ! (f , "{}(0x{:02x})" , "NullableInt32u" , AttributeId :: NullableInt32u as u32) ? , AttributeId :: NullableInt40u => write ! (f , "{}(0x{:02x})" , "NullableInt40u" , AttributeId :: NullableInt40u as u32) ? , AttributeId :: NullableInt48u => write ! (f , "{}(0x{:02x})" , "NullableInt48u" , AttributeId :: NullableInt48u as u32) ? , AttributeId :: NullableInt56u => write ! (f , "{}(0x{:02x})" , "NullableInt56u" , AttributeId :: NullableInt56u as u32) ? , AttributeId :: NullableInt64u => write ! (f , "{}(0x{:02x})" , "NullableInt64u" , AttributeId :: NullableInt64u as u32) ? , AttributeId :: NullableInt8s => write ! (f , "{}(0x{:02x})" , "NullableInt8s" , AttributeId :: NullableInt8s as u32) ? , AttributeId :: NullableInt16s => write ! (f , "{}(0x{:02x})" , "NullableInt16s" , AttributeId :: NullableInt16s as u32) ? , AttributeId :: NullableInt24s => write ! (f , "{}(0x{:02x})" , "NullableInt24s" , AttributeId :: NullableInt24s as u32) ? , AttributeId :: NullableInt32s => write ! (f , "{}(0x{:02x})" , "NullableInt32s" , AttributeId :: NullableInt32s as u32) ? , AttributeId :: NullableInt40s => write ! (f , "{}(0x{:02x})" , "NullableInt40s" , AttributeId :: NullableInt40s as u32) ? , AttributeId :: NullableInt48s => write ! (f , "{}(0x{:02x})" , "NullableInt48s" , AttributeId :: NullableInt48s as u32) ? , AttributeId :: NullableInt56s => write ! (f , "{}(0x{:02x})" , "NullableInt56s" , AttributeId :: NullableInt56s as u32) ? , AttributeId :: NullableInt64s => write ! (f , "{}(0x{:02x})" , "NullableInt64s" , AttributeId :: NullableInt64s as u32) ? , AttributeId :: NullableEnum8 => write ! (f , "{}(0x{:02x})" , "NullableEnum8" , AttributeId :: NullableEnum8 as u32) ? , AttributeId :: NullableEnum16 => write ! (f , "{}(0x{:02x})" , "NullableEnum16" , AttributeId :: NullableEnum16 as u32) ? , AttributeId :: NullableFloatSingle => write ! (f , "{}(0x{:02x})" , "NullableFloatSingle" , AttributeId :: NullableFloatSingle as u32) ? , AttributeId :: NullableFloatDouble => write ! (f , "{}(0x{:02x})" , "NullableFloatDouble" , AttributeId :: NullableFloatDouble as u32) ? , AttributeId :: NullableOctetString => write ! (f , "{}(0x{:02x})" , "NullableOctetString" , AttributeId :: NullableOctetString as u32) ? , AttributeId :: NullableCharString => write ! (f , "{}(0x{:02x})" , "NullableCharString" , AttributeId :: NullableCharString as u32) ? , AttributeId :: NullableEnumAttr => write ! (f , "{}(0x{:02x})" , "NullableEnumAttr" , AttributeId :: NullableEnumAttr as u32) ? , AttributeId :: NullableStruct => write ! (f , "{}(0x{:02x})" , "NullableStruct" , AttributeId :: NullableStruct as u32) ? , AttributeId :: NullableRangeRestrictedInt8u => write ! (f , "{}(0x{:02x})" , "NullableRangeRestrictedInt8u" , AttributeId :: NullableRangeRestrictedInt8u as u32) ? , AttributeId :: NullableRangeRestrictedInt8s => write ! (f , "{}(0x{:02x})" , "NullableRangeRestrictedInt8s" , AttributeId :: NullableRangeRestrictedInt8s as u32) ? , AttributeId :: NullableRangeRestrictedInt16u => write ! (f , "{}(0x{:02x})" , "NullableRangeRestrictedInt16u" , AttributeId :: NullableRangeRestrictedInt16u as u32) ? , AttributeId :: NullableRangeRestrictedInt16s => write ! (f , "{}(0x{:02x})" , "NullableRangeRestrictedInt16s" , AttributeId :: NullableRangeRestrictedInt16s as u32) ? , AttributeId :: WriteOnlyInt8u => write ! (f , "{}(0x{:02x})" , "WriteOnlyInt8u" , AttributeId :: WriteOnlyInt8u as u32) ? , AttributeId :: NullableGlobalEnum => write ! (f , "{}(0x{:02x})" , "NullableGlobalEnum" , AttributeId :: NullableGlobalEnum as u32) ? , AttributeId :: NullableGlobalStruct => write ! (f , "{}(0x{:02x})" , "NullableGlobalStruct" , AttributeId :: NullableGlobalStruct as u32) ? , AttributeId :: GeneratedCommandList => write ! (f , "{}(0x{:02x})" , "GeneratedCommandList" , AttributeId :: GeneratedCommandList as u32) ? , AttributeId :: AcceptedCommandList => write ! (f , "{}(0x{:02x})" , "AcceptedCommandList" , AttributeId :: AcceptedCommandList as u32) ? , AttributeId :: AttributeList => write ! (f , "{}(0x{:02x})" , "AttributeList" , AttributeId :: AttributeList as u32) ? , AttributeId :: FeatureMap => write ! (f , "{}(0x{:02x})" , "FeatureMap" , AttributeId :: FeatureMap as u32) ? , AttributeId :: ClusterRevision => write ! (f , "{}(0x{:02x})" , "ClusterRevision" , AttributeId :: ClusterRevision as u32) ? , AttributeId :: MeiInt8u => write ! (f , "{}(0x{:02x})" , "MeiInt8u" , AttributeId :: MeiInt8u as u32) ? , } if self . 0.1 { write ! (f , "::Write") } else { write ! (f , "::Read") } } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for MetadataDebug < (AttributeId , bool) > { fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "Attr::") ; match self . 0.0 { AttributeId :: Boolean => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Boolean" , AttributeId :: Boolean as u32) , AttributeId :: Bitmap8 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Bitmap8" , AttributeId :: Bitmap8 as u32) , AttributeId :: Bitmap16 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Bitmap16" , AttributeId :: Bitmap16 as u32) , AttributeId :: Bitmap32 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Bitmap32" , AttributeId :: Bitmap32 as u32) , AttributeId :: Bitmap64 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Bitmap64" , AttributeId :: Bitmap64 as u32) , AttributeId :: Int8u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int8u" , AttributeId :: Int8u as u32) , AttributeId :: Int16u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int16u" , AttributeId :: Int16u as u32) , AttributeId :: Int24u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int24u" , AttributeId :: Int24u as u32) , AttributeId :: Int32u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int32u" , AttributeId :: Int32u as u32) , AttributeId :: Int40u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int40u" , AttributeId :: Int40u as u32) , AttributeId :: Int48u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int48u" , AttributeId :: Int48u as u32) , AttributeId :: Int56u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int56u" , AttributeId :: Int56u as u32) , AttributeId :: Int64u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int64u" , AttributeId :: Int64u as u32) , AttributeId :: Int8s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int8s" , AttributeId :: Int8s as u32) , AttributeId :: Int16s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int16s" , AttributeId :: Int16s as u32) , AttributeId :: Int24s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int24s" , AttributeId :: Int24s as u32) , AttributeId :: Int32s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int32s" , AttributeId :: Int32s as u32) , AttributeId :: Int40s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int40s" , AttributeId :: Int40s as u32) , AttributeId :: Int48s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int48s" , AttributeId :: Int48s as u32) , AttributeId :: Int56s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int56s" , AttributeId :: Int56s as u32) , AttributeId :: Int64s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Int64s" , AttributeId :: Int64s as u32) , AttributeId :: Enum8 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Enum8" , AttributeId :: Enum8 as u32) , AttributeId :: Enum16 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Enum16" , AttributeId :: Enum16 as u32) , AttributeId :: FloatSingle => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "FloatSingle" , AttributeId :: FloatSingle as u32) , AttributeId :: FloatDouble => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "FloatDouble" , AttributeId :: FloatDouble as u32) , AttributeId :: OctetString => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "OctetString" , AttributeId :: OctetString as u32) , AttributeId :: ListInt8u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "ListInt8u" , AttributeId :: ListInt8u as u32) , AttributeId :: ListOctetString => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "ListOctetString" , AttributeId :: ListOctetString as u32) , AttributeId :: ListStructOctetString => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "ListStructOctetString" , AttributeId :: ListStructOctetString as u32) , AttributeId :: LongOctetString => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "LongOctetString" , AttributeId :: LongOctetString as u32) , AttributeId :: CharString => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "CharString" , AttributeId :: CharString as u32) , AttributeId :: LongCharString => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "LongCharString" , AttributeId :: LongCharString as u32) , AttributeId :: EpochUs => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "EpochUs" , AttributeId :: EpochUs as u32) , AttributeId :: EpochS => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "EpochS" , AttributeId :: EpochS as u32) , AttributeId :: VendorId => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "VendorId" , AttributeId :: VendorId as u32) , AttributeId :: ListNullablesAndOptionalsStruct => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "ListNullablesAndOptionalsStruct" , AttributeId :: ListNullablesAndOptionalsStruct as u32) , AttributeId :: EnumAttr => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "EnumAttr" , AttributeId :: EnumAttr as u32) , AttributeId :: StructAttr => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "StructAttr" , AttributeId :: StructAttr as u32) , AttributeId :: RangeRestrictedInt8u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "RangeRestrictedInt8u" , AttributeId :: RangeRestrictedInt8u as u32) , AttributeId :: RangeRestrictedInt8s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "RangeRestrictedInt8s" , AttributeId :: RangeRestrictedInt8s as u32) , AttributeId :: RangeRestrictedInt16u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "RangeRestrictedInt16u" , AttributeId :: RangeRestrictedInt16u as u32) , AttributeId :: RangeRestrictedInt16s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "RangeRestrictedInt16s" , AttributeId :: RangeRestrictedInt16s as u32) , AttributeId :: ListLongOctetString => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "ListLongOctetString" , AttributeId :: ListLongOctetString as u32) , AttributeId :: ListFabricScoped => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "ListFabricScoped" , AttributeId :: ListFabricScoped as u32) , AttributeId :: TimedWriteBoolean => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TimedWriteBoolean" , AttributeId :: TimedWriteBoolean as u32) , AttributeId :: GeneralErrorBoolean => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "GeneralErrorBoolean" , AttributeId :: GeneralErrorBoolean as u32) , AttributeId :: ClusterErrorBoolean => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "ClusterErrorBoolean" , AttributeId :: ClusterErrorBoolean as u32) , AttributeId :: GlobalEnum => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "GlobalEnum" , AttributeId :: GlobalEnum as u32) , AttributeId :: GlobalStruct => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "GlobalStruct" , AttributeId :: GlobalStruct as u32) , AttributeId :: UnsupportedAttributeRequiringAdminPrivilege => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "UnsupportedAttributeRequiringAdminPrivilege" , AttributeId :: UnsupportedAttributeRequiringAdminPrivilege as u32) , AttributeId :: Unsupported => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Unsupported" , AttributeId :: Unsupported as u32) , AttributeId :: ReadFailureCode => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "ReadFailureCode" , AttributeId :: ReadFailureCode as u32) , AttributeId :: FailureInt32U => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "FailureInt32U" , AttributeId :: FailureInt32U as u32) , AttributeId :: NullableBoolean => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableBoolean" , AttributeId :: NullableBoolean as u32) , AttributeId :: NullableBitmap8 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableBitmap8" , AttributeId :: NullableBitmap8 as u32) , AttributeId :: NullableBitmap16 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableBitmap16" , AttributeId :: NullableBitmap16 as u32) , AttributeId :: NullableBitmap32 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableBitmap32" , AttributeId :: NullableBitmap32 as u32) , AttributeId :: NullableBitmap64 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableBitmap64" , AttributeId :: NullableBitmap64 as u32) , AttributeId :: NullableInt8u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt8u" , AttributeId :: NullableInt8u as u32) , AttributeId :: NullableInt16u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt16u" , AttributeId :: NullableInt16u as u32) , AttributeId :: NullableInt24u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt24u" , AttributeId :: NullableInt24u as u32) , AttributeId :: NullableInt32u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt32u" , AttributeId :: NullableInt32u as u32) , AttributeId :: NullableInt40u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt40u" , AttributeId :: NullableInt40u as u32) , AttributeId :: NullableInt48u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt48u" , AttributeId :: NullableInt48u as u32) , AttributeId :: NullableInt56u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt56u" , AttributeId :: NullableInt56u as u32) , AttributeId :: NullableInt64u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt64u" , AttributeId :: NullableInt64u as u32) , AttributeId :: NullableInt8s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt8s" , AttributeId :: NullableInt8s as u32) , AttributeId :: NullableInt16s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt16s" , AttributeId :: NullableInt16s as u32) , AttributeId :: NullableInt24s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt24s" , AttributeId :: NullableInt24s as u32) , AttributeId :: NullableInt32s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt32s" , AttributeId :: NullableInt32s as u32) , AttributeId :: NullableInt40s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt40s" , AttributeId :: NullableInt40s as u32) , AttributeId :: NullableInt48s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt48s" , AttributeId :: NullableInt48s as u32) , AttributeId :: NullableInt56s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt56s" , AttributeId :: NullableInt56s as u32) , AttributeId :: NullableInt64s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableInt64s" , AttributeId :: NullableInt64s as u32) , AttributeId :: NullableEnum8 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableEnum8" , AttributeId :: NullableEnum8 as u32) , AttributeId :: NullableEnum16 => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableEnum16" , AttributeId :: NullableEnum16 as u32) , AttributeId :: NullableFloatSingle => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableFloatSingle" , AttributeId :: NullableFloatSingle as u32) , AttributeId :: NullableFloatDouble => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableFloatDouble" , AttributeId :: NullableFloatDouble as u32) , AttributeId :: NullableOctetString => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableOctetString" , AttributeId :: NullableOctetString as u32) , AttributeId :: NullableCharString => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableCharString" , AttributeId :: NullableCharString as u32) , AttributeId :: NullableEnumAttr => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableEnumAttr" , AttributeId :: NullableEnumAttr as u32) , AttributeId :: NullableStruct => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableStruct" , AttributeId :: NullableStruct as u32) , AttributeId :: NullableRangeRestrictedInt8u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableRangeRestrictedInt8u" , AttributeId :: NullableRangeRestrictedInt8u as u32) , AttributeId :: NullableRangeRestrictedInt8s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableRangeRestrictedInt8s" , AttributeId :: NullableRangeRestrictedInt8s as u32) , AttributeId :: NullableRangeRestrictedInt16u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableRangeRestrictedInt16u" , AttributeId :: NullableRangeRestrictedInt16u as u32) , AttributeId :: NullableRangeRestrictedInt16s => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableRangeRestrictedInt16s" , AttributeId :: NullableRangeRestrictedInt16s as u32) , AttributeId :: WriteOnlyInt8u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "WriteOnlyInt8u" , AttributeId :: WriteOnlyInt8u as u32) , AttributeId :: NullableGlobalEnum => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableGlobalEnum" , AttributeId :: NullableGlobalEnum as u32) , AttributeId :: NullableGlobalStruct => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "NullableGlobalStruct" , AttributeId :: NullableGlobalStruct as u32) , AttributeId :: GeneratedCommandList => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "GeneratedCommandList" , AttributeId :: GeneratedCommandList as u32) , AttributeId :: AcceptedCommandList => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "AcceptedCommandList" , AttributeId :: AcceptedCommandList as u32) , AttributeId :: AttributeList => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "AttributeList" , AttributeId :: AttributeList as u32) , AttributeId :: FeatureMap => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "FeatureMap" , AttributeId :: FeatureMap as u32) , AttributeId :: ClusterRevision => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "ClusterRevision" , AttributeId :: ClusterRevision as u32) , AttributeId :: MeiInt8u => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "MeiInt8u" , AttributeId :: MeiInt8u as u32) , } if self . 0.1 { rs_matter_crate :: reexport :: defmt :: write ! (f , "::Write") } else { rs_matter_crate :: reexport :: defmt :: write ! (f , "::Read") } } } # [doc = "The command IDs for the cluster."] # [derive (Copy , Clone , Debug , Eq , PartialEq , Hash , rs_matter_crate :: reexport :: strum :: FromRepr)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u32)] pub enum CommandId { Test = 0 , TestNotHandled = 1 , TestSpecific = 2 , TestUnknownCommand = 3 , TestAddArguments = 4 , TestSimpleArgumentRequest = 5 , TestStructArrayArgumentRequest = 6 , TestStructArgumentRequest = 7 , TestNestedStructArgumentRequest = 8 , TestListStructArgumentRequest = 9 , TestListInt8UArgumentRequest = 10 , TestNestedStructListArgumentRequest = 11 , TestListNestedStructListArgumentRequest = 12 , TestListInt8UReverseRequest = 13 , TestEnumsRequest = 14 , TestNullableOptionalRequest = 15 , TestComplexNullableOptionalRequest = 16 , SimpleStructEchoRequest = 17 , TimedInvokeRequest = 18 , TestSimpleOptionalArgumentRequest = 19 , TestEmitTestEventRequest = 20 , TestEmitTestFabricScopedEventRequest = 21 , TestBatchHelperRequest = 22 , TestSecondBatchHelperRequest = 23 , StringEchoRequest = 24 , GlobalEchoRequest = 25 , TestCheckCommandFlags = 26 , TestDifferentVendorMeiRequest = 4294049962 } impl core :: convert :: TryFrom < rs_matter_crate :: dm :: CmdId > for CommandId { type Error = rs_matter_crate :: error :: Error ; fn try_from (id : rs_matter_crate :: dm :: CmdId) -> Result < Self , Self :: Error > { CommandId :: from_repr (id) . ok_or_else (|| rs_matter_crate :: error :: ErrorCode :: CommandNotFound . into ()) } } impl core :: fmt :: Debug for MetadataDebug < CommandId > { # [allow (unreachable_code)] fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "Cmd::") ? ; match self . 0 { CommandId :: Test => write ! (f , "{}(0x{:02x})" , "Test" , CommandId :: Test as u32) ? , CommandId :: TestNotHandled => write ! (f , "{}(0x{:02x})" , "TestNotHandled" , CommandId :: TestNotHandled as u32) ? , CommandId :: TestSpecific => write ! (f , "{}(0x{:02x})" , "TestSpecific" , CommandId :: TestSpecific as u32) ? , CommandId :: TestUnknownCommand => write ! (f , "{}(0x{:02x})" , "TestUnknownCommand" , CommandId :: TestUnknownCommand as u32) ? , CommandId :: TestAddArguments => write ! (f , "{}(0x{:02x})" , "TestAddArguments" , CommandId :: TestAddArguments as u32) ? , CommandId :: TestSimpleArgumentRequest => write ! (f , "{}(0x{:02x})" , "TestSimpleArgumentRequest" , CommandId :: TestSimpleArgumentRequest as u32) ? , CommandId :: TestStructArrayArgumentRequest => write ! (f , "{}(0x{:02x})" , "TestStructArrayArgumentRequest" , CommandId :: TestStructArrayArgumentRequest as u32) ? , CommandId :: TestStructArgumentRequest => write ! (f , "{}(0x{:02x})" , "TestStructArgumentRequest" , CommandId :: TestStructArgumentRequest as u32) ? , CommandId :: TestNestedStructArgumentRequest => write ! (f , "{}(0x{:02x})" , "TestNestedStructArgumentRequest" , CommandId :: TestNestedStructArgumentRequest as u32) ? , CommandId :: TestListStructArgumentRequest => write ! (f , "{}(0x{:02x})" , "TestListStructArgumentRequest" , CommandId :: TestListStructArgumentRequest as u32) ? , CommandId :: TestListInt8UArgumentRequest => write ! (f , "{}(0x{:02x})" , "TestListInt8UArgumentRequest" , CommandId :: TestListInt8UArgumentRequest as u32) ? , CommandId :: TestNestedStructListArgumentRequest => write ! (f , "{}(0x{:02x})" , "TestNestedStructListArgumentRequest" , CommandId :: TestNestedStructListArgumentRequest as u32) ? , CommandId :: TestListNestedStructListArgumentRequest => write ! (f , "{}(0x{:02x})" , "TestListNestedStructListArgumentRequest" , CommandId :: TestListNestedStructListArgumentRequest as u32) ? , CommandId :: TestListInt8UReverseRequest => write ! (f , "{}(0x{:02x})" , "TestListInt8UReverseRequest" , CommandId :: TestListInt8UReverseRequest as u32) ? , CommandId :: TestEnumsRequest => write ! (f , "{}(0x{:02x})" , "TestEnumsRequest" , CommandId :: TestEnumsRequest as u32) ? , CommandId :: TestNullableOptionalRequest => write ! (f , "{}(0x{:02x})" , "TestNullableOptionalRequest" , CommandId :: TestNullableOptionalRequest as u32) ? , CommandId :: TestComplexNullableOptionalRequest => write ! (f , "{}(0x{:02x})" , "TestComplexNullableOptionalRequest" , CommandId :: TestComplexNullableOptionalRequest as u32) ? , CommandId :: SimpleStructEchoRequest => write ! (f , "{}(0x{:02x})" , "SimpleStructEchoRequest" , CommandId :: SimpleStructEchoRequest as u32) ? , CommandId :: TimedInvokeRequest => write ! (f , "{}(0x{:02x})" , "TimedInvokeRequest" , CommandId :: TimedInvokeRequest as u32) ? , CommandId :: TestSimpleOptionalArgumentRequest => write ! (f , "{}(0x{:02x})" , "TestSimpleOptionalArgumentRequest" , CommandId :: TestSimpleOptionalArgumentRequest as u32) ? , CommandId :: TestEmitTestEventRequest => write ! (f , "{}(0x{:02x})" , "TestEmitTestEventRequest" , CommandId :: TestEmitTestEventRequest as u32) ? , CommandId :: TestEmitTestFabricScopedEventRequest => write ! (f , "{}(0x{:02x})" , "TestEmitTestFabricScopedEventRequest" , CommandId :: TestEmitTestFabricScopedEventRequest as u32) ? , CommandId :: TestBatchHelperRequest => write ! (f , "{}(0x{:02x})" , "TestBatchHelperRequest" , CommandId :: TestBatchHelperRequest as u32) ? , CommandId :: TestSecondBatchHelperRequest => write ! (f , "{}(0x{:02x})" , "TestSecondBatchHelperRequest" , CommandId :: TestSecondBatchHelperRequest as u32) ? , CommandId :: StringEchoRequest => write ! (f , "{}(0x{:02x})" , "StringEchoRequest" , CommandId :: StringEchoRequest as u32) ? , CommandId :: GlobalEchoRequest => write ! (f , "{}(0x{:02x})" , "GlobalEchoRequest" , CommandId :: GlobalEchoRequest as u32) ? , CommandId :: TestCheckCommandFlags => write ! (f , "{}(0x{:02x})" , "TestCheckCommandFlags" , CommandId :: TestCheckCommandFlags as u32) ? , CommandId :: TestDifferentVendorMeiRequest => write ! (f , "{}(0x{:02x})" , "TestDifferentVendorMeiRequest" , CommandId :: TestDifferentVendorMeiRequest as u32) ? , } write ! (f , "::Invoke") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for MetadataDebug < CommandId > { # [allow (unreachable_code)] fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "Cmd::") ; match self . 0 { CommandId :: Test => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "Test" , CommandId :: Test as u32) , CommandId :: TestNotHandled => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestNotHandled" , CommandId :: TestNotHandled as u32) , CommandId :: TestSpecific => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestSpecific" , CommandId :: TestSpecific as u32) , CommandId :: TestUnknownCommand => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestUnknownCommand" , CommandId :: TestUnknownCommand as u32) , CommandId :: TestAddArguments => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestAddArguments" , CommandId :: TestAddArguments as u32) , CommandId :: TestSimpleArgumentRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestSimpleArgumentRequest" , CommandId :: TestSimpleArgumentRequest as u32) , CommandId :: TestStructArrayArgumentRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestStructArrayArgumentRequest" , CommandId :: TestStructArrayArgumentRequest as u32) , CommandId :: TestStructArgumentRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestStructArgumentRequest" , CommandId :: TestStructArgumentRequest as u32) , CommandId :: TestNestedStructArgumentRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestNestedStructArgumentRequest" , CommandId :: TestNestedStructArgumentRequest as u32) , CommandId :: TestListStructArgumentRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestListStructArgumentRequest" , CommandId :: TestListStructArgumentRequest as u32) , CommandId :: TestListInt8UArgumentRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestListInt8UArgumentRequest" , CommandId :: TestListInt8UArgumentRequest as u32) , CommandId :: TestNestedStructListArgumentRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestNestedStructListArgumentRequest" , CommandId :: TestNestedStructListArgumentRequest as u32) , CommandId :: TestListNestedStructListArgumentRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestListNestedStructListArgumentRequest" , CommandId :: TestListNestedStructListArgumentRequest as u32) , CommandId :: TestListInt8UReverseRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestListInt8UReverseRequest" , CommandId :: TestListInt8UReverseRequest as u32) , CommandId :: TestEnumsRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestEnumsRequest" , CommandId :: TestEnumsRequest as u32) , CommandId :: TestNullableOptionalRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestNullableOptionalRequest" , CommandId :: TestNullableOptionalRequest as u32) , CommandId :: TestComplexNullableOptionalRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestComplexNullableOptionalRequest" , CommandId :: TestComplexNullableOptionalRequest as u32) , CommandId :: SimpleStructEchoRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "SimpleStructEchoRequest" , CommandId :: SimpleStructEchoRequest as u32) , CommandId :: TimedInvokeRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TimedInvokeRequest" , CommandId :: TimedInvokeRequest as u32) , CommandId :: TestSimpleOptionalArgumentRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestSimpleOptionalArgumentRequest" , CommandId :: TestSimpleOptionalArgumentRequest as u32) , CommandId :: TestEmitTestEventRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestEmitTestEventRequest" , CommandId :: TestEmitTestEventRequest as u32) , CommandId :: TestEmitTestFabricScopedEventRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestEmitTestFabricScopedEventRequest" , CommandId :: TestEmitTestFabricScopedEventRequest as u32) , CommandId :: TestBatchHelperRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestBatchHelperRequest" , CommandId :: TestBatchHelperRequest as u32) , CommandId :: TestSecondBatchHelperRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestSecondBatchHelperRequest" , CommandId :: TestSecondBatchHelperRequest as u32) , CommandId :: StringEchoRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "StringEchoRequest" , CommandId :: StringEchoRequest as u32) , CommandId :: GlobalEchoRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "GlobalEchoRequest" , CommandId :: GlobalEchoRequest as u32) , CommandId :: TestCheckCommandFlags => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestCheckCommandFlags" , CommandId :: TestCheckCommandFlags as u32) , CommandId :: TestDifferentVendorMeiRequest => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestDifferentVendorMeiRequest" , CommandId :: TestDifferentVendorMeiRequest as u32) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "::Invoke") } } # [doc = "The command response IDs for the cluster."] # [derive (Copy , Clone , Debug , Eq , PartialEq , Hash , rs_matter_crate :: reexport :: strum :: FromRepr)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u32)] pub enum CommandResponseId { TestSpecificResponse = 0 , TestAddArgumentsResponse = 1 , TestSimpleArgumentResponse = 2 , TestStructArrayArgumentResponse = 3 , TestListInt8UReverseResponse = 4 , TestEnumsResponse = 5 , TestNullableOptionalResponse = 6 , TestComplexNullableOptionalResponse = 7 , BooleanResponse = 8 , SimpleStructResponse = 9 , TestEmitTestEventResponse = 10 , TestEmitTestFabricScopedEventResponse = 11 , TestBatchHelperResponse = 12 , StringEchoResponse = 13 , GlobalEchoResponse = 14 , TestDifferentVendorMeiResponse = 4294049979 } impl core :: fmt :: Debug for MetadataDebug < CommandResponseId > { # [allow (unreachable_code)] fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "Cmd::") ? ; match self . 0 { CommandResponseId :: TestSpecificResponse => write ! (f , "{}(0x{:02x})" , "TestSpecificResponse" , CommandResponseId :: TestSpecificResponse as u32) ? , CommandResponseId :: TestAddArgumentsResponse => write ! (f , "{}(0x{:02x})" , "TestAddArgumentsResponse" , CommandResponseId :: TestAddArgumentsResponse as u32) ? , CommandResponseId :: TestSimpleArgumentResponse => write ! (f , "{}(0x{:02x})" , "TestSimpleArgumentResponse" , CommandResponseId :: TestSimpleArgumentResponse as u32) ? , CommandResponseId :: TestStructArrayArgumentResponse => write ! (f , "{}(0x{:02x})" , "TestStructArrayArgumentResponse" , CommandResponseId :: TestStructArrayArgumentResponse as u32) ? , CommandResponseId :: TestListInt8UReverseResponse => write ! (f , "{}(0x{:02x})" , "TestListInt8UReverseResponse" , CommandResponseId :: TestListInt8UReverseResponse as u32) ? , CommandResponseId :: TestEnumsResponse => write ! (f , "{}(0x{:02x})" , "TestEnumsResponse" , CommandResponseId :: TestEnumsResponse as u32) ? , CommandResponseId :: TestNullableOptionalResponse => write ! (f , "{}(0x{:02x})" , "TestNullableOptionalResponse" , CommandResponseId :: TestNullableOptionalResponse as u32) ? , CommandResponseId :: TestComplexNullableOptionalResponse => write ! (f , "{}(0x{:02x})" , "TestComplexNullableOptionalResponse" , CommandResponseId :: TestComplexNullableOptionalResponse as u32) ? , CommandResponseId :: BooleanResponse => write ! (f , "{}(0x{:02x})" , "BooleanResponse" , CommandResponseId :: BooleanResponse as u32) ? , CommandResponseId :: SimpleStructResponse => write ! (f , "{}(0x{:02x})" , "SimpleStructResponse" , CommandResponseId :: SimpleStructResponse as u32) ? , CommandResponseId :: TestEmitTestEventResponse => write ! (f , "{}(0x{:02x})" , "TestEmitTestEventResponse" , CommandResponseId :: TestEmitTestEventResponse as u32) ? , CommandResponseId :: TestEmitTestFabricScopedEventResponse => write ! (f , "{}(0x{:02x})" , "TestEmitTestFabricScopedEventResponse" , CommandResponseId :: TestEmitTestFabricScopedEventResponse as u32) ? , CommandResponseId :: TestBatchHelperResponse => write ! (f , "{}(0x{:02x})" , "TestBatchHelperResponse" , CommandResponseId :: TestBatchHelperResponse as u32) ? , CommandResponseId :: StringEchoResponse => write ! (f , "{}(0x{:02x})" , "StringEchoResponse" , CommandResponseId :: StringEchoResponse as u32) ? , CommandResponseId :: GlobalEchoResponse => write ! (f , "{}(0x{:02x})" , "GlobalEchoResponse" , CommandResponseId :: GlobalEchoResponse as u32) ? , CommandResponseId :: TestDifferentVendorMeiResponse => write ! (f , "{}(0x{:02x})" , "TestDifferentVendorMeiResponse" , CommandResponseId :: TestDifferentVendorMeiResponse as u32) ? , } write ! (f , "::Response") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for MetadataDebug < CommandResponseId > { # [allow (unreachable_code)] fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "Cmd::") ; match self . 0 { CommandResponseId :: TestSpecificResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestSpecificResponse" , CommandResponseId :: TestSpecificResponse as u32) , CommandResponseId :: TestAddArgumentsResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestAddArgumentsResponse" , CommandResponseId :: TestAddArgumentsResponse as u32) , CommandResponseId :: TestSimpleArgumentResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestSimpleArgumentResponse" , CommandResponseId :: TestSimpleArgumentResponse as u32) , CommandResponseId :: TestStructArrayArgumentResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestStructArrayArgumentResponse" , CommandResponseId :: TestStructArrayArgumentResponse as u32) , CommandResponseId :: TestListInt8UReverseResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestListInt8UReverseResponse" , CommandResponseId :: TestListInt8UReverseResponse as u32) , CommandResponseId :: TestEnumsResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestEnumsResponse" , CommandResponseId :: TestEnumsResponse as u32) , CommandResponseId :: TestNullableOptionalResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestNullableOptionalResponse" , CommandResponseId :: TestNullableOptionalResponse as u32) , CommandResponseId :: TestComplexNullableOptionalResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestComplexNullableOptionalResponse" , CommandResponseId :: TestComplexNullableOptionalResponse as u32) , CommandResponseId :: BooleanResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "BooleanResponse" , CommandResponseId :: BooleanResponse as u32) , CommandResponseId :: SimpleStructResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "SimpleStructResponse" , CommandResponseId :: SimpleStructResponse as u32) , CommandResponseId :: TestEmitTestEventResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestEmitTestEventResponse" , CommandResponseId :: TestEmitTestEventResponse as u32) , CommandResponseId :: TestEmitTestFabricScopedEventResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestEmitTestFabricScopedEventResponse" , CommandResponseId :: TestEmitTestFabricScopedEventResponse as u32) , CommandResponseId :: TestBatchHelperResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestBatchHelperResponse" , CommandResponseId :: TestBatchHelperResponse as u32) , CommandResponseId :: StringEchoResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "StringEchoResponse" , CommandResponseId :: StringEchoResponse as u32) , CommandResponseId :: GlobalEchoResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "GlobalEchoResponse" , CommandResponseId :: GlobalEchoResponse as u32) , CommandResponseId :: TestDifferentVendorMeiResponse => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestDifferentVendorMeiResponse" , CommandResponseId :: TestDifferentVendorMeiResponse as u32) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "::Response") } } impl core :: convert :: TryFrom < rs_matter_crate :: dm :: CmdId > for CommandResponseId { type Error = rs_matter_crate :: error :: Error ; fn try_from (id : rs_matter_crate :: dm :: CmdId) -> Result < Self , Self :: Error > { CommandResponseId :: from_repr (id) . ok_or_else (|| rs_matter_crate :: error :: ErrorCode :: CommandNotFound . into ()) } } # [doc = "The event IDs for the cluster."] # [derive (Copy , Clone , Debug , Eq , PartialEq , Hash , rs_matter_crate :: reexport :: strum :: FromRepr)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] # [repr (u32)] pub enum EventId { TestEvent = 1 , TestFabricScopedEvent = 2 , TestDifferentVendorMeiEvent = 4294050030 } impl core :: convert :: TryFrom < rs_matter_crate :: dm :: EventId > for EventId { type Error = rs_matter_crate :: error :: Error ; fn try_from (id : rs_matter_crate :: dm :: EventId) -> Result < Self , Self :: Error > { EventId :: from_repr (id) . ok_or_else (|| rs_matter_crate :: error :: ErrorCode :: EventNotFound . into ()) } } impl core :: fmt :: Debug for MetadataDebug < EventId > { # [allow (unreachable_code)] fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "Event::") ? ; match self . 0 { EventId :: TestEvent => write ! (f , "{}(0x{:02x})" , "TestEvent" , EventId :: TestEvent as u32) ? , EventId :: TestFabricScopedEvent => write ! (f , "{}(0x{:02x})" , "TestFabricScopedEvent" , EventId :: TestFabricScopedEvent as u32) ? , EventId :: TestDifferentVendorMeiEvent => write ! (f , "{}(0x{:02x})" , "TestDifferentVendorMeiEvent" , EventId :: TestDifferentVendorMeiEvent as u32) ? , } write ! (f , "::Emit") } } # [cfg (feature = "defmt")] impl rs_matter_crate :: reexport :: defmt :: Format for MetadataDebug < EventId > { # [allow (unreachable_code)] fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "Event::") ; match self . 0 { EventId :: TestEvent => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestEvent" , EventId :: TestEvent as u32) , EventId :: TestFabricScopedEvent => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestFabricScopedEvent" , EventId :: TestFabricScopedEvent as u32) , EventId :: TestDifferentVendorMeiEvent => rs_matter_crate :: reexport :: defmt :: write ! (f , "{}(0x{:02x})" , "TestDifferentVendorMeiEvent" , EventId :: TestDifferentVendorMeiEvent as u32) , } rs_matter_crate :: reexport :: defmt :: write ! (f , "::Emit") } } use rs_matter_crate :: dm :: clusters :: decl :: globals :: * ; # [doc = "The cluster metadata. By default, all cluster attributes, commands and events are allowed, and the revision is the latest one. Use `Cluster::with_*` to reconfigure."] pub const FULL_CLUSTER : rs_matter_crate :: dm :: Cluster < 'static > = rs_matter_crate :: dm :: Cluster :: new (4294048773 , 1 , 0 , & [rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Boolean as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Bitmap8 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Bitmap16 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Bitmap32 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Bitmap64 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int8u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int16u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int24u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int32u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int40u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int48u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int56u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int64u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int8s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int16s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int24s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int32s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int40s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int48s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int56s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Int64s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Enum8 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Enum16 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: FloatSingle as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: FloatDouble as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: OctetString as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: ListInt8u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: A) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: ListOctetString as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: A) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: ListStructOctetString as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: A) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: LongOctetString as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: CharString as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: LongCharString as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: EpochUs as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: EpochS as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: VendorId as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: ListNullablesAndOptionalsStruct as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: A) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: EnumAttr as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: StructAttr as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: RangeRestrictedInt8u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: RangeRestrictedInt8s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: RangeRestrictedInt16u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: RangeRestrictedInt16s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: ListLongOctetString as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: A) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: ListFabricScoped as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: A) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: TimedWriteBoolean as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) . union (rs_matter_crate :: dm :: Access :: TIMED_ONLY) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: GeneralErrorBoolean as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: ClusterErrorBoolean as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: GlobalEnum as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: GlobalStruct as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: UnsupportedAttributeRequiringAdminPrivilege as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN) , rs_matter_crate :: dm :: Quality :: O) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: Unsupported as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: O) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: ReadFailureCode as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: O) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: FailureInt32U as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: O) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableBoolean as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableBitmap8 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableBitmap16 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableBitmap32 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableBitmap64 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt8u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt16u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt24u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt32u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt40u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt48u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt56u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt64u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt8s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt16s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt24s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt32s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt40s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt48s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt56s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableInt64s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableEnum8 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableEnum16 as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableFloatSingle as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableFloatDouble as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableOctetString as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableCharString as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableEnumAttr as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableStruct as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableRangeRestrictedInt8u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableRangeRestrictedInt8s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableRangeRestrictedInt16u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableRangeRestrictedInt16s as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: WriteOnlyInt8u as _ , rs_matter_crate :: dm :: Access :: WRITE . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN))) , rs_matter_crate :: dm :: Quality :: O) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableGlobalEnum as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: NullableGlobalStruct as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: GeneratedCommandList as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: NEED_VIEW) , rs_matter_crate :: dm :: Quality :: A) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: AcceptedCommandList as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: NEED_VIEW) , rs_matter_crate :: dm :: Quality :: A) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: AttributeList as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: NEED_VIEW) , rs_matter_crate :: dm :: Quality :: A) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: FeatureMap as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: NEED_VIEW) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: ClusterRevision as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: NEED_VIEW) , rs_matter_crate :: dm :: Quality :: NONE) , rs_matter_crate :: dm :: Attribute :: new (AttributeId :: MeiInt8u as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: WRITE) . union (rs_matter_crate :: dm :: Access :: NEED_OPERATE . union (rs_matter_crate :: dm :: Access :: NEED_MANAGE . union (rs_matter_crate :: dm :: Access :: NEED_ADMIN)) . union (rs_matter_crate :: dm :: Access :: NEED_VIEW)) , rs_matter_crate :: dm :: Quality :: NONE) ,] , & [rs_matter_crate :: dm :: Command :: new (CommandId :: Test as _ , None , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestNotHandled as _ , None , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestSpecific as _ , Some (CommandResponseId :: TestSpecificResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestUnknownCommand as _ , None , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestAddArguments as _ , Some (CommandResponseId :: TestAddArgumentsResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestSimpleArgumentRequest as _ , Some (CommandResponseId :: TestSimpleArgumentResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestStructArrayArgumentRequest as _ , Some (CommandResponseId :: TestStructArrayArgumentResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestStructArgumentRequest as _ , Some (CommandResponseId :: BooleanResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestNestedStructArgumentRequest as _ , Some (CommandResponseId :: BooleanResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestListStructArgumentRequest as _ , Some (CommandResponseId :: BooleanResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestListInt8UArgumentRequest as _ , Some (CommandResponseId :: BooleanResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestNestedStructListArgumentRequest as _ , Some (CommandResponseId :: BooleanResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestListNestedStructListArgumentRequest as _ , Some (CommandResponseId :: BooleanResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestListInt8UReverseRequest as _ , Some (CommandResponseId :: TestListInt8UReverseResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestEnumsRequest as _ , Some (CommandResponseId :: TestEnumsResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestNullableOptionalRequest as _ , Some (CommandResponseId :: TestNullableOptionalResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestComplexNullableOptionalRequest as _ , Some (CommandResponseId :: TestComplexNullableOptionalResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: SimpleStructEchoRequest as _ , Some (CommandResponseId :: SimpleStructResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TimedInvokeRequest as _ , None , rs_matter_crate :: dm :: Access :: WO . union (rs_matter_crate :: dm :: Access :: TIMED_ONLY) ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestSimpleOptionalArgumentRequest as _ , None , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestEmitTestEventRequest as _ , Some (CommandResponseId :: TestEmitTestEventResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestEmitTestFabricScopedEventRequest as _ , Some (CommandResponseId :: TestEmitTestFabricScopedEventResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestBatchHelperRequest as _ , Some (CommandResponseId :: TestBatchHelperResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestSecondBatchHelperRequest as _ , Some (CommandResponseId :: TestBatchHelperResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: StringEchoRequest as _ , Some (CommandResponseId :: StringEchoResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: GlobalEchoRequest as _ , Some (CommandResponseId :: GlobalEchoResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestCheckCommandFlags as _ , None , rs_matter_crate :: dm :: Access :: WO . union (rs_matter_crate :: dm :: Access :: TIMED_ONLY) . union (rs_matter_crate :: dm :: Access :: FAB_SCOPED) ,) , rs_matter_crate :: dm :: Command :: new (CommandId :: TestDifferentVendorMeiRequest as _ , Some (CommandResponseId :: TestDifferentVendorMeiResponse as _) , rs_matter_crate :: dm :: Access :: WO ,) ,] , & [rs_matter_crate :: dm :: Event :: new (EventId :: TestEvent as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: NEED_VIEW) ,) , rs_matter_crate :: dm :: Event :: new (EventId :: TestFabricScopedEvent as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: NEED_VIEW) . union (rs_matter_crate :: dm :: Access :: FAB_SENSITIVE) ,) , rs_matter_crate :: dm :: Event :: new (EventId :: TestDifferentVendorMeiEvent as _ , rs_matter_crate :: dm :: Access :: READ . union (rs_matter_crate :: dm :: Access :: NEED_VIEW) ,) ,] , | _ , _ , _ | true , | _ , _ , _ | true , | _ , _ , _ | true ,) ; # [doc = "A helper struct to generate the cluster debug info."] struct MetadataDebug < T > (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) ; fn boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > ; fn bitmap_8 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < Bitmap8MaskMap , rs_matter_crate :: error :: Error > ; fn bitmap_16 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < Bitmap16MaskMap , rs_matter_crate :: error :: Error > ; fn bitmap_32 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < Bitmap32MaskMap , rs_matter_crate :: error :: Error > ; fn bitmap_64 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < Bitmap64MaskMap , rs_matter_crate :: error :: Error > ; fn int_8_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u8 , rs_matter_crate :: error :: Error > ; fn int_16_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u16 , rs_matter_crate :: error :: Error > ; fn int_24_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u32 , rs_matter_crate :: error :: Error > ; fn int_32_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u32 , rs_matter_crate :: error :: Error > ; fn int_40_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u64 , rs_matter_crate :: error :: Error > ; fn int_48_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u64 , rs_matter_crate :: error :: Error > ; fn int_56_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u64 , rs_matter_crate :: error :: Error > ; fn int_64_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u64 , rs_matter_crate :: error :: Error > ; fn int_8_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i8 , rs_matter_crate :: error :: Error > ; fn int_16_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i16 , rs_matter_crate :: error :: Error > ; fn int_24_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i32 , rs_matter_crate :: error :: Error > ; fn int_32_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i32 , rs_matter_crate :: error :: Error > ; fn int_40_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i64 , rs_matter_crate :: error :: Error > ; fn int_48_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i64 , rs_matter_crate :: error :: Error > ; fn int_56_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i64 , rs_matter_crate :: error :: Error > ; fn int_64_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i64 , rs_matter_crate :: error :: Error > ; fn enum_8 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u8 , rs_matter_crate :: error :: Error > ; fn enum_16 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u16 , rs_matter_crate :: error :: Error > ; fn float_single (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < f32 , rs_matter_crate :: error :: Error > ; fn float_double (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < f64 , rs_matter_crate :: error :: Error > ; fn octet_string < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: tlv :: OctetsBuilder < P >) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > >) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > >) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > >) -> Result < P , rs_matter_crate :: error :: Error > ; 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 >) -> Result < P , rs_matter_crate :: error :: Error > ; fn char_string < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: tlv :: Utf8StrBuilder < P >) -> Result < P , rs_matter_crate :: error :: Error > ; 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 >) -> Result < P , rs_matter_crate :: error :: Error > ; fn epoch_us (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u64 , rs_matter_crate :: error :: Error > ; fn epoch_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u32 , rs_matter_crate :: error :: Error > ; fn vendor_id (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u16 , rs_matter_crate :: error :: Error > ; 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 > >) -> Result < P , rs_matter_crate :: error :: Error > ; fn enum_attr (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < SimpleEnum , rs_matter_crate :: error :: Error > ; fn struct_attr < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : SimpleStructBuilder < P >) -> Result < P , rs_matter_crate :: error :: Error > ; fn range_restricted_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u8 , rs_matter_crate :: error :: Error > ; fn range_restricted_int_8_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i8 , rs_matter_crate :: error :: Error > ; fn range_restricted_int_16_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u16 , rs_matter_crate :: error :: Error > ; fn range_restricted_int_16_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i16 , rs_matter_crate :: error :: Error > ; 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 > >) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > >) -> Result < P , rs_matter_crate :: error :: Error > ; fn timed_write_boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > ; fn general_error_boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > ; fn cluster_error_boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > ; fn global_enum (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < TestGlobalEnum , rs_matter_crate :: error :: Error > ; fn global_struct < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : TestGlobalStructBuilder < P >) -> Result < P , rs_matter_crate :: error :: Error > ; fn unsupported_attribute_requiring_admin_privilege (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > { Err (rs_matter_crate :: error :: ErrorCode :: AttributeNotFound . into ()) } fn unsupported (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > { Err (rs_matter_crate :: error :: ErrorCode :: AttributeNotFound . into ()) } fn read_failure_code (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u8 , rs_matter_crate :: error :: Error > { Err (rs_matter_crate :: error :: ErrorCode :: AttributeNotFound . into ()) } fn failure_int_32_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u32 , rs_matter_crate :: error :: Error > { Err (rs_matter_crate :: error :: ErrorCode :: AttributeNotFound . into ()) } fn nullable_boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < bool > , rs_matter_crate :: error :: Error > ; fn nullable_bitmap_8 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < Bitmap8MaskMap > , rs_matter_crate :: error :: Error > ; fn nullable_bitmap_16 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < Bitmap16MaskMap > , rs_matter_crate :: error :: Error > ; fn nullable_bitmap_32 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < Bitmap32MaskMap > , rs_matter_crate :: error :: Error > ; fn nullable_bitmap_64 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < Bitmap64MaskMap > , rs_matter_crate :: error :: Error > ; fn nullable_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u8 > , rs_matter_crate :: error :: Error > ; fn nullable_int_16_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u16 > , rs_matter_crate :: error :: Error > ; fn nullable_int_24_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u32 > , rs_matter_crate :: error :: Error > ; fn nullable_int_32_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u32 > , rs_matter_crate :: error :: Error > ; fn nullable_int_40_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u64 > , rs_matter_crate :: error :: Error > ; fn nullable_int_48_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u64 > , rs_matter_crate :: error :: Error > ; fn nullable_int_56_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u64 > , rs_matter_crate :: error :: Error > ; fn nullable_int_64_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u64 > , rs_matter_crate :: error :: Error > ; fn nullable_int_8_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < i8 > , rs_matter_crate :: error :: Error > ; fn nullable_int_16_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < i16 > , rs_matter_crate :: error :: Error > ; fn nullable_int_24_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < i32 > , rs_matter_crate :: error :: Error > ; fn nullable_int_32_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < i32 > , rs_matter_crate :: error :: Error > ; fn nullable_int_40_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < i64 > , rs_matter_crate :: error :: Error > ; fn nullable_int_48_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < i64 > , rs_matter_crate :: error :: Error > ; fn nullable_int_56_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < i64 > , rs_matter_crate :: error :: Error > ; fn nullable_int_64_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < i64 > , rs_matter_crate :: error :: Error > ; fn nullable_enum_8 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u8 > , rs_matter_crate :: error :: Error > ; fn nullable_enum_16 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u16 > , rs_matter_crate :: error :: Error > ; fn nullable_float_single (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < f32 > , rs_matter_crate :: error :: Error > ; fn nullable_float_double (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < f64 > , rs_matter_crate :: error :: Error > ; 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 > >) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > >) -> Result < P , rs_matter_crate :: error :: Error > ; fn nullable_enum_attr (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < SimpleEnum > , rs_matter_crate :: error :: Error > ; 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 > >) -> Result < P , rs_matter_crate :: error :: Error > ; fn nullable_range_restricted_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u8 > , rs_matter_crate :: error :: Error > ; fn nullable_range_restricted_int_8_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < i8 > , rs_matter_crate :: error :: Error > ; fn nullable_range_restricted_int_16_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < u16 > , rs_matter_crate :: error :: Error > ; fn nullable_range_restricted_int_16_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < i16 > , rs_matter_crate :: error :: Error > ; fn nullable_global_enum (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < TestGlobalEnum > , rs_matter_crate :: error :: Error > ; fn nullable_global_struct < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: tlv :: NullableBuilder < P , TestGlobalStructBuilder < P > >) -> Result < P , rs_matter_crate :: error :: Error > ; fn mei_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u8 , rs_matter_crate :: error :: Error > ; fn set_boolean (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : bool) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_bitmap_8 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : Bitmap8MaskMap) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_bitmap_16 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : Bitmap16MaskMap) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_bitmap_32 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : Bitmap32MaskMap) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u8) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u32) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u64) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u64) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : i8) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : i32) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : i64) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : i64) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u8) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_enum_16 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u16) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_float_single (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : f32) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_float_double (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : f64) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& 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 > ; 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 > ; 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 > ; 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 (& 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Utf8Str < '_ >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_epoch_us (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u64) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_epoch_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u32) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& 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 > ; fn set_enum_attr (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : SimpleEnum) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u8) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u16) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& 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 > ; 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 > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : bool) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_cluster_error_boolean (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : bool) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_global_enum (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : TestGlobalEnum) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_global_struct (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : TestGlobalStruct < '_ >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_unsupported_attribute_requiring_admin_privilege (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : bool) -> Result < () , rs_matter_crate :: error :: Error > { Err (rs_matter_crate :: error :: ErrorCode :: AttributeNotFound . into ()) } 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 :: AttributeNotFound . into ()) } fn set_read_failure_code (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u8) -> Result < () , rs_matter_crate :: error :: Error > { Err (rs_matter_crate :: error :: ErrorCode :: AttributeNotFound . into ()) } fn set_failure_int_32_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u32) -> Result < () , rs_matter_crate :: error :: Error > { Err (rs_matter_crate :: error :: ErrorCode :: AttributeNotFound . into ()) } fn set_nullable_boolean (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < bool >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_bitmap_8 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < Bitmap8MaskMap >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_bitmap_16 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < Bitmap16MaskMap >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_bitmap_32 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < Bitmap32MaskMap >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_bitmap_64 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < Bitmap64MaskMap >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u8 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_16_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u16 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_24_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u32 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_32_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u32 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_40_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u64 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_48_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u64 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_56_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u64 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_64_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u64 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_8_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i8 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_16_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i16 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_24_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i32 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_32_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i32 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_40_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i64 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_48_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i64 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_56_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i64 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_int_64_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i64 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_enum_8 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u8 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_enum_16 (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u16 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_float_single (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < f32 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_float_double (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < f64 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_octet_string (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: OctetStr < '_ > >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_char_string (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_enum_attr (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < SimpleEnum >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_struct (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < SimpleStruct < '_ > >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_range_restricted_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u8 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_range_restricted_int_8_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i8 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_range_restricted_int_16_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < u16 >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_range_restricted_int_16_s (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < i16 >) -> Result < () , rs_matter_crate :: error :: Error > ; 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 :: AttributeNotFound . into ()) } fn set_nullable_global_enum (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < TestGlobalEnum >) -> Result < () , rs_matter_crate :: error :: Error > ; fn set_nullable_global_struct (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < TestGlobalStruct < '_ > >) -> Result < () , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext ,) -> Result < () , rs_matter_crate :: error :: Error > ; fn handle_test_not_handled (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext ,) -> Result < () , rs_matter_crate :: error :: Error > ; fn handle_test_specific < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , response : TestSpecificResponseBuilder < P > ,) -> Result < P , rs_matter_crate :: error :: Error > ; fn handle_test_unknown_command (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext ,) -> Result < () , rs_matter_crate :: error :: Error > ; fn handle_test_add_arguments < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestAddArgumentsRequest < '_ > , response : TestAddArgumentsResponseBuilder < P > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; fn handle_test_enums_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestEnumsRequestRequest < '_ > , response : TestEnumsResponseBuilder < P > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestSimpleOptionalArgumentRequestRequest < '_ > ,) -> Result < () , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; fn handle_string_echo_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : StringEchoRequestRequest < '_ > , response : StringEchoResponseBuilder < P > ,) -> Result < P , rs_matter_crate :: error :: Error > ; fn handle_global_echo_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : GlobalEchoRequestRequest < '_ > , response : GlobalEchoResponseBuilder < P > ,) -> Result < P , rs_matter_crate :: error :: Error > ; fn handle_test_check_command_flags (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext ,) -> Result < () , rs_matter_crate :: error :: Error > ; 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > ; } impl < T > ClusterHandler for & T where T : ClusterHandler { const CLUSTER : rs_matter_crate :: dm :: Cluster < 'static > = T :: CLUSTER ; fn dataver (& self) -> u32 { T :: dataver (self) } fn dataver_changed (& self) { T :: dataver_changed (self) } fn boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > { T :: boolean (self , ctx) } fn bitmap_8 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < Bitmap8MaskMap , rs_matter_crate :: error :: Error > { T :: bitmap_8 (self , ctx) } fn bitmap_16 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < Bitmap16MaskMap , rs_matter_crate :: error :: Error > { T :: bitmap_16 (self , ctx) } fn bitmap_32 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < Bitmap32MaskMap , rs_matter_crate :: error :: Error > { T :: bitmap_32 (self , ctx) } fn bitmap_64 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < Bitmap64MaskMap , rs_matter_crate :: error :: Error > { T :: bitmap_64 (self , ctx) } fn int_8_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u8 , rs_matter_crate :: error :: Error > { T :: int_8_u (self , ctx) } fn int_16_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u16 , rs_matter_crate :: error :: Error > { T :: int_16_u (self , ctx) } fn int_24_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u32 , rs_matter_crate :: error :: Error > { T :: int_24_u (self , ctx) } fn int_32_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u32 , rs_matter_crate :: error :: Error > { T :: int_32_u (self , ctx) } fn int_40_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u64 , rs_matter_crate :: error :: Error > { T :: int_40_u (self , ctx) } fn int_48_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u64 , rs_matter_crate :: error :: Error > { T :: int_48_u (self , ctx) } fn int_56_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u64 , rs_matter_crate :: error :: Error > { T :: int_56_u (self , ctx) } fn int_64_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u64 , rs_matter_crate :: error :: Error > { T :: int_64_u (self , ctx) } fn int_8_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i8 , rs_matter_crate :: error :: Error > { T :: int_8_s (self , ctx) } fn int_16_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i16 , rs_matter_crate :: error :: Error > { T :: int_16_s (self , ctx) } fn int_24_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i32 , rs_matter_crate :: error :: Error > { T :: int_24_s (self , ctx) } fn int_32_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i32 , rs_matter_crate :: error :: Error > { T :: int_32_s (self , ctx) } fn int_40_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i64 , rs_matter_crate :: error :: Error > { T :: int_40_s (self , ctx) } fn int_48_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i64 , rs_matter_crate :: error :: Error > { T :: int_48_s (self , ctx) } fn int_56_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i64 , rs_matter_crate :: error :: Error > { T :: int_56_s (self , ctx) } fn int_64_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i64 , rs_matter_crate :: error :: Error > { T :: int_64_s (self , ctx) } fn enum_8 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u8 , rs_matter_crate :: error :: Error > { T :: enum_8 (self , ctx) } fn enum_16 (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u16 , rs_matter_crate :: error :: Error > { T :: enum_16 (self , ctx) } fn float_single (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < f32 , rs_matter_crate :: error :: Error > { T :: float_single (self , ctx) } fn float_double (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < f64 , rs_matter_crate :: error :: Error > { T :: float_double (self , ctx) } fn octet_string < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: tlv :: OctetsBuilder < P >) -> Result < P , rs_matter_crate :: error :: Error > { T :: octet_string (self , ctx , builder) } 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 > >) -> Result < P , rs_matter_crate :: error :: Error > { T :: list_int_8_u (self , ctx , builder) } 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 > >) -> Result < P , rs_matter_crate :: error :: Error > { T :: list_octet_string (self , ctx , builder) } 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 > >) -> Result < P , rs_matter_crate :: error :: Error > { T :: list_struct_octet_string (self , ctx , builder) } 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 >) -> Result < P , rs_matter_crate :: error :: Error > { T :: long_octet_string (self , ctx , builder) } fn char_string < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: tlv :: Utf8StrBuilder < P >) -> Result < P , rs_matter_crate :: error :: Error > { T :: char_string (self , ctx , builder) } 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 >) -> Result < P , rs_matter_crate :: error :: Error > { T :: long_char_string (self , ctx , builder) } fn epoch_us (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u64 , rs_matter_crate :: error :: Error > { T :: epoch_us (self , ctx) } fn epoch_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u32 , rs_matter_crate :: error :: Error > { T :: epoch_s (self , ctx) } fn vendor_id (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u16 , rs_matter_crate :: error :: Error > { T :: vendor_id (self , ctx) } 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 > >) -> Result < P , rs_matter_crate :: error :: Error > { T :: list_nullables_and_optionals_struct (self , ctx , builder) } fn enum_attr (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < SimpleEnum , rs_matter_crate :: error :: Error > { T :: enum_attr (self , ctx) } fn struct_attr < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : SimpleStructBuilder < P >) -> Result < P , rs_matter_crate :: error :: Error > { T :: struct_attr (self , ctx , builder) } fn range_restricted_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u8 , rs_matter_crate :: error :: Error > { T :: range_restricted_int_8_u (self , ctx) } fn range_restricted_int_8_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i8 , rs_matter_crate :: error :: Error > { T :: range_restricted_int_8_s (self , ctx) } fn range_restricted_int_16_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u16 , rs_matter_crate :: error :: Error > { T :: range_restricted_int_16_u (self , ctx) } fn range_restricted_int_16_s (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < i16 , rs_matter_crate :: error :: Error > { T :: range_restricted_int_16_s (self , ctx) } 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 > >) -> Result < P , rs_matter_crate :: error :: Error > { T :: list_long_octet_string (self , ctx , builder) } 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 > >) -> Result < P , rs_matter_crate :: error :: Error > { T :: list_fabric_scoped (self , ctx , builder) } fn timed_write_boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > { T :: timed_write_boolean (self , ctx) } fn general_error_boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > { T :: general_error_boolean (self , ctx) } fn cluster_error_boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > { T :: cluster_error_boolean (self , ctx) } fn global_enum (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < TestGlobalEnum , rs_matter_crate :: error :: Error > { T :: global_enum (self , ctx) } fn global_struct < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : TestGlobalStructBuilder < P >) -> Result < P , rs_matter_crate :: error :: Error > { T :: global_struct (self , ctx , builder) } fn unsupported_attribute_requiring_admin_privilege (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > { T :: unsupported_attribute_requiring_admin_privilege (self , ctx) } fn unsupported (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < bool , rs_matter_crate :: error :: Error > { T :: unsupported (self , ctx) } fn read_failure_code (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u8 , rs_matter_crate :: error :: Error > { T :: read_failure_code (self , ctx) } fn failure_int_32_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u32 , rs_matter_crate :: error :: Error > { T :: failure_int_32_u (self , ctx) } fn nullable_boolean (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < bool > , 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 :: tlv :: Nullable < Bitmap8MaskMap > , 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 :: tlv :: Nullable < Bitmap16MaskMap > , 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 :: tlv :: Nullable < Bitmap32MaskMap > , 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 :: tlv :: Nullable < Bitmap64MaskMap > , 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 :: tlv :: Nullable < u8 > , 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 :: tlv :: Nullable < u16 > , 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 :: tlv :: Nullable < u32 > , 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 :: tlv :: Nullable < u32 > , 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 :: tlv :: Nullable < u64 > , 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 :: tlv :: Nullable < u64 > , 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 :: tlv :: Nullable < u64 > , 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 :: tlv :: Nullable < u64 > , 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 :: tlv :: Nullable < i8 > , 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 :: tlv :: Nullable < i16 > , 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 :: tlv :: Nullable < i32 > , 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 :: tlv :: Nullable < i32 > , 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 :: tlv :: Nullable < i64 > , 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 :: tlv :: Nullable < i64 > , 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 :: tlv :: Nullable < i64 > , 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 :: tlv :: Nullable < i64 > , 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 :: tlv :: Nullable < u8 > , 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 :: tlv :: Nullable < u16 > , 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 :: tlv :: Nullable < f32 > , 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 :: tlv :: Nullable < f64 > , rs_matter_crate :: error :: Error > { T :: nullable_float_double (self , ctx) } 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 > >) -> Result < P , rs_matter_crate :: error :: Error > { T :: nullable_octet_string (self , ctx , builder) } 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 > >) -> Result < P , rs_matter_crate :: error :: Error > { T :: nullable_char_string (self , ctx , builder) } fn nullable_enum_attr (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < SimpleEnum > , rs_matter_crate :: error :: Error > { T :: nullable_enum_attr (self , ctx) } 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 > >) -> Result < P , rs_matter_crate :: error :: Error > { 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 :: tlv :: Nullable < u8 > , 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 :: tlv :: Nullable < i8 > , 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 :: tlv :: Nullable < u16 > , 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 :: tlv :: Nullable < i16 > , rs_matter_crate :: error :: Error > { T :: nullable_range_restricted_int_16_s (self , ctx) } fn nullable_global_enum (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < rs_matter_crate :: tlv :: Nullable < TestGlobalEnum > , rs_matter_crate :: error :: Error > { T :: nullable_global_enum (self , ctx) } fn nullable_global_struct < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , builder : rs_matter_crate :: tlv :: NullableBuilder < P , TestGlobalStructBuilder < P > >) -> Result < P , rs_matter_crate :: error :: Error > { T :: nullable_global_struct (self , ctx , builder) } fn mei_int_8_u (& self , ctx : impl rs_matter_crate :: dm :: ReadContext) -> Result < u8 , rs_matter_crate :: error :: Error > { T :: mei_int_8_u (self , ctx) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } fn set_global_enum (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : TestGlobalEnum) -> Result < () , rs_matter_crate :: error :: Error > { T :: set_global_enum (self , ctx , value) } fn set_global_struct (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : TestGlobalStruct < '_ >) -> Result < () , rs_matter_crate :: error :: Error > { T :: set_global_struct (self , ctx , value) } fn set_unsupported_attribute_requiring_admin_privilege (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : bool) -> Result < () , rs_matter_crate :: error :: Error > { T :: set_unsupported_attribute_requiring_admin_privilege (self , ctx , value) } 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) } fn set_read_failure_code (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u8) -> Result < () , rs_matter_crate :: error :: Error > { T :: set_read_failure_code (self , ctx , value) } fn set_failure_int_32_u (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : u32) -> Result < () , rs_matter_crate :: error :: Error > { T :: set_failure_int_32_u (self , ctx , value) } fn set_nullable_boolean (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < bool >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < Bitmap8MaskMap >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < Bitmap16MaskMap >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < Bitmap32MaskMap >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < Bitmap64MaskMap >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u8 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u16 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u32 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u32 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u64 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u64 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u64 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u64 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < i8 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < i16 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < i32 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < i32 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < i64 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < i64 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < i64 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < i64 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u8 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u16 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < f32 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < f64 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < rs_matter_crate :: tlv :: OctetStr < '_ > >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < rs_matter_crate :: tlv :: Utf8Str < '_ > >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < SimpleEnum >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < SimpleStruct < '_ > >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u8 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < i8 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < u16 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 < i16 >) -> Result < () , rs_matter_crate :: error :: Error > { T :: 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 > { T :: set_write_only_int_8_u (self , ctx , value) } fn set_nullable_global_enum (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < TestGlobalEnum >) -> Result < () , rs_matter_crate :: error :: Error > { T :: set_nullable_global_enum (self , ctx , value) } fn set_nullable_global_struct (& self , ctx : impl rs_matter_crate :: dm :: WriteContext , value : rs_matter_crate :: tlv :: Nullable < TestGlobalStruct < '_ > >) -> Result < () , rs_matter_crate :: error :: Error > { T :: set_nullable_global_struct (self , ctx , value) } 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) } fn handle_test (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext ,) -> Result < () , rs_matter_crate :: error :: Error > { T :: handle_test (self , ctx) } 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) } fn handle_test_specific < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , response : TestSpecificResponseBuilder < P > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: 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 > { T :: handle_test_unknown_command (self , ctx) } fn handle_test_add_arguments < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestAddArgumentsRequest < '_ > , response : TestAddArgumentsResponseBuilder < P > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_add_arguments (self , ctx , request , response) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_simple_argument_request (self , ctx , request , response) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_struct_array_argument_request (self , ctx , request , response) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_struct_argument_request (self , ctx , request , response) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_nested_struct_argument_request (self , ctx , request , response) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_list_struct_argument_request (self , ctx , request , response) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: 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 < P > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: 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 < P > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_list_nested_struct_list_argument_request (self , ctx , request , response) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_list_int_8_u_reverse_request (self , ctx , request , response) } fn handle_test_enums_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : TestEnumsRequestRequest < '_ > , response : TestEnumsResponseBuilder < P > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_enums_request (self , ctx , request , response) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: 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 < P > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_complex_nullable_optional_request (self , ctx , request , response) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: 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 > { T :: 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 > { T :: handle_test_simple_optional_argument_request (self , ctx , request) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: 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 < P > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_emit_test_fabric_scoped_event_request (self , ctx , request , response) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_batch_helper_request (self , ctx , request , response) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_test_second_batch_helper_request (self , ctx , request , response) } fn handle_string_echo_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : StringEchoRequestRequest < '_ > , response : StringEchoResponseBuilder < P > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_string_echo_request (self , ctx , request , response) } fn handle_global_echo_request < P : rs_matter_crate :: tlv :: TLVBuilderParent > (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext , request : GlobalEchoRequestRequest < '_ > , response : GlobalEchoResponseBuilder < P > ,) -> Result < P , rs_matter_crate :: error :: Error > { T :: handle_global_echo_request (self , ctx , request , response) } fn handle_test_check_command_flags (& self , ctx : impl rs_matter_crate :: dm :: InvokeContext ,) -> Result < () , rs_matter_crate :: error :: Error > { T :: handle_test_check_command_flags (self , ctx) } 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 > ,) -> Result < P , rs_matter_crate :: error :: Error > { 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."] # [derive (Debug , Copy , Clone , Eq , PartialEq , Hash)] # [cfg_attr (feature = "defmt" , derive (rs_matter_crate :: reexport :: defmt :: Format))] pub struct HandlerAdaptor < T > (pub T) ; impl < T > rs_matter_crate :: dm :: Handler for HandlerAdaptor < T > where T : ClusterHandler , { # [allow (unreachable_code)] fn read (& self , ctx : impl rs_matter_crate :: dm :: ReadContext , reply : impl rs_matter_crate :: dm :: ReadReply ,) -> Result < () , rs_matter_crate :: error :: Error > { if let Some (mut writer) = reply . with_dataver (self . 0 . dataver ()) ? { if ctx . attr () . is_system () { ctx . attr () . cluster (ctx . metadata () , | cluster | cluster . read (ctx . attr () , writer)) } else { match AttributeId :: try_from (ctx . attr () . attr_id) ? { AttributeId :: Boolean => { let attr_read_result = self . 0. boolean (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Boolean , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Boolean , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Bitmap8 => { let attr_read_result = self . 0. bitmap_8 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap8 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap8 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Bitmap16 => { let attr_read_result = self . 0. bitmap_16 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap16 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap16 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Bitmap32 => { let attr_read_result = self . 0. bitmap_32 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap32 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap32 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Bitmap64 => { let attr_read_result = self . 0. bitmap_64 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap64 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap64 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int8u => { let attr_read_result = self . 0. int_8_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int8u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int8u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int16u => { let attr_read_result = self . 0. int_16_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int16u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int16u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int24u => { let attr_read_result = self . 0. int_24_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int24u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int24u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int32u => { let attr_read_result = self . 0. int_32_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int32u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int32u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int40u => { let attr_read_result = self . 0. int_40_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int40u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int40u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int48u => { let attr_read_result = self . 0. int_48_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int48u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int48u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int56u => { let attr_read_result = self . 0. int_56_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int56u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int56u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int64u => { let attr_read_result = self . 0. int_64_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int64u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int64u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int8s => { let attr_read_result = self . 0. int_8_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int8s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int8s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int16s => { let attr_read_result = self . 0. int_16_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int16s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int16s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int24s => { let attr_read_result = self . 0. int_24_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int24s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int24s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int32s => { let attr_read_result = self . 0. int_32_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int32s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int32s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int40s => { let attr_read_result = self . 0. int_40_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int40s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int40s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int48s => { let attr_read_result = self . 0. int_48_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int48s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int48s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int56s => { let attr_read_result = self . 0. int_56_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int56s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int56s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Int64s => { let attr_read_result = self . 0. int_64_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int64s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int64s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Enum8 => { let attr_read_result = self . 0. enum_8 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Enum8 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Enum8 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Enum16 => { let attr_read_result = self . 0. enum_16 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Enum16 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Enum16 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: FloatSingle => { let attr_read_result = self . 0. float_single (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FloatSingle , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FloatSingle , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: FloatDouble => { let attr_read_result = self . 0. float_double (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FloatDouble , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FloatDouble , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: OctetString => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: OctetString , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: OctetString , 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. 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: OctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: OctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: ListInt8u => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListInt8u , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListInt8u , 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. 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 ,) ? ,) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListInt8u , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListInt8u , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: ListOctetString => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListOctetString , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListOctetString , 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. 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 ,) ? ,) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListOctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListOctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: ListStructOctetString => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListStructOctetString , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListStructOctetString , 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. 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 , MetadataDebug ((AttributeId :: ListStructOctetString , false)))) , tw) , tag ,) ? ,) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListStructOctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListStructOctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: LongOctetString => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongOctetString , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongOctetString , 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. 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongOctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongOctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: CharString => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: CharString , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: CharString , 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. 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: CharString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: CharString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: LongCharString => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongCharString , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongCharString , 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. 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongCharString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongCharString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: EpochUs => { let attr_read_result = self . 0. epoch_us (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EpochUs , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EpochUs , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: EpochS => { let attr_read_result = self . 0. epoch_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EpochS , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EpochS , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: VendorId => { let attr_read_result = self . 0. vendor_id (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: VendorId , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: VendorId , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: ListNullablesAndOptionalsStruct => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListNullablesAndOptionalsStruct , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListNullablesAndOptionalsStruct , 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. 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 , MetadataDebug ((AttributeId :: ListNullablesAndOptionalsStruct , false)))) , tw) , tag ,) ? ,) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListNullablesAndOptionalsStruct , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListNullablesAndOptionalsStruct , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: EnumAttr => { let attr_read_result = self . 0. enum_attr (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EnumAttr , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EnumAttr , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: StructAttr => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: StructAttr , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: StructAttr , 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. 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: StructAttr , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: StructAttr , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: RangeRestrictedInt8u => { let attr_read_result = self . 0. range_restricted_int_8_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt8u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt8u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: RangeRestrictedInt8s => { let attr_read_result = self . 0. range_restricted_int_8_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt8s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt8s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: RangeRestrictedInt16u => { let attr_read_result = self . 0. range_restricted_int_16_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt16u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt16u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: RangeRestrictedInt16s => { let attr_read_result = self . 0. range_restricted_int_16_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt16s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt16s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: ListLongOctetString => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListLongOctetString , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListLongOctetString , 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. 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 , MetadataDebug ((AttributeId :: ListLongOctetString , false)))) , tw) , tag ,) ? ,) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListLongOctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListLongOctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: ListFabricScoped => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListFabricScoped , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListFabricScoped , 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. 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 ,) ? ,) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListFabricScoped , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListFabricScoped , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: TimedWriteBoolean => { let attr_read_result = self . 0. timed_write_boolean (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: TimedWriteBoolean , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: TimedWriteBoolean , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: GeneralErrorBoolean => { let attr_read_result = self . 0. general_error_boolean (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GeneralErrorBoolean , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GeneralErrorBoolean , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: ClusterErrorBoolean => { let attr_read_result = self . 0. cluster_error_boolean (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ClusterErrorBoolean , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ClusterErrorBoolean , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: GlobalEnum => { let attr_read_result = self . 0. global_enum (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GlobalEnum , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GlobalEnum , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: GlobalStruct => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GlobalStruct , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GlobalStruct , 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. global_struct (& ctx , rs_matter_crate :: tlv :: TLVBuilder :: new (rs_matter_crate :: tlv :: TLVWriteParent :: new (MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GlobalStruct , false)))) , tw) , tag ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GlobalStruct , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GlobalStruct , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: UnsupportedAttributeRequiringAdminPrivilege => { let attr_read_result = self . 0. unsupported_attribute_requiring_admin_privilege (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: UnsupportedAttributeRequiringAdminPrivilege , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: UnsupportedAttributeRequiringAdminPrivilege , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: Unsupported => { let attr_read_result = self . 0. unsupported (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Unsupported , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Unsupported , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: ReadFailureCode => { let attr_read_result = self . 0. read_failure_code (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ReadFailureCode , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ReadFailureCode , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: FailureInt32U => { let attr_read_result = self . 0. failure_int_32_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FailureInt32U , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FailureInt32U , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableBoolean => { let attr_read_result = self . 0. nullable_boolean (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBoolean , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBoolean , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableBitmap8 => { let attr_read_result = self . 0. nullable_bitmap_8 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap8 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap8 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableBitmap16 => { let attr_read_result = self . 0. nullable_bitmap_16 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap16 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap16 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableBitmap32 => { let attr_read_result = self . 0. nullable_bitmap_32 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap32 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap32 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableBitmap64 => { let attr_read_result = self . 0. nullable_bitmap_64 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap64 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap64 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt8u => { let attr_read_result = self . 0. nullable_int_8_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt8u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt8u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt16u => { let attr_read_result = self . 0. nullable_int_16_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt16u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt16u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt24u => { let attr_read_result = self . 0. nullable_int_24_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt24u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt24u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt32u => { let attr_read_result = self . 0. nullable_int_32_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt32u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt32u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt40u => { let attr_read_result = self . 0. nullable_int_40_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt40u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt40u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt48u => { let attr_read_result = self . 0. nullable_int_48_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt48u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt48u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt56u => { let attr_read_result = self . 0. nullable_int_56_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt56u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt56u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt64u => { let attr_read_result = self . 0. nullable_int_64_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt64u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt64u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt8s => { let attr_read_result = self . 0. nullable_int_8_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt8s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt8s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt16s => { let attr_read_result = self . 0. nullable_int_16_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt16s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt16s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt24s => { let attr_read_result = self . 0. nullable_int_24_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt24s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt24s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt32s => { let attr_read_result = self . 0. nullable_int_32_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt32s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt32s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt40s => { let attr_read_result = self . 0. nullable_int_40_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt40s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt40s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt48s => { let attr_read_result = self . 0. nullable_int_48_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt48s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt48s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt56s => { let attr_read_result = self . 0. nullable_int_56_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt56s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt56s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableInt64s => { let attr_read_result = self . 0. nullable_int_64_s (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt64s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt64s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableEnum8 => { let attr_read_result = self . 0. nullable_enum_8 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnum8 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnum8 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableEnum16 => { let attr_read_result = self . 0. nullable_enum_16 (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnum16 , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnum16 , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableFloatSingle => { let attr_read_result = self . 0. nullable_float_single (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableFloatSingle , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableFloatSingle , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableFloatDouble => { let attr_read_result = self . 0. nullable_float_double (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableFloatDouble , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableFloatDouble , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableOctetString => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableOctetString , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , 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 = 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)))) , tw) , tag ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableOctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableOctetString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: NullableCharString => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableCharString , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableCharString , 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_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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableCharString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableCharString , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: NullableEnumAttr => { let attr_read_result = self . 0. nullable_enum_attr (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnumAttr , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnumAttr , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableStruct => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableStruct , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableStruct , 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_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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableStruct , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableStruct , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: NullableRangeRestrictedInt8u => { let attr_read_result = self . 0. nullable_range_restricted_int_8_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt8u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt8u , false)))) , attr_read_result) ; 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) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt8s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt8s , false)))) , attr_read_result) ; 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) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt16u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt16u , false)))) , attr_read_result) ; 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) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt16s , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt16s , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableGlobalEnum => { let attr_read_result = self . 0. nullable_global_enum (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableGlobalEnum , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableGlobalEnum , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } AttributeId :: NullableGlobalStruct => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableGlobalStruct , false))))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableGlobalStruct , 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_global_struct (& ctx , rs_matter_crate :: tlv :: TLVBuilder :: new (rs_matter_crate :: tlv :: TLVWriteParent :: new (MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableGlobalStruct , false)))) , tw) , tag ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableGlobalStruct , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableGlobalStruct , false)))) , attr_read_result . as_ref () . map (| _ | ())) ; attr_read_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) } AttributeId :: MeiInt8u => { let attr_read_result = self . 0. mei_int_8_u (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: MeiInt8u , false)))) , attr_read_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: MeiInt8u , false)))) , attr_read_result) ; rs_matter_crate :: dm :: Reply :: set (writer , attr_read_result ?) } # [allow (unreachable_code)] other => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: error ! ("Attribute {:?} not supported" , other) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: error ! ("Attribute {:?} not supported" , other) ; Err (rs_matter_crate :: error :: ErrorCode :: AttributeNotFound . into ()) } } } } else { Ok (()) } } # [allow (unreachable_code)] fn write (& self , ctx : impl rs_matter_crate :: dm :: WriteContext ,) -> Result < () , rs_matter_crate :: error :: Error > { ctx . attr () . check_dataver (self . 0 . dataver ()) ? ; if ctx . attr () . is_system () { return Err (rs_matter_crate :: error :: ErrorCode :: InvalidAction . into ()) } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Boolean , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Boolean , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap8 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap8 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap16 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap16 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap32 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap32 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap64 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Bitmap64 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int8u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int8u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int16u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int16u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int24u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int24u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int32u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int32u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int40u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int40u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int48u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int48u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int56u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int56u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int64u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int64u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int8s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int8s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int16s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int16s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int24s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int24s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int32s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int32s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int40s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int40s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int48s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int48s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int56s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int56s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int64s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Int64s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Enum8 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Enum8 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Enum16 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Enum16 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FloatSingle , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FloatSingle , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FloatDouble , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FloatDouble , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: OctetString , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: OctetString , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: ListInt8u => { let attr_data = rs_matter_crate :: dm :: ArrayAttributeWrite :: new (ctx . attr () . list_index . clone () , ctx . data ()) ? ; let attr_write_result = self . 0. set_list_int_8_u (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListInt8u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListInt8u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: ListOctetString => { let attr_data = rs_matter_crate :: dm :: ArrayAttributeWrite :: new (ctx . attr () . list_index . clone () , ctx . data ()) ? ; let attr_write_result = self . 0. set_list_octet_string (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListOctetString , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListOctetString , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: ListStructOctetString => { let attr_data = rs_matter_crate :: dm :: ArrayAttributeWrite :: new (ctx . attr () . list_index . clone () , ctx . data ()) ? ; let attr_write_result = self . 0. set_list_struct_octet_string (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListStructOctetString , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListStructOctetString , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongOctetString , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongOctetString , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: CharString , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: CharString , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongCharString , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: LongCharString , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EpochUs , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EpochUs , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EpochS , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EpochS , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: VendorId , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: VendorId , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: ListNullablesAndOptionalsStruct => { let attr_data = rs_matter_crate :: dm :: ArrayAttributeWrite :: new (ctx . attr () . list_index . clone () , ctx . data ()) ? ; let attr_write_result = self . 0. set_list_nullables_and_optionals_struct (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListNullablesAndOptionalsStruct , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListNullablesAndOptionalsStruct , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EnumAttr , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: EnumAttr , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: StructAttr , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: StructAttr , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt8u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt8u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt8s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt8s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt16u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt16u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt16s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: RangeRestrictedInt16s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: ListLongOctetString => { let attr_data = rs_matter_crate :: dm :: ArrayAttributeWrite :: new (ctx . attr () . list_index . clone () , ctx . data ()) ? ; let attr_write_result = self . 0. set_list_long_octet_string (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListLongOctetString , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListLongOctetString , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: ListFabricScoped => { let attr_data = rs_matter_crate :: dm :: ArrayAttributeWrite :: new (ctx . attr () . list_index . clone () , ctx . data ()) ? ; let attr_write_result = self . 0. set_list_fabric_scoped (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListFabricScoped , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ListFabricScoped , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: TimedWriteBoolean , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: TimedWriteBoolean , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GeneralErrorBoolean , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GeneralErrorBoolean , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ClusterErrorBoolean , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ClusterErrorBoolean , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: GlobalEnum => { let attr_data : TestGlobalEnum = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_global_enum (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GlobalEnum , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GlobalEnum , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: GlobalStruct => { let attr_data : TestGlobalStruct < '_ > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_global_struct (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GlobalStruct , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: GlobalStruct , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: UnsupportedAttributeRequiringAdminPrivilege => { let attr_data : bool = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_unsupported_attribute_requiring_admin_privilege (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: UnsupportedAttributeRequiringAdminPrivilege , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: UnsupportedAttributeRequiringAdminPrivilege , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Unsupported , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: Unsupported , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: ReadFailureCode => { let attr_data : u8 = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_read_failure_code (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ReadFailureCode , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: ReadFailureCode , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: FailureInt32U => { let attr_data : u32 = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_failure_int_32_u (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FailureInt32U , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: FailureInt32U , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableBoolean => { let attr_data : rs_matter_crate :: tlv :: Nullable < bool > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_boolean (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBoolean , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBoolean , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableBitmap8 => { let attr_data : rs_matter_crate :: tlv :: Nullable < Bitmap8MaskMap > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_bitmap_8 (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap8 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap8 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableBitmap16 => { let attr_data : rs_matter_crate :: tlv :: Nullable < Bitmap16MaskMap > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_bitmap_16 (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap16 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap16 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableBitmap32 => { let attr_data : rs_matter_crate :: tlv :: Nullable < Bitmap32MaskMap > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_bitmap_32 (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap32 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap32 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableBitmap64 => { let attr_data : rs_matter_crate :: tlv :: Nullable < Bitmap64MaskMap > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_bitmap_64 (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap64 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableBitmap64 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt8u => { let attr_data : rs_matter_crate :: tlv :: Nullable < u8 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_8_u (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt8u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt8u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt16u => { let attr_data : rs_matter_crate :: tlv :: Nullable < u16 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_16_u (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt16u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt16u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt24u => { let attr_data : rs_matter_crate :: tlv :: Nullable < u32 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_24_u (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt24u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt24u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt32u => { let attr_data : rs_matter_crate :: tlv :: Nullable < u32 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_32_u (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt32u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt32u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt40u => { let attr_data : rs_matter_crate :: tlv :: Nullable < u64 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_40_u (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt40u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt40u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt48u => { let attr_data : rs_matter_crate :: tlv :: Nullable < u64 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_48_u (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt48u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt48u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt56u => { let attr_data : rs_matter_crate :: tlv :: Nullable < u64 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_56_u (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt56u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt56u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt64u => { let attr_data : rs_matter_crate :: tlv :: Nullable < u64 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_64_u (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt64u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt64u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt8s => { let attr_data : rs_matter_crate :: tlv :: Nullable < i8 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_8_s (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt8s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt8s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt16s => { let attr_data : rs_matter_crate :: tlv :: Nullable < i16 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_16_s (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt16s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt16s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt24s => { let attr_data : rs_matter_crate :: tlv :: Nullable < i32 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_24_s (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt24s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt24s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt32s => { let attr_data : rs_matter_crate :: tlv :: Nullable < i32 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_32_s (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt32s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt32s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt40s => { let attr_data : rs_matter_crate :: tlv :: Nullable < i64 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_40_s (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt40s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt40s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt48s => { let attr_data : rs_matter_crate :: tlv :: Nullable < i64 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_48_s (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt48s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt48s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt56s => { let attr_data : rs_matter_crate :: tlv :: Nullable < i64 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_56_s (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt56s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt56s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableInt64s => { let attr_data : rs_matter_crate :: tlv :: Nullable < i64 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_int_64_s (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt64s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableInt64s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableEnum8 => { let attr_data : rs_matter_crate :: tlv :: Nullable < u8 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_enum_8 (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnum8 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnum8 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableEnum16 => { let attr_data : rs_matter_crate :: tlv :: Nullable < u16 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_enum_16 (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnum16 , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnum16 , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableFloatSingle => { let attr_data : rs_matter_crate :: tlv :: Nullable < f32 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_float_single (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableFloatSingle , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableFloatSingle , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableFloatDouble => { let attr_data : rs_matter_crate :: tlv :: Nullable < f64 > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_float_double (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableFloatDouble , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableFloatDouble , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableOctetString => { 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableOctetString , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableOctetString , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableCharString => { 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableCharString , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableCharString , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableEnumAttr => { let attr_data : rs_matter_crate :: tlv :: Nullable < SimpleEnum > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_enum_attr (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnumAttr , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableEnumAttr , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableStruct => { let attr_data : rs_matter_crate :: tlv :: Nullable < SimpleStruct < '_ > > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_struct (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableStruct , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableStruct , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableRangeRestrictedInt8u => { let attr_data : rs_matter_crate :: tlv :: Nullable < u8 > = 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt8u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt8u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableRangeRestrictedInt8s => { let attr_data : rs_matter_crate :: tlv :: Nullable < i8 > = 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt8s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt8s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableRangeRestrictedInt16u => { let attr_data : rs_matter_crate :: tlv :: Nullable < u16 > = 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt16u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt16u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableRangeRestrictedInt16s => { let attr_data : rs_matter_crate :: tlv :: Nullable < i16 > = 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt16s , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableRangeRestrictedInt16s , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: WriteOnlyInt8u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: WriteOnlyInt8u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableGlobalEnum => { let attr_data : rs_matter_crate :: tlv :: Nullable < TestGlobalEnum > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_global_enum (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableGlobalEnum , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableGlobalEnum , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } AttributeId :: NullableGlobalStruct => { let attr_data : rs_matter_crate :: tlv :: Nullable < TestGlobalStruct < '_ > > = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; let attr_write_result = self . 0. set_nullable_global_struct (& ctx , attr_data . clone ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableGlobalStruct , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: NullableGlobalStruct , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: MeiInt8u , false)))) , attr_data , attr_write_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . attr () . endpoint_id , self , MetadataDebug ((AttributeId :: MeiInt8u , false)))) , attr_data , attr_write_result) ; attr_write_result ? ; } other => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: error ! ("Attribute {:?} not supported" , other) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: error ! ("Attribute {:?} not supported" , other) ; return Err (rs_matter_crate :: error :: ErrorCode :: AttributeNotFound . into ()) ; } } Ok (()) } # [allow (unreachable_code)] 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) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: Test))) , cmd_invoke_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: Test))) , cmd_invoke_result) ; cmd_invoke_result ? ; } CommandId :: TestNotHandled => { let cmd_invoke_result = self . 0. handle_test_not_handled (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNotHandled))) , cmd_invoke_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNotHandled))) , cmd_invoke_result) ; cmd_invoke_result ? ; } CommandId :: TestSpecific => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSpecific)))) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSpecific)))) ; 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 ,) ? ,) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSpecific))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSpecific))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestUnknownCommand => { let cmd_invoke_result = self . 0. handle_test_unknown_command (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestUnknownCommand))) , cmd_invoke_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestUnknownCommand))) , cmd_invoke_result) ; cmd_invoke_result ? ; } CommandId :: TestAddArguments => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestAddArguments))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestAddArguments))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestAddArguments))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestAddArguments))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestSimpleArgumentRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSimpleArgumentRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSimpleArgumentRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSimpleArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSimpleArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestStructArrayArgumentRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestStructArrayArgumentRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestStructArrayArgumentRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestStructArrayArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestStructArrayArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestStructArgumentRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestStructArgumentRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestStructArgumentRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestStructArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestStructArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestNestedStructArgumentRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNestedStructArgumentRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNestedStructArgumentRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNestedStructArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNestedStructArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestListStructArgumentRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListStructArgumentRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListStructArgumentRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListStructArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListStructArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestListInt8UArgumentRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListInt8UArgumentRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListInt8UArgumentRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListInt8UArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListInt8UArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestNestedStructListArgumentRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNestedStructListArgumentRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNestedStructListArgumentRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNestedStructListArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNestedStructListArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestListNestedStructListArgumentRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListNestedStructListArgumentRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListNestedStructListArgumentRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListNestedStructListArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListNestedStructListArgumentRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestListInt8UReverseRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListInt8UReverseRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListInt8UReverseRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListInt8UReverseRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestListInt8UReverseRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestEnumsRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEnumsRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEnumsRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEnumsRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEnumsRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestNullableOptionalRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNullableOptionalRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNullableOptionalRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNullableOptionalRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestNullableOptionalRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestComplexNullableOptionalRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestComplexNullableOptionalRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestComplexNullableOptionalRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestComplexNullableOptionalRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestComplexNullableOptionalRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: SimpleStructEchoRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: SimpleStructEchoRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: SimpleStructEchoRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: SimpleStructEchoRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: SimpleStructEchoRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TimedInvokeRequest => { let cmd_invoke_result = self . 0. handle_timed_invoke_request (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TimedInvokeRequest))) , cmd_invoke_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TimedInvokeRequest))) , cmd_invoke_result) ; cmd_invoke_result ? ; } 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 ()) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSimpleOptionalArgumentRequest))) , cmd_data , cmd_invoke_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSimpleOptionalArgumentRequest))) , cmd_data , cmd_invoke_result) ; cmd_invoke_result ? ; } CommandId :: TestEmitTestEventRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEmitTestEventRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEmitTestEventRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEmitTestEventRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEmitTestEventRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestEmitTestFabricScopedEventRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEmitTestFabricScopedEventRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEmitTestFabricScopedEventRequest))) , cmd_data) ; 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 (& ctx , cmd_data , rs_matter_crate :: tlv :: TLVBuilder :: new (rs_matter_crate :: tlv :: TLVWriteParent :: new (MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEmitTestFabricScopedEventRequest))) , tw) , tag ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEmitTestFabricScopedEventRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestEmitTestFabricScopedEventRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestBatchHelperRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestBatchHelperRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestBatchHelperRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestBatchHelperRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestBatchHelperRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestSecondBatchHelperRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSecondBatchHelperRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSecondBatchHelperRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSecondBatchHelperRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestSecondBatchHelperRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: StringEchoRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: StringEchoRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: StringEchoRequest))) , cmd_data) ; let mut writer = reply . with_command (13u32) ? ; 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_string_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 :: StringEchoRequest))) , tw) , tag ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: StringEchoRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: StringEchoRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: GlobalEchoRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: GlobalEchoRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: GlobalEchoRequest))) , cmd_data) ; let mut writer = reply . with_command (14u32) ? ; 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_global_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 :: GlobalEchoRequest))) , tw) , tag ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: GlobalEchoRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: GlobalEchoRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } CommandId :: TestCheckCommandFlags => { let cmd_invoke_result = self . 0. handle_test_check_command_flags (& ctx) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestCheckCommandFlags))) , cmd_invoke_result) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestCheckCommandFlags))) , cmd_invoke_result) ; cmd_invoke_result ? ; } CommandId :: TestDifferentVendorMeiRequest => { let cmd_data = rs_matter_crate :: tlv :: FromTLV :: from_tlv (ctx . data ()) ? ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestDifferentVendorMeiRequest))) , cmd_data) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?}({:?}) -> (build) +" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestDifferentVendorMeiRequest))) , cmd_data) ; 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 ,) ?) ; # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestDifferentVendorMeiRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: debug ! ("{:?} (end) -> {:?}" , MetadataDebug ((ctx . cmd () . endpoint_id , self , MetadataDebug (CommandId :: TestDifferentVendorMeiRequest))) , cmd_invoke_result . as_ref () . map (| _ | ())) ; cmd_invoke_result ? ; rs_matter_crate :: dm :: Reply :: complete (writer) ? } other => { # [cfg (feature = "defmt")] rs_matter_crate :: reexport :: defmt :: error ! ("Command {:?} not supported" , other) ; # [cfg (feature = "log")] rs_matter_crate :: reexport :: log :: error ! ("Command {:?} not supported" , other) ; return Err (rs_matter_crate :: error :: ErrorCode :: CommandNotFound . into ()) ; } } Ok (()) } fn bump_dataver (& self , ctx : impl rs_matter_crate :: dm :: MatchContext) { if ctx . cluster () . map (| c | c == 4294048773u32) . unwrap_or (true) { self . 0 . dataver_changed () ; } } } impl < T , Q > core :: fmt :: Debug for MetadataDebug < (u16 , & HandlerAdaptor < T > , Q) > where T : ClusterHandler , Q : core :: fmt :: Debug , { # [allow (unreachable_code)] fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { write ! (f , "Endpt(0x{:02x})::Cluster::{}(0x{:04x})::{:?}" , self . 0.0 , "UnitTesting" , 4294048773u32 , self . 0.2) } } # [cfg (feature = "defmt")] impl < T , Q > rs_matter_crate :: reexport :: defmt :: Format for MetadataDebug < (u16 , & HandlerAdaptor < T > , Q) > where T : ClusterHandler , Q : rs_matter_crate :: reexport :: defmt :: Format , { # [allow (unreachable_code)] fn format (& self , f : rs_matter_crate :: reexport :: defmt :: Formatter < '_ >) { rs_matter_crate :: reexport :: defmt :: write ! (f , "Endpt(0x{:02x})::Cluster::{}(0x{:04x})::{:?}" , self . 0.0 , "UnitTesting" , 4294048773u32 , self . 0.2) } } impl < T > rs_matter_crate :: dm :: NonBlockingHandler for HandlerAdaptor < T > where T : ClusterHandler , { } # [doc = "Cluster-scoped view onto a [`rs_matter_crate::im::CmdDataArrayBuilder`] for the `UnitTesting` cluster. Empty-request commands push and return `Self`; parameterized commands return the codegen-emitted typed request builder (whose parent chain bypasses the view — close back to the array via Data + CmdData `.end()?`s). `.end()` closes the wrapped array. Command names that would collide with the view's own inherent methods (see `RESERVED_VIEW_METHOD_NAMES` in the codegen — currently `end`, which the WebRTC cluster uses) get a `cmd_` prefix."] pub struct UnitTestingCmdRequestsView < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { array : rs_matter_crate :: im :: CmdDataArrayBuilder < P > , } impl < P > UnitTestingCmdRequestsView < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn test (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; let array = self . array . push () ? . path (endpoint , 4294048773 , 0) ? . data (| w | { w . start_struct (& rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: CmdDataTag :: Data as u8 ,)) ? ; w . end_container () }) ? . end () ? ; Ok (Self { array }) } pub fn test_not_handled (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; let array = self . array . push () ? . path (endpoint , 4294048773 , 1) ? . data (| w | { w . start_struct (& rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: CmdDataTag :: Data as u8 ,)) ? ; w . end_container () }) ? . end () ? ; Ok (Self { array }) } pub fn test_specific (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; let array = self . array . push () ? . path (endpoint , 4294048773 , 2) ? . data (| w | { w . start_struct (& rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: CmdDataTag :: Data as u8 ,)) ? ; w . end_container () }) ? . end () ? ; Ok (Self { array }) } pub fn test_unknown_command (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; let array = self . array . push () ? . path (endpoint , 4294048773 , 3) ? . data (| w | { w . start_struct (& rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: CmdDataTag :: Data as u8 ,)) ? ; w . end_container () }) ? . end () ? ; Ok (Self { array }) } pub fn test_add_arguments (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestAddArgumentsRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 4) ? . data_builder () } pub fn test_simple_argument_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestSimpleArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 5) ? . data_builder () } pub fn test_struct_array_argument_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestStructArrayArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 6) ? . data_builder () } pub fn test_struct_argument_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestStructArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 7) ? . data_builder () } pub fn test_nested_struct_argument_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestNestedStructArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 8) ? . data_builder () } pub fn test_list_struct_argument_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestListStructArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 9) ? . data_builder () } pub fn test_list_int_8_u_argument_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestListInt8UArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 10) ? . data_builder () } pub fn test_nested_struct_list_argument_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestNestedStructListArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 11) ? . data_builder () } pub fn test_list_nested_struct_list_argument_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestListNestedStructListArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 12) ? . data_builder () } pub fn test_list_int_8_u_reverse_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestListInt8UReverseRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 13) ? . data_builder () } pub fn test_enums_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestEnumsRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 14) ? . data_builder () } pub fn test_nullable_optional_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestNullableOptionalRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 15) ? . data_builder () } pub fn test_complex_nullable_optional_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestComplexNullableOptionalRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 16) ? . data_builder () } pub fn simple_struct_echo_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < SimpleStructEchoRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 17) ? . data_builder () } pub fn timed_invoke_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; let array = self . array . push () ? . path (endpoint , 4294048773 , 18) ? . data (| w | { w . start_struct (& rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: CmdDataTag :: Data as u8 ,)) ? ; w . end_container () }) ? . end () ? ; Ok (Self { array }) } pub fn test_simple_optional_argument_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestSimpleOptionalArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 19) ? . data_builder () } pub fn test_emit_test_event_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestEmitTestEventRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 20) ? . data_builder () } pub fn test_emit_test_fabric_scoped_event_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestEmitTestFabricScopedEventRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 21) ? . data_builder () } pub fn test_batch_helper_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestBatchHelperRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 22) ? . data_builder () } pub fn test_second_batch_helper_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestSecondBatchHelperRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 23) ? . data_builder () } pub fn string_echo_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < StringEchoRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 24) ? . data_builder () } pub fn global_echo_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < GlobalEchoRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 25) ? . data_builder () } pub fn test_check_command_flags (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { use rs_matter_crate :: tlv :: TLVWrite ; let array = self . array . push () ? . path (endpoint , 4294048773 , 26) ? . data (| w | { w . start_struct (& rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: CmdDataTag :: Data as u8 ,)) ? ; w . end_container () }) ? . end () ? ; Ok (Self { array }) } pub fn test_different_vendor_mei_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestDifferentVendorMeiRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < P > , 2 , > , 0 , > , rs_matter_crate :: error :: Error , > { self . array . push () ? . path (endpoint , 4294048773 , 4294049962) ? . data_builder () } # [doc = r" Close the wrapped array and return its parent."] pub fn end (self) -> Result < P , rs_matter_crate :: error :: Error > { self . array . end () } } # [doc = "IM-client extension trait for the `UnitTesting` cluster's commands. `use` this trait to call `.unit_testing_inv()` on a [`rs_matter_crate::im::CmdDataArrayBuilder`]; the returned [`UnitTestingCmdRequestsView`] exposes one method per command (cluster-prefix-free). `.end()` on the view closes the wrapped array."] pub trait UnitTestingCmdRequests < P > : Sized where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn unit_testing_inv (self) -> UnitTestingCmdRequestsView < P > ; } impl < P > UnitTestingCmdRequests < P > for rs_matter_crate :: im :: CmdDataArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn unit_testing_inv (self) -> UnitTestingCmdRequestsView < P > { UnitTestingCmdRequestsView { array : self } } } # [doc = "Cluster-scoped view onto an [`rs_matter_crate::im::AttrPathArrayBuilder`] for the `UnitTesting` cluster. Each method pushes one `AttrPath` (cluster ID baked in) and returns `Self` for chaining; `.end()` closes the underlying array. Attribute names that would collide with the view's own inherent methods (see `RESERVED_VIEW_METHOD_NAMES` in the codegen) get an `attr_` prefix."] pub struct UnitTestingAttrReadsView < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { array : rs_matter_crate :: im :: AttrPathArrayBuilder < P > , } impl < P > UnitTestingAttrReadsView < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn boolean (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (0) ? . end () ? ; Ok (Self { array }) } pub fn bitmap_8 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (1) ? . end () ? ; Ok (Self { array }) } pub fn bitmap_16 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (2) ? . end () ? ; Ok (Self { array }) } pub fn bitmap_32 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (3) ? . end () ? ; Ok (Self { array }) } pub fn bitmap_64 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (4) ? . end () ? ; Ok (Self { array }) } pub fn int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (5) ? . end () ? ; Ok (Self { array }) } pub fn int_16_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (6) ? . end () ? ; Ok (Self { array }) } pub fn int_24_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (7) ? . end () ? ; Ok (Self { array }) } pub fn int_32_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (8) ? . end () ? ; Ok (Self { array }) } pub fn int_40_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (9) ? . end () ? ; Ok (Self { array }) } pub fn int_48_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (10) ? . end () ? ; Ok (Self { array }) } pub fn int_56_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (11) ? . end () ? ; Ok (Self { array }) } pub fn int_64_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (12) ? . end () ? ; Ok (Self { array }) } pub fn int_8_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (13) ? . end () ? ; Ok (Self { array }) } pub fn int_16_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (14) ? . end () ? ; Ok (Self { array }) } pub fn int_24_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (15) ? . end () ? ; Ok (Self { array }) } pub fn int_32_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16) ? . end () ? ; Ok (Self { array }) } pub fn int_40_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (17) ? . end () ? ; Ok (Self { array }) } pub fn int_48_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (18) ? . end () ? ; Ok (Self { array }) } pub fn int_56_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (19) ? . end () ? ; Ok (Self { array }) } pub fn int_64_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (20) ? . end () ? ; Ok (Self { array }) } pub fn enum_8 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (21) ? . end () ? ; Ok (Self { array }) } pub fn enum_16 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (22) ? . end () ? ; Ok (Self { array }) } pub fn float_single (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (23) ? . end () ? ; Ok (Self { array }) } pub fn float_double (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (24) ? . end () ? ; Ok (Self { array }) } pub fn octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (25) ? . end () ? ; Ok (Self { array }) } pub fn list_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (26) ? . end () ? ; Ok (Self { array }) } pub fn list_octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (27) ? . end () ? ; Ok (Self { array }) } pub fn list_struct_octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (28) ? . end () ? ; Ok (Self { array }) } pub fn long_octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (29) ? . end () ? ; Ok (Self { array }) } pub fn char_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (30) ? . end () ? ; Ok (Self { array }) } pub fn long_char_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (31) ? . end () ? ; Ok (Self { array }) } pub fn epoch_us (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (32) ? . end () ? ; Ok (Self { array }) } pub fn epoch_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (33) ? . end () ? ; Ok (Self { array }) } pub fn vendor_id (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (34) ? . end () ? ; Ok (Self { array }) } pub fn list_nullables_and_optionals_struct (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (35) ? . end () ? ; Ok (Self { array }) } pub fn enum_attr (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (36) ? . end () ? ; Ok (Self { array }) } pub fn struct_attr (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (37) ? . end () ? ; Ok (Self { array }) } pub fn range_restricted_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (38) ? . end () ? ; Ok (Self { array }) } pub fn range_restricted_int_8_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (39) ? . end () ? ; Ok (Self { array }) } pub fn range_restricted_int_16_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (40) ? . end () ? ; Ok (Self { array }) } pub fn range_restricted_int_16_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (41) ? . end () ? ; Ok (Self { array }) } pub fn list_long_octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (42) ? . end () ? ; Ok (Self { array }) } pub fn list_fabric_scoped (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (43) ? . end () ? ; Ok (Self { array }) } pub fn timed_write_boolean (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (48) ? . end () ? ; Ok (Self { array }) } pub fn general_error_boolean (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (49) ? . end () ? ; Ok (Self { array }) } pub fn cluster_error_boolean (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (50) ? . end () ? ; Ok (Self { array }) } pub fn global_enum (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (51) ? . end () ? ; Ok (Self { array }) } pub fn global_struct (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (52) ? . end () ? ; Ok (Self { array }) } pub fn unsupported_attribute_requiring_admin_privilege (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (254) ? . end () ? ; Ok (Self { array }) } pub fn unsupported (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (255) ? . end () ? ; Ok (Self { array }) } pub fn read_failure_code (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (12288) ? . end () ? ; Ok (Self { array }) } pub fn failure_int_32_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (12289) ? . end () ? ; Ok (Self { array }) } pub fn nullable_boolean (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16384) ? . end () ? ; Ok (Self { array }) } pub fn nullable_bitmap_8 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16385) ? . end () ? ; Ok (Self { array }) } pub fn nullable_bitmap_16 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16386) ? . end () ? ; Ok (Self { array }) } pub fn nullable_bitmap_32 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16387) ? . end () ? ; Ok (Self { array }) } pub fn nullable_bitmap_64 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16388) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16389) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_16_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16390) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_24_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16391) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_32_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16392) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_40_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16393) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_48_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16394) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_56_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16395) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_64_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16396) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_8_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16397) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_16_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16398) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_24_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16399) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_32_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16400) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_40_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16401) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_48_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16402) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_56_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16403) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_64_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16404) ? . end () ? ; Ok (Self { array }) } pub fn nullable_enum_8 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16405) ? . end () ? ; Ok (Self { array }) } pub fn nullable_enum_16 (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16406) ? . end () ? ; Ok (Self { array }) } pub fn nullable_float_single (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16407) ? . end () ? ; Ok (Self { array }) } pub fn nullable_float_double (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16408) ? . end () ? ; Ok (Self { array }) } pub fn nullable_octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16409) ? . end () ? ; Ok (Self { array }) } pub fn nullable_char_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16414) ? . end () ? ; Ok (Self { array }) } pub fn nullable_enum_attr (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16420) ? . end () ? ; Ok (Self { array }) } pub fn nullable_struct (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16421) ? . end () ? ; Ok (Self { array }) } pub fn nullable_range_restricted_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16422) ? . end () ? ; Ok (Self { array }) } pub fn nullable_range_restricted_int_8_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16423) ? . end () ? ; Ok (Self { array }) } pub fn nullable_range_restricted_int_16_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16424) ? . end () ? ; Ok (Self { array }) } pub fn nullable_range_restricted_int_16_s (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16425) ? . end () ? ; Ok (Self { array }) } pub fn write_only_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16426) ? . end () ? ; Ok (Self { array }) } pub fn nullable_global_enum (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16435) ? . end () ? ; Ok (Self { array }) } pub fn nullable_global_struct (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (16436) ? . end () ? ; Ok (Self { array }) } pub fn generated_command_list (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (65528) ? . end () ? ; Ok (Self { array }) } pub fn accepted_command_list (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (65529) ? . end () ? ; Ok (Self { array }) } pub fn attribute_list (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (65531) ? . end () ? ; Ok (Self { array }) } pub fn feature_map (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (65532) ? . end () ? ; Ok (Self { array }) } pub fn cluster_revision (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (65533) ? . end () ? ; Ok (Self { array }) } pub fn mei_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . endpoint (endpoint) ? . cluster (4294048773) ? . attr (4294070017) ? . end () ? ; Ok (Self { array }) } # [doc = r" Close the wrapped array and return its parent."] pub fn end (self) -> Result < P , rs_matter_crate :: error :: Error > { self . array . end () } } # [doc = "IM-client extension trait for the `UnitTesting` cluster's attribute reads. `use` this trait to call `.unit_testing_read()` on an [`rs_matter_crate::im::AttrPathArrayBuilder`]; the returned [`UnitTestingAttrReadsView`] exposes one method per attribute (cluster-prefix-free). `.end()` on the view closes the wrapped array."] pub trait UnitTestingAttrReads < P > : Sized where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn unit_testing_read (self) -> UnitTestingAttrReadsView < P > ; } impl < P > UnitTestingAttrReads < P > for rs_matter_crate :: im :: AttrPathArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn unit_testing_read (self) -> UnitTestingAttrReadsView < P > { UnitTestingAttrReadsView { array : self } } } # [doc = "Cluster-scoped view onto an [`rs_matter_crate::im::AttrDataArrayBuilder`] for the `UnitTesting` cluster. Scalar-valued attrs push and return `Self` for chaining; struct/list-valued attrs return the codegen-emitted typed value builder (whose parent chain bypasses the view — close back to the array via Data + AttrData `.end()?`s). `.end()` closes the wrapped array. Attribute names that would collide with the view's own inherent methods (see `RESERVED_VIEW_METHOD_NAMES` in the codegen) get an `attr_` prefix."] pub struct UnitTestingAttrWritesView < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { array : rs_matter_crate :: im :: AttrDataArrayBuilder < P > , } impl < P > UnitTestingAttrWritesView < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { pub fn boolean (self , endpoint : rs_matter_crate :: dm :: EndptId , value : bool ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 0) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn bitmap_8 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : Bitmap8MaskMap ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 1) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn bitmap_16 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : Bitmap16MaskMap ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 2) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn bitmap_32 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : Bitmap32MaskMap ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 3) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn bitmap_64 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : Bitmap64MaskMap ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 4) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u8 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 5) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_16_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u16 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 6) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_24_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u32 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 7) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_32_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u32 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 8) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_40_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u64 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 9) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_48_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u64 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 10) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_56_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u64 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 11) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_64_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u64 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 12) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_8_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : i8 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 13) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_16_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : i16 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 14) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_24_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : i32 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 15) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_32_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : i32 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_40_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : i64 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 17) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_48_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : i64 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 18) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_56_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : i64 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 19) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn int_64_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : i64 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 20) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn enum_8 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u8 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 21) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn enum_16 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u16 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 22) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn float_single (self , endpoint : rs_matter_crate :: dm :: EndptId , value : f32 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 23) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn float_double (self , endpoint : rs_matter_crate :: dm :: EndptId , value : f64 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 24) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: OctetStr < '_ > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 25) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn list_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < rs_matter_crate :: tlv :: ToTLVArrayBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > , u8 > , rs_matter_crate :: error :: Error > { self . array . push () ? . path (endpoint , 4294048773 , 26) ? . data_builder () } pub fn list_octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < rs_matter_crate :: tlv :: OctetsArrayBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > > , rs_matter_crate :: error :: Error > { self . array . push () ? . path (endpoint , 4294048773 , 27) ? . data_builder () } pub fn list_struct_octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestListStructOctetArrayBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > > , rs_matter_crate :: error :: Error > { self . array . push () ? . path (endpoint , 4294048773 , 28) ? . data_builder () } pub fn long_octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: OctetStr < '_ > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 29) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn char_string (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Utf8Str < '_ > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 30) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn long_char_string (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Utf8Str < '_ > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 31) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn epoch_us (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u64 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 32) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn epoch_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u32 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 33) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn vendor_id (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u16 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 34) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn list_nullables_and_optionals_struct (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < NullablesAndOptionalsStructArrayBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > > , rs_matter_crate :: error :: Error > { self . array . push () ? . path (endpoint , 4294048773 , 35) ? . data_builder () } pub fn enum_attr (self , endpoint : rs_matter_crate :: dm :: EndptId , value : SimpleEnum ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 36) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn struct_attr (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < SimpleStructBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > > , rs_matter_crate :: error :: Error > { self . array . push () ? . path (endpoint , 4294048773 , 37) ? . data_builder () } pub fn range_restricted_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u8 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 38) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn range_restricted_int_8_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : i8 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 39) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn range_restricted_int_16_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u16 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 40) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn range_restricted_int_16_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : i16 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 41) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn list_long_octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < rs_matter_crate :: tlv :: OctetsArrayBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > > , rs_matter_crate :: error :: Error > { self . array . push () ? . path (endpoint , 4294048773 , 42) ? . data_builder () } pub fn list_fabric_scoped (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestFabricScopedArrayBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > > , rs_matter_crate :: error :: Error > { self . array . push () ? . path (endpoint , 4294048773 , 43) ? . data_builder () } pub fn timed_write_boolean (self , endpoint : rs_matter_crate :: dm :: EndptId , value : bool ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 48) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn general_error_boolean (self , endpoint : rs_matter_crate :: dm :: EndptId , value : bool ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 49) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn cluster_error_boolean (self , endpoint : rs_matter_crate :: dm :: EndptId , value : bool ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 50) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn global_enum (self , endpoint : rs_matter_crate :: dm :: EndptId , value : TestGlobalEnum ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 51) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn global_struct (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestGlobalStructBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > > , rs_matter_crate :: error :: Error > { self . array . push () ? . path (endpoint , 4294048773 , 52) ? . data_builder () } pub fn unsupported_attribute_requiring_admin_privilege (self , endpoint : rs_matter_crate :: dm :: EndptId , value : bool ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 254) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn unsupported (self , endpoint : rs_matter_crate :: dm :: EndptId , value : bool ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 255) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn read_failure_code (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u8 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 12288) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn failure_int_32_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u32 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 12289) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_boolean (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < bool > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16384) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_bitmap_8 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < Bitmap8MaskMap > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16385) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_bitmap_16 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < Bitmap16MaskMap > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16386) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_bitmap_32 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < Bitmap32MaskMap > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16387) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_bitmap_64 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < Bitmap64MaskMap > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16388) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u8 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16389) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_16_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u16 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16390) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_24_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u32 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16391) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_32_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u32 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16392) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_40_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u64 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16393) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_48_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u64 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16394) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_56_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u64 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16395) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_64_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u64 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16396) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_8_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < i8 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16397) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_16_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < i16 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16398) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_24_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < i32 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16399) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_32_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < i32 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16400) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_40_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < i64 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16401) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_48_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < i64 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16402) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_56_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < i64 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16403) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_int_64_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < i64 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16404) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_enum_8 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u8 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16405) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_enum_16 (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u16 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16406) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_float_single (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < f32 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16407) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_float_double (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < f64 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16408) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_octet_string (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: OctetStr < '_ > > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16409) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_char_string (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < '_ > > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16414) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_enum_attr (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < SimpleEnum > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16420) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_struct (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < rs_matter_crate :: tlv :: NullableBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > , SimpleStructBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > > > , rs_matter_crate :: error :: Error > { self . array . push () ? . path (endpoint , 4294048773 , 16421) ? . data_builder () } pub fn nullable_range_restricted_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u8 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16422) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_range_restricted_int_8_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < i8 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16423) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_range_restricted_int_16_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < u16 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16424) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_range_restricted_int_16_s (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < i16 > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16425) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn write_only_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u8 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16426) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_global_enum (self , endpoint : rs_matter_crate :: dm :: EndptId , value : rs_matter_crate :: tlv :: Nullable < TestGlobalEnum > ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 16435) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } pub fn nullable_global_struct (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < rs_matter_crate :: tlv :: NullableBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > , TestGlobalStructBuilder < rs_matter_crate :: im :: AttrDataBuilder < rs_matter_crate :: im :: AttrDataArrayBuilder < P > , 3 > > > , rs_matter_crate :: error :: Error > { self . array . push () ? . path (endpoint , 4294048773 , 16436) ? . data_builder () } pub fn mei_int_8_u (self , endpoint : rs_matter_crate :: dm :: EndptId , value : u8 ,) -> Result < Self , rs_matter_crate :: error :: Error > { let array = self . array . push () ? . path (endpoint , 4294048773 , 4294070017) ? . data (| w | rs_matter_crate :: tlv :: ToTLV :: to_tlv (& value , & rs_matter_crate :: tlv :: TLVTag :: Context (rs_matter_crate :: im :: AttrDataTag :: Data as u8 ,) , w ,)) ? . end () ? ; Ok (Self { array }) } # [doc = r" Close the wrapped array and return its parent."] pub fn end (self) -> Result < P , rs_matter_crate :: error :: Error > { self . array . end () } } # [doc = "IM-client extension trait for the `UnitTesting` cluster's attribute writes. `use` this trait to call `.unit_testing_write()` on an [`rs_matter_crate::im::AttrDataArrayBuilder`]; the returned [`UnitTestingAttrWritesView`] exposes one method per writable attribute (cluster-prefix-free). `.end()` on the view closes the wrapped array."] pub trait UnitTestingAttrWrites < P > : Sized where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn unit_testing_write (self) -> UnitTestingAttrWritesView < P > ; } impl < P > UnitTestingAttrWrites < P > for rs_matter_crate :: im :: AttrDataArrayBuilder < P > where P : rs_matter_crate :: tlv :: TLVBuilderParent , { fn unit_testing_write (self) -> UnitTestingAttrWritesView < P > { UnitTestingAttrWritesView { array : self } } } # [doc = "Cluster-scoped response view onto a [`rs_matter_crate::im::InvokeResp`] for the `UnitTesting` cluster. Each method returns an iterator of `(EndptId, Result)` over the entries in `invoke_responses` whose path matches that command. Command names that would collide with the view's own inherent methods (see `RESERVED_VIEW_METHOD_NAMES` in the codegen) get a `cmd_` prefix."] pub struct UnitTestingCmdResponsesView < 'a , 'r > { resp : & 'r rs_matter_crate :: im :: InvokeResp < 'a > , } impl < 'a , 'r > UnitTestingCmdResponsesView < 'a , 'r > { pub fn test (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 0) } pub fn test_not_handled (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 1) } pub fn test_specific (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestSpecificResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestSpecificResponse < 'a >> (4294048773 , 2) } pub fn test_unknown_command (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 3) } pub fn test_add_arguments (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestAddArgumentsResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestAddArgumentsResponse < 'a >> (4294048773 , 4) } pub fn test_simple_argument_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestSimpleArgumentResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestSimpleArgumentResponse < 'a >> (4294048773 , 5) } pub fn test_struct_array_argument_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestStructArrayArgumentResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestStructArrayArgumentResponse < 'a >> (4294048773 , 6) } pub fn test_struct_argument_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < BooleanResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < BooleanResponse < 'a >> (4294048773 , 7) } pub fn test_nested_struct_argument_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < BooleanResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < BooleanResponse < 'a >> (4294048773 , 8) } pub fn test_list_struct_argument_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < BooleanResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < BooleanResponse < 'a >> (4294048773 , 9) } pub fn test_list_int_8_u_argument_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < BooleanResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < BooleanResponse < 'a >> (4294048773 , 10) } pub fn test_nested_struct_list_argument_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < BooleanResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < BooleanResponse < 'a >> (4294048773 , 11) } pub fn test_list_nested_struct_list_argument_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < BooleanResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < BooleanResponse < 'a >> (4294048773 , 12) } pub fn test_list_int_8_u_reverse_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestListInt8UReverseResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestListInt8UReverseResponse < 'a >> (4294048773 , 13) } pub fn test_enums_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestEnumsResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestEnumsResponse < 'a >> (4294048773 , 14) } pub fn test_nullable_optional_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestNullableOptionalResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestNullableOptionalResponse < 'a >> (4294048773 , 15) } pub fn test_complex_nullable_optional_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestComplexNullableOptionalResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestComplexNullableOptionalResponse < 'a >> (4294048773 , 16) } pub fn simple_struct_echo_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < SimpleStructResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < SimpleStructResponse < 'a >> (4294048773 , 17) } pub fn timed_invoke_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 18) } pub fn test_simple_optional_argument_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 19) } pub fn test_emit_test_event_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestEmitTestEventResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestEmitTestEventResponse < 'a >> (4294048773 , 20) } pub fn test_emit_test_fabric_scoped_event_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestEmitTestFabricScopedEventResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestEmitTestFabricScopedEventResponse < 'a >> (4294048773 , 21) } pub fn test_batch_helper_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestBatchHelperResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestBatchHelperResponse < 'a >> (4294048773 , 22) } pub fn test_second_batch_helper_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestBatchHelperResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestBatchHelperResponse < 'a >> (4294048773 , 23) } pub fn string_echo_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < StringEchoResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < StringEchoResponse < 'a >> (4294048773 , 24) } pub fn global_echo_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < GlobalEchoResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < GlobalEchoResponse < 'a >> (4294048773 , 25) } pub fn test_check_command_flags (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 26) } pub fn test_different_vendor_mei_request (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestDifferentVendorMeiResponse < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . responses :: < TestDifferentVendorMeiResponse < 'a >> (4294048773 , 4294049962) } } # [doc = "IM-client extension trait for extracting `UnitTesting`-cluster command responses out of a generic [`rs_matter_crate::im::InvokeResp`]. `use` this trait to call `.unit_testing_inv_resp()` on an `InvokeResp`; the returned [`UnitTestingCmdResponsesView`] exposes one iterator method per command, each yielding `(EndptId, Result<, Error>)` — see [`rs_matter_crate::im::InvokeResp::responses`] / [`rs_matter_crate::im::InvokeResp::statuses`] for the per-entry semantics."] pub trait UnitTestingCmdResponses < 'a > { fn unit_testing_inv_resp (& self) -> UnitTestingCmdResponsesView < 'a , '_ > ; } impl < 'a > UnitTestingCmdResponses < 'a > for rs_matter_crate :: im :: InvokeResp < 'a > { fn unit_testing_inv_resp (& self) -> UnitTestingCmdResponsesView < 'a , '_ > { UnitTestingCmdResponsesView { resp : self } } } # [doc = "Cluster-scoped response view onto a [`rs_matter_crate::im::ReportDataResp`] for the `UnitTesting` cluster. Each method returns an iterator of `(EndptId, Result)` over the entries in `attr_reports` whose path matches that attribute. Attribute names that would collide with the view's own inherent methods (see `RESERVED_VIEW_METHOD_NAMES` in the codegen) get an `attr_` prefix."] pub struct UnitTestingAttrResponsesView < 'a , 'r > { resp : & 'r rs_matter_crate :: im :: ReportDataResp < 'a > , } impl < 'a , 'r > UnitTestingAttrResponsesView < 'a , 'r > { pub fn boolean (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < bool , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < bool > (4294048773 , 0) } pub fn bitmap_8 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < Bitmap8MaskMap , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < Bitmap8MaskMap > (4294048773 , 1) } pub fn bitmap_16 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < Bitmap16MaskMap , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < Bitmap16MaskMap > (4294048773 , 2) } pub fn bitmap_32 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < Bitmap32MaskMap , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < Bitmap32MaskMap > (4294048773 , 3) } pub fn bitmap_64 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < Bitmap64MaskMap , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < Bitmap64MaskMap > (4294048773 , 4) } pub fn int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u8 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u8 > (4294048773 , 5) } pub fn int_16_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u16 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u16 > (4294048773 , 6) } pub fn int_24_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u32 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u32 > (4294048773 , 7) } pub fn int_32_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u32 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u32 > (4294048773 , 8) } pub fn int_40_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u64 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u64 > (4294048773 , 9) } pub fn int_48_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u64 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u64 > (4294048773 , 10) } pub fn int_56_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u64 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u64 > (4294048773 , 11) } pub fn int_64_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u64 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u64 > (4294048773 , 12) } pub fn int_8_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < i8 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < i8 > (4294048773 , 13) } pub fn int_16_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < i16 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < i16 > (4294048773 , 14) } pub fn int_24_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < i32 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < i32 > (4294048773 , 15) } pub fn int_32_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < i32 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < i32 > (4294048773 , 16) } pub fn int_40_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < i64 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < i64 > (4294048773 , 17) } pub fn int_48_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < i64 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < i64 > (4294048773 , 18) } pub fn int_56_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < i64 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < i64 > (4294048773 , 19) } pub fn int_64_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < i64 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < i64 > (4294048773 , 20) } pub fn enum_8 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u8 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u8 > (4294048773 , 21) } pub fn enum_16 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u16 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u16 > (4294048773 , 22) } pub fn float_single (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < f32 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < f32 > (4294048773 , 23) } pub fn float_double (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < f64 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < f64 > (4294048773 , 24) } pub fn octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: OctetStr < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: OctetStr < 'a > > (4294048773 , 25) } pub fn list_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: TLVArray < 'a , u8 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: TLVArray < 'a , u8 > > (4294048773 , 26) } pub fn list_octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: TLVArray < 'a , rs_matter_crate :: tlv :: OctetStr < 'a > > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: TLVArray < 'a , rs_matter_crate :: tlv :: OctetStr < 'a > > > (4294048773 , 27) } pub fn list_struct_octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: TLVArray < 'a , TestListStructOctet < 'a > > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: TLVArray < 'a , TestListStructOctet < 'a > > > (4294048773 , 28) } pub fn long_octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: OctetStr < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: OctetStr < 'a > > (4294048773 , 29) } pub fn char_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Utf8Str < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Utf8Str < 'a > > (4294048773 , 30) } pub fn long_char_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Utf8Str < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Utf8Str < 'a > > (4294048773 , 31) } pub fn epoch_us (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u64 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u64 > (4294048773 , 32) } pub fn epoch_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u32 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u32 > (4294048773 , 33) } pub fn vendor_id (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u16 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u16 > (4294048773 , 34) } pub fn list_nullables_and_optionals_struct (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: TLVArray < 'a , NullablesAndOptionalsStruct < 'a > > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: TLVArray < 'a , NullablesAndOptionalsStruct < 'a > > > (4294048773 , 35) } pub fn enum_attr (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < SimpleEnum , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < SimpleEnum > (4294048773 , 36) } pub fn struct_attr (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < SimpleStruct < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < SimpleStruct < 'a > > (4294048773 , 37) } pub fn range_restricted_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u8 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u8 > (4294048773 , 38) } pub fn range_restricted_int_8_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < i8 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < i8 > (4294048773 , 39) } pub fn range_restricted_int_16_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u16 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u16 > (4294048773 , 40) } pub fn range_restricted_int_16_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < i16 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < i16 > (4294048773 , 41) } pub fn list_long_octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: TLVArray < 'a , rs_matter_crate :: tlv :: OctetStr < 'a > > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: TLVArray < 'a , rs_matter_crate :: tlv :: OctetStr < 'a > > > (4294048773 , 42) } pub fn list_fabric_scoped (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: TLVArray < 'a , TestFabricScoped < 'a > > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: TLVArray < 'a , TestFabricScoped < 'a > > > (4294048773 , 43) } pub fn timed_write_boolean (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < bool , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < bool > (4294048773 , 48) } pub fn general_error_boolean (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < bool , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < bool > (4294048773 , 49) } pub fn cluster_error_boolean (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < bool , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < bool > (4294048773 , 50) } pub fn global_enum (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestGlobalEnum , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < TestGlobalEnum > (4294048773 , 51) } pub fn global_struct (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < TestGlobalStruct < 'a > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < TestGlobalStruct < 'a > > (4294048773 , 52) } pub fn unsupported_attribute_requiring_admin_privilege (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < bool , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < bool > (4294048773 , 254) } pub fn unsupported (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < bool , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < bool > (4294048773 , 255) } pub fn read_failure_code (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u8 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u8 > (4294048773 , 12288) } pub fn failure_int_32_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u32 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u32 > (4294048773 , 12289) } pub fn nullable_boolean (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < bool > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < bool > > (4294048773 , 16384) } pub fn nullable_bitmap_8 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < Bitmap8MaskMap > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < Bitmap8MaskMap > > (4294048773 , 16385) } pub fn nullable_bitmap_16 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < Bitmap16MaskMap > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < Bitmap16MaskMap > > (4294048773 , 16386) } pub fn nullable_bitmap_32 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < Bitmap32MaskMap > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < Bitmap32MaskMap > > (4294048773 , 16387) } pub fn nullable_bitmap_64 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < Bitmap64MaskMap > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < Bitmap64MaskMap > > (4294048773 , 16388) } pub fn nullable_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u8 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u8 > > (4294048773 , 16389) } pub fn nullable_int_16_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u16 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u16 > > (4294048773 , 16390) } pub fn nullable_int_24_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u32 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u32 > > (4294048773 , 16391) } pub fn nullable_int_32_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u32 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u32 > > (4294048773 , 16392) } pub fn nullable_int_40_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u64 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u64 > > (4294048773 , 16393) } pub fn nullable_int_48_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u64 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u64 > > (4294048773 , 16394) } pub fn nullable_int_56_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u64 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u64 > > (4294048773 , 16395) } pub fn nullable_int_64_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u64 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u64 > > (4294048773 , 16396) } pub fn nullable_int_8_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < i8 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < i8 > > (4294048773 , 16397) } pub fn nullable_int_16_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < i16 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < i16 > > (4294048773 , 16398) } pub fn nullable_int_24_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < i32 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < i32 > > (4294048773 , 16399) } pub fn nullable_int_32_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < i32 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < i32 > > (4294048773 , 16400) } pub fn nullable_int_40_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < i64 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < i64 > > (4294048773 , 16401) } pub fn nullable_int_48_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < i64 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < i64 > > (4294048773 , 16402) } pub fn nullable_int_56_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < i64 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < i64 > > (4294048773 , 16403) } pub fn nullable_int_64_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < i64 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < i64 > > (4294048773 , 16404) } pub fn nullable_enum_8 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u8 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u8 > > (4294048773 , 16405) } pub fn nullable_enum_16 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u16 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u16 > > (4294048773 , 16406) } pub fn nullable_float_single (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < f32 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < f32 > > (4294048773 , 16407) } pub fn nullable_float_double (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < f64 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < f64 > > (4294048773 , 16408) } pub fn nullable_octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: OctetStr < 'a > > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: OctetStr < 'a > > > (4294048773 , 16409) } pub fn nullable_char_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < 'a > > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < rs_matter_crate :: tlv :: Utf8Str < 'a > > > (4294048773 , 16414) } pub fn nullable_enum_attr (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < SimpleEnum > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < SimpleEnum > > (4294048773 , 16420) } pub fn nullable_struct (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < SimpleStruct < 'a > > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < SimpleStruct < 'a > > > (4294048773 , 16421) } pub fn nullable_range_restricted_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u8 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u8 > > (4294048773 , 16422) } pub fn nullable_range_restricted_int_8_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < i8 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < i8 > > (4294048773 , 16423) } pub fn nullable_range_restricted_int_16_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < u16 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < u16 > > (4294048773 , 16424) } pub fn nullable_range_restricted_int_16_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < i16 > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < i16 > > (4294048773 , 16425) } pub fn write_only_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u8 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u8 > (4294048773 , 16426) } pub fn nullable_global_enum (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < TestGlobalEnum > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < TestGlobalEnum > > (4294048773 , 16435) } pub fn nullable_global_struct (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: Nullable < TestGlobalStruct < 'a > > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: Nullable < TestGlobalStruct < 'a > > > (4294048773 , 16436) } pub fn generated_command_list (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: TLVArray < 'a , rs_matter_crate :: im :: CmdId > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: TLVArray < 'a , rs_matter_crate :: im :: CmdId > > (4294048773 , 65528) } pub fn accepted_command_list (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: TLVArray < 'a , rs_matter_crate :: im :: CmdId > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: TLVArray < 'a , rs_matter_crate :: im :: CmdId > > (4294048773 , 65529) } pub fn attribute_list (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < rs_matter_crate :: tlv :: TLVArray < 'a , rs_matter_crate :: im :: AttrId > , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < rs_matter_crate :: tlv :: TLVArray < 'a , rs_matter_crate :: im :: AttrId > > (4294048773 , 65531) } pub fn feature_map (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u32 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u32 > (4294048773 , 65532) } pub fn cluster_revision (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u16 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u16 > (4294048773 , 65533) } pub fn mei_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < u8 , rs_matter_crate :: error :: Error > ,) > + use < '_ , 'a , 'r > { self . resp . attrs :: < u8 > (4294048773 , 4294070017) } } # [doc = "IM-client extension trait for extracting `UnitTesting`-cluster attribute reports out of a generic [`rs_matter_crate::im::ReportDataResp`]. `use` this trait to call `.unit_testing_read_resp()` on a `ReportDataResp`; the returned [`UnitTestingAttrResponsesView`] exposes one iterator method per attribute (scalar, string, struct and list alike), each yielding `(EndptId, Result)`. The item type borrows the response, so string/struct/list attributes come back as `Utf8Str<'a>`/`OctetStr<'a>`, the codegen struct wrapper `Foo<'a>`, or `TLVArray<'a, _>` respectively."] pub trait UnitTestingAttrResponses < 'a > { fn unit_testing_read_resp (& self) -> UnitTestingAttrResponsesView < 'a , '_ > ; } impl < 'a > UnitTestingAttrResponses < 'a > for rs_matter_crate :: im :: ReportDataResp < 'a > { fn unit_testing_read_resp (& self) -> UnitTestingAttrResponsesView < 'a , '_ > { UnitTestingAttrResponsesView { resp : self } } } # [doc = "Cluster-scoped write-status view onto a [`rs_matter_crate::im::WriteResp`] for the `UnitTesting` cluster. Each method returns an iterator of `(EndptId, Result<(), Error>)` over the entries in `write_responses` whose path matches that attribute. Attribute names that would collide with the view's own inherent methods (see `RESERVED_VIEW_METHOD_NAMES` in the codegen) get an `attr_` prefix."] pub struct UnitTestingWriteResponsesView < 'a , 'r > { resp : & 'r rs_matter_crate :: im :: WriteResp < 'a > , } impl < 'a , 'r > UnitTestingWriteResponsesView < 'a , 'r > { pub fn boolean (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 0) } pub fn bitmap_8 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 1) } pub fn bitmap_16 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 2) } pub fn bitmap_32 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 3) } pub fn bitmap_64 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 4) } pub fn int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 5) } pub fn int_16_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 6) } pub fn int_24_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 7) } pub fn int_32_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 8) } pub fn int_40_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 9) } pub fn int_48_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 10) } pub fn int_56_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 11) } pub fn int_64_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 12) } pub fn int_8_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 13) } pub fn int_16_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 14) } pub fn int_24_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 15) } pub fn int_32_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16) } pub fn int_40_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 17) } pub fn int_48_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 18) } pub fn int_56_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 19) } pub fn int_64_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 20) } pub fn enum_8 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 21) } pub fn enum_16 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 22) } pub fn float_single (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 23) } pub fn float_double (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 24) } pub fn octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 25) } pub fn list_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 26) } pub fn list_octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 27) } pub fn list_struct_octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 28) } pub fn long_octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 29) } pub fn char_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 30) } pub fn long_char_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 31) } pub fn epoch_us (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 32) } pub fn epoch_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 33) } pub fn vendor_id (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 34) } pub fn list_nullables_and_optionals_struct (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 35) } pub fn enum_attr (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 36) } pub fn struct_attr (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 37) } pub fn range_restricted_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 38) } pub fn range_restricted_int_8_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 39) } pub fn range_restricted_int_16_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 40) } pub fn range_restricted_int_16_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 41) } pub fn list_long_octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 42) } pub fn list_fabric_scoped (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 43) } pub fn timed_write_boolean (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 48) } pub fn general_error_boolean (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 49) } pub fn cluster_error_boolean (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 50) } pub fn global_enum (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 51) } pub fn global_struct (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 52) } pub fn unsupported_attribute_requiring_admin_privilege (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 254) } pub fn unsupported (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 255) } pub fn read_failure_code (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 12288) } pub fn failure_int_32_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 12289) } pub fn nullable_boolean (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16384) } pub fn nullable_bitmap_8 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16385) } pub fn nullable_bitmap_16 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16386) } pub fn nullable_bitmap_32 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16387) } pub fn nullable_bitmap_64 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16388) } pub fn nullable_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16389) } pub fn nullable_int_16_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16390) } pub fn nullable_int_24_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16391) } pub fn nullable_int_32_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16392) } pub fn nullable_int_40_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16393) } pub fn nullable_int_48_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16394) } pub fn nullable_int_56_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16395) } pub fn nullable_int_64_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16396) } pub fn nullable_int_8_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16397) } pub fn nullable_int_16_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16398) } pub fn nullable_int_24_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16399) } pub fn nullable_int_32_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16400) } pub fn nullable_int_40_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16401) } pub fn nullable_int_48_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16402) } pub fn nullable_int_56_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16403) } pub fn nullable_int_64_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16404) } pub fn nullable_enum_8 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16405) } pub fn nullable_enum_16 (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16406) } pub fn nullable_float_single (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16407) } pub fn nullable_float_double (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16408) } pub fn nullable_octet_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16409) } pub fn nullable_char_string (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16414) } pub fn nullable_enum_attr (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16420) } pub fn nullable_struct (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16421) } pub fn nullable_range_restricted_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16422) } pub fn nullable_range_restricted_int_8_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16423) } pub fn nullable_range_restricted_int_16_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16424) } pub fn nullable_range_restricted_int_16_s (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16425) } pub fn write_only_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16426) } pub fn nullable_global_enum (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16435) } pub fn nullable_global_struct (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 16436) } pub fn mei_int_8_u (& self ,) -> impl Iterator < Item = (rs_matter_crate :: dm :: EndptId , Result < () , rs_matter_crate :: error :: Error > ,) > + '_ { self . resp . statuses (4294048773 , 4294070017) } } # [doc = "IM-client extension trait for extracting `UnitTesting`-cluster per-attribute write statuses out of a generic [`rs_matter_crate::im::WriteResp`]. `use` this trait to call `.unit_testing_write_resp()` on a `WriteResp`; the returned [`UnitTestingWriteResponsesView`] exposes one iterator method per writable attribute, each yielding `(EndptId, Result<(), Error>)`."] pub trait UnitTestingWriteResponses < 'a > { fn unit_testing_write_resp (& self) -> UnitTestingWriteResponsesView < 'a , '_ > ; } impl < 'a > UnitTestingWriteResponses < 'a > for rs_matter_crate :: im :: WriteResp < 'a > { fn unit_testing_write_resp (& self) -> UnitTestingWriteResponsesView < 'a , '_ > { UnitTestingWriteResponsesView { resp : self } } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestSpecificResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestSpecificResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestSpecificResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestSpecificResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestSpecificResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestAddArgumentsResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestAddArgumentsResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestAddArgumentsResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestAddArgumentsResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestAddArgumentsResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestSimpleArgumentResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestSimpleArgumentResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestSimpleArgumentResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestSimpleArgumentResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestSimpleArgumentResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestStructArrayArgumentResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestStructArrayArgumentResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestStructArrayArgumentResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestStructArrayArgumentResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestStructArrayArgumentResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `BooleanResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`BooleanResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct BooleanResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > BooleanResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < BooleanResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestListInt8UReverseResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestListInt8UReverseResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestListInt8UReverseResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestListInt8UReverseResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestListInt8UReverseResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestEnumsResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestEnumsResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestEnumsResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestEnumsResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestEnumsResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestNullableOptionalResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestNullableOptionalResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestNullableOptionalResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestNullableOptionalResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestNullableOptionalResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestComplexNullableOptionalResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestComplexNullableOptionalResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestComplexNullableOptionalResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestComplexNullableOptionalResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestComplexNullableOptionalResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `SimpleStructResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`SimpleStructResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct SimpleStructResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > SimpleStructResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < SimpleStructResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestEmitTestEventResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestEmitTestEventResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestEmitTestEventResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestEmitTestEventResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestEmitTestEventResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestEmitTestFabricScopedEventResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestEmitTestFabricScopedEventResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestEmitTestFabricScopedEventResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestEmitTestFabricScopedEventResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestEmitTestFabricScopedEventResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestBatchHelperResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestBatchHelperResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestBatchHelperResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestBatchHelperResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestBatchHelperResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `StringEchoResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`StringEchoResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct StringEchoResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > StringEchoResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < StringEchoResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `GlobalEchoResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`GlobalEchoResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct GlobalEchoResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > GlobalEchoResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < GlobalEchoResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Single-shot handle wrapping the [`InvokeRespChunk`] of a `TestDifferentVendorMeiResponse` response. Holds the exchange's RX buffer alive; `response()` parses the embedded `CommandDataIB` into a borrowed [`TestDifferentVendorMeiResponse`]. The trailing `StatusResponse(Success)` is sent when the caller `.complete().await?`s the handle.\n\nSingle-command invokes never chunk per Matter Core spec §10.7.10, so a single `response()` call is sufficient."] pub struct TestDifferentVendorMeiResponseHandle < 'a > { chunk : rs_matter_crate :: im :: client :: InvokeRespChunk < 'a > , } impl < 'a > TestDifferentVendorMeiResponseHandle < 'a > { # [doc = r" Borrowed access to the parsed response. The returned"] # [doc = r" value points into the exchange's RX buffer, which"] # [doc = r" stays valid until this handle is dropped or"] # [doc = r" `.complete()`d."] pub fn response (& self) -> Result < TestDifferentVendorMeiResponse < '_ > , rs_matter_crate :: error :: Error > { let invoke_resp = self . chunk . response () ? . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let invoke_responses = invoke_resp . invoke_responses . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let cmd_resp = invoke_responses . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; match cmd_resp { rs_matter_crate :: im :: CmdResp :: Cmd (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: CmdResp :: Status (s) => { Err (s . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } } # [doc = r" Send the trailing `StatusResponse(Success)` and close"] # [doc = r" the exchange. Call this once after the borrowed"] # [doc = r" response is no longer needed. Forgetting it lets the"] # [doc = r" peer time out and resend — functional but wasteful."] pub async fn complete (self) -> Result < () , rs_matter_crate :: error :: Error > { let mut chunk = self . chunk ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } } # [doc = "Per-exchange view onto the `UnitTesting` cluster's client operations. Returned by [`UnitTestingClient::unit_testing`]. Each method consumes the view (and therefore the underlying [`rs_matter_crate::transport::exchange::Exchange`]) — one exchange is one IM transaction."] pub struct UnitTestingClientView < 'a > { exchange : rs_matter_crate :: transport :: exchange :: Exchange < 'a > , } impl < 'a > UnitTestingClientView < 'a > { pub async fn test (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < () , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let mut chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { msg . invoke_requests () ? . unit_testing_inv () . test (endpoint) ? . end () ? . end () }) . await ? ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } pub async fn test_not_handled (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < () , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let mut chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { msg . invoke_requests () ? . unit_testing_inv () . test_not_handled (endpoint) ? . end () ? . end () }) . await ? ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } pub async fn test_specific (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < TestSpecificResponseHandle < 'a > , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { msg . invoke_requests () ? . unit_testing_inv () . test_specific (endpoint) ? . end () ? . end () }) . await ? ; Ok (TestSpecificResponseHandle { chunk }) } pub async fn test_unknown_command (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < () , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let mut chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { msg . invoke_requests () ? . unit_testing_inv () . test_unknown_command (endpoint) ? . end () ? . end () }) . await ? ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } pub async fn test_add_arguments < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestAddArgumentsResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestAddArgumentsRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_add_arguments (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestAddArgumentsResponseHandle { chunk }) } pub async fn test_simple_argument_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestSimpleArgumentResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestSimpleArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_simple_argument_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestSimpleArgumentResponseHandle { chunk }) } pub async fn test_struct_array_argument_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestStructArrayArgumentResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestStructArrayArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_struct_array_argument_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestStructArrayArgumentResponseHandle { chunk }) } pub async fn test_struct_argument_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < BooleanResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestStructArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_struct_argument_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (BooleanResponseHandle { chunk }) } pub async fn test_nested_struct_argument_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < BooleanResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestNestedStructArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_nested_struct_argument_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (BooleanResponseHandle { chunk }) } pub async fn test_list_struct_argument_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < BooleanResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestListStructArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_list_struct_argument_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (BooleanResponseHandle { chunk }) } pub async fn test_list_int_8_u_argument_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < BooleanResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestListInt8UArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_list_int_8_u_argument_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (BooleanResponseHandle { chunk }) } pub async fn test_nested_struct_list_argument_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < BooleanResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestNestedStructListArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_nested_struct_list_argument_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (BooleanResponseHandle { chunk }) } pub async fn test_list_nested_struct_list_argument_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < BooleanResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestListNestedStructListArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_list_nested_struct_list_argument_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (BooleanResponseHandle { chunk }) } pub async fn test_list_int_8_u_reverse_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestListInt8UReverseResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestListInt8UReverseRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_list_int_8_u_reverse_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestListInt8UReverseResponseHandle { chunk }) } pub async fn test_enums_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestEnumsResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestEnumsRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_enums_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestEnumsResponseHandle { chunk }) } pub async fn test_nullable_optional_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestNullableOptionalResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestNullableOptionalRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_nullable_optional_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestNullableOptionalResponseHandle { chunk }) } pub async fn test_complex_nullable_optional_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestComplexNullableOptionalResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestComplexNullableOptionalRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_complex_nullable_optional_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestComplexNullableOptionalResponseHandle { chunk }) } pub async fn simple_struct_echo_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < SimpleStructResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (SimpleStructEchoRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . simple_struct_echo_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (SimpleStructResponseHandle { chunk }) } pub async fn timed_invoke_request (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < () , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let mut chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { msg . invoke_requests () ? . unit_testing_inv () . timed_invoke_request (endpoint) ? . end () ? . end () }) . await ? ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } pub async fn test_simple_optional_argument_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < () , rs_matter_crate :: error :: Error > where F : FnMut (TestSimpleOptionalArgumentRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let mut chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_simple_optional_argument_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } pub async fn test_emit_test_event_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestEmitTestEventResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestEmitTestEventRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_emit_test_event_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestEmitTestEventResponseHandle { chunk }) } pub async fn test_emit_test_fabric_scoped_event_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestEmitTestFabricScopedEventResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestEmitTestFabricScopedEventRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_emit_test_fabric_scoped_event_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestEmitTestFabricScopedEventResponseHandle { chunk }) } pub async fn test_batch_helper_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestBatchHelperResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestBatchHelperRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_batch_helper_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestBatchHelperResponseHandle { chunk }) } pub async fn test_second_batch_helper_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestBatchHelperResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestSecondBatchHelperRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_second_batch_helper_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestBatchHelperResponseHandle { chunk }) } pub async fn string_echo_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < StringEchoResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (StringEchoRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . string_echo_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (StringEchoResponseHandle { chunk }) } pub async fn global_echo_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < GlobalEchoResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (GlobalEchoRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . global_echo_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (GlobalEchoResponseHandle { chunk }) } pub async fn test_check_command_flags (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < () , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let mut chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { msg . invoke_requests () ? . unit_testing_inv () . test_check_command_flags (endpoint) ? . end () ? . end () }) . await ? ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (()) } pub async fn test_different_vendor_mei_request < F > (self , endpoint : rs_matter_crate :: dm :: EndptId , mut request : F ,) -> Result < TestDifferentVendorMeiResponseHandle < 'a > , rs_matter_crate :: error :: Error > where F : FnMut (TestDifferentVendorMeiRequestRequestBuilder < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , 0 , > ,) -> Result < rs_matter_crate :: im :: CmdDataBuilder < rs_matter_crate :: im :: CmdDataArrayBuilder < rs_matter_crate :: im :: InvReqBuilder < rs_matter_crate :: im :: client :: InvokeSender < 'a > , 3 > , > , 2 , > , rs_matter_crate :: error :: Error , > , { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingCmdRequests as _Cmds ; let chunk = _ImClient :: invoke_with (self . exchange , None , | msg | { let view = msg . invoke_requests () ? . unit_testing_inv () ; let req_builder = view . test_different_vendor_mei_request (endpoint) ? ; let cmd_data = request (req_builder) ? ; cmd_data . end () ? . end () ? . end () }) . await ? ; Ok (TestDifferentVendorMeiResponseHandle { chunk }) } pub async fn boolean_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < bool , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . boolean (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < bool , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn bitmap_8_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Bitmap8MaskMap , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . bitmap_8 (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < Bitmap8MaskMap , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn bitmap_16_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Bitmap16MaskMap , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . bitmap_16 (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < Bitmap16MaskMap , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn bitmap_32_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Bitmap32MaskMap , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . bitmap_32 (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < Bitmap32MaskMap , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn bitmap_64_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < Bitmap64MaskMap , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . bitmap_64 (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < Bitmap64MaskMap , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_8_u_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < u8 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_8_u (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < u8 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_16_u_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < u16 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_16_u (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < u16 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_24_u_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < u32 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_24_u (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < u32 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_32_u_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < u32 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_32_u (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < u32 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_40_u_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < u64 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_40_u (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < u64 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_48_u_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < u64 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_48_u (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < u64 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_56_u_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < u64 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_56_u (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < u64 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_64_u_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < u64 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_64_u (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < u64 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_8_s_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < i8 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_8_s (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < i8 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_16_s_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < i16 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_16_s (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < i16 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_24_s_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < i32 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_24_s (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < i32 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_32_s_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < i32 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_32_s (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < i32 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_40_s_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < i64 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_40_s (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < i64 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_48_s_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < i64 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_48_s (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < i64 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_56_s_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < i64 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_56_s (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < i64 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn int_64_s_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < i64 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . int_64_s (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < i64 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn enum_8_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < u8 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . enum_8 (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < u8 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn enum_16_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < u16 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . enum_16 (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < u16 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn float_single_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < f32 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . float_single (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < f32 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } pub async fn float_double_read (self , endpoint : rs_matter_crate :: dm :: EndptId ,) -> Result < f64 , rs_matter_crate :: error :: Error > { use rs_matter_crate :: im :: client :: ImClient as _ImClient ; use self :: UnitTestingAttrReads as _Reads ; let mut chunk = _ImClient :: read_with (self . exchange , | msg | { msg . attr_requests () ? . unit_testing_read () . float_double (endpoint) ? . end () ? . fabric_filtered (true) ? . end () }) . await ? ; let value = { let resp = chunk . response () ? ; let attr_reports = resp . attr_reports . as_ref () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let attr_resp = attr_reports . iter () . next () . ok_or (rs_matter_crate :: error :: ErrorCode :: InvalidData) ? . map_err (| _ | rs_matter_crate :: error :: ErrorCode :: InvalidData) ? ; let value : Result < f64 , rs_matter_crate :: error :: Error > = match attr_resp { rs_matter_crate :: im :: AttrResp :: Data (data) => { rs_matter_crate :: tlv :: FromTLV :: from_tlv (& data . data) } rs_matter_crate :: im :: AttrResp :: Status (status) => { Err (status . status . status . to_error_code () . unwrap_or (rs_matter_crate :: error :: ErrorCode :: Failure) . into ()) } } ; value ? } ; while let Some (next) = chunk . complete () . await ? { chunk = next ; } Ok (value) } # [doc = "Read a non-scalar attribute (string, octet string, struct or list) \ whose value *borrows* the response buffer. Decodes the value and \ passes `Result` to `f` while the borrow is live, \ returning the owned `R` that `f` produces (copy out what you need, \ diff --git a/rs-matter-codegen/src/idl/event.rs b/rs-matter-codegen/src/idl/event.rs index ed762fe39..d36458b60 100644 --- a/rs-matter-codegen/src/idl/event.rs +++ b/rs-matter-codegen/src/idl/event.rs @@ -62,7 +62,7 @@ fn event(e: &Event, entities: &EntityContext, context: &IdlGenerateContext) -> T pub fn emit_for(emitter: impl #krate::dm::EventEmitter, endpoint_id: #krate::dm::EndptId, f: F) -> Result<#krate::dm::EventNumber, #krate::error::Error> where - F: FnOnce(#name_builder<#krate::dm::events::EventTLVWrite<'_>>) -> Result<#krate::dm::events::EventTLVWrite<'_>, #krate::error::Error>, + F: FnOnce(#name_builder<#krate::im::events::EventTLVWrite<'_>>) -> Result<#krate::im::events::EventTLVWrite<'_>, #krate::error::Error>, { emitter.emit_event( endpoint_id, @@ -70,7 +70,7 @@ fn event(e: &Event, entities: &EntityContext, context: &IdlGenerateContext) -> T EventId::#name as _, Self::PRIORITY, |tw| { - f(#name_builder::new(tw, &#krate::dm::events::EVENT_DATA_TAG)?)?; + f(#name_builder::new(tw, &#krate::im::events::EVENT_DATA_TAG)?)?; Ok(()) }, @@ -79,13 +79,13 @@ fn event(e: &Event, entities: &EntityContext, context: &IdlGenerateContext) -> T pub fn emit(emitter: impl #krate::dm::OwnEventEmitter, f: F) -> Result<#krate::dm::EventNumber, #krate::error::Error> where - F: FnOnce(#name_builder<#krate::dm::events::EventTLVWrite<'_>>) -> Result<#krate::dm::events::EventTLVWrite<'_>, #krate::error::Error>, + F: FnOnce(#name_builder<#krate::im::events::EventTLVWrite<'_>>) -> Result<#krate::im::events::EventTLVWrite<'_>, #krate::error::Error>, { emitter.emit_own_event( EventId::#name as _, Self::PRIORITY, |tw| { - f(#name_builder::new(tw, &#krate::dm::events::EVENT_DATA_TAG)?)?; + f(#name_builder::new(tw, &#krate::im::events::EVENT_DATA_TAG)?)?; Ok(()) }, diff --git a/rs-matter/src/dm.rs b/rs-matter/src/dm.rs index 3e4c68738..1c60ea330 100644 --- a/rs-matter/src/dm.rs +++ b/rs-matter/src/dm.rs @@ -15,2021 +15,18 @@ * limitations under the License. */ -use core::num::NonZeroU8; -use core::pin::pin; - -use embassy_futures::select::{select3, select4}; -use embassy_time::{Instant, Timer}; - -use crate::acl::Accessor; -use crate::crypto::Crypto; -use crate::dm::clusters::net_comm::{ - NetCtl, NetworkType, Networks, NetworksAccess, SharedNetworks, -}; -use crate::dm::clusters::wifi_diag::WirelessDiag; -use crate::dm::events::EventTLVWrite; -use crate::dm::networks::eth::EthNetwork; -use crate::dm::networks::wireless::{NoopWirelessNetCtl, WirelessMgr, MAX_CREDS_SIZE}; -use crate::dm::networks::NetChangeNotif; -use crate::dm::subscriptions::SubscriptionsBuffers; -use crate::error::{Error, ErrorCode}; -use crate::im::{ - AttrPath, EventPriority, EventResp, EventStatus, IMStatusCode, InvReq, InvRespTag, OpCode, - ReadReq, ReportDataReq, ReportDataRespTag, StatusResp, SubscribeReq, SubscribeResp, TimedReq, - WriteReq, WriteRespTag, IM_REVISION, PROTO_ID_INTERACTION_MODEL, -}; -use crate::persist::{ - KvBlobStore, KvBlobStoreAccess, SharedKvBlobStore, DEFAULT_KV_BUF_SIZE, NETWORKS_KEY, -}; -use crate::respond::ExchangeHandler; -use crate::tlv::{get_root_node_struct, FromTLV, Nullable, TLVElement, TLVTag, TLVWrite, ToTLV}; -use crate::transport::exchange::{Exchange, ExchangeId, MAX_EXCHANGE_TX_BUF_SIZE}; -use crate::utils::cell::RefCell; -use crate::utils::select::Coalesce; -use crate::utils::storage::pooled::Buffers; -use crate::utils::storage::WriteBuf; -use crate::utils::sync::blocking::Mutex; -use crate::Matter; - -use crate::utils::init::{init, Init}; - -use events::{Events, DEFAULT_MAX_EVENTS_BUF_SIZE}; -use subscriptions::{ReportContext, Subscriptions, DEFAULT_MAX_SUBSCRIPTIONS}; +//! The Data Model as defined by the Matter Core spec: the structure and schema +//! of a node - its endpoints, clusters, attributes, commands and events - and +//! the handlers that give them behaviour. +//! +//! The Interaction Model engine that drives reads, writes, subscriptions and +//! invokes against this data model lives in [`crate::im`]. pub use types::*; pub mod clusters; pub mod devices; pub mod endpoints; -pub mod events; pub mod networks; -pub mod subscriptions; mod types; - -/// The buffer type used by the Interaction Model for RX/TX payloads. Aliases the -/// central [`Buffer`](crate::transport::exchange::Buffer). -pub type IMBuffer = crate::transport::exchange::Buffer; - -/// An `ExchangeHandler` implementation capable of handling responder exchanges for the Interaction Model protocol. -/// The mutable, owned-together state a [`InteractionModel`] operates on: the -/// subscriptions table, the events queue and the network store. -/// -/// Allocating these as a single value (rather than three separate locals wired -/// up by hand at every call site) is the whole point: construct one -/// `InteractionModelState`, then hand a reference to it to [`InteractionModel::new`]. Each of -/// the three pieces keeps its own lock internally (the proven multi-lock model); -/// folding them behind a single mutex is a possible later refinement. -/// -/// `N` is the (raw) [`Networks`] implementation — e.g. -/// [`EthNetwork`](crate::dm::networks::eth::EthNetwork) or -/// [`WirelessNetworks`](crate::dm::networks::wireless::WirelessNetworks); it is -/// wrapped internally in a [`SharedNetworks`] so the data model and (later) the -/// wireless manager can share it. `NS`/`NE` bound the subscription table and the -/// event-buffer size and default to [`DEFAULT_MAX_SUBSCRIPTIONS`] / -/// [`DEFAULT_MAX_EVENTS_BUF_SIZE`]. -pub struct InteractionModelState< - N, - const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, - const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, - const KB: usize = DEFAULT_KV_BUF_SIZE, -> { - subscriptions: Subscriptions, - events: Events, - networks: SharedNetworks, - /// The scratch buffer used by the key-value persistence machinery at runtime. - /// Behind a blocking mutex so the data model can recombine it with the - /// (store-only) [`SharedKvBlobStore`](crate::persist::SharedKvBlobStore). - kv_buf: Mutex>, -} - -impl InteractionModelState { - /// Create a new state instance backed by the given (raw) [`Networks`] store. - pub const fn new(networks: N) -> Self { - Self { - subscriptions: Subscriptions::new(), - events: Events::new(), - networks: SharedNetworks::new(networks), - kv_buf: Mutex::new(RefCell::new([0; KB])), - } - } - - /// Return an in-place initializer for the state (for large `NE`/`KB`, to - /// avoid a big temporary on the stack). - pub fn init(networks: impl Init) -> impl Init { - init!(Self { - subscriptions <- Subscriptions::init(), - events <- Events::init(), - networks <- SharedNetworks::init(networks), - kv_buf <- Mutex::init(RefCell::init(crate::utils::init::zeroed())), - }) - } - - /// Re-hydrate this state's persisted contents - the events-queue epoch (so - /// event numbers are not reused across reboots) and the network store - using - /// this state's own (owned) scratch buffer. Call once at startup, before the - /// state is shared with a [`InteractionModel`]. - pub async fn load_persist(&mut self, mut kv: S) -> Result<(), Error> - where - S: KvBlobStore, - N: Networks, - { - // We hold `&mut self`, so borrow the scratch buffer directly - no locking - // (the mutex is only needed for shared, runtime access). - let Self { - events, - networks, - kv_buf, - .. - } = self; - - let buf = &mut kv_buf.get_mut().get_mut()[..]; - - // The event-number epoch. - events.load_persist(&mut kv, buf).await?; - - // The network store. - let networks = networks.get_mut().get_mut(); - networks.reset()?; - if let Some(data) = kv.load(NETWORKS_KEY, buf)? { - networks.load(data)?; - } - - Ok(()) - } - - /// Borrow this state's owned scratch buffer for one-time startup loads (e.g. - /// [`Matter::load_persist`] or a cluster's `load_persist`), so callers need - /// not allocate a separate buffer. - /// - /// Available only with exclusive (`&mut`) access - i.e. before the state is - /// shared with a [`InteractionModel`]. - pub fn kv_buf_mut(&mut self) -> &mut [u8] { - &mut self.kv_buf.get_mut().get_mut()[..] - } - - /// The subscriptions table. - pub const fn subscriptions(&self) -> &Subscriptions { - &self.subscriptions - } - - /// The events queue. - pub const fn events(&self) -> &Events { - &self.events - } - - /// The network store (wrapped for shared, change-notifying access). - pub const fn networks(&self) -> &SharedNetworks { - &self.networks - } -} - -/// Recombines a store-only [`SharedKvBlobStore`] with the scratch buffer owned by -/// a [`InteractionModelState`] to present a full [`KvBlobStoreAccess`]. -/// -/// The buffer lock is always taken first, then the store lock, so the two-lock -/// order is consistent across all persistence paths (and single-threaded -/// executors never actually block on either). -struct StateKvBlobStore<'a, S, const KB: usize> { - store: &'a SharedKvBlobStore, - buf: &'a Mutex>, -} - -impl KvBlobStoreAccess for StateKvBlobStore<'_, S, KB> -where - S: KvBlobStore, -{ - fn access(&self, f: F) -> R - where - F: FnOnce(&mut dyn KvBlobStore, &mut [u8]) -> R, - { - self.buf.lock(|cell| { - let mut buf = cell.borrow_mut(); - - self.store.with_store(|store| f(store, &mut buf[..])) - }) - } -} - -/// The implementation needs a `DataModel` instance to interact with the underlying clusters of the data model. -/// -/// `NC` is the network controller type driving the (optional) wireless connection -/// manager from [`InteractionModel::run`]. It defaults to [`NoopWirelessNetCtl`], which is -/// the right choice for Ethernet (and what the convenience [`InteractionModel::new`] -/// constructor wires up); wireless devices pass a real controller via -/// [`InteractionModel::new_with_net_ctl`]. -pub struct InteractionModel< - 'a, - C, - B, - T, - S, - N, - NC = NoopWirelessNetCtl, - const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, - const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, - const KB: usize = DEFAULT_KV_BUF_SIZE, -> where - B: Buffers, -{ - matter: &'a Matter<'a>, - crypto: C, - buffers: &'a B, - kv: SharedKvBlobStore, - net_ctl: NC, - subscriptions_buffers: SubscriptionsBuffers<'a, B, NS>, - state: &'a InteractionModelState, - handler: T, -} - -/// A [`InteractionModelState`] for an Ethernet device: its network store is a fixed -/// [`EthNetwork`], so call sites need only the (defaulted) subscription/event -/// sizes. Pairs with [`EthInteractionModel`]. -pub type EthInteractionModelState< - const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, - const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, - const KB: usize = DEFAULT_KV_BUF_SIZE, -> = InteractionModelState, NS, NE, KB>; - -/// A [`InteractionModel`] for an Ethernet device (network store fixed to [`EthNetwork`]), -/// so the `N` generic disappears from call sites. Pairs with [`EthInteractionModelState`]. -pub type EthInteractionModel< - 'a, - C, - B, - T, - S, - NC = NoopWirelessNetCtl, - const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, - const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, - const KB: usize = DEFAULT_KV_BUF_SIZE, -> = InteractionModel<'a, C, B, T, S, EthNetwork<'static>, NC, NS, NE, KB>; - -/// A [`InteractionModelState`] for a wireless device, parameterized by the concrete -/// wireless network store `N` (e.g. `WifiNetworks<3>` or a Thread store). Pairs -/// with [`WirelessInteractionModel`]. -pub type WirelessInteractionModelState< - N, - const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, - const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, - const KB: usize = DEFAULT_KV_BUF_SIZE, -> = InteractionModelState; - -/// A [`InteractionModel`] for a wireless device (network store `N`, network controller -/// `NC`). Pairs with [`WirelessInteractionModelState`]. -pub type WirelessInteractionModel< - 'a, - C, - B, - T, - S, - N, - NC, - const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, - const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, - const KB: usize = DEFAULT_KV_BUF_SIZE, -> = InteractionModel<'a, C, B, T, S, N, NC, NS, NE, KB>; - -impl<'a, C, B, T, S, N, const NS: usize, const NE: usize, const KB: usize> - InteractionModel<'a, C, B, T, S, N, NoopWirelessNetCtl, NS, NE, KB> -where - C: Crypto, - B: Buffers, - T: DataModel, - S: KvBlobStore, - N: Networks, -{ - /// Create the data model for a device that does not need an operational - /// wireless connection manager (typically an Ethernet device). - /// - /// This is a convenience wrapper around [`InteractionModel::new_with_net_ctl`] that - /// fixes the network controller to an inert [`NoopWirelessNetCtl`], so - /// [`InteractionModel::run`]'s connection-management branch stays dormant. - /// - /// # Arguments - /// - `matter` - a reference to the `Matter` instance - /// - `buffers` - a reference to an implementation of `Buffers` which is used for allocating RX and TX buffers on the fly, when necessary - /// - `handler` - an instance of type `T` which implements the `DataModel` trait. This instance is used for interacting with the underlying - /// clusters of the data model. Note that the expectations is for the user to provide a handler that handles the Matter system clusters - /// as well (Endpoint 0), possibly by decorating her own clusters with the `rs_matter::dm::root_endpoint::with_` methods - /// - `kv` - an instance of type `S` which implements the `KvBlobStoreAccess` trait. This instance is used for interacting with the key-value blob store. - /// - `state` - a reference to the [`InteractionModelState`] holding the subscriptions table, the - /// events queue and the network store (the latter parameterized by the `Networks` - /// implementation `N`). - #[inline(always)] - pub fn new( - matter: &'a Matter<'a>, - crypto: C, - buffers: &'a B, - handler: T, - kv: SharedKvBlobStore, - state: &'a InteractionModelState, - ) -> Self { - Self::new_with_net_ctl( - matter, - crypto, - buffers, - handler, - kv, - NoopWirelessNetCtl::new(NetworkType::Ethernet), - state, - ) - } -} - -impl<'a, C, B, T, S, N, NC, const NS: usize, const NE: usize, const KB: usize> - InteractionModel<'a, C, B, T, S, N, NC, NS, NE, KB> -where - C: Crypto, - B: Buffers, - T: DataModel, - S: KvBlobStore, - N: Networks, -{ - /// Create the data model with an explicit network controller `net_ctl`. - /// - /// Use this for wireless devices: `net_ctl` drives the operational connection - /// manager run from [`InteractionModel::run`] (and is typically the same controller - /// instance also wired into the `NetworkCommissioning` cluster handler). For - /// Ethernet devices prefer the [`InteractionModel::new`] convenience constructor. - /// - /// # Arguments - /// - `matter` - a reference to the `Matter` instance - /// - `buffers` - a reference to an implementation of `Buffers` which is used for allocating RX and TX buffers on the fly, when necessary - /// - `handler` - an instance of type `T` which implements the `DataModel` trait. This instance is used for interacting with the underlying - /// clusters of the data model. Note that the expectations is for the user to provide a handler that handles the Matter system clusters - /// as well (Endpoint 0), possibly by decorating her own clusters with the `rs_matter::dm::root_endpoint::with_` methods - /// - `kv` - an instance of type `S` which implements the `KvBlobStoreAccess` trait. This instance is used for interacting with the key-value blob store. - /// - `net_ctl` - the network controller (`NetCtl` + `WirelessDiag` + `NetChangeNotif`) used by - /// the operational wireless connection manager driven from [`InteractionModel::run`]. - /// - `state` - a reference to the [`InteractionModelState`] holding the subscriptions table, the - /// events queue and the network store (the latter parameterized by the `Networks` - /// implementation `N`). - #[inline(always)] - pub fn new_with_net_ctl( - matter: &'a Matter<'a>, - crypto: C, - buffers: &'a B, - handler: T, - kv: SharedKvBlobStore, - net_ctl: NC, - state: &'a InteractionModelState, - ) -> Self { - state.subscriptions.clear(); - - Self { - matter, - crypto, - buffers, - kv, - net_ctl, - subscriptions_buffers: SubscriptionsBuffers::new(), - state, - handler, - } - } - - /// Get a reference to the `Matter` instance this data model is associated with. - pub const fn matter(&self) -> &'a Matter<'a> { - self.matter - } - - pub const fn crypto(&self) -> &C { - &self.crypto - } - - /// Return a [`KvBlobStoreAccess`] for interacting with the key-value blob - /// store. This recombines the store-only `S` held by the data model with the - /// scratch buffer owned by the [`InteractionModelState`]. - pub fn kv(&self) -> impl KvBlobStoreAccess + '_ { - self.kv_access() - } - - /// Recombine the store-only KV (`self.kv`) with the scratch buffer owned by - /// [`InteractionModelState`] into a full [`KvBlobStoreAccess`]. - fn kv_access(&self) -> StateKvBlobStore<'_, S, KB> { - StateKvBlobStore { - store: &self.kv, - buf: &self.state.kv_buf, - } - } - - /// Open the basic commissioning window. - /// - /// Equivalent to [`Matter::open_basic_comm_window`] but additionally - /// bumps the data version of the `AdministratorCommissioning` - /// cluster on the root endpoint and routes the change to - /// subscribers — both happen automatically because this `InteractionModel` - /// is itself the [`AttrChangeNotifier`] passed down. - /// - /// Prefer this entry point over the `Matter` one for any code path - /// that has a `InteractionModel` available; `Matter::open_basic_comm_window` - /// is the building block we delegate to and does not bump dataver - /// (see its docs). - pub fn open_basic_comm_window(&self, timeout_secs: u16) -> Result<(), Error> { - self.matter - .open_basic_comm_window(timeout_secs, &self.crypto, self) - } - - /// Close the active commissioning window. - /// - /// Equivalent to [`Matter::close_comm_window`] but additionally - /// bumps the `AdministratorCommissioning` dataver and routes - /// subscribers via this `InteractionModel`'s [`AttrChangeNotifier`]. See - /// `open_basic_comm_window` for the rationale. - pub fn close_comm_window(&self) -> Result { - self.matter.close_comm_window(self) - } - - /// Bump `BasicInformation::ConfigurationVersion` by one, persist - /// the new value, and notify subscribers (which also bumps the - /// `BasicInformation` cluster's dataver via this `InteractionModel`'s - /// [`AttrChangeNotifier`]). - /// - /// Per Matter Core Spec, callers MUST invoke this - /// whenever the node's exposed fixed-quality surface changes — - /// typically after a firmware update that adds or removes - /// functionality, after an internal reconfiguration that changes - /// any `F`-quality attribute (Descriptor::ServerList, - /// PartsList, …), or (for bridges) after a bridged node is added - /// or removed. It is not invoked automatically by `rs-matter` - /// because the library has no way to know about an application's - /// reconfiguration events. - /// - /// Returns the new `ConfigurationVersion` value. - pub fn bump_configuration_version(&self) -> Result { - // Delegate to `Matter::bump_configuration_version` for the - // in-memory bump + persist; pass `self` as the - // `AttrChangeNotifier` so the cluster's `Dataver` is bumped - // too (the `Matter`-level call by itself only routes - // subscribers and persists). - self.matter - .bump_configuration_version(self.kv_access(), self) - } - - /// Run the Data Model instance. - /// - /// This drives the IM timeout checks, the data-model handler's own background - /// job, the subscriptions reporting loop, and - for wireless devices - the - /// operational connection manager (inert for Ethernet, where `net_ctl` is a - /// [`NoopWirelessNetCtl`]). - pub async fn run(&self) -> Result<(), Error> - where - NC: NetCtl + WirelessDiag + NetChangeNotif, - { - let mut timeouts = pin!(self.run_timeout_checks()); - let mut handler = pin!(self.handler.run(self)); - let mut subs = pin!(self.process_subscriptions(self.matter)); - let mut net = pin!(self.run_net_mgr()); - - select4(&mut timeouts, &mut handler, &mut subs, &mut net) - .coalesce() - .await - } - - /// Drive the operational wireless connection manager. - /// - /// For Ethernet devices (`net_ctl.net_type() == NetworkType::Ethernet`) there - /// is nothing to manage, so this future simply pends forever. For wireless - /// devices it runs a [`WirelessMgr`] over the network store, cycling through - /// the registered networks and (re)connecting as needed once commissioned. - async fn run_net_mgr(&self) -> Result<(), Error> - where - NC: NetCtl + WirelessDiag + NetChangeNotif, - { - if self.net_ctl.net_type() == NetworkType::Ethernet { - // Nothing to manage for a wired device - just pend forever. - return core::future::pending().await; - } - - let mut buf = [0u8; MAX_CREDS_SIZE]; - let mut mgr = WirelessMgr::new(self.state.networks(), &self.net_ctl, &mut buf); - - mgr.run().await - } - - async fn run_timeout_checks(&self) -> Result<(), Error> { - const CHECK_INTERVAL_SECS: u64 = 1; - - loop { - Timer::after_secs(CHECK_INTERVAL_SECS).await; - - self.check_timeouts(None)?; - } - } - - fn check_timeouts(&self, exch_id: Option) -> Result<(), Error> { - let mut notify_mdns = || self.matter.transport().notify_mdns_changed(); - let mut notify_change = - |endpt_id, clust_id| self.notify_cluster_changed(endpt_id, clust_id); - - self.matter.with_state(|state| { - let expire_sess_id = exch_id.and_then(|exch_id| { - state - .sessions - .get(exch_id.session_id()) - .map(|sess| sess.id()) - }); - - // Disarm the failsafe on timeout - state.failsafe.check_failsafe_timeout( - &mut state.fabrics, - &mut state.sessions, - &self.state.networks, - self.kv_access(), - expire_sess_id, - &mut notify_mdns, - &mut notify_change, - )?; - - // Close the commissioning window on timeout - state - .pase - .check_comm_window_timeout(&mut notify_mdns, &mut notify_change)?; - - Ok(()) - }) - } - - /// Answer a responding exchange using the `DataModel` instance wrapped by this exchange handler. - pub async fn handle(&self, exchange: &mut Exchange<'_>) -> Result<(), Error> { - let fetch_meta = |exchange: &mut Exchange| { - let meta = exchange.rx()?.meta(); - if meta.proto_id != PROTO_ID_INTERACTION_MODEL { - Err(ErrorCode::InvalidProto)?; - } - - Result::<_, Error>::Ok(meta) - }; - - if exchange.rx().is_err() { - exchange.recv_fetch().await?; - } - - let is_groupcast = exchange.is_groupcast()?; - - let mut meta = fetch_meta(exchange)?; - - let timeout_instant = if !is_groupcast && meta.opcode::()? == OpCode::TimedRequest { - let timeout = self.timed(exchange).await?; - - exchange.recv_fetch().await?; - meta = fetch_meta(exchange)?; - - Some(timeout) - } else { - None - }; - - self.check_timeouts(Some(exchange.id()))?; - - // TODO: Handle the cases where we receive a timeout request - // before read and subscribe. This is probably not allowed. - - match meta.opcode::()? { - OpCode::ReadRequest if is_groupcast => { - error!("Received a groupcast message for opcode: ReadRequest") - } - OpCode::ReadRequest if !is_groupcast => self.read(exchange).await?, - OpCode::WriteRequest => self.write(exchange, timeout_instant, is_groupcast).await?, - OpCode::InvokeRequest => self.invoke(exchange, timeout_instant, is_groupcast).await?, - OpCode::SubscribeRequest if is_groupcast => { - error!("Received a groupcast message for opcode: SubscribeRequest") - } - OpCode::SubscribeRequest if !is_groupcast => self.subscribe(exchange).await?, - OpCode::TimedRequest if !is_groupcast => { - Self::send_status(exchange, IMStatusCode::InvalidAction).await? - } - _ if is_groupcast => { - // Silently drop unsupported opcodes for group messages - } - opcode => { - error!("Invalid opcode: {:?}", opcode); - Err(ErrorCode::InvalidOpcode)? - } - } - - if !is_groupcast { - exchange.acknowledge().await?; - } - - Ok(()) - } - - /// Respond to a `ReadReq` request. - async fn read(&self, exchange: &mut Exchange<'_>) -> Result<(), Error> { - let Some((mut tx, rx)) = self.buffers(exchange).await? else { - return Ok(()); - }; - - let read_req = ReadReq::new(TLVElement::new(&rx)); - debug!("IM: Read request: {:?}", read_req); - - if let Err(err) = Self::validate_read(&read_req) { - error!("Invalid read request: {:?}", err); - return Self::send_status(exchange, err.code().into()).await; - } - - let req = ReportDataReq::Read(&read_req); - - let mut wb = WriteBuf::new(&mut tx); - - // Honor the `fabricFiltered` flag on the originating Read request. - // When set, fabric-sensitive events emitted on other fabrics are - // dropped before they reach the wire (Matter Core spec). - let fabric_filtered = req.fabric_filtered().unwrap_or(true); - - let mut resp = ReportDataResponder::new( - &req, - None, - HandlerInvoker::new(exchange, self), - EventReader::new(0, u64::MAX, fabric_filtered), - &self.state.events, - ); - - resp.respond(&mut wb, true, true, &self.handler, |_, _, _| true) - .await?; - - Ok(()) - } - - /// Validate a `ReadReq` request prior to processing. - fn validate_read(req: &ReadReq<'_>) -> Result<(), Error> { - if let Some(attr_requests) = req.attr_requests()? { - for attr_req in attr_requests { - Self::validate_attr_wildcard_path(&attr_req?)?; - } - } - - Ok(()) - } - - /// Per-spec validation of an `AttrPath` that may contain wildcards. - /// - /// Per Matter spec, when a path uses a wildcard cluster - /// but specifies a concrete attribute id, that attribute id must be a - /// global (system) attribute. Any other combination must be rejected with - /// `INVALID_ACTION`. - fn validate_attr_wildcard_path(path: &AttrPath) -> Result<(), Error> { - if path.cluster.is_none() { - if let Some(attr_id) = path.attr { - if !Attribute::is_system_attr(attr_id) { - return Err(ErrorCode::InvalidAction.into()); - } - } - } - - Ok(()) - } - - /// Respond to a `WriteReq` request. - /// - /// Arguments: - /// - `exchange` - the exchange to respond to - /// - `timeout_instant` - an optional timeout instant, if the request is a timed request - async fn write( - &self, - exchange: &mut Exchange<'_>, - timeout_instant: Option, - is_groupcast: bool, - ) -> Result<(), Error> { - while exchange.rx().is_ok() { - // Loop while there are more write request chunks to process - - let Some((mut tx, rx)) = self.buffers(exchange).await? else { - break; - }; - - let req = WriteReq::new(TLVElement::new(&rx)); - debug!("IM: Write request: {:?}", req); - - let timed = req.timed_request()?; - - if self.timed_out(exchange, timeout_instant, timed).await? { - break; - } - - let mut wb = WriteBuf::new(&mut tx); - - let mut resp = WriteResponder::new(&req, HandlerInvoker::new(exchange, self)); - - resp.respond(&mut wb, &self.handler, is_groupcast).await?; - - if req.more_chunks()? { - // This write request is just one of the chunks, so we need to wait and process - // the next chunk as well - exchange.recv_fetch().await?; - } - } - - Ok(()) - } - - /// Respond to an `InvokeReq` request. - /// - /// Arguments: - /// - `exchange` - the exchange to respond to - /// - `timeout_instant` - an optional timeout instant, if the request is a timed request - async fn invoke( - &self, - exchange: &mut Exchange<'_>, - timeout_instant: Option, - is_groupcast: bool, - ) -> Result<(), Error> { - let Some((mut tx, rx)) = self.buffers(exchange).await? else { - return Ok(()); - }; - - let req = InvReq::new(TLVElement::new(&rx)); - debug!("IM: Invoke request: {:?}", req); - - let timed = req.timed_request()?; - - if self.timed_out(exchange, timeout_instant, timed).await? { - return Ok(()); - } - - let max_paths = exchange.matter().dev_det().max_paths_per_invoke as usize; - - if let Some(reqs) = req.inv_requests()? { - let mut count = 0; - for r in &reqs { - let _ = r?; - count += 1; - } - - if count > max_paths { - return Self::send_status(exchange, IMStatusCode::InvalidAction).await; - } - - // Per Matter Core spec: when an `InvokeRequestMessage` - // carries multiple `CommandDataIB` entries, each MUST include a unique - // `CommandRef` and the request paths SHALL be unique. `count` is bounded - // by `max_paths_per_invoke` (typically a single-digit number), so the - // O(n²) pairwise check below is cheaper than allocating buffers. - if count > 1 { - for (i, req_i) in reqs.iter().enumerate() { - let req_i = req_i?; - if req_i.command_ref.is_none() { - return Self::send_status(exchange, IMStatusCode::InvalidAction).await; - } - for req_j in reqs.iter().skip(i + 1) { - let req_j = req_j?; - if req_i.path == req_j.path || req_i.command_ref == req_j.command_ref { - return Self::send_status(exchange, IMStatusCode::InvalidAction).await; - } - } - } - } - } - - let mut wb = WriteBuf::new(&mut tx); - - let mut resp = InvokeResponder::new(&req, HandlerInvoker::new(exchange, self)); - - resp.respond(&mut wb, &self.handler, is_groupcast).await - } - - /// Respond to a `SubscribeReq` request by priming the subscription (i.e. doing an initial data report) - /// and if the priming is successful, sending a `SubscribeResp` response to the peer and registering - /// the subscription details in the `Subscriptions` instance. - async fn subscribe(&self, exchange: &mut Exchange<'_>) -> Result<(), Error> { - let Some((mut tx, rx)) = self.buffers(exchange).await? else { - return Ok(()); - }; - - let req = SubscribeReq::new(TLVElement::new(&rx)); - debug!("IM: Subscribe request: {:?}", req); - - let accessor = exchange.accessor()?; - - if let Err(err) = self.validate_subscribe(&req, &accessor) { - error!("Invalid subscribe request: {:?}", err); - return Self::send_status(exchange, err.code().into()).await; - } - - let (fab_idx, peer_node_id) = exchange.with_state(|state| { - let sess = exchange.id().session(&mut state.sessions); - - let fab_idx = NonZeroU8::new(sess.get_local_fabric_idx()).ok_or(ErrorCode::Invalid)?; - let peer_node_id = sess.get_peer_node_id().ok_or(ErrorCode::Invalid)?; - - Ok((fab_idx, peer_node_id)) - })?; - - if !req.keep_subs()? { - self.state - .subscriptions - .remove(&self.subscriptions_buffers, |sub| { - (sub.ids().fab_idx == fab_idx && sub.ids().peer_node_id == peer_node_id) - .then_some("new subscription request") - }); - } - - let max_int_secs = core::cmp::max(req.max_int_ceil()?, 40); // Say we need at least 4 secs for potential latencies - let min_int_secs = req.min_int_floor()?; - - let now = Instant::now(); - - let Some(mut rctx) = self.state.subscriptions.add( - now, - fab_idx, - peer_node_id, - exchange.id().session_id(), - min_int_secs, - max_int_secs, - self.state.events.watermark(), - rx, - &self.subscriptions_buffers, - ) else { - return Self::send_status(exchange, IMStatusCode::ResourceExhausted).await; - }; - - let primed = self.report_data(&mut rctx, &mut tx, exchange, true).await?; - - if primed { - exchange - .send_with(|_, wb| { - SubscribeResp::write(wb, rctx.subscription().ids().id, max_int_secs)?; - Ok(Some(OpCode::SubscribeResponse.into())) - }) - .await?; - - rctx.set_keep(); - - info!("Subscription {:?} primed", rctx.subscription().ids()); - - // Commit the subscription into the table now (its `report_complete` - // runs on `Drop`) and then wake the reporter so it can account for - // the new subscription's deadline. - drop(rctx); - self.state.subscriptions.notification.notify(); - } - - Ok(()) - } - - /// Validates the subscription request - fn validate_subscribe( - &self, - req: &SubscribeReq<'_>, - accessor: &Accessor<'_>, - ) -> Result<(), Error> { - // As per spec, we need to validate that the subscription request - // contains existing endpoints, clusters and attributes, and if not - // we should (a bit surprisingly) return InvalidAction - - self.handler.access(|node| { - let mut has_attrs = false; - let mut has_events = false; - - if let Some(attr_requests) = req.attr_requests()? { - has_attrs = true; - - for attr_req in attr_requests { - let path = attr_req?; - - if path.is_wildcard() { - Self::validate_attr_wildcard_path(&path)?; - - if !node.has_accessible_attr(&path, accessor) { - return Err(ErrorCode::InvalidAction.into()); - } - } else { - node.validate_attr_path(&path, false, false, accessor) - .map_err(|_| ErrorCode::InvalidAction)?; - } - } - } - - if let Some(event_reqs) = req.event_requests()? { - has_events = true; - - for event_req in event_reqs { - let path = event_req?; - - if !path.is_wildcard() { - node.validate_event_path(&path, accessor) - .map_err(|_| ErrorCode::InvalidAction)?; - } - } - } - - if !has_attrs && !has_events { - // Empty subscribe requests are not allowed either - return Err(ErrorCode::InvalidAction.into()); - } - - Ok(()) - }) - } - - /// Process all valid subscriptions in an endless loop, checking for changes - /// and reporting them to the peers. - async fn process_subscriptions(&self, matter: &Matter<'_>) -> Result<(), Error> { - loop { - // Sleep until the soonest subscription deadline: the end of a - // `min_int` quiet period for a subscription holding back a change, - // or the chosen liveness wake point. A change, event, removal, a torn - // down session, or a newly accepted subscription (the accept path - // notifies) all wake the loop early. With no subscription there is - // no deadline, so just wait to be notified. - let mut notification = pin!(self.state.subscriptions.notification.wait()); - let mut session_removed = pin!(matter.transport().wait_session_removed()); - - // With no subscription (or none primed) the deadline is `Instant::MAX`, - // so the timer effectively never fires and the loop just waits to be - // notified. - let deadline = self - .state - .subscriptions - .next_report_at(self.state.events.watermark(), &self.subscriptions_buffers); - let mut timeout = pin!(Timer::at(deadline)); - - select3(&mut notification, &mut timeout, &mut session_removed).await; - - let now = Instant::now(); - - // First remove all expired or no-longer valid subscriptions - - loop { - let removed_any = - self.state - .subscriptions - .remove(&self.subscriptions_buffers, |sub| { - if sub.is_expired(now) { - return Some("expired"); - } - - matter.with_state(|state| { - if state.fabrics.get(sub.ids().fab_idx).is_none() { - return Some("fabric removed"); - } - - // The session the subscription was accepted on was - // torn down (eviction, explicit close, peer-side - // CASE re-handshake, ...). Per Matter spec - // subscriptions are scoped to the session they - // were established on, and the publisher can no - // longer route reports to the subscriber. Drop - // immediately rather than waiting for `max_int` - // to expire and time-out the send. - if state.sessions.get(sub.session_id()).is_none() { - return Some("session removed"); - } - - None - }) - }); - - if !removed_any { - break; - } - } - - // Now report while there are subscriptions which are due for reporting - - let event_numbers_watermark = self.state.events.watermark(); - - loop { - let Some(mut rctx) = self.state.subscriptions.report( - now, - event_numbers_watermark, - &self.subscriptions_buffers, - ) else { - break; - }; - - let result = self.process_subscription(matter, &mut rctx).await; - - match result { - Ok(true) => rctx.set_keep(), - Ok(false) => (), - Err(e) => error!( - "Error processing subscription {:?}: {:?}", - rctx.subscription().ids(), - e - ), - } - } - - // Periodically trim changed-attr entries that have been reported by every - // subscription, so the table does not accumulate stale promoted wildcards. - self.state.subscriptions.purge_reported_changes(); - } - } - - /// Process one valid subscription, reporting the data to the peer. - /// - /// Arguments: - /// - `matter` - a reference to the `Matter` instance - /// - `fabric_idx` - the fabric index of the peer - /// - `peer_node_id` - the node ID of the peer - /// - `session_id` - the session ID of the peer, if any - /// - `sub` - the received and saved data for the subscription, when the subscription was primed - /// - `min_event_number` - the subscription's current event watermark; updated - /// in place as events are emitted so the caller can persist it - /// - `ctx` - the report context for this subscription - #[allow(clippy::too_many_arguments)] - async fn process_subscription( - &self, - matter: &Matter<'_>, - rctx: &mut ReportContext<'_, '_, B, NS>, - ) -> Result { - let mut exchange = - Exchange::initiate_for_session(matter, rctx.subscription().session_id())?; - - if let Some(mut tx) = self.buffers.get().await { - // Always safe as `IMBuffer` is defined to be `MAX_EXCHANGE_RX_BUF_SIZE`, which is bigger than `MAX_EXCHANGE_TX_BUF_SIZE` - unwrap!(tx.resize_default(MAX_EXCHANGE_TX_BUF_SIZE)); - - let primed = self - .report_data(rctx, &mut tx, &mut exchange, false) - .await?; - - exchange.acknowledge().await?; - - Ok(primed) - } else { - error!( - "No TX buffer available for processing subscription {:?}", - rctx.subscription().ids(), - ); - - Ok(false) - } - } - - /// Process a `TimedReq` request, which is used to set a timeout for the following Write/Invoke request. - async fn timed(&self, exchange: &mut Exchange<'_>) -> Result { - let req = TimedReq::from_tlv(&get_root_node_struct(exchange.rx()?.payload())?)?; - debug!("IM: Timed request: {:?}", req); - - let timeout_instant = req.timeout_instant(); - - Self::send_status(exchange, IMStatusCode::Success).await?; - - Ok(timeout_instant) - } - - /// A utility to check whether a timed request has timed out, and if so, send a timeout status response - async fn timed_out( - &self, - exchange: &mut Exchange<'_>, - timeout_instant: Option, - timed_req: bool, - ) -> Result { - let status = { - if timed_req != timeout_instant.is_some() { - Some(IMStatusCode::TimedRequestMisMatch) - } else if timeout_instant - .map(|timeout_instant| Instant::now() > timeout_instant) - .unwrap_or(false) - { - Some(IMStatusCode::Timeout) - } else { - None - } - }; - - if let Some(status) = status { - Self::send_status(exchange, status).await?; - - Ok(true) - } else { - Ok(false) - } - } - - /// A utility to respond with a `ReportData` response to a subscription request, which is used to report data to the peer. - /// - /// Arguments: - /// - `id` - the subscription ID - /// - `fabric_idx` - the fabric index of the peer - /// - `peer_node_id` - the node ID of the peer - /// - `min_event_number` - the minimum event number to report - /// - `rx` - the received data for the subscription, when the subscription was primed - /// - `tx` - the TX buffer to write the response to - /// - `exchange` - the exchange to respond to - /// - `with_dataver` - whether to include the data version in the response - #[allow(clippy::too_many_arguments)] - async fn report_data( - &self, - rctx: &mut ReportContext<'_, '_, B, NS>, - tx: &mut [u8], - exchange: &mut Exchange<'_>, - with_dataver: bool, - ) -> Result - where - T: DataModel, - { - let mut wb = WriteBuf::new(tx); - - let sub_req = SubscribeReq::new(TLVElement::new(rctx.rx())); - let req = if with_dataver { - ReportDataReq::Subscribe(&sub_req) - } else { - ReportDataReq::SubscribeReport(&sub_req) - }; - - // Honor the `fabricFiltered` flag on the originating Subscribe request. - // When set, fabric-sensitive events emitted on other fabrics are - // dropped before they reach the wire (Matter Core spec). - let fabric_filtered = req.fabric_filtered().unwrap_or(true); - - let mut resp = ReportDataResponder::new( - &req, - Some(rctx.subscription().ids().id), - HandlerInvoker::new(exchange, self), - EventReader::new( - rctx.max_seen_event_number(), - rctx.next_max_seen_event_number(), - fabric_filtered, - ), - &self.state.events, - ); - - let sub_valid = resp - .respond( - &mut wb, - false, - rctx.should_send_if_empty(), - &self.handler, - |e, c, a| rctx.should_report_attr(e, c, a), - ) - .await?; - - if !sub_valid { - warn!( - "Subscription {:?} removed during reporting", - rctx.subscription().ids() - ); - } - - Ok(sub_valid) - } - - /// A utility to fetch a pair of TX/RX buffers for processing an Interaction Model request. - /// - /// If there are no free buffers available, this method will send a `Busy` status response to the peer. - /// - /// Upon returning: - /// - The RX buffer will contain the payload of the received Interaction Model request - /// - The TX buffer will be resized to `MAX_EXCHANGE_TX_BUF_SIZE` and will be ready to be written to - /// - /// Returns: - /// - `Ok(Some((tx, rx)))` - if both TX and RX buffers are available - /// - `Ok(None)` - if no buffers are available, and a `Busy` status response has been sent - /// - `Err(Error)` - if an error occurred while fetching the buffers or sending the status response - async fn buffers( - &self, - exchange: &mut Exchange<'_>, - ) -> Result, B::Buffer<'a>)>, Error> { - if let Some(tx) = self.tx_buffer(exchange).await? { - if let Some(rx) = self.rx_buffer(exchange).await? { - return Ok(Some((tx, rx))); - } - } - - Ok(None) - } - - /// A utility to fetch a RX buffer for processing an Interaction Model request. - /// - /// If there are no free buffers available, this method will send a `Busy` status response to the peer. - /// - /// Upon returning, the RX buffer will contain the payload of the received Interaction Model request. - /// - /// Returns: - /// - `Ok(Some(rx))` - if a RX buffer is available - /// - `Ok(None)` - if no RX buffer is available, and a `Busy` status response has been sent - /// - `Err(Error)` - if an error occurred while fetching the buffer or sending the status response - async fn rx_buffer(&self, exchange: &mut Exchange<'_>) -> Result>, Error> { - if let Some(mut buffer) = self.buffer(exchange).await? { - let rx = exchange.rx()?; - - buffer.clear(); - - // Safe to unwrap, as `IMBuffer` is defined to be `MAX_EXCHANGE_RX_BUF_SIZE`, i.e. it cannot be overflown - // by the payload of the received exchange. - unwrap!(buffer.extend_from_slice(rx.payload())); - - exchange.rx_done()?; - - Ok(Some(buffer)) - } else { - Ok(None) - } - } - - /// A utility to fetch a TX buffer for processing an Interaction Model request. - /// - /// If there are no free buffers available, this method will send a `Busy` status response to the peer. - /// - /// Upon returning, the TX buffer will be resized to `MAX_EXCHANGE_TX_BUF_SIZE` and will be ready to be written to. - /// - /// Returns: - /// - `Ok(Some(tx))` - if a TX buffer is available - /// - `Ok(None)` - if no TX buffer is available, and a `Busy` status response has been sent - /// - `Err(Error)` - if an error occurred while fetching the buffer or sending the status response - async fn tx_buffer(&self, exchange: &mut Exchange<'_>) -> Result>, Error> { - if let Some(mut buffer) = self.buffer(exchange).await? { - // Always safe as `IMBuffer` is defined to be `MAX_EXCHANGE_RX_BUF_SIZE`, which is bigger than `MAX_EXCHANGE_TX_BUF_SIZE` - unwrap!(buffer.resize_default(MAX_EXCHANGE_TX_BUF_SIZE)); - - Ok(Some(buffer)) - } else { - Ok(None) - } - } - - /// A utility to fetch a buffer for processing an Interaction Model request. - /// - /// If there are no free buffers available, this method will send a `Busy` status response to the peer. - /// - /// Upon returning, the buffer will be UNINITIALIZED. I.e. it is up to the user to resize it appropriately - /// if it is to be used for sending a response, or to fill it with data, if it is to be used for receiving data. - /// - /// Returns: - /// - `Ok(Some(buffer))` - if a buffer is available - /// - `Ok(None)` - if no buffer is available, and a `Busy` status response has been sent - /// - `Err(Error)` - if an error occurred while fetching the buffer or sending the status response - async fn buffer(&self, exchange: &mut Exchange<'_>) -> Result>, Error> { - if let Some(buffer) = self.buffers.get().await { - Ok(Some(buffer)) - } else { - Self::send_status(exchange, IMStatusCode::Busy).await?; - - Ok(None) - } - } - - /// A utility to send a status response to the peer. - async fn send_status(exchange: &mut Exchange<'_>, status: IMStatusCode) -> Result<(), Error> { - exchange - .send_with(|_, wb| { - StatusResp::write(wb, status)?; - - Ok(Some(OpCode::StatusResponse.into())) - }) - .await - } -} - -impl ExchangeHandler - for InteractionModel<'_, C, B, T, S, N, NC, NS, NE, KB> -where - C: Crypto, - B: Buffers, - T: DataModel, - S: KvBlobStore, - N: Networks, -{ - async fn handle(&self, mut exchange: Exchange<'_>) -> Result<(), Error> { - InteractionModel::handle(self, &mut exchange).await - } -} - -impl HandlerContext - for InteractionModel<'_, C, B, T, S, N, NC, NS, NE, KB> -where - C: Crypto, - B: Buffers, - T: DataModel, - S: KvBlobStore, - N: Networks, -{ - fn matter(&self) -> &Matter<'_> { - self.matter - } - - fn crypto(&self) -> impl Crypto + '_ { - &self.crypto - } - - fn kv(&self) -> impl KvBlobStoreAccess + '_ { - self.kv_access() - } - - fn networks(&self) -> impl NetworksAccess + '_ { - &self.state.networks - } - - fn metadata(&self) -> impl Metadata + '_ { - &self.handler - } - - fn handler(&self) -> impl AsyncHandler + '_ { - &self.handler - } - - fn buffers(&self) -> impl Buffers + '_ { - self.buffers - } -} - -impl AttrChangeNotifier - for InteractionModel<'_, C, B, T, S, N, NC, NS, NE, KB> -where - C: Crypto, - B: Buffers, - T: DataModel, - S: KvBlobStore, - N: Networks, -{ - fn notify_attr_changed(&self, endpoint_id: EndptId, cluster_id: ClusterId, attr_id: AttrId) { - self.handler.bump_dataver(MatchContextInstance::new( - Some(endpoint_id), - Some(cluster_id), - )); - self.state - .subscriptions - .notify_attr_changed(endpoint_id, cluster_id, attr_id); - } - - fn notify_cluster_changed(&self, endpoint_id: EndptId, cluster_id: ClusterId) { - self.handler.bump_dataver(MatchContextInstance::new( - Some(endpoint_id), - Some(cluster_id), - )); - self.state - .subscriptions - .notify_cluster_changed(endpoint_id, cluster_id); - } - - fn notify_endpoint_changed(&self, endpoint_id: EndptId) { - self.handler - .bump_dataver(MatchContextInstance::new(Some(endpoint_id), None)); - self.state - .subscriptions - .notify_endpoint_changed(endpoint_id) - } - - fn notify_all_changed(&self) { - self.handler - .bump_dataver(MatchContextInstance::new(None, None)); - self.state.subscriptions.notify_all_changed() - } -} - -impl EventEmitter - for InteractionModel<'_, C, B, T, S, N, NC, NS, NE, KB> -where - C: Crypto, - B: Buffers, - T: DataModel, - S: KvBlobStore, - N: Networks, -{ - fn emit_event( - &self, - endpoint_id: EndptId, - cluster_id: ClusterId, - event_id: EventId, - priority: EventPriority, - f: F, - ) -> Result - where - F: FnOnce(EventTLVWrite<'_>) -> Result<(), Error>, - { - let event_number = self.state.events.push( - endpoint_id, - cluster_id, - event_id, - priority, - self.kv_access(), - f, - )?; - - self.state - .subscriptions - .notify_event_emitted(endpoint_id, cluster_id, event_id); - - Ok(event_number) - } -} - -pub enum RespondOutcome { - Accepted, - Rejected, - Empty, -} - -/// This type responds with a `ReportData` response to all of: -/// - A `ReadReq` -/// - A `SubscribeReq` -/// - A `SubscribeReportReq` (i.e. once a valid recorded subscription is detected as in a need to be reported on) -/// -/// The responder handles chunking as needed. I.e. if reported data is too large to fit into a single -/// Matter message, it will send the data in multiple chunks (i.e. with multiple Matter messages), waiting for -/// a `Success` response from the peer after each chunk, and then continuing to send the next chunk until all data is sent. -struct ReportDataResponder<'a, 'b, 'c, const NE: usize, C> { - req: &'a ReportDataReq<'a>, - subscription_id: Option, - invoker: HandlerInvoker<'b, 'c, C>, - event_reader: EventReader, - events: &'a Events, -} - -impl<'a, 'b, 'c, const NE: usize, C> ReportDataResponder<'a, 'b, 'c, NE, C> -where - C: HandlerContext, -{ - // This is the amount of space we reserve for the structure/array closing TLVs - // to be attached towards the end of long reads - const LONG_READS_TLV_RESERVE_SIZE: usize = 24; - - /// Create a new `ReportDataResponder`. - const fn new( - req: &'a ReportDataReq<'a>, - subscription_id: Option, - invoker: HandlerInvoker<'b, 'c, C>, - event_reader: EventReader, - events: &'a Events, - ) -> Self { - Self { - req, - subscription_id, - invoker, - event_reader, - events, - } - } - - /// Respond to the request with a `ReportData` response, possibly with more than one - /// chunk if the data is too large to fit into a single Matter message. - /// - /// Arguments: - /// - `wb` - the buffer to use while sending the response - /// - `suppress_last_resp` - whether to suppress the response from the peer. When multiple Matter messages are - /// being sent due to chunking, this is valid for the last chunk only, as the others - by necessity need to have a - /// status response by the other peer - async fn respond( - &mut self, - wb: &mut WriteBuf<'_>, - suppress_last_resp: bool, - send_if_empty: bool, - metadata: M, - mut filter: F, - ) -> Result - where - M: Metadata, - F: FnMut(EndptId, ClusterId, u32) -> bool, - { - let mut empty = true; - - self.start_reply(wb)?; - - if !self - .report_attributes(wb, &mut empty, &metadata, &mut filter) - .await? - { - return Ok(false); - } - - if !self.report_events(wb, &mut empty, &metadata).await? { - return Ok(false); - } - - if send_if_empty || !empty { - self.send(ReportDataChunkState::Done, suppress_last_resp, wb) - .await - } else { - debug!("No data to report, skipping sending ReportData response"); - - Ok(true) - } - } - - async fn report_attributes( - &mut self, - wb: &mut WriteBuf<'_>, - empty: &mut bool, - metadata: M, - mut filter: F, - ) -> Result - where - M: Metadata, - F: FnMut(EndptId, ClusterId, u32) -> bool, - { - let accessor = self.invoker.exchange().accessor()?; - - if self.req.attr_requests()?.is_some() { - wb.start_array(&TLVTag::Context(ReportDataRespTag::AttributeReports as u8))?; - - for item in expand_read(&metadata, self.req, &accessor, &mut filter)? { - let item = item?; - - *empty = false; - - loop { - let result = self.invoker.process_read(&item, &mut *wb).await; - - match result { - Ok(()) => break, - Err(err) if err.code() == ErrorCode::NoSpace => { - let array_attr = item.as_ref().ok().filter(|attr| { - attr.list_index.is_none() - // The whole attribute is requested - // Check if it is an array, and if so, send it as individual items instead - && attr.array - }); - - if let Some(array_attr) = array_attr { - if self.send_array_items(array_attr, wb).await? { - break; - } else { - return Ok(false); - } - } else { - debug!("<<< No TX space, chunking >>>"); - if !self - .send(ReportDataChunkState::ChunkingAttributes, false, wb) - .await? - { - return Ok(false); - } - } - } - Err(err) => Err(err)?, - } - } - } - - wb.end_container()?; - } - - Ok(true) - } - - async fn report_events( - &mut self, - wb: &mut WriteBuf<'_>, - empty: &mut bool, - metadata: M, - ) -> Result - where - M: Metadata, - { - let accessor = self.invoker.exchange().accessor()?; - - if let Some(event_reqs) = self.req.event_requests()? { - wb.start_array(&TLVTag::Context(ReportDataRespTag::EventReports as _))?; - - // Validate concrete event paths against node metadata - // and emit EventStatusIB for non-wildcard paths that don't match - for event_req in event_reqs.iter() { - let path = event_req?; - - if !path.is_wildcard() { - if let Err(status) = - metadata.access(|node| node.validate_event_path(&path, &accessor)) - { - if matches!(status, IMStatusCode::UnsupportedEvent) { - // Event does not exist on this endpoint - // TODO: Look at TestEventsById.yaml - // Seems we should not error out in that case? - continue; - } - - *empty = false; - - let resp = EventResp::Status(EventStatus::new(path, status, None)); - - let mut result = resp.to_tlv(&TLVTag::Anonymous, &mut *wb); - - if let Err(e) = &result { - if e.code() == ErrorCode::NoSpace { - debug!("<<< No TX space, chunking >>>"); - if !self - .send(ReportDataChunkState::ChunkingEvents, false, &mut *wb) - .await? - { - return Ok(false); - } - - result = resp.to_tlv(&TLVTag::Anonymous, &mut *wb); - } - } - - result?; - } - } - } - - let event_filters = self.req.event_filters()?; - - loop { - let finished = self.events.fetch(|events| { - metadata.access(|node| { - for event in events { - let result = self.event_reader.process_read( - event, - &event_reqs, - &event_filters, - node, - &accessor, - &mut *wb, - ); - - if let Err(e) = &result { - if e.code() == ErrorCode::NoSpace { - return Ok::<_, Error>(false); - } - } - - if result? { - *empty = false; - } - } - - Ok(true) - }) - })?; - - if finished { - break; - } - - debug!("<<< No TX space, chunking >>>"); - if !self - .send(ReportDataChunkState::ChunkingEvents, false, wb) - .await? - { - return Ok(false); - } - } - - wb.end_container()?; - } - - Ok(true) - } - - /// Send the items of an array attribute one by one, until the end of the array is reached. - /// - /// The data is potentially sent in multiple chunks if it cannot fit into a single Matter message. - /// - /// Arguments: - /// - `attr` - the array attribute to send the items of - /// - `wb` - the buffer to use while sending the items - async fn send_array_items( - &mut self, - attr: &AttrDetails, - wb: &mut WriteBuf<'_>, - ) -> Result { - let mut attr = attr.clone(); - - // First generate an empty array - let mut list_index = None; - attr.list_chunked = true; - attr.list_index = Some(Nullable::new(list_index)); - - loop { - let pos = wb.get_tail(); - - let result = self.invoker.read(&attr, &mut *wb).await; - - if result.is_err() { - // If we got an error, we rewind to the position before the read - // and handle it accordingly - wb.rewind_to(pos); - } - - match result { - Ok(()) => { - // The empty array payload was sent - // Now iterate over the array and send each item one by one as separate payload - - let new_list_index = if let Some(list_index) = list_index { - list_index + 1 - } else { - 0 - }; - - list_index = Some(new_list_index); - attr.list_index = Some(Nullable::some(new_list_index)); - } - Err(err) if err.code() == ErrorCode::NoSpace => { - debug!("<<< No TX space, chunking >>>"); - if !self - .send(ReportDataChunkState::ChunkingAttributes, false, wb) - .await? - { - return Ok(false); - } - } - Err(err) if err.code() == ErrorCode::ConstraintError => break, // Got to the end of the array - Err(err) => Err(err)?, - } - } - - Ok(true) - } - - /// Send the reply to the peer, potentially opening another reply. - /// - /// Arguments: - /// - `state`: tracks chunking state - are we just sending a chunk packet or are we done and wrapping up? - /// - `suppress_last_resp`: whether to suppress the response from the peer, this is ignored if state is != Done - /// - `wb`: the buffer containing the reply. Once the reply is sent, the buffer is re-initialized for a new reply if `more_chunks` is `true` - async fn send( - &mut self, - state: ReportDataChunkState, - suppress_last_resp: bool, - wb: &mut WriteBuf<'_>, - ) -> Result { - self.end_reply(state, suppress_last_resp, wb)?; - - self.invoker - .exchange() - .send(OpCode::ReportData, wb.as_slice()) - .await?; - - let cont = match state { - ReportDataChunkState::ChunkingAttributes => { - let cont = self.recv_status_success().await?; - self.start_reply(wb)?; - wb.start_array(&TLVTag::Context(ReportDataRespTag::AttributeReports as u8))?; - cont - } - ReportDataChunkState::ChunkingEvents => { - let cont = self.recv_status_success().await?; - self.start_reply(wb)?; - wb.start_array(&TLVTag::Context(ReportDataRespTag::EventReports as u8))?; - cont - } - ReportDataChunkState::Done => { - if !suppress_last_resp { - self.recv_status_success().await? - } else { - false - } - } - }; - - Ok(cont) - } - - /// Receive a status response from the peer - /// - /// If the response is not a status response, the method will fail with an `Invalid` error. - /// - /// Return `Ok(true)` if the response is a success response, `Ok(false)` if the response is not a success response. - async fn recv_status_success(&mut self) -> Result { - let rx = self.invoker.exchange().recv().await?; - let opcode = rx.meta().proto_opcode; - - if opcode != OpCode::StatusResponse as u8 { - warn!( - "Got opcode {:02x}, while expecting status code {:02x}", - opcode, - OpCode::StatusResponse as u8 - ); - - return Err(ErrorCode::Invalid.into()); - } - - let resp = StatusResp::from_tlv(&get_root_node_struct(rx.payload())?)?; - - if resp.status == IMStatusCode::Success { - Ok(true) - } else { - warn!( - "Got status response {:?}, aborting interaction", - resp.status - ); - - drop(rx); - - self.invoker.exchange().acknowledge().await?; - - Ok(false) - } - } - - /// Start a reply by initializing the `WriteBuf` and writing the initial TLVs. - fn start_reply(&self, wb: &mut WriteBuf<'_>) -> Result<(), Error> { - wb.reset(); - wb.shrink(Self::LONG_READS_TLV_RESERVE_SIZE)?; - - wb.start_struct(&TLVTag::Anonymous)?; - - if let Some(subscription_id) = self.subscription_id { - assert!(matches!( - self.req, - ReportDataReq::Subscribe(_) | ReportDataReq::SubscribeReport(_) - )); - wb.u32( - &TLVTag::Context(ReportDataRespTag::SubscriptionId as u8), - subscription_id, - )?; - } else { - assert!(matches!(self.req, ReportDataReq::Read(_))); - } - - Ok(()) - } - - /// End a reply by writing the closing TLVs and potentially indicating that there are more chunks to send. - fn end_reply( - &self, - state: ReportDataChunkState, - suppress_resp: bool, - wb: &mut WriteBuf<'_>, - ) -> Result<(), Error> { - wb.expand(Self::LONG_READS_TLV_RESERVE_SIZE)?; - - match state { - ReportDataChunkState::ChunkingAttributes | ReportDataChunkState::ChunkingEvents => { - wb.end_container()?; - wb.bool( - &TLVTag::Context(ReportDataRespTag::MoreChunkedMsgs as u8), - true, - )?; - } - ReportDataChunkState::Done => { - if suppress_resp { - wb.bool( - &TLVTag::Context(ReportDataRespTag::SupressResponse as u8), - true, - )?; - } - } - }; - - // InteractionModelRevision is mandatory in all IM messages from - // Matter 1.0 onward (TLV tag 0xFF). matter.js validates this - // strictly and refuses to commission devices that omit it; the - // reference chip-tool happens to tolerate the absence. - wb.u8( - &TLVTag::Context(GlobalElements::InteractionModelRevision as u8), - IM_REVISION, - )?; - - wb.end_container()?; - - Ok(()) - } -} - -/// Used to avoid duplicating the chunking logic for events and attributes; they both -/// share the same write path when the current packet fills up, and use this to determine -/// which field they should be setting up an array in for more output in the next packet -#[derive(Clone, Copy)] -enum ReportDataChunkState { - ChunkingAttributes, - ChunkingEvents, - Done, -} - -/// This type responds to a `WriteReq` by invoking the -/// corresponding handlers for each write attribute in the request. -/// -/// The responser assumes that all response data can fit in a single Matter message, -/// which is a fair assumption and as per the Matter spec, in that the response of a -/// write request is always shorter than the write request itself, so given that the -/// write request fits in a single Matter message, the write reponse should as well. -/// -/// With that said, the write request might itself be just one out of many chunks that -/// the other peers is sending, but processing all of those chunks is not done here, -/// but is rather - a responsibility of the caller who should call in a loop `WriteResponder::respond` -/// for all the chunks of the write request, until the `WriteReq::more_chunks()` returns `false`. -struct WriteResponder<'a, 'b, 'c, C> { - req: &'a WriteReq<'a>, - invoker: HandlerInvoker<'b, 'c, C>, -} - -impl<'a, 'b, 'c, C> WriteResponder<'a, 'b, 'c, C> -where - C: HandlerContext, -{ - /// Create a new `WriteResponder`. - const fn new(req: &'a WriteReq<'a>, invoker: HandlerInvoker<'b, 'c, C>) -> Self { - Self { req, invoker } - } - - /// Respond to the write request by processing each write attribute in the request - /// and sending a response back. - async fn respond( - &mut self, - wb: &mut WriteBuf<'_>, - metadata: M, - suppress_resp: bool, - ) -> Result<(), Error> - where - M: Metadata, - { - let accessor = self.invoker.exchange().accessor()?; - - wb.reset(); - - wb.start_struct(&TLVTag::Anonymous)?; - wb.start_array(&TLVTag::Context(WriteRespTag::WriteResponses as u8))?; - - for item in expand_write(metadata, self.req, &accessor)? { - self.invoker.process_write(&item?, &mut *wb).await?; - } - - if suppress_resp { - return Ok(()); - } - - wb.end_container()?; - // Mandatory `interactionModelRevision` (tag 0xFF); see note in - // the ReportData emitter above. - wb.u8( - &TLVTag::Context(GlobalElements::InteractionModelRevision as u8), - IM_REVISION, - )?; - wb.end_container()?; - - self.invoker - .exchange() - .send(OpCode::WriteResponse, wb.as_slice()) - .await - } -} - -/// This type responds to an `InvRequest` by invoking the -/// corresponding handlers for each command in the invoke request. -/// -/// NOTE: In future, this responder should support chunking in that -/// if the reply to all the commands in the invoke request is too large to fit -/// into a single Matter message, it should send the response in multiple chunks. -/// -/// The simplest strategy for chunking would be to simply - and unconditionally - send each individual -/// command response in a separate Matter message, i.e. if the invoke request contains 3 commands, -/// the responder will send 3 Matter messages, each containing a single command response. -struct InvokeResponder<'a, 'b, 'c, C> { - req: &'a InvReq<'a>, - invoker: HandlerInvoker<'b, 'c, C>, -} - -impl<'a, 'b, 'c, C> InvokeResponder<'a, 'b, 'c, C> -where - C: HandlerContext, -{ - /// Create a new `InvokeResponder`. - const fn new(req: &'a InvReq<'a>, invoker: HandlerInvoker<'b, 'c, C>) -> Self { - Self { req, invoker } - } - - /// Respond to the invoke request by processing each command in the request - /// and sending one or more reponses back. - async fn respond( - &mut self, - wb: &mut WriteBuf<'_>, - metadata: M, - suppress_resp: bool, - ) -> Result<(), Error> - where - M: Metadata, - { - wb.reset(); - - wb.start_struct(&TLVTag::Anonymous)?; - - // Suppress Response -> TODO: Need to revisit this for cases where we send a command back - wb.bool( - &TLVTag::Context(InvRespTag::SupressResponse as u8), - suppress_resp, - )?; - - let has_requests = self.req.inv_requests()?.is_some(); - - if has_requests { - wb.start_array(&TLVTag::Context(InvRespTag::InvokeResponses as u8))?; - } - - let accessor = self.invoker.exchange().accessor()?; - - for item in expand_invoke(metadata, self.req, &accessor)? { - self.invoker.process_invoke(&item?, &mut *wb).await?; - } - - if suppress_resp { - return Ok(()); - } - - if has_requests { - wb.end_container()?; - } - - // Mandatory `interactionModelRevision` (tag 0xFF) at the end of - // every IM message — see the matching note in the ReportData - // emitter above. - wb.u8( - &TLVTag::Context(GlobalElements::InteractionModelRevision as u8), - IM_REVISION, - )?; - wb.end_container()?; - - self.invoker - .exchange() - .send(OpCode::InvokeResponse, wb.as_slice()) - .await?; - - Ok(()) - } -} diff --git a/rs-matter/src/dm/clusters/basic_info.rs b/rs-matter/src/dm/clusters/basic_info.rs index 9c649d19b..0b828e05f 100644 --- a/rs-matter/src/dm/clusters/basic_info.rs +++ b/rs-matter/src/dm/clusters/basic_info.rs @@ -19,10 +19,10 @@ use core::str::FromStr; -use crate::dm::subscriptions::DEFAULT_MAX_SUBSCRIPTIONS; use crate::dm::{Cluster, Dataver, InvokeContext, ReadContext, WriteContext}; use crate::error::{Error, ErrorCode}; use crate::fabric::MAX_FABRICS; +use crate::im::subscriptions::DEFAULT_MAX_SUBSCRIPTIONS; use crate::persist::{KvBlobStore, Persist, BASIC_INFO_KEY}; use crate::tlv::{FromTLV, Nullable, TLVBuilderParent, TLVElement, ToTLV, Utf8StrBuilder}; use crate::transport::exchange::Exchange; diff --git a/rs-matter/src/dm/types/handler.rs b/rs-matter/src/dm/types/handler.rs index 3a8cb8a8f..f60a34dae 100644 --- a/rs-matter/src/dm/types/handler.rs +++ b/rs-matter/src/dm/types/handler.rs @@ -22,10 +22,10 @@ use embassy_futures::select::select; use crate::crypto::Crypto; use crate::dm::clusters::net_comm::NetworksAccess; -use crate::dm::events::EventTLVWrite; -use crate::dm::{EventId, IMBuffer, Metadata}; +use crate::dm::{EventId, Metadata}; use crate::error::{Error, ErrorCode}; -use crate::im::{EventNumber, EventPriority}; +use crate::im::events::EventTLVWrite; +use crate::im::{EventNumber, EventPriority, IMBuffer}; use crate::persist::KvBlobStoreAccess; use crate::tlv::TLVElement; use crate::transport::exchange::Exchange; diff --git a/rs-matter/src/im.rs b/rs-matter/src/im.rs index a12648b10..7778568fe 100644 --- a/rs-matter/src/im.rs +++ b/rs-matter/src/im.rs @@ -15,17 +15,58 @@ * limitations under the License. */ -//! This module contains the TLV-serde types as defined by the Interaction Model. +//! The Interaction Model as defined by the Matter Core spec: the interactions +//! (Read, Subscribe/Report, Write, Invoke, Timed) and their TLV-serde encoding +//! types, plus the engine - [`InteractionModel`] - that drives those +//! interactions against a [`crate::dm`] data model. //! -//! Additionally, it contains a very simple IM implementation - busy - which always -//! returns a busy status code, to all incoming IM requests. +//! It also contains a requestor-side IM client ([`client`]) and a very simple +//! responder - [`busy`] - which always returns a busy status code to all +//! incoming IM requests. + +use core::num::NonZeroU8; +use core::pin::pin; + +use embassy_futures::select::{select3, select4}; +use embassy_time::{Instant, Timer}; use num::FromPrimitive; use num_derive::FromPrimitive; +use crate::acl::Accessor; +use crate::crypto::Crypto; +use crate::dm::clusters::net_comm::{ + NetCtl, NetworkType, Networks, NetworksAccess, SharedNetworks, +}; +use crate::dm::clusters::wifi_diag::WirelessDiag; +use crate::dm::networks::eth::EthNetwork; +use crate::dm::networks::wireless::{NoopWirelessNetCtl, WirelessMgr, MAX_CREDS_SIZE}; +use crate::dm::networks::NetChangeNotif; +use crate::dm::{ + expand_invoke, expand_read, expand_write, AsyncHandler, AttrChangeNotifier, AttrDetails, + Attribute, DataModel, EventEmitter, EventReader, GlobalElements, HandlerContext, + HandlerInvoker, MatchContextInstance, Metadata, +}; use crate::error::{Error, ErrorCode}; -use crate::tlv::{FromTLV, TLVElement, TLVTag, TLVWrite, ToTLV, TLV}; -use crate::transport::exchange::MessageMeta; +use crate::im::events::{EventTLVWrite, Events, DEFAULT_MAX_EVENTS_BUF_SIZE}; +use crate::im::subscriptions::{ + ReportContext, Subscriptions, SubscriptionsBuffers, DEFAULT_MAX_SUBSCRIPTIONS, +}; +use crate::persist::{ + KvBlobStore, KvBlobStoreAccess, SharedKvBlobStore, DEFAULT_KV_BUF_SIZE, NETWORKS_KEY, +}; +use crate::respond::ExchangeHandler; +use crate::tlv::{ + get_root_node_struct, FromTLV, Nullable, TLVElement, TLVTag, TLVWrite, ToTLV, TLV, +}; +use crate::transport::exchange::{Exchange, ExchangeId, MessageMeta, MAX_EXCHANGE_TX_BUF_SIZE}; +use crate::utils::cell::RefCell; +use crate::utils::init::{init, Init}; +use crate::utils::select::Coalesce; +use crate::utils::storage::pooled::Buffers; +use crate::utils::storage::WriteBuf; +use crate::utils::sync::blocking::Mutex; +use crate::Matter; pub use attr::*; pub use event::*; @@ -37,6 +78,8 @@ pub use types::*; pub mod busy; pub mod client; +pub mod events; +pub mod subscriptions; mod attr; mod event; @@ -282,3 +325,1970 @@ impl GenericPath { ) } } + +/// The buffer type used by the Interaction Model for RX/TX payloads. Aliases the +/// central [`Buffer`](crate::transport::exchange::Buffer). +pub type IMBuffer = crate::transport::exchange::Buffer; + +/// An `ExchangeHandler` implementation capable of handling responder exchanges for the Interaction Model protocol. +/// The mutable, owned-together state a [`InteractionModel`] operates on: the +/// subscriptions table, the events queue and the network store. +/// +/// Allocating these as a single value (rather than three separate locals wired +/// up by hand at every call site) is the whole point: construct one +/// `InteractionModelState`, then hand a reference to it to [`InteractionModel::new`]. Each of +/// the three pieces keeps its own lock internally (the proven multi-lock model); +/// folding them behind a single mutex is a possible later refinement. +/// +/// `N` is the (raw) [`Networks`] implementation — e.g. +/// [`EthNetwork`](crate::dm::networks::eth::EthNetwork) or +/// [`WirelessNetworks`](crate::dm::networks::wireless::WirelessNetworks); it is +/// wrapped internally in a [`SharedNetworks`] so the data model and (later) the +/// wireless manager can share it. `NS`/`NE` bound the subscription table and the +/// event-buffer size and default to [`DEFAULT_MAX_SUBSCRIPTIONS`] / +/// [`DEFAULT_MAX_EVENTS_BUF_SIZE`]. +pub struct InteractionModelState< + N, + const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, + const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, + const KB: usize = DEFAULT_KV_BUF_SIZE, +> { + subscriptions: Subscriptions, + events: Events, + networks: SharedNetworks, + /// The scratch buffer used by the key-value persistence machinery at runtime. + /// Behind a blocking mutex so the data model can recombine it with the + /// (store-only) [`SharedKvBlobStore`](crate::persist::SharedKvBlobStore). + kv_buf: Mutex>, +} + +impl InteractionModelState { + /// Create a new state instance backed by the given (raw) [`Networks`] store. + pub const fn new(networks: N) -> Self { + Self { + subscriptions: Subscriptions::new(), + events: Events::new(), + networks: SharedNetworks::new(networks), + kv_buf: Mutex::new(RefCell::new([0; KB])), + } + } + + /// Return an in-place initializer for the state (for large `NE`/`KB`, to + /// avoid a big temporary on the stack). + pub fn init(networks: impl Init) -> impl Init { + init!(Self { + subscriptions <- Subscriptions::init(), + events <- Events::init(), + networks <- SharedNetworks::init(networks), + kv_buf <- Mutex::init(RefCell::init(crate::utils::init::zeroed())), + }) + } + + /// Re-hydrate this state's persisted contents - the events-queue epoch (so + /// event numbers are not reused across reboots) and the network store - using + /// this state's own (owned) scratch buffer. Call once at startup, before the + /// state is shared with a [`InteractionModel`]. + pub async fn load_persist(&mut self, mut kv: S) -> Result<(), Error> + where + S: KvBlobStore, + N: Networks, + { + // We hold `&mut self`, so borrow the scratch buffer directly - no locking + // (the mutex is only needed for shared, runtime access). + let Self { + events, + networks, + kv_buf, + .. + } = self; + + let buf = &mut kv_buf.get_mut().get_mut()[..]; + + // The event-number epoch. + events.load_persist(&mut kv, buf).await?; + + // The network store. + let networks = networks.get_mut().get_mut(); + networks.reset()?; + if let Some(data) = kv.load(NETWORKS_KEY, buf)? { + networks.load(data)?; + } + + Ok(()) + } + + /// Borrow this state's owned scratch buffer for one-time startup loads (e.g. + /// [`Matter::load_persist`] or a cluster's `load_persist`), so callers need + /// not allocate a separate buffer. + /// + /// Available only with exclusive (`&mut`) access - i.e. before the state is + /// shared with a [`InteractionModel`]. + pub fn kv_buf_mut(&mut self) -> &mut [u8] { + &mut self.kv_buf.get_mut().get_mut()[..] + } + + /// The subscriptions table. + pub const fn subscriptions(&self) -> &Subscriptions { + &self.subscriptions + } + + /// The events queue. + pub const fn events(&self) -> &Events { + &self.events + } + + /// The network store (wrapped for shared, change-notifying access). + pub const fn networks(&self) -> &SharedNetworks { + &self.networks + } +} + +/// Recombines a store-only [`SharedKvBlobStore`] with the scratch buffer owned by +/// a [`InteractionModelState`] to present a full [`KvBlobStoreAccess`]. +/// +/// The buffer lock is always taken first, then the store lock, so the two-lock +/// order is consistent across all persistence paths (and single-threaded +/// executors never actually block on either). +struct StateKvBlobStore<'a, S, const KB: usize> { + store: &'a SharedKvBlobStore, + buf: &'a Mutex>, +} + +impl KvBlobStoreAccess for StateKvBlobStore<'_, S, KB> +where + S: KvBlobStore, +{ + fn access(&self, f: F) -> R + where + F: FnOnce(&mut dyn KvBlobStore, &mut [u8]) -> R, + { + self.buf.lock(|cell| { + let mut buf = cell.borrow_mut(); + + self.store.with_store(|store| f(store, &mut buf[..])) + }) + } +} + +/// The implementation needs a `DataModel` instance to interact with the underlying clusters of the data model. +/// +/// `NC` is the network controller type driving the (optional) wireless connection +/// manager from [`InteractionModel::run`]. It defaults to [`NoopWirelessNetCtl`], which is +/// the right choice for Ethernet (and what the convenience [`InteractionModel::new`] +/// constructor wires up); wireless devices pass a real controller via +/// [`InteractionModel::new_with_net_ctl`]. +pub struct InteractionModel< + 'a, + C, + B, + T, + S, + N, + NC = NoopWirelessNetCtl, + const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, + const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, + const KB: usize = DEFAULT_KV_BUF_SIZE, +> where + B: Buffers, +{ + matter: &'a Matter<'a>, + crypto: C, + buffers: &'a B, + kv: SharedKvBlobStore, + net_ctl: NC, + subscriptions_buffers: SubscriptionsBuffers<'a, B, NS>, + state: &'a InteractionModelState, + handler: T, +} + +/// A [`InteractionModelState`] for an Ethernet device: its network store is a fixed +/// [`EthNetwork`], so call sites need only the (defaulted) subscription/event +/// sizes. Pairs with [`EthInteractionModel`]. +pub type EthInteractionModelState< + const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, + const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, + const KB: usize = DEFAULT_KV_BUF_SIZE, +> = InteractionModelState, NS, NE, KB>; + +/// A [`InteractionModel`] for an Ethernet device (network store fixed to [`EthNetwork`]), +/// so the `N` generic disappears from call sites. Pairs with [`EthInteractionModelState`]. +pub type EthInteractionModel< + 'a, + C, + B, + T, + S, + NC = NoopWirelessNetCtl, + const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, + const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, + const KB: usize = DEFAULT_KV_BUF_SIZE, +> = InteractionModel<'a, C, B, T, S, EthNetwork<'static>, NC, NS, NE, KB>; + +/// A [`InteractionModelState`] for a wireless device, parameterized by the concrete +/// wireless network store `N` (e.g. `WifiNetworks<3>` or a Thread store). Pairs +/// with [`WirelessInteractionModel`]. +pub type WirelessInteractionModelState< + N, + const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, + const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, + const KB: usize = DEFAULT_KV_BUF_SIZE, +> = InteractionModelState; + +/// A [`InteractionModel`] for a wireless device (network store `N`, network controller +/// `NC`). Pairs with [`WirelessInteractionModelState`]. +pub type WirelessInteractionModel< + 'a, + C, + B, + T, + S, + N, + NC, + const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, + const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, + const KB: usize = DEFAULT_KV_BUF_SIZE, +> = InteractionModel<'a, C, B, T, S, N, NC, NS, NE, KB>; + +impl<'a, C, B, T, S, N, const NS: usize, const NE: usize, const KB: usize> + InteractionModel<'a, C, B, T, S, N, NoopWirelessNetCtl, NS, NE, KB> +where + C: Crypto, + B: Buffers, + T: DataModel, + S: KvBlobStore, + N: Networks, +{ + /// Create the data model for a device that does not need an operational + /// wireless connection manager (typically an Ethernet device). + /// + /// This is a convenience wrapper around [`InteractionModel::new_with_net_ctl`] that + /// fixes the network controller to an inert [`NoopWirelessNetCtl`], so + /// [`InteractionModel::run`]'s connection-management branch stays dormant. + /// + /// # Arguments + /// - `matter` - a reference to the `Matter` instance + /// - `buffers` - a reference to an implementation of `Buffers` which is used for allocating RX and TX buffers on the fly, when necessary + /// - `handler` - an instance of type `T` which implements the `DataModel` trait. This instance is used for interacting with the underlying + /// clusters of the data model. Note that the expectations is for the user to provide a handler that handles the Matter system clusters + /// as well (Endpoint 0), possibly by decorating her own clusters with the `rs_matter::dm::root_endpoint::with_` methods + /// - `kv` - an instance of type `S` which implements the `KvBlobStoreAccess` trait. This instance is used for interacting with the key-value blob store. + /// - `state` - a reference to the [`InteractionModelState`] holding the subscriptions table, the + /// events queue and the network store (the latter parameterized by the `Networks` + /// implementation `N`). + #[inline(always)] + pub fn new( + matter: &'a Matter<'a>, + crypto: C, + buffers: &'a B, + handler: T, + kv: SharedKvBlobStore, + state: &'a InteractionModelState, + ) -> Self { + Self::new_with_net_ctl( + matter, + crypto, + buffers, + handler, + kv, + NoopWirelessNetCtl::new(NetworkType::Ethernet), + state, + ) + } +} + +impl<'a, C, B, T, S, N, NC, const NS: usize, const NE: usize, const KB: usize> + InteractionModel<'a, C, B, T, S, N, NC, NS, NE, KB> +where + C: Crypto, + B: Buffers, + T: DataModel, + S: KvBlobStore, + N: Networks, +{ + /// Create the data model with an explicit network controller `net_ctl`. + /// + /// Use this for wireless devices: `net_ctl` drives the operational connection + /// manager run from [`InteractionModel::run`] (and is typically the same controller + /// instance also wired into the `NetworkCommissioning` cluster handler). For + /// Ethernet devices prefer the [`InteractionModel::new`] convenience constructor. + /// + /// # Arguments + /// - `matter` - a reference to the `Matter` instance + /// - `buffers` - a reference to an implementation of `Buffers` which is used for allocating RX and TX buffers on the fly, when necessary + /// - `handler` - an instance of type `T` which implements the `DataModel` trait. This instance is used for interacting with the underlying + /// clusters of the data model. Note that the expectations is for the user to provide a handler that handles the Matter system clusters + /// as well (Endpoint 0), possibly by decorating her own clusters with the `rs_matter::dm::root_endpoint::with_` methods + /// - `kv` - an instance of type `S` which implements the `KvBlobStoreAccess` trait. This instance is used for interacting with the key-value blob store. + /// - `net_ctl` - the network controller (`NetCtl` + `WirelessDiag` + `NetChangeNotif`) used by + /// the operational wireless connection manager driven from [`InteractionModel::run`]. + /// - `state` - a reference to the [`InteractionModelState`] holding the subscriptions table, the + /// events queue and the network store (the latter parameterized by the `Networks` + /// implementation `N`). + #[inline(always)] + pub fn new_with_net_ctl( + matter: &'a Matter<'a>, + crypto: C, + buffers: &'a B, + handler: T, + kv: SharedKvBlobStore, + net_ctl: NC, + state: &'a InteractionModelState, + ) -> Self { + state.subscriptions.clear(); + + Self { + matter, + crypto, + buffers, + kv, + net_ctl, + subscriptions_buffers: SubscriptionsBuffers::new(), + state, + handler, + } + } + + /// Get a reference to the `Matter` instance this data model is associated with. + pub const fn matter(&self) -> &'a Matter<'a> { + self.matter + } + + pub const fn crypto(&self) -> &C { + &self.crypto + } + + /// Return a [`KvBlobStoreAccess`] for interacting with the key-value blob + /// store. This recombines the store-only `S` held by the data model with the + /// scratch buffer owned by the [`InteractionModelState`]. + pub fn kv(&self) -> impl KvBlobStoreAccess + '_ { + self.kv_access() + } + + /// Recombine the store-only KV (`self.kv`) with the scratch buffer owned by + /// [`InteractionModelState`] into a full [`KvBlobStoreAccess`]. + fn kv_access(&self) -> StateKvBlobStore<'_, S, KB> { + StateKvBlobStore { + store: &self.kv, + buf: &self.state.kv_buf, + } + } + + /// Open the basic commissioning window. + /// + /// Equivalent to [`Matter::open_basic_comm_window`] but additionally + /// bumps the data version of the `AdministratorCommissioning` + /// cluster on the root endpoint and routes the change to + /// subscribers — both happen automatically because this `InteractionModel` + /// is itself the [`AttrChangeNotifier`] passed down. + /// + /// Prefer this entry point over the `Matter` one for any code path + /// that has a `InteractionModel` available; `Matter::open_basic_comm_window` + /// is the building block we delegate to and does not bump dataver + /// (see its docs). + pub fn open_basic_comm_window(&self, timeout_secs: u16) -> Result<(), Error> { + self.matter + .open_basic_comm_window(timeout_secs, &self.crypto, self) + } + + /// Close the active commissioning window. + /// + /// Equivalent to [`Matter::close_comm_window`] but additionally + /// bumps the `AdministratorCommissioning` dataver and routes + /// subscribers via this `InteractionModel`'s [`AttrChangeNotifier`]. See + /// `open_basic_comm_window` for the rationale. + pub fn close_comm_window(&self) -> Result { + self.matter.close_comm_window(self) + } + + /// Bump `BasicInformation::ConfigurationVersion` by one, persist + /// the new value, and notify subscribers (which also bumps the + /// `BasicInformation` cluster's dataver via this `InteractionModel`'s + /// [`AttrChangeNotifier`]). + /// + /// Per Matter Core Spec, callers MUST invoke this + /// whenever the node's exposed fixed-quality surface changes — + /// typically after a firmware update that adds or removes + /// functionality, after an internal reconfiguration that changes + /// any `F`-quality attribute (Descriptor::ServerList, + /// PartsList, …), or (for bridges) after a bridged node is added + /// or removed. It is not invoked automatically by `rs-matter` + /// because the library has no way to know about an application's + /// reconfiguration events. + /// + /// Returns the new `ConfigurationVersion` value. + pub fn bump_configuration_version(&self) -> Result { + // Delegate to `Matter::bump_configuration_version` for the + // in-memory bump + persist; pass `self` as the + // `AttrChangeNotifier` so the cluster's `Dataver` is bumped + // too (the `Matter`-level call by itself only routes + // subscribers and persists). + self.matter + .bump_configuration_version(self.kv_access(), self) + } + + /// Run the Data Model instance. + /// + /// This drives the IM timeout checks, the data-model handler's own background + /// job, the subscriptions reporting loop, and - for wireless devices - the + /// operational connection manager (inert for Ethernet, where `net_ctl` is a + /// [`NoopWirelessNetCtl`]). + pub async fn run(&self) -> Result<(), Error> + where + NC: NetCtl + WirelessDiag + NetChangeNotif, + { + let mut timeouts = pin!(self.run_timeout_checks()); + let mut handler = pin!(self.handler.run(self)); + let mut subs = pin!(self.process_subscriptions(self.matter)); + let mut net = pin!(self.run_net_mgr()); + + select4(&mut timeouts, &mut handler, &mut subs, &mut net) + .coalesce() + .await + } + + /// Drive the operational wireless connection manager. + /// + /// For Ethernet devices (`net_ctl.net_type() == NetworkType::Ethernet`) there + /// is nothing to manage, so this future simply pends forever. For wireless + /// devices it runs a [`WirelessMgr`] over the network store, cycling through + /// the registered networks and (re)connecting as needed once commissioned. + async fn run_net_mgr(&self) -> Result<(), Error> + where + NC: NetCtl + WirelessDiag + NetChangeNotif, + { + if self.net_ctl.net_type() == NetworkType::Ethernet { + // Nothing to manage for a wired device - just pend forever. + return core::future::pending().await; + } + + let mut buf = [0u8; MAX_CREDS_SIZE]; + let mut mgr = WirelessMgr::new(self.state.networks(), &self.net_ctl, &mut buf); + + mgr.run().await + } + + async fn run_timeout_checks(&self) -> Result<(), Error> { + const CHECK_INTERVAL_SECS: u64 = 1; + + loop { + Timer::after_secs(CHECK_INTERVAL_SECS).await; + + self.check_timeouts(None)?; + } + } + + fn check_timeouts(&self, exch_id: Option) -> Result<(), Error> { + let mut notify_mdns = || self.matter.transport().notify_mdns_changed(); + let mut notify_change = + |endpt_id, clust_id| self.notify_cluster_changed(endpt_id, clust_id); + + self.matter.with_state(|state| { + let expire_sess_id = exch_id.and_then(|exch_id| { + state + .sessions + .get(exch_id.session_id()) + .map(|sess| sess.id()) + }); + + // Disarm the failsafe on timeout + state.failsafe.check_failsafe_timeout( + &mut state.fabrics, + &mut state.sessions, + &self.state.networks, + self.kv_access(), + expire_sess_id, + &mut notify_mdns, + &mut notify_change, + )?; + + // Close the commissioning window on timeout + state + .pase + .check_comm_window_timeout(&mut notify_mdns, &mut notify_change)?; + + Ok(()) + }) + } + + /// Answer a responding exchange using the `DataModel` instance wrapped by this exchange handler. + pub async fn handle(&self, exchange: &mut Exchange<'_>) -> Result<(), Error> { + let fetch_meta = |exchange: &mut Exchange| { + let meta = exchange.rx()?.meta(); + if meta.proto_id != PROTO_ID_INTERACTION_MODEL { + Err(ErrorCode::InvalidProto)?; + } + + Result::<_, Error>::Ok(meta) + }; + + if exchange.rx().is_err() { + exchange.recv_fetch().await?; + } + + let is_groupcast = exchange.is_groupcast()?; + + let mut meta = fetch_meta(exchange)?; + + let timeout_instant = if !is_groupcast && meta.opcode::()? == OpCode::TimedRequest { + let timeout = self.timed(exchange).await?; + + exchange.recv_fetch().await?; + meta = fetch_meta(exchange)?; + + Some(timeout) + } else { + None + }; + + self.check_timeouts(Some(exchange.id()))?; + + // TODO: Handle the cases where we receive a timeout request + // before read and subscribe. This is probably not allowed. + + match meta.opcode::()? { + OpCode::ReadRequest if is_groupcast => { + error!("Received a groupcast message for opcode: ReadRequest") + } + OpCode::ReadRequest if !is_groupcast => self.read(exchange).await?, + OpCode::WriteRequest => self.write(exchange, timeout_instant, is_groupcast).await?, + OpCode::InvokeRequest => self.invoke(exchange, timeout_instant, is_groupcast).await?, + OpCode::SubscribeRequest if is_groupcast => { + error!("Received a groupcast message for opcode: SubscribeRequest") + } + OpCode::SubscribeRequest if !is_groupcast => self.subscribe(exchange).await?, + OpCode::TimedRequest if !is_groupcast => { + Self::send_status(exchange, IMStatusCode::InvalidAction).await? + } + _ if is_groupcast => { + // Silently drop unsupported opcodes for group messages + } + opcode => { + error!("Invalid opcode: {:?}", opcode); + Err(ErrorCode::InvalidOpcode)? + } + } + + if !is_groupcast { + exchange.acknowledge().await?; + } + + Ok(()) + } + + /// Respond to a `ReadReq` request. + async fn read(&self, exchange: &mut Exchange<'_>) -> Result<(), Error> { + let Some((mut tx, rx)) = self.buffers(exchange).await? else { + return Ok(()); + }; + + let read_req = ReadReq::new(TLVElement::new(&rx)); + debug!("IM: Read request: {:?}", read_req); + + if let Err(err) = Self::validate_read(&read_req) { + error!("Invalid read request: {:?}", err); + return Self::send_status(exchange, err.code().into()).await; + } + + let req = ReportDataReq::Read(&read_req); + + let mut wb = WriteBuf::new(&mut tx); + + // Honor the `fabricFiltered` flag on the originating Read request. + // When set, fabric-sensitive events emitted on other fabrics are + // dropped before they reach the wire (Matter Core spec). + let fabric_filtered = req.fabric_filtered().unwrap_or(true); + + let mut resp = ReportDataResponder::new( + &req, + None, + HandlerInvoker::new(exchange, self), + EventReader::new(0, u64::MAX, fabric_filtered), + &self.state.events, + ); + + resp.respond(&mut wb, true, true, &self.handler, |_, _, _| true) + .await?; + + Ok(()) + } + + /// Validate a `ReadReq` request prior to processing. + fn validate_read(req: &ReadReq<'_>) -> Result<(), Error> { + if let Some(attr_requests) = req.attr_requests()? { + for attr_req in attr_requests { + Self::validate_attr_wildcard_path(&attr_req?)?; + } + } + + Ok(()) + } + + /// Per-spec validation of an `AttrPath` that may contain wildcards. + /// + /// Per Matter spec, when a path uses a wildcard cluster + /// but specifies a concrete attribute id, that attribute id must be a + /// global (system) attribute. Any other combination must be rejected with + /// `INVALID_ACTION`. + fn validate_attr_wildcard_path(path: &AttrPath) -> Result<(), Error> { + if path.cluster.is_none() { + if let Some(attr_id) = path.attr { + if !Attribute::is_system_attr(attr_id) { + return Err(ErrorCode::InvalidAction.into()); + } + } + } + + Ok(()) + } + + /// Respond to a `WriteReq` request. + /// + /// Arguments: + /// - `exchange` - the exchange to respond to + /// - `timeout_instant` - an optional timeout instant, if the request is a timed request + async fn write( + &self, + exchange: &mut Exchange<'_>, + timeout_instant: Option, + is_groupcast: bool, + ) -> Result<(), Error> { + while exchange.rx().is_ok() { + // Loop while there are more write request chunks to process + + let Some((mut tx, rx)) = self.buffers(exchange).await? else { + break; + }; + + let req = WriteReq::new(TLVElement::new(&rx)); + debug!("IM: Write request: {:?}", req); + + let timed = req.timed_request()?; + + if self.timed_out(exchange, timeout_instant, timed).await? { + break; + } + + let mut wb = WriteBuf::new(&mut tx); + + let mut resp = WriteResponder::new(&req, HandlerInvoker::new(exchange, self)); + + resp.respond(&mut wb, &self.handler, is_groupcast).await?; + + if req.more_chunks()? { + // This write request is just one of the chunks, so we need to wait and process + // the next chunk as well + exchange.recv_fetch().await?; + } + } + + Ok(()) + } + + /// Respond to an `InvokeReq` request. + /// + /// Arguments: + /// - `exchange` - the exchange to respond to + /// - `timeout_instant` - an optional timeout instant, if the request is a timed request + async fn invoke( + &self, + exchange: &mut Exchange<'_>, + timeout_instant: Option, + is_groupcast: bool, + ) -> Result<(), Error> { + let Some((mut tx, rx)) = self.buffers(exchange).await? else { + return Ok(()); + }; + + let req = InvReq::new(TLVElement::new(&rx)); + debug!("IM: Invoke request: {:?}", req); + + let timed = req.timed_request()?; + + if self.timed_out(exchange, timeout_instant, timed).await? { + return Ok(()); + } + + let max_paths = exchange.matter().dev_det().max_paths_per_invoke as usize; + + if let Some(reqs) = req.inv_requests()? { + let mut count = 0; + for r in &reqs { + let _ = r?; + count += 1; + } + + if count > max_paths { + return Self::send_status(exchange, IMStatusCode::InvalidAction).await; + } + + // Per Matter Core spec: when an `InvokeRequestMessage` + // carries multiple `CommandDataIB` entries, each MUST include a unique + // `CommandRef` and the request paths SHALL be unique. `count` is bounded + // by `max_paths_per_invoke` (typically a single-digit number), so the + // O(n²) pairwise check below is cheaper than allocating buffers. + if count > 1 { + for (i, req_i) in reqs.iter().enumerate() { + let req_i = req_i?; + if req_i.command_ref.is_none() { + return Self::send_status(exchange, IMStatusCode::InvalidAction).await; + } + for req_j in reqs.iter().skip(i + 1) { + let req_j = req_j?; + if req_i.path == req_j.path || req_i.command_ref == req_j.command_ref { + return Self::send_status(exchange, IMStatusCode::InvalidAction).await; + } + } + } + } + } + + let mut wb = WriteBuf::new(&mut tx); + + let mut resp = InvokeResponder::new(&req, HandlerInvoker::new(exchange, self)); + + resp.respond(&mut wb, &self.handler, is_groupcast).await + } + + /// Respond to a `SubscribeReq` request by priming the subscription (i.e. doing an initial data report) + /// and if the priming is successful, sending a `SubscribeResp` response to the peer and registering + /// the subscription details in the `Subscriptions` instance. + async fn subscribe(&self, exchange: &mut Exchange<'_>) -> Result<(), Error> { + let Some((mut tx, rx)) = self.buffers(exchange).await? else { + return Ok(()); + }; + + let req = SubscribeReq::new(TLVElement::new(&rx)); + debug!("IM: Subscribe request: {:?}", req); + + let accessor = exchange.accessor()?; + + if let Err(err) = self.validate_subscribe(&req, &accessor) { + error!("Invalid subscribe request: {:?}", err); + return Self::send_status(exchange, err.code().into()).await; + } + + let (fab_idx, peer_node_id) = exchange.with_state(|state| { + let sess = exchange.id().session(&mut state.sessions); + + let fab_idx = NonZeroU8::new(sess.get_local_fabric_idx()).ok_or(ErrorCode::Invalid)?; + let peer_node_id = sess.get_peer_node_id().ok_or(ErrorCode::Invalid)?; + + Ok((fab_idx, peer_node_id)) + })?; + + if !req.keep_subs()? { + self.state + .subscriptions + .remove(&self.subscriptions_buffers, |sub| { + (sub.ids().fab_idx == fab_idx && sub.ids().peer_node_id == peer_node_id) + .then_some("new subscription request") + }); + } + + let max_int_secs = core::cmp::max(req.max_int_ceil()?, 40); // Say we need at least 4 secs for potential latencies + let min_int_secs = req.min_int_floor()?; + + let now = Instant::now(); + + let Some(mut rctx) = self.state.subscriptions.add( + now, + fab_idx, + peer_node_id, + exchange.id().session_id(), + min_int_secs, + max_int_secs, + self.state.events.watermark(), + rx, + &self.subscriptions_buffers, + ) else { + return Self::send_status(exchange, IMStatusCode::ResourceExhausted).await; + }; + + let primed = self.report_data(&mut rctx, &mut tx, exchange, true).await?; + + if primed { + exchange + .send_with(|_, wb| { + SubscribeResp::write(wb, rctx.subscription().ids().id, max_int_secs)?; + Ok(Some(OpCode::SubscribeResponse.into())) + }) + .await?; + + rctx.set_keep(); + + info!("Subscription {:?} primed", rctx.subscription().ids()); + + // Commit the subscription into the table now (its `report_complete` + // runs on `Drop`) and then wake the reporter so it can account for + // the new subscription's deadline. + drop(rctx); + self.state.subscriptions.notification.notify(); + } + + Ok(()) + } + + /// Validates the subscription request + fn validate_subscribe( + &self, + req: &SubscribeReq<'_>, + accessor: &Accessor<'_>, + ) -> Result<(), Error> { + // As per spec, we need to validate that the subscription request + // contains existing endpoints, clusters and attributes, and if not + // we should (a bit surprisingly) return InvalidAction + + self.handler.access(|node| { + let mut has_attrs = false; + let mut has_events = false; + + if let Some(attr_requests) = req.attr_requests()? { + has_attrs = true; + + for attr_req in attr_requests { + let path = attr_req?; + + if path.is_wildcard() { + Self::validate_attr_wildcard_path(&path)?; + + if !node.has_accessible_attr(&path, accessor) { + return Err(ErrorCode::InvalidAction.into()); + } + } else { + node.validate_attr_path(&path, false, false, accessor) + .map_err(|_| ErrorCode::InvalidAction)?; + } + } + } + + if let Some(event_reqs) = req.event_requests()? { + has_events = true; + + for event_req in event_reqs { + let path = event_req?; + + if !path.is_wildcard() { + node.validate_event_path(&path, accessor) + .map_err(|_| ErrorCode::InvalidAction)?; + } + } + } + + if !has_attrs && !has_events { + // Empty subscribe requests are not allowed either + return Err(ErrorCode::InvalidAction.into()); + } + + Ok(()) + }) + } + + /// Process all valid subscriptions in an endless loop, checking for changes + /// and reporting them to the peers. + async fn process_subscriptions(&self, matter: &Matter<'_>) -> Result<(), Error> { + loop { + // Sleep until the soonest subscription deadline: the end of a + // `min_int` quiet period for a subscription holding back a change, + // or the chosen liveness wake point. A change, event, removal, a torn + // down session, or a newly accepted subscription (the accept path + // notifies) all wake the loop early. With no subscription there is + // no deadline, so just wait to be notified. + let mut notification = pin!(self.state.subscriptions.notification.wait()); + let mut session_removed = pin!(matter.transport().wait_session_removed()); + + // With no subscription (or none primed) the deadline is `Instant::MAX`, + // so the timer effectively never fires and the loop just waits to be + // notified. + let deadline = self + .state + .subscriptions + .next_report_at(self.state.events.watermark(), &self.subscriptions_buffers); + let mut timeout = pin!(Timer::at(deadline)); + + select3(&mut notification, &mut timeout, &mut session_removed).await; + + let now = Instant::now(); + + // First remove all expired or no-longer valid subscriptions + + loop { + let removed_any = + self.state + .subscriptions + .remove(&self.subscriptions_buffers, |sub| { + if sub.is_expired(now) { + return Some("expired"); + } + + matter.with_state(|state| { + if state.fabrics.get(sub.ids().fab_idx).is_none() { + return Some("fabric removed"); + } + + // The session the subscription was accepted on was + // torn down (eviction, explicit close, peer-side + // CASE re-handshake, ...). Per Matter spec + // subscriptions are scoped to the session they + // were established on, and the publisher can no + // longer route reports to the subscriber. Drop + // immediately rather than waiting for `max_int` + // to expire and time-out the send. + if state.sessions.get(sub.session_id()).is_none() { + return Some("session removed"); + } + + None + }) + }); + + if !removed_any { + break; + } + } + + // Now report while there are subscriptions which are due for reporting + + let event_numbers_watermark = self.state.events.watermark(); + + loop { + let Some(mut rctx) = self.state.subscriptions.report( + now, + event_numbers_watermark, + &self.subscriptions_buffers, + ) else { + break; + }; + + let result = self.process_subscription(matter, &mut rctx).await; + + match result { + Ok(true) => rctx.set_keep(), + Ok(false) => (), + Err(e) => error!( + "Error processing subscription {:?}: {:?}", + rctx.subscription().ids(), + e + ), + } + } + + // Periodically trim changed-attr entries that have been reported by every + // subscription, so the table does not accumulate stale promoted wildcards. + self.state.subscriptions.purge_reported_changes(); + } + } + + /// Process one valid subscription, reporting the data to the peer. + /// + /// Arguments: + /// - `matter` - a reference to the `Matter` instance + /// - `fabric_idx` - the fabric index of the peer + /// - `peer_node_id` - the node ID of the peer + /// - `session_id` - the session ID of the peer, if any + /// - `sub` - the received and saved data for the subscription, when the subscription was primed + /// - `min_event_number` - the subscription's current event watermark; updated + /// in place as events are emitted so the caller can persist it + /// - `ctx` - the report context for this subscription + #[allow(clippy::too_many_arguments)] + async fn process_subscription( + &self, + matter: &Matter<'_>, + rctx: &mut ReportContext<'_, '_, B, NS>, + ) -> Result { + let mut exchange = + Exchange::initiate_for_session(matter, rctx.subscription().session_id())?; + + if let Some(mut tx) = self.buffers.get().await { + // Always safe as `IMBuffer` is defined to be `MAX_EXCHANGE_RX_BUF_SIZE`, which is bigger than `MAX_EXCHANGE_TX_BUF_SIZE` + unwrap!(tx.resize_default(MAX_EXCHANGE_TX_BUF_SIZE)); + + let primed = self + .report_data(rctx, &mut tx, &mut exchange, false) + .await?; + + exchange.acknowledge().await?; + + Ok(primed) + } else { + error!( + "No TX buffer available for processing subscription {:?}", + rctx.subscription().ids(), + ); + + Ok(false) + } + } + + /// Process a `TimedReq` request, which is used to set a timeout for the following Write/Invoke request. + async fn timed(&self, exchange: &mut Exchange<'_>) -> Result { + let req = TimedReq::from_tlv(&get_root_node_struct(exchange.rx()?.payload())?)?; + debug!("IM: Timed request: {:?}", req); + + let timeout_instant = req.timeout_instant(); + + Self::send_status(exchange, IMStatusCode::Success).await?; + + Ok(timeout_instant) + } + + /// A utility to check whether a timed request has timed out, and if so, send a timeout status response + async fn timed_out( + &self, + exchange: &mut Exchange<'_>, + timeout_instant: Option, + timed_req: bool, + ) -> Result { + let status = { + if timed_req != timeout_instant.is_some() { + Some(IMStatusCode::TimedRequestMisMatch) + } else if timeout_instant + .map(|timeout_instant| Instant::now() > timeout_instant) + .unwrap_or(false) + { + Some(IMStatusCode::Timeout) + } else { + None + } + }; + + if let Some(status) = status { + Self::send_status(exchange, status).await?; + + Ok(true) + } else { + Ok(false) + } + } + + /// A utility to respond with a `ReportData` response to a subscription request, which is used to report data to the peer. + /// + /// Arguments: + /// - `id` - the subscription ID + /// - `fabric_idx` - the fabric index of the peer + /// - `peer_node_id` - the node ID of the peer + /// - `min_event_number` - the minimum event number to report + /// - `rx` - the received data for the subscription, when the subscription was primed + /// - `tx` - the TX buffer to write the response to + /// - `exchange` - the exchange to respond to + /// - `with_dataver` - whether to include the data version in the response + #[allow(clippy::too_many_arguments)] + async fn report_data( + &self, + rctx: &mut ReportContext<'_, '_, B, NS>, + tx: &mut [u8], + exchange: &mut Exchange<'_>, + with_dataver: bool, + ) -> Result + where + T: DataModel, + { + let mut wb = WriteBuf::new(tx); + + let sub_req = SubscribeReq::new(TLVElement::new(rctx.rx())); + let req = if with_dataver { + ReportDataReq::Subscribe(&sub_req) + } else { + ReportDataReq::SubscribeReport(&sub_req) + }; + + // Honor the `fabricFiltered` flag on the originating Subscribe request. + // When set, fabric-sensitive events emitted on other fabrics are + // dropped before they reach the wire (Matter Core spec). + let fabric_filtered = req.fabric_filtered().unwrap_or(true); + + let mut resp = ReportDataResponder::new( + &req, + Some(rctx.subscription().ids().id), + HandlerInvoker::new(exchange, self), + EventReader::new( + rctx.max_seen_event_number(), + rctx.next_max_seen_event_number(), + fabric_filtered, + ), + &self.state.events, + ); + + let sub_valid = resp + .respond( + &mut wb, + false, + rctx.should_send_if_empty(), + &self.handler, + |e, c, a| rctx.should_report_attr(e, c, a), + ) + .await?; + + if !sub_valid { + warn!( + "Subscription {:?} removed during reporting", + rctx.subscription().ids() + ); + } + + Ok(sub_valid) + } + + /// A utility to fetch a pair of TX/RX buffers for processing an Interaction Model request. + /// + /// If there are no free buffers available, this method will send a `Busy` status response to the peer. + /// + /// Upon returning: + /// - The RX buffer will contain the payload of the received Interaction Model request + /// - The TX buffer will be resized to `MAX_EXCHANGE_TX_BUF_SIZE` and will be ready to be written to + /// + /// Returns: + /// - `Ok(Some((tx, rx)))` - if both TX and RX buffers are available + /// - `Ok(None)` - if no buffers are available, and a `Busy` status response has been sent + /// - `Err(Error)` - if an error occurred while fetching the buffers or sending the status response + async fn buffers( + &self, + exchange: &mut Exchange<'_>, + ) -> Result, B::Buffer<'a>)>, Error> { + if let Some(tx) = self.tx_buffer(exchange).await? { + if let Some(rx) = self.rx_buffer(exchange).await? { + return Ok(Some((tx, rx))); + } + } + + Ok(None) + } + + /// A utility to fetch a RX buffer for processing an Interaction Model request. + /// + /// If there are no free buffers available, this method will send a `Busy` status response to the peer. + /// + /// Upon returning, the RX buffer will contain the payload of the received Interaction Model request. + /// + /// Returns: + /// - `Ok(Some(rx))` - if a RX buffer is available + /// - `Ok(None)` - if no RX buffer is available, and a `Busy` status response has been sent + /// - `Err(Error)` - if an error occurred while fetching the buffer or sending the status response + async fn rx_buffer(&self, exchange: &mut Exchange<'_>) -> Result>, Error> { + if let Some(mut buffer) = self.buffer(exchange).await? { + let rx = exchange.rx()?; + + buffer.clear(); + + // Safe to unwrap, as `IMBuffer` is defined to be `MAX_EXCHANGE_RX_BUF_SIZE`, i.e. it cannot be overflown + // by the payload of the received exchange. + unwrap!(buffer.extend_from_slice(rx.payload())); + + exchange.rx_done()?; + + Ok(Some(buffer)) + } else { + Ok(None) + } + } + + /// A utility to fetch a TX buffer for processing an Interaction Model request. + /// + /// If there are no free buffers available, this method will send a `Busy` status response to the peer. + /// + /// Upon returning, the TX buffer will be resized to `MAX_EXCHANGE_TX_BUF_SIZE` and will be ready to be written to. + /// + /// Returns: + /// - `Ok(Some(tx))` - if a TX buffer is available + /// - `Ok(None)` - if no TX buffer is available, and a `Busy` status response has been sent + /// - `Err(Error)` - if an error occurred while fetching the buffer or sending the status response + async fn tx_buffer(&self, exchange: &mut Exchange<'_>) -> Result>, Error> { + if let Some(mut buffer) = self.buffer(exchange).await? { + // Always safe as `IMBuffer` is defined to be `MAX_EXCHANGE_RX_BUF_SIZE`, which is bigger than `MAX_EXCHANGE_TX_BUF_SIZE` + unwrap!(buffer.resize_default(MAX_EXCHANGE_TX_BUF_SIZE)); + + Ok(Some(buffer)) + } else { + Ok(None) + } + } + + /// A utility to fetch a buffer for processing an Interaction Model request. + /// + /// If there are no free buffers available, this method will send a `Busy` status response to the peer. + /// + /// Upon returning, the buffer will be UNINITIALIZED. I.e. it is up to the user to resize it appropriately + /// if it is to be used for sending a response, or to fill it with data, if it is to be used for receiving data. + /// + /// Returns: + /// - `Ok(Some(buffer))` - if a buffer is available + /// - `Ok(None)` - if no buffer is available, and a `Busy` status response has been sent + /// - `Err(Error)` - if an error occurred while fetching the buffer or sending the status response + async fn buffer(&self, exchange: &mut Exchange<'_>) -> Result>, Error> { + if let Some(buffer) = self.buffers.get().await { + Ok(Some(buffer)) + } else { + Self::send_status(exchange, IMStatusCode::Busy).await?; + + Ok(None) + } + } + + /// A utility to send a status response to the peer. + async fn send_status(exchange: &mut Exchange<'_>, status: IMStatusCode) -> Result<(), Error> { + exchange + .send_with(|_, wb| { + StatusResp::write(wb, status)?; + + Ok(Some(OpCode::StatusResponse.into())) + }) + .await + } +} + +impl ExchangeHandler + for InteractionModel<'_, C, B, T, S, N, NC, NS, NE, KB> +where + C: Crypto, + B: Buffers, + T: DataModel, + S: KvBlobStore, + N: Networks, +{ + async fn handle(&self, mut exchange: Exchange<'_>) -> Result<(), Error> { + InteractionModel::handle(self, &mut exchange).await + } +} + +impl HandlerContext + for InteractionModel<'_, C, B, T, S, N, NC, NS, NE, KB> +where + C: Crypto, + B: Buffers, + T: DataModel, + S: KvBlobStore, + N: Networks, +{ + fn matter(&self) -> &Matter<'_> { + self.matter + } + + fn crypto(&self) -> impl Crypto + '_ { + &self.crypto + } + + fn kv(&self) -> impl KvBlobStoreAccess + '_ { + self.kv_access() + } + + fn networks(&self) -> impl NetworksAccess + '_ { + &self.state.networks + } + + fn metadata(&self) -> impl Metadata + '_ { + &self.handler + } + + fn handler(&self) -> impl AsyncHandler + '_ { + &self.handler + } + + fn buffers(&self) -> impl Buffers + '_ { + self.buffers + } +} + +impl AttrChangeNotifier + for InteractionModel<'_, C, B, T, S, N, NC, NS, NE, KB> +where + C: Crypto, + B: Buffers, + T: DataModel, + S: KvBlobStore, + N: Networks, +{ + fn notify_attr_changed(&self, endpoint_id: EndptId, cluster_id: ClusterId, attr_id: AttrId) { + self.handler.bump_dataver(MatchContextInstance::new( + Some(endpoint_id), + Some(cluster_id), + )); + self.state + .subscriptions + .notify_attr_changed(endpoint_id, cluster_id, attr_id); + } + + fn notify_cluster_changed(&self, endpoint_id: EndptId, cluster_id: ClusterId) { + self.handler.bump_dataver(MatchContextInstance::new( + Some(endpoint_id), + Some(cluster_id), + )); + self.state + .subscriptions + .notify_cluster_changed(endpoint_id, cluster_id); + } + + fn notify_endpoint_changed(&self, endpoint_id: EndptId) { + self.handler + .bump_dataver(MatchContextInstance::new(Some(endpoint_id), None)); + self.state + .subscriptions + .notify_endpoint_changed(endpoint_id) + } + + fn notify_all_changed(&self) { + self.handler + .bump_dataver(MatchContextInstance::new(None, None)); + self.state.subscriptions.notify_all_changed() + } +} + +impl EventEmitter + for InteractionModel<'_, C, B, T, S, N, NC, NS, NE, KB> +where + C: Crypto, + B: Buffers, + T: DataModel, + S: KvBlobStore, + N: Networks, +{ + fn emit_event( + &self, + endpoint_id: EndptId, + cluster_id: ClusterId, + event_id: EventId, + priority: EventPriority, + f: F, + ) -> Result + where + F: FnOnce(EventTLVWrite<'_>) -> Result<(), Error>, + { + let event_number = self.state.events.push( + endpoint_id, + cluster_id, + event_id, + priority, + self.kv_access(), + f, + )?; + + self.state + .subscriptions + .notify_event_emitted(endpoint_id, cluster_id, event_id); + + Ok(event_number) + } +} + +pub enum RespondOutcome { + Accepted, + Rejected, + Empty, +} + +/// This type responds with a `ReportData` response to all of: +/// - A `ReadReq` +/// - A `SubscribeReq` +/// - A `SubscribeReportReq` (i.e. once a valid recorded subscription is detected as in a need to be reported on) +/// +/// The responder handles chunking as needed. I.e. if reported data is too large to fit into a single +/// Matter message, it will send the data in multiple chunks (i.e. with multiple Matter messages), waiting for +/// a `Success` response from the peer after each chunk, and then continuing to send the next chunk until all data is sent. +struct ReportDataResponder<'a, 'b, 'c, const NE: usize, C> { + req: &'a ReportDataReq<'a>, + subscription_id: Option, + invoker: HandlerInvoker<'b, 'c, C>, + event_reader: EventReader, + events: &'a Events, +} + +impl<'a, 'b, 'c, const NE: usize, C> ReportDataResponder<'a, 'b, 'c, NE, C> +where + C: HandlerContext, +{ + // This is the amount of space we reserve for the structure/array closing TLVs + // to be attached towards the end of long reads + const LONG_READS_TLV_RESERVE_SIZE: usize = 24; + + /// Create a new `ReportDataResponder`. + const fn new( + req: &'a ReportDataReq<'a>, + subscription_id: Option, + invoker: HandlerInvoker<'b, 'c, C>, + event_reader: EventReader, + events: &'a Events, + ) -> Self { + Self { + req, + subscription_id, + invoker, + event_reader, + events, + } + } + + /// Respond to the request with a `ReportData` response, possibly with more than one + /// chunk if the data is too large to fit into a single Matter message. + /// + /// Arguments: + /// - `wb` - the buffer to use while sending the response + /// - `suppress_last_resp` - whether to suppress the response from the peer. When multiple Matter messages are + /// being sent due to chunking, this is valid for the last chunk only, as the others - by necessity need to have a + /// status response by the other peer + async fn respond( + &mut self, + wb: &mut WriteBuf<'_>, + suppress_last_resp: bool, + send_if_empty: bool, + metadata: M, + mut filter: F, + ) -> Result + where + M: Metadata, + F: FnMut(EndptId, ClusterId, u32) -> bool, + { + let mut empty = true; + + self.start_reply(wb)?; + + if !self + .report_attributes(wb, &mut empty, &metadata, &mut filter) + .await? + { + return Ok(false); + } + + if !self.report_events(wb, &mut empty, &metadata).await? { + return Ok(false); + } + + if send_if_empty || !empty { + self.send(ReportDataChunkState::Done, suppress_last_resp, wb) + .await + } else { + debug!("No data to report, skipping sending ReportData response"); + + Ok(true) + } + } + + async fn report_attributes( + &mut self, + wb: &mut WriteBuf<'_>, + empty: &mut bool, + metadata: M, + mut filter: F, + ) -> Result + where + M: Metadata, + F: FnMut(EndptId, ClusterId, u32) -> bool, + { + let accessor = self.invoker.exchange().accessor()?; + + if self.req.attr_requests()?.is_some() { + wb.start_array(&TLVTag::Context(ReportDataRespTag::AttributeReports as u8))?; + + for item in expand_read(&metadata, self.req, &accessor, &mut filter)? { + let item = item?; + + *empty = false; + + loop { + let result = self.invoker.process_read(&item, &mut *wb).await; + + match result { + Ok(()) => break, + Err(err) if err.code() == ErrorCode::NoSpace => { + let array_attr = item.as_ref().ok().filter(|attr| { + attr.list_index.is_none() + // The whole attribute is requested + // Check if it is an array, and if so, send it as individual items instead + && attr.array + }); + + if let Some(array_attr) = array_attr { + if self.send_array_items(array_attr, wb).await? { + break; + } else { + return Ok(false); + } + } else { + debug!("<<< No TX space, chunking >>>"); + if !self + .send(ReportDataChunkState::ChunkingAttributes, false, wb) + .await? + { + return Ok(false); + } + } + } + Err(err) => Err(err)?, + } + } + } + + wb.end_container()?; + } + + Ok(true) + } + + async fn report_events( + &mut self, + wb: &mut WriteBuf<'_>, + empty: &mut bool, + metadata: M, + ) -> Result + where + M: Metadata, + { + let accessor = self.invoker.exchange().accessor()?; + + if let Some(event_reqs) = self.req.event_requests()? { + wb.start_array(&TLVTag::Context(ReportDataRespTag::EventReports as _))?; + + // Validate concrete event paths against node metadata + // and emit EventStatusIB for non-wildcard paths that don't match + for event_req in event_reqs.iter() { + let path = event_req?; + + if !path.is_wildcard() { + if let Err(status) = + metadata.access(|node| node.validate_event_path(&path, &accessor)) + { + if matches!(status, IMStatusCode::UnsupportedEvent) { + // Event does not exist on this endpoint + // TODO: Look at TestEventsById.yaml + // Seems we should not error out in that case? + continue; + } + + *empty = false; + + let resp = EventResp::Status(EventStatus::new(path, status, None)); + + let mut result = resp.to_tlv(&TLVTag::Anonymous, &mut *wb); + + if let Err(e) = &result { + if e.code() == ErrorCode::NoSpace { + debug!("<<< No TX space, chunking >>>"); + if !self + .send(ReportDataChunkState::ChunkingEvents, false, &mut *wb) + .await? + { + return Ok(false); + } + + result = resp.to_tlv(&TLVTag::Anonymous, &mut *wb); + } + } + + result?; + } + } + } + + let event_filters = self.req.event_filters()?; + + loop { + let finished = self.events.fetch(|events| { + metadata.access(|node| { + for event in events { + let result = self.event_reader.process_read( + event, + &event_reqs, + &event_filters, + node, + &accessor, + &mut *wb, + ); + + if let Err(e) = &result { + if e.code() == ErrorCode::NoSpace { + return Ok::<_, Error>(false); + } + } + + if result? { + *empty = false; + } + } + + Ok(true) + }) + })?; + + if finished { + break; + } + + debug!("<<< No TX space, chunking >>>"); + if !self + .send(ReportDataChunkState::ChunkingEvents, false, wb) + .await? + { + return Ok(false); + } + } + + wb.end_container()?; + } + + Ok(true) + } + + /// Send the items of an array attribute one by one, until the end of the array is reached. + /// + /// The data is potentially sent in multiple chunks if it cannot fit into a single Matter message. + /// + /// Arguments: + /// - `attr` - the array attribute to send the items of + /// - `wb` - the buffer to use while sending the items + async fn send_array_items( + &mut self, + attr: &AttrDetails, + wb: &mut WriteBuf<'_>, + ) -> Result { + let mut attr = attr.clone(); + + // First generate an empty array + let mut list_index = None; + attr.list_chunked = true; + attr.list_index = Some(Nullable::new(list_index)); + + loop { + let pos = wb.get_tail(); + + let result = self.invoker.read(&attr, &mut *wb).await; + + if result.is_err() { + // If we got an error, we rewind to the position before the read + // and handle it accordingly + wb.rewind_to(pos); + } + + match result { + Ok(()) => { + // The empty array payload was sent + // Now iterate over the array and send each item one by one as separate payload + + let new_list_index = if let Some(list_index) = list_index { + list_index + 1 + } else { + 0 + }; + + list_index = Some(new_list_index); + attr.list_index = Some(Nullable::some(new_list_index)); + } + Err(err) if err.code() == ErrorCode::NoSpace => { + debug!("<<< No TX space, chunking >>>"); + if !self + .send(ReportDataChunkState::ChunkingAttributes, false, wb) + .await? + { + return Ok(false); + } + } + Err(err) if err.code() == ErrorCode::ConstraintError => break, // Got to the end of the array + Err(err) => Err(err)?, + } + } + + Ok(true) + } + + /// Send the reply to the peer, potentially opening another reply. + /// + /// Arguments: + /// - `state`: tracks chunking state - are we just sending a chunk packet or are we done and wrapping up? + /// - `suppress_last_resp`: whether to suppress the response from the peer, this is ignored if state is != Done + /// - `wb`: the buffer containing the reply. Once the reply is sent, the buffer is re-initialized for a new reply if `more_chunks` is `true` + async fn send( + &mut self, + state: ReportDataChunkState, + suppress_last_resp: bool, + wb: &mut WriteBuf<'_>, + ) -> Result { + self.end_reply(state, suppress_last_resp, wb)?; + + self.invoker + .exchange() + .send(OpCode::ReportData, wb.as_slice()) + .await?; + + let cont = match state { + ReportDataChunkState::ChunkingAttributes => { + let cont = self.recv_status_success().await?; + self.start_reply(wb)?; + wb.start_array(&TLVTag::Context(ReportDataRespTag::AttributeReports as u8))?; + cont + } + ReportDataChunkState::ChunkingEvents => { + let cont = self.recv_status_success().await?; + self.start_reply(wb)?; + wb.start_array(&TLVTag::Context(ReportDataRespTag::EventReports as u8))?; + cont + } + ReportDataChunkState::Done => { + if !suppress_last_resp { + self.recv_status_success().await? + } else { + false + } + } + }; + + Ok(cont) + } + + /// Receive a status response from the peer + /// + /// If the response is not a status response, the method will fail with an `Invalid` error. + /// + /// Return `Ok(true)` if the response is a success response, `Ok(false)` if the response is not a success response. + async fn recv_status_success(&mut self) -> Result { + let rx = self.invoker.exchange().recv().await?; + let opcode = rx.meta().proto_opcode; + + if opcode != OpCode::StatusResponse as u8 { + warn!( + "Got opcode {:02x}, while expecting status code {:02x}", + opcode, + OpCode::StatusResponse as u8 + ); + + return Err(ErrorCode::Invalid.into()); + } + + let resp = StatusResp::from_tlv(&get_root_node_struct(rx.payload())?)?; + + if resp.status == IMStatusCode::Success { + Ok(true) + } else { + warn!( + "Got status response {:?}, aborting interaction", + resp.status + ); + + drop(rx); + + self.invoker.exchange().acknowledge().await?; + + Ok(false) + } + } + + /// Start a reply by initializing the `WriteBuf` and writing the initial TLVs. + fn start_reply(&self, wb: &mut WriteBuf<'_>) -> Result<(), Error> { + wb.reset(); + wb.shrink(Self::LONG_READS_TLV_RESERVE_SIZE)?; + + wb.start_struct(&TLVTag::Anonymous)?; + + if let Some(subscription_id) = self.subscription_id { + assert!(matches!( + self.req, + ReportDataReq::Subscribe(_) | ReportDataReq::SubscribeReport(_) + )); + wb.u32( + &TLVTag::Context(ReportDataRespTag::SubscriptionId as u8), + subscription_id, + )?; + } else { + assert!(matches!(self.req, ReportDataReq::Read(_))); + } + + Ok(()) + } + + /// End a reply by writing the closing TLVs and potentially indicating that there are more chunks to send. + fn end_reply( + &self, + state: ReportDataChunkState, + suppress_resp: bool, + wb: &mut WriteBuf<'_>, + ) -> Result<(), Error> { + wb.expand(Self::LONG_READS_TLV_RESERVE_SIZE)?; + + match state { + ReportDataChunkState::ChunkingAttributes | ReportDataChunkState::ChunkingEvents => { + wb.end_container()?; + wb.bool( + &TLVTag::Context(ReportDataRespTag::MoreChunkedMsgs as u8), + true, + )?; + } + ReportDataChunkState::Done => { + if suppress_resp { + wb.bool( + &TLVTag::Context(ReportDataRespTag::SupressResponse as u8), + true, + )?; + } + } + }; + + // InteractionModelRevision is mandatory in all IM messages from + // Matter 1.0 onward (TLV tag 0xFF). matter.js validates this + // strictly and refuses to commission devices that omit it; the + // reference chip-tool happens to tolerate the absence. + wb.u8( + &TLVTag::Context(GlobalElements::InteractionModelRevision as u8), + IM_REVISION, + )?; + + wb.end_container()?; + + Ok(()) + } +} + +/// Used to avoid duplicating the chunking logic for events and attributes; they both +/// share the same write path when the current packet fills up, and use this to determine +/// which field they should be setting up an array in for more output in the next packet +#[derive(Clone, Copy)] +enum ReportDataChunkState { + ChunkingAttributes, + ChunkingEvents, + Done, +} + +/// This type responds to a `WriteReq` by invoking the +/// corresponding handlers for each write attribute in the request. +/// +/// The responser assumes that all response data can fit in a single Matter message, +/// which is a fair assumption and as per the Matter spec, in that the response of a +/// write request is always shorter than the write request itself, so given that the +/// write request fits in a single Matter message, the write reponse should as well. +/// +/// With that said, the write request might itself be just one out of many chunks that +/// the other peers is sending, but processing all of those chunks is not done here, +/// but is rather - a responsibility of the caller who should call in a loop `WriteResponder::respond` +/// for all the chunks of the write request, until the `WriteReq::more_chunks()` returns `false`. +struct WriteResponder<'a, 'b, 'c, C> { + req: &'a WriteReq<'a>, + invoker: HandlerInvoker<'b, 'c, C>, +} + +impl<'a, 'b, 'c, C> WriteResponder<'a, 'b, 'c, C> +where + C: HandlerContext, +{ + /// Create a new `WriteResponder`. + const fn new(req: &'a WriteReq<'a>, invoker: HandlerInvoker<'b, 'c, C>) -> Self { + Self { req, invoker } + } + + /// Respond to the write request by processing each write attribute in the request + /// and sending a response back. + async fn respond( + &mut self, + wb: &mut WriteBuf<'_>, + metadata: M, + suppress_resp: bool, + ) -> Result<(), Error> + where + M: Metadata, + { + let accessor = self.invoker.exchange().accessor()?; + + wb.reset(); + + wb.start_struct(&TLVTag::Anonymous)?; + wb.start_array(&TLVTag::Context(WriteRespTag::WriteResponses as u8))?; + + for item in expand_write(metadata, self.req, &accessor)? { + self.invoker.process_write(&item?, &mut *wb).await?; + } + + if suppress_resp { + return Ok(()); + } + + wb.end_container()?; + // Mandatory `interactionModelRevision` (tag 0xFF); see note in + // the ReportData emitter above. + wb.u8( + &TLVTag::Context(GlobalElements::InteractionModelRevision as u8), + IM_REVISION, + )?; + wb.end_container()?; + + self.invoker + .exchange() + .send(OpCode::WriteResponse, wb.as_slice()) + .await + } +} + +/// This type responds to an `InvRequest` by invoking the +/// corresponding handlers for each command in the invoke request. +/// +/// NOTE: In future, this responder should support chunking in that +/// if the reply to all the commands in the invoke request is too large to fit +/// into a single Matter message, it should send the response in multiple chunks. +/// +/// The simplest strategy for chunking would be to simply - and unconditionally - send each individual +/// command response in a separate Matter message, i.e. if the invoke request contains 3 commands, +/// the responder will send 3 Matter messages, each containing a single command response. +struct InvokeResponder<'a, 'b, 'c, C> { + req: &'a InvReq<'a>, + invoker: HandlerInvoker<'b, 'c, C>, +} + +impl<'a, 'b, 'c, C> InvokeResponder<'a, 'b, 'c, C> +where + C: HandlerContext, +{ + /// Create a new `InvokeResponder`. + const fn new(req: &'a InvReq<'a>, invoker: HandlerInvoker<'b, 'c, C>) -> Self { + Self { req, invoker } + } + + /// Respond to the invoke request by processing each command in the request + /// and sending one or more reponses back. + async fn respond( + &mut self, + wb: &mut WriteBuf<'_>, + metadata: M, + suppress_resp: bool, + ) -> Result<(), Error> + where + M: Metadata, + { + wb.reset(); + + wb.start_struct(&TLVTag::Anonymous)?; + + // Suppress Response -> TODO: Need to revisit this for cases where we send a command back + wb.bool( + &TLVTag::Context(InvRespTag::SupressResponse as u8), + suppress_resp, + )?; + + let has_requests = self.req.inv_requests()?.is_some(); + + if has_requests { + wb.start_array(&TLVTag::Context(InvRespTag::InvokeResponses as u8))?; + } + + let accessor = self.invoker.exchange().accessor()?; + + for item in expand_invoke(metadata, self.req, &accessor)? { + self.invoker.process_invoke(&item?, &mut *wb).await?; + } + + if suppress_resp { + return Ok(()); + } + + if has_requests { + wb.end_container()?; + } + + // Mandatory `interactionModelRevision` (tag 0xFF) at the end of + // every IM message — see the matching note in the ReportData + // emitter above. + wb.u8( + &TLVTag::Context(GlobalElements::InteractionModelRevision as u8), + IM_REVISION, + )?; + wb.end_container()?; + + self.invoker + .exchange() + .send(OpCode::InvokeResponse, wb.as_slice()) + .await?; + + Ok(()) + } +} diff --git a/rs-matter/src/dm/events.rs b/rs-matter/src/im/events.rs similarity index 100% rename from rs-matter/src/dm/events.rs rename to rs-matter/src/im/events.rs diff --git a/rs-matter/src/dm/subscriptions.rs b/rs-matter/src/im/subscriptions.rs similarity index 99% rename from rs-matter/src/dm/subscriptions.rs rename to rs-matter/src/im/subscriptions.rs index 5e7522e64..9dbf8c8a6 100644 --- a/rs-matter/src/dm/subscriptions.rs +++ b/rs-matter/src/im/subscriptions.rs @@ -19,8 +19,8 @@ use core::num::NonZeroU8; use embassy_time::Instant; -use crate::dm::{AttrId, ClusterId, EndptId, EventId, EventNumber, IMBuffer, NodeId}; use crate::fabric::MAX_FABRICS; +use crate::im::{AttrId, ClusterId, EndptId, EventId, EventNumber, IMBuffer, NodeId}; use crate::utils::cell::RefCell; use crate::utils::init::{init, Init}; use crate::utils::storage::pooled::Buffers; diff --git a/rs-matter/src/lib.rs b/rs-matter/src/lib.rs index aa5048407..abf72bbd4 100644 --- a/rs-matter/src/lib.rs +++ b/rs-matter/src/lib.rs @@ -365,7 +365,7 @@ impl<'a> Matter<'a> { /// `AdministratorCommissioning` — a subsequent dataver-filtered /// read could therefore cache-hit and miss the change. Application /// code that holds a `InteractionModel` should prefer - /// [`crate::dm::InteractionModel::open_basic_comm_window`], which delegates + /// [`crate::im::InteractionModel::open_basic_comm_window`], which delegates /// here and additionally bumps dataver via its /// [`AttrChangeNotifier`] impl. pub fn open_basic_comm_window( @@ -405,7 +405,7 @@ impl<'a> Matter<'a> { /// **Note:** As with [`Matter::open_basic_comm_window`], this does /// not bump the per-cluster `Dataver` of /// `AdministratorCommissioning`. Prefer - /// [`crate::dm::InteractionModel::close_comm_window`] when a `InteractionModel` + /// [`crate::im::InteractionModel::close_comm_window`] when a `InteractionModel` /// is available. pub fn close_comm_window(&self, notify: &dyn AttrChangeNotifier) -> Result { let notify_mdns = || self.transport().notify_mdns_changed(); @@ -430,7 +430,7 @@ impl<'a> Matter<'a> { /// `BasicInformation`. A subsequent dataver-filtered read could /// therefore cache-hit and miss the change. Application code that /// holds a `InteractionModel` should prefer - /// [`crate::dm::InteractionModel::bump_configuration_version`], which + /// [`crate::im::InteractionModel::bump_configuration_version`], which /// delegates here and additionally bumps dataver via its /// [`AttrChangeNotifier`] impl. /// diff --git a/rs-matter/src/persist.rs b/rs-matter/src/persist.rs index f5f6a75b9..ad6e5d516 100644 --- a/rs-matter/src/persist.rs +++ b/rs-matter/src/persist.rs @@ -28,7 +28,7 @@ pub use fileio::*; /// The default size (in bytes) of the scratch buffer used by the key-value /// persistence machinery for (de)serializing BLOBs. This is the buffer that -/// [`InteractionModelState`](crate::dm::InteractionModelState) owns and the data model +/// [`InteractionModelState`](crate::im::InteractionModelState) owns and the data model /// recombines with the (store-only) [`SharedKvBlobStore`] at runtime. pub const DEFAULT_KV_BUF_SIZE: usize = 4096; @@ -209,7 +209,7 @@ impl KvBlobStoreAccess for DummyKvBlobStoreAccess { /// mutex. /// /// The scratch buffer used for (de)serialization is not owned here; it is owned -/// by [`InteractionModelState`](crate::dm::InteractionModelState) and recombined with this +/// by [`InteractionModelState`](crate::im::InteractionModelState) and recombined with this /// store by the data model into a full [`KvBlobStoreAccess`]. pub struct SharedKvBlobStore(Mutex>); @@ -225,7 +225,7 @@ impl SharedKvBlobStore { /// Get exclusive (locked) access to the wrapped `KvBlobStore`. /// /// The data model uses this to recombine the store with the scratch buffer - /// owned by [`InteractionModelState`](crate::dm::InteractionModelState) into a full + /// owned by [`InteractionModelState`](crate::im::InteractionModelState) into a full /// [`KvBlobStoreAccess`]. pub fn with_store(&self, f: F) -> R where diff --git a/rs-matter/src/respond.rs b/rs-matter/src/respond.rs index d5349204e..5a1935ef7 100644 --- a/rs-matter/src/respond.rs +++ b/rs-matter/src/respond.rs @@ -23,14 +23,13 @@ use embassy_futures::select::{select, select_slice}; use crate::crypto::Crypto; use crate::dm::clusters::net_comm; -use crate::dm::events::DEFAULT_MAX_EVENTS_BUF_SIZE; use crate::dm::networks::wireless::NoopWirelessNetCtl; -use crate::dm::subscriptions::DEFAULT_MAX_SUBSCRIPTIONS; use crate::dm::DataModel; -use crate::dm::{IMBuffer, InteractionModel}; use crate::error::Error; use crate::im::busy::BusyInteractionModel; -use crate::im::PROTO_ID_INTERACTION_MODEL; +use crate::im::events::DEFAULT_MAX_EVENTS_BUF_SIZE; +use crate::im::subscriptions::DEFAULT_MAX_SUBSCRIPTIONS; +use crate::im::{IMBuffer, InteractionModel, PROTO_ID_INTERACTION_MODEL}; use crate::persist::{KvBlobStore, DEFAULT_KV_BUF_SIZE}; use crate::sc::busy::BusySecureChannel; use crate::sc::SecureChannel; diff --git a/rs-matter/src/transport/exchange.rs b/rs-matter/src/transport/exchange.rs index 9e72e4cb7..29ea3046d 100644 --- a/rs-matter/src/transport/exchange.rs +++ b/rs-matter/src/transport/exchange.rs @@ -67,7 +67,7 @@ pub const MAX_EXCHANGE_TX_BUF_SIZE: usize = /// A protocol payload buffer, sized to hold a full exchange RX message /// ([`MAX_EXCHANGE_RX_BUF_SIZE`]). /// -/// This is the central buffer type that both [`IMBuffer`](crate::dm::IMBuffer) +/// This is the central buffer type that both [`IMBuffer`](crate::im::IMBuffer) /// and [`BdxBuffer`](crate::bdx::BdxBuffer) alias, so a single /// [`PooledBuffers`](crate::utils::storage::pooled::PooledBuffers) pool can be /// shared across the data model and BDX. diff --git a/rs-matter/tests/commissioning.rs b/rs-matter/tests/commissioning.rs index 4e5cce6d9..698e782d5 100644 --- a/rs-matter/tests/commissioning.rs +++ b/rs-matter/tests/commissioning.rs @@ -61,13 +61,11 @@ use rs_matter::dm::clusters::net_comm::DummyNetworks; use rs_matter::dm::devices::test::{TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; use rs_matter::dm::devices::DEV_TYPE_ON_OFF_LIGHT; use rs_matter::dm::networks::unix::UnixNetifs; -use rs_matter::dm::subscriptions::DEFAULT_MAX_SUBSCRIPTIONS; -use rs_matter::dm::{ - endpoints, Async, DataModel, Dataver, Endpoint, EpClMatcher, InteractionModel, - InteractionModelState, Node, -}; +use rs_matter::dm::{endpoints, Async, DataModel, Dataver, Endpoint, EpClMatcher, Node}; use rs_matter::error::Error; +use rs_matter::im::subscriptions::DEFAULT_MAX_SUBSCRIPTIONS; use rs_matter::im::IMStatusCode; +use rs_matter::im::{InteractionModel, InteractionModelState}; use rs_matter::onboard::cac::{IcacGenerator, RcacGenerator}; use rs_matter::onboard::noc::NocGenerator; use rs_matter::onboard::{CommissionOptions, Commissioner}; diff --git a/rs-matter/tests/common/e2e.rs b/rs-matter/tests/common/e2e.rs index 40cbf97c9..f1432838b 100644 --- a/rs-matter/tests/common/e2e.rs +++ b/rs-matter/tests/common/e2e.rs @@ -26,8 +26,9 @@ use rs_matter::acl::{AclEntry, AuthMode}; use rs_matter::crypto::{test_only_crypto, Crypto}; use rs_matter::dm::clusters::net_comm::DummyNetworks; use rs_matter::dm::devices::test::{TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; -use rs_matter::dm::{DataModel, InteractionModel, InteractionModelState, Privilege}; +use rs_matter::dm::{DataModel, Privilege}; use rs_matter::error::Error; +use rs_matter::im::{InteractionModel, InteractionModelState}; use rs_matter::persist::{DummyKvBlobStore, SharedKvBlobStore}; use rs_matter::respond::{ExchangeHandler, Responder}; use rs_matter::transport::exchange::Exchange; From 0d41959d9713d766a8fe8fcc8132cf907353cd07 Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Fri, 19 Jun 2026 10:46:00 +0000 Subject: [PATCH 09/14] Move the im::encoding types to a new im::encoding module --- .../src/dm/clusters/app/push_av_stream.rs | 2 +- rs-matter/src/dm/clusters/groups.rs | 2 +- rs-matter/src/dm/clusters/ota_req.rs | 2 +- rs-matter/src/dm/types.rs | 2 +- rs-matter/src/dm/types/attribute.rs | 2 +- rs-matter/src/dm/types/cluster.rs | 3 +- rs-matter/src/dm/types/command.rs | 2 +- rs-matter/src/dm/types/handler.rs | 4 +- rs-matter/src/dm/types/node.rs | 9 +- rs-matter/src/dm/types/reply.rs | 2 +- rs-matter/src/im.rs | 267 +--------------- rs-matter/src/im/encoding.rs | 289 ++++++++++++++++++ rs-matter/src/im/{ => encoding}/attr.rs | 0 rs-matter/src/im/{ => encoding}/attr/read.rs | 0 .../im/{ => encoding}/attr/read_builder.rs | 2 +- .../src/im/{ => encoding}/attr/subscribe.rs | 0 .../{ => encoding}/attr/subscribe_builder.rs | 4 +- rs-matter/src/im/{ => encoding}/attr/write.rs | 0 .../im/{ => encoding}/attr/write_builder.rs | 0 rs-matter/src/im/{ => encoding}/event.rs | 0 rs-matter/src/im/{ => encoding}/invoke.rs | 0 .../src/im/{ => encoding}/invoke_builder.rs | 2 +- rs-matter/src/im/{ => encoding}/status.rs | 0 rs-matter/src/im/{ => encoding}/timed.rs | 0 rs-matter/src/im/{ => encoding}/types.rs | 0 25 files changed, 311 insertions(+), 283 deletions(-) create mode 100644 rs-matter/src/im/encoding.rs rename rs-matter/src/im/{ => encoding}/attr.rs (100%) rename rs-matter/src/im/{ => encoding}/attr/read.rs (100%) rename rs-matter/src/im/{ => encoding}/attr/read_builder.rs (99%) rename rs-matter/src/im/{ => encoding}/attr/subscribe.rs (100%) rename rs-matter/src/im/{ => encoding}/attr/subscribe_builder.rs (99%) rename rs-matter/src/im/{ => encoding}/attr/write.rs (100%) rename rs-matter/src/im/{ => encoding}/attr/write_builder.rs (100%) rename rs-matter/src/im/{ => encoding}/event.rs (100%) rename rs-matter/src/im/{ => encoding}/invoke.rs (100%) rename rs-matter/src/im/{ => encoding}/invoke_builder.rs (99%) rename rs-matter/src/im/{ => encoding}/status.rs (100%) rename rs-matter/src/im/{ => encoding}/timed.rs (100%) rename rs-matter/src/im/{ => encoding}/types.rs (100%) diff --git a/rs-matter/src/dm/clusters/app/push_av_stream.rs b/rs-matter/src/dm/clusters/app/push_av_stream.rs index dd7657ac0..1f19e8e4b 100644 --- a/rs-matter/src/dm/clusters/app/push_av_stream.rs +++ b/rs-matter/src/dm/clusters/app/push_av_stream.rs @@ -66,9 +66,9 @@ use core::cell::{Cell, RefCell}; +use crate::dm::FabricIndex; use crate::dm::{ArrayAttributeRead, Cluster, Dataver, EndptId, InvokeContext, ReadContext}; use crate::error::{Error, ErrorCode}; -use crate::im::FabricIndex; use crate::tlv::{TLVBuilderParent, TLVElement, TLVTag, ToTLV}; use crate::utils::storage::{Vec, WriteBuf}; use crate::utils::sync::blocking::Mutex; diff --git a/rs-matter/src/dm/clusters/groups.rs b/rs-matter/src/dm/clusters/groups.rs index 05e0d1c35..cdba48aa2 100644 --- a/rs-matter/src/dm/clusters/groups.rs +++ b/rs-matter/src/dm/clusters/groups.rs @@ -22,7 +22,7 @@ use core::num::NonZeroU8; use crate::dm::{Cluster, Dataver, InvokeContext, ReadContext}; use crate::error::{Error, ErrorCode}; use crate::fabric::FabricPersist; -use crate::im::IMStatusCode; +use crate::im::encoding::IMStatusCode; use crate::tlv::{Nullable, TLVBuilderParent}; use crate::{with, MatterState}; diff --git a/rs-matter/src/dm/clusters/ota_req.rs b/rs-matter/src/dm/clusters/ota_req.rs index e8c8f813c..947d394c9 100644 --- a/rs-matter/src/dm/clusters/ota_req.rs +++ b/rs-matter/src/dm/clusters/ota_req.rs @@ -38,9 +38,9 @@ use crate::dm::{ ArrayAttributeRead, ArrayAttributeWrite, AttrChangeNotifier, Cluster, Dataver, InvokeContext, ReadContext, WriteContext, }; +use crate::dm::{AttrId, EndptId, NodeId}; use crate::error::{Error, ErrorCode}; use crate::fabric::MAX_FABRICS; -use crate::im::{AttrId, EndptId, NodeId}; use crate::persist::{KvBlobStore, Persist, OTA_PROVIDERS_KEY}; use crate::tlv::{FromTLV, Nullable, Octets, TLVArray, TLVBuilderParent, TLVElement, ToTLV}; use crate::transport::exchange::Exchange; diff --git a/rs-matter/src/dm/types.rs b/rs-matter/src/dm/types.rs index 90f9dbacd..37c236498 100644 --- a/rs-matter/src/dm/types.rs +++ b/rs-matter/src/dm/types.rs @@ -41,7 +41,7 @@ mod node; mod privilege; mod reply; -pub use crate::im::types::*; +pub use crate::im::encoding::types::*; #[derive(Debug, ToTLV, Copy, Clone)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] diff --git a/rs-matter/src/dm/types/attribute.rs b/rs-matter/src/dm/types/attribute.rs index 0572b83a4..40c5e90b3 100644 --- a/rs-matter/src/dm/types/attribute.rs +++ b/rs-matter/src/dm/types/attribute.rs @@ -24,7 +24,7 @@ use strum::FromRepr; use crate::attribute_enum; use crate::dm::Metadata; use crate::error::{Error, ErrorCode}; -use crate::im::{AttrPath, AttrStatus, IMStatusCode}; +use crate::im::encoding::{AttrPath, AttrStatus, IMStatusCode}; use crate::tlv::{AsNullable, FromTLV, Nullable, TLVBuilder, TLVBuilderParent, TLVElement, TLVTag}; use crate::utils::maybe::Maybe; diff --git a/rs-matter/src/dm/types/cluster.rs b/rs-matter/src/dm/types/cluster.rs index 25e85d002..b83079c6b 100644 --- a/rs-matter/src/dm/types/cluster.rs +++ b/rs-matter/src/dm/types/cluster.rs @@ -20,8 +20,7 @@ use core::fmt::{self, Debug}; use crate::acl::{AccessReq, Accessor}; use crate::dm::*; use crate::error::{Error, ErrorCode}; -use crate::im::GenericPath; -use crate::im::IMStatusCode; +use crate::im::encoding::{GenericPath, IMStatusCode}; use crate::tlv::{TLVTag, TLVWrite}; /// A type alias for the attribute matching function diff --git a/rs-matter/src/dm/types/command.rs b/rs-matter/src/dm/types/command.rs index 0ca809d40..cc2e1bdb0 100644 --- a/rs-matter/src/dm/types/command.rs +++ b/rs-matter/src/dm/types/command.rs @@ -18,7 +18,7 @@ use core::cell::Cell; use core::fmt; -use crate::im::{CmdPath, CmdStatus, IMStatusCode}; +use crate::im::encoding::{CmdPath, CmdStatus, IMStatusCode}; use super::{Access, ClusterId, CmdId, EndptId}; diff --git a/rs-matter/src/dm/types/handler.rs b/rs-matter/src/dm/types/handler.rs index f60a34dae..f1dae5059 100644 --- a/rs-matter/src/dm/types/handler.rs +++ b/rs-matter/src/dm/types/handler.rs @@ -22,10 +22,10 @@ use embassy_futures::select::select; use crate::crypto::Crypto; use crate::dm::clusters::net_comm::NetworksAccess; -use crate::dm::{EventId, Metadata}; +use crate::dm::{EventId, EventNumber, Metadata}; use crate::error::{Error, ErrorCode}; +use crate::im::encoding::{EventPriority, IMBuffer}; use crate::im::events::EventTLVWrite; -use crate::im::{EventNumber, EventPriority, IMBuffer}; use crate::persist::KvBlobStoreAccess; use crate::tlv::TLVElement; use crate::transport::exchange::Exchange; diff --git a/rs-matter/src/dm/types/node.rs b/rs-matter/src/dm/types/node.rs index 45ebac267..1e105fdea 100644 --- a/rs-matter/src/dm/types/node.rs +++ b/rs-matter/src/dm/types/node.rs @@ -21,15 +21,15 @@ use core::fmt; use crate::acl::Accessor; use crate::dm::{Cluster, Endpoint, Metadata, Quality}; use crate::error::Error; -use crate::im::{ +use crate::im::encoding::{ AttrData, AttrPath, AttrStatus, CmdData, CmdStatus, DataVersionFilter, EventPath, GenericPath, - IMStatusCode, InvReq, NodeId, ReportDataReq, WriteReq, + IMStatusCode, InvReq, ReportDataReq, WriteReq, }; use crate::tlv::{TLVArray, TLVElement}; use crate::utils::init::{init, Init}; use crate::utils::storage::Vec; -use super::{AttrDetails, ClusterId, CmdDetails, EndptId}; +use super::{AttrDetails, ClusterId, CmdDetails, EndptId, NodeId}; /// The main Matter metadata type describing a Matter Node. /// @@ -1025,8 +1025,7 @@ mod test { Access, Attribute, Cluster, ClusterId, Command, DeviceType, Endpoint, EndptId, Quality, }; use crate::error::{Error, ErrorCode}; - use crate::im::GenericPath; - use crate::im::IMStatusCode; + use crate::im::encoding::{GenericPath, IMStatusCode}; use crate::test::test_matter; use super::{Node, Operation, PathExpanderIterator, PathExpansionItem}; diff --git a/rs-matter/src/dm/types/reply.rs b/rs-matter/src/dm/types/reply.rs index a12aa5738..97925c301 100644 --- a/rs-matter/src/dm/types/reply.rs +++ b/rs-matter/src/dm/types/reply.rs @@ -18,7 +18,7 @@ use crate::acl::Accessor; use crate::dm::{AsyncHandler, GlobalElements, HandlerContext, Node}; use crate::error::{Error, ErrorCode}; -use crate::im::{ +use crate::im::encoding::{ AttrDataTag, AttrPath, AttrResp, AttrRespTag, AttrStatus, CmdDataTag, CmdPath, CmdResp, CmdRespTag, CmdStatus, EventData, EventFilter, EventPath, EventResp, IMStatusCode, }; diff --git a/rs-matter/src/im.rs b/rs-matter/src/im.rs index 7778568fe..d64d42515 100644 --- a/rs-matter/src/im.rs +++ b/rs-matter/src/im.rs @@ -30,9 +30,6 @@ use core::pin::pin; use embassy_futures::select::{select3, select4}; use embassy_time::{Instant, Timer}; -use num::FromPrimitive; -use num_derive::FromPrimitive; - use crate::acl::Accessor; use crate::crypto::Crypto; use crate::dm::clusters::net_comm::{ @@ -56,10 +53,8 @@ use crate::persist::{ KvBlobStore, KvBlobStoreAccess, SharedKvBlobStore, DEFAULT_KV_BUF_SIZE, NETWORKS_KEY, }; use crate::respond::ExchangeHandler; -use crate::tlv::{ - get_root_node_struct, FromTLV, Nullable, TLVElement, TLVTag, TLVWrite, ToTLV, TLV, -}; -use crate::transport::exchange::{Exchange, ExchangeId, MessageMeta, MAX_EXCHANGE_TX_BUF_SIZE}; +use crate::tlv::{get_root_node_struct, FromTLV, Nullable, TLVElement, TLVTag, TLVWrite, ToTLV}; +use crate::transport::exchange::{Exchange, ExchangeId, MAX_EXCHANGE_TX_BUF_SIZE}; use crate::utils::cell::RefCell; use crate::utils::init::{init, Init}; use crate::utils::select::Coalesce; @@ -68,268 +63,14 @@ use crate::utils::storage::WriteBuf; use crate::utils::sync::blocking::Mutex; use crate::Matter; -pub use attr::*; -pub use event::*; -pub use invoke::*; -pub use invoke_builder::*; -pub use status::*; -pub use timed::*; -pub use types::*; +pub use encoding::*; pub mod busy; pub mod client; +pub mod encoding; pub mod events; pub mod subscriptions; -mod attr; -mod event; -mod invoke; -mod invoke_builder; -mod status; -mod timed; -pub(crate) mod types; - -/// Interaction Model ID as per the Matter Core spec -pub const PROTO_ID_INTERACTION_MODEL: u16 = 0x01; - -/// `interactionModelRevision` value emitted on every outgoing IM message -/// rs-matter sends — both responder-side (ReportData / WriteResponse / -/// InvokeResponse / StatusResponse / SubscribeResponse, in [`crate::dm`] -/// and [`crate::im::status`] / [`crate::im::attr::subscribe`]) and -/// requestor-side (the client builders in [`crate::im::client`] and -/// [`crate::im::TimedReq`]). -/// -/// The TLV context tag is [`GlobalElements::InteractionModelRevision`] -/// (= `0xFF`). -/// -/// `13` has been the spec-mandated value since Matter 1.3; see the -/// "Revision History" of the Matter Core Specification. -pub const IM_REVISION: u8 = 13; - -/// An enumeration of all possible error codes that can be returned by the Interaction Model. -#[derive(FromPrimitive, Debug, Clone, Copy, PartialEq, Eq, Hash)] -#[cfg_attr(feature = "defmt", derive(defmt::Format))] -pub enum IMStatusCode { - Success = 0, - Failure = 1, - InvalidSubscription = 0x7D, - UnsupportedAccess = 0x7E, - UnsupportedEndpoint = 0x7F, - InvalidAction = 0x80, - UnsupportedCommand = 0x81, - InvalidCommand = 0x85, - UnsupportedAttribute = 0x86, - ConstraintError = 0x87, - UnsupportedWrite = 0x88, - ResourceExhausted = 0x89, - NotFound = 0x8b, - UnreportableAttribute = 0x8c, - InvalidDataType = 0x8d, - UnsupportedRead = 0x8f, - DataVersionMismatch = 0x92, - Timeout = 0x94, - UnsupportedNode = 0x9b, - Busy = 0x9c, - UnsupportedCluster = 0xc3, - NoUpstreamSubscription = 0xc5, - NeedsTimedInteraction = 0xc6, - UnsupportedEvent = 0xc7, - PathsExhausted = 0xc8, - TimedRequestMisMatch = 0xc9, - FailSafeRequired = 0xca, - InvalidInState = 0xcb, - NoCommandResponse = 0xcc, - DynamicConstraintError = 0xcf, -} - -impl From for IMStatusCode { - fn from(e: ErrorCode) -> Self { - match e { - ErrorCode::NodeNotFound => IMStatusCode::UnsupportedNode, - ErrorCode::EndpointNotFound => IMStatusCode::UnsupportedEndpoint, - ErrorCode::ClusterNotFound => IMStatusCode::UnsupportedCluster, - ErrorCode::AttributeNotFound => IMStatusCode::UnsupportedAttribute, - ErrorCode::CommandNotFound => IMStatusCode::UnsupportedCommand, - ErrorCode::EventNotFound => IMStatusCode::UnsupportedEvent, - ErrorCode::InvalidAction => IMStatusCode::InvalidAction, - ErrorCode::InvalidCommand => IMStatusCode::InvalidCommand, - ErrorCode::InvalidDataType => IMStatusCode::InvalidDataType, - ErrorCode::UnsupportedAccess => IMStatusCode::UnsupportedAccess, - ErrorCode::Busy => IMStatusCode::Busy, - ErrorCode::DataVersionMismatch => IMStatusCode::DataVersionMismatch, - ErrorCode::ResourceExhausted => IMStatusCode::ResourceExhausted, - ErrorCode::FailSafeRequired => IMStatusCode::FailSafeRequired, - ErrorCode::NeedsTimedInteraction => IMStatusCode::NeedsTimedInteraction, - ErrorCode::ConstraintError => IMStatusCode::ConstraintError, - ErrorCode::DynamicConstraintError => IMStatusCode::DynamicConstraintError, - ErrorCode::NotFound => IMStatusCode::NotFound, - ErrorCode::Failure => IMStatusCode::Failure, - _ => IMStatusCode::Failure, - } - } -} - -impl From for IMStatusCode { - fn from(value: Error) -> Self { - Self::from(value.code()) - } -} - -impl IMStatusCode { - /// Convert a non-success IM status code to an `ErrorCode`. - /// - /// Returns `None` for `Success`, since success is not an error. - pub fn to_error_code(self) -> Option { - match self { - Self::Success => None, - Self::UnsupportedAccess => Some(ErrorCode::UnsupportedAccess), - Self::InvalidAction => Some(ErrorCode::InvalidAction), - Self::UnsupportedCommand => Some(ErrorCode::CommandNotFound), - Self::InvalidCommand => Some(ErrorCode::InvalidCommand), - Self::UnsupportedAttribute => Some(ErrorCode::AttributeNotFound), - Self::ConstraintError => Some(ErrorCode::ConstraintError), - Self::DynamicConstraintError => Some(ErrorCode::DynamicConstraintError), - Self::ResourceExhausted => Some(ErrorCode::ResourceExhausted), - Self::NotFound => Some(ErrorCode::NotFound), - Self::InvalidDataType => Some(ErrorCode::InvalidDataType), - Self::DataVersionMismatch => Some(ErrorCode::DataVersionMismatch), - Self::Busy => Some(ErrorCode::Busy), - Self::UnsupportedNode => Some(ErrorCode::NodeNotFound), - Self::UnsupportedEndpoint => Some(ErrorCode::EndpointNotFound), - Self::UnsupportedCluster => Some(ErrorCode::ClusterNotFound), - Self::UnsupportedEvent => Some(ErrorCode::EventNotFound), - Self::NeedsTimedInteraction => Some(ErrorCode::NeedsTimedInteraction), - Self::FailSafeRequired => Some(ErrorCode::FailSafeRequired), - _ => Some(ErrorCode::Failure), - } - } -} - -impl FromTLV<'_> for IMStatusCode { - fn from_tlv(t: &TLVElement) -> Result { - FromPrimitive::from_u16(t.u16()?).ok_or_else(|| ErrorCode::Invalid.into()) - } -} - -impl ToTLV for IMStatusCode { - fn to_tlv(&self, tag: &TLVTag, mut tw: W) -> Result<(), Error> { - tw.u16(tag, *self as _) - } - - fn tlv_iter(&self, tag: TLVTag) -> impl Iterator, Error>> { - TLV::u16(tag, *self as _).into_tlv_iter() - } -} - -/// An enumeration of all possible opcodes used in the Interaction Model. -#[derive(FromPrimitive, Debug, Copy, Clone, Eq, PartialEq)] -#[cfg_attr(feature = "defmt", derive(defmt::Format))] -pub enum OpCode { - Reserved = 0, - StatusResponse = 1, - ReadRequest = 2, - SubscribeRequest = 3, - SubscribeResponse = 4, - ReportData = 5, - WriteRequest = 6, - WriteResponse = 7, - InvokeRequest = 8, - InvokeResponse = 9, - TimedRequest = 10, -} - -impl OpCode { - /// Return the opcode as a `MessageMeta` structure, which contains - /// the protocol ID, opcode, and reliability information. - /// - /// Reliability is set to `true` as all IM messages are reliable. - pub const fn meta(&self) -> MessageMeta { - MessageMeta { - proto_id: PROTO_ID_INTERACTION_MODEL, - proto_opcode: *self as u8, - reliable: true, - } - } - - /// Return `true` if the opcode payload is in TLV format. - /// - /// Currently, the payload of all IM opcodes except `Reserved` is in TLV format. - pub const fn is_tlv(&self) -> bool { - !matches!(self, Self::Reserved) - } -} - -impl From for MessageMeta { - fn from(opcode: OpCode) -> Self { - opcode.meta() - } -} - -/// A generic (possibly a wildcard) path with endpoint, clusters, and a leaf -/// -/// The leaf could be a command, an attribute, or an event -/// -/// Note that this type does not implement `FromTLV` / `ToTLV` because it does not correspond -/// to a specific TLV structure in the Interaction Model. -/// -/// Note also that it only captures a _subset_ of the fields of `AttrPath`, and as such, it should be used with care! -/// -/// Look at `AttrPath`, `CmdPath`, and `EventPath` for specific TLV structures, which -/// can be turned into `GenericPath` using their `to_gp()` method. -#[derive(Default, Clone, Debug, PartialEq)] -#[cfg_attr(feature = "defmt", derive(defmt::Format))] -pub struct GenericPath { - /// The endpoint ID, if specified, otherwise `None` for wildcard - pub endpoint: Option, - /// The cluster ID, if specified, otherwise `None` for wildcard - pub cluster: Option, - /// The leaf ID, if specified, otherwise `None` for wildcard - pub leaf: Option, -} - -impl GenericPath { - /// Create a new `GenericPath` with the given endpoint, cluster, and leaf. - pub const fn new( - endpoint: Option, - cluster: Option, - leaf: Option, - ) -> Self { - Self { - endpoint, - cluster, - leaf, - } - } - - /// Return Ok, if the path is non wildcard, otherwise returns an error - pub fn not_wildcard(&self) -> Result<(EndptId, ClusterId, u32), Error> { - match *self { - GenericPath { - endpoint: Some(e), - cluster: Some(c), - leaf: Some(l), - } => Ok((e, c, l)), - _ => Err(ErrorCode::Invalid.into()), - } - } - - /// Return true, if the path is wildcard - pub const fn is_wildcard(&self) -> bool { - !matches!( - *self, - GenericPath { - endpoint: Some(_), - cluster: Some(_), - leaf: Some(_), - } - ) - } -} - -/// The buffer type used by the Interaction Model for RX/TX payloads. Aliases the -/// central [`Buffer`](crate::transport::exchange::Buffer). -pub type IMBuffer = crate::transport::exchange::Buffer; - /// An `ExchangeHandler` implementation capable of handling responder exchanges for the Interaction Model protocol. /// The mutable, owned-together state a [`InteractionModel`] operates on: the /// subscriptions table, the events queue and the network store. diff --git a/rs-matter/src/im/encoding.rs b/rs-matter/src/im/encoding.rs new file mode 100644 index 000000000..dc8955070 --- /dev/null +++ b/rs-matter/src/im/encoding.rs @@ -0,0 +1,289 @@ +/* + * + * Copyright (c) 2022-2026 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +//! The Interaction Model Encoding as defined by the Matter Core spec: the +//! wire-level TLV-serde types and path primitives - request/response payloads +//! (`ReadReq`, `ReportDataReq`, `WriteReq`, `InvReq`, …), paths (`AttrPath`, +//! `CmdPath`, `EventPath`, `GenericPath`), status codes and opcodes. +//! +//! This is the lowest layer of the Interaction Model: it is what the data model +//! ([`crate::dm`]) depends upon, and what the IM engine ([`crate::im`]) and +//! client ([`crate::im::client`]) build their messages from. + +use num::FromPrimitive; +use num_derive::FromPrimitive; + +use crate::error::{Error, ErrorCode}; +use crate::tlv::{FromTLV, TLVElement, TLVTag, TLVWrite, ToTLV, TLV}; +use crate::transport::exchange::MessageMeta; + +pub use attr::*; +pub use event::*; +pub use invoke::*; +pub use invoke_builder::*; +pub use status::*; +pub use timed::*; +pub use types::*; + +mod attr; +mod event; +mod invoke; +mod invoke_builder; +mod status; +mod timed; +pub(crate) mod types; + +/// The buffer type used by the Interaction Model for RX/TX payloads. Aliases the +/// central [`Buffer`](crate::transport::exchange::Buffer). +pub type IMBuffer = crate::transport::exchange::Buffer; + +/// Interaction Model ID as per the Matter Core spec +pub const PROTO_ID_INTERACTION_MODEL: u16 = 0x01; + +/// `interactionModelRevision` value emitted on every outgoing IM message +/// rs-matter sends — both responder-side (ReportData / WriteResponse / +/// InvokeResponse / StatusResponse / SubscribeResponse, in [`crate::dm`] +/// and [`crate::im::status`] / [`crate::im::attr::subscribe`]) and +/// requestor-side (the client builders in [`crate::im::client`] and +/// [`crate::im::TimedReq`]). +/// +/// The TLV context tag is [`GlobalElements::InteractionModelRevision`] +/// (= `0xFF`). +/// +/// `13` has been the spec-mandated value since Matter 1.3; see the +/// "Revision History" of the Matter Core Specification. +pub const IM_REVISION: u8 = 13; + +/// An enumeration of all possible error codes that can be returned by the Interaction Model. +#[derive(FromPrimitive, Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] +pub enum IMStatusCode { + Success = 0, + Failure = 1, + InvalidSubscription = 0x7D, + UnsupportedAccess = 0x7E, + UnsupportedEndpoint = 0x7F, + InvalidAction = 0x80, + UnsupportedCommand = 0x81, + InvalidCommand = 0x85, + UnsupportedAttribute = 0x86, + ConstraintError = 0x87, + UnsupportedWrite = 0x88, + ResourceExhausted = 0x89, + NotFound = 0x8b, + UnreportableAttribute = 0x8c, + InvalidDataType = 0x8d, + UnsupportedRead = 0x8f, + DataVersionMismatch = 0x92, + Timeout = 0x94, + UnsupportedNode = 0x9b, + Busy = 0x9c, + UnsupportedCluster = 0xc3, + NoUpstreamSubscription = 0xc5, + NeedsTimedInteraction = 0xc6, + UnsupportedEvent = 0xc7, + PathsExhausted = 0xc8, + TimedRequestMisMatch = 0xc9, + FailSafeRequired = 0xca, + InvalidInState = 0xcb, + NoCommandResponse = 0xcc, + DynamicConstraintError = 0xcf, +} + +impl From for IMStatusCode { + fn from(e: ErrorCode) -> Self { + match e { + ErrorCode::NodeNotFound => IMStatusCode::UnsupportedNode, + ErrorCode::EndpointNotFound => IMStatusCode::UnsupportedEndpoint, + ErrorCode::ClusterNotFound => IMStatusCode::UnsupportedCluster, + ErrorCode::AttributeNotFound => IMStatusCode::UnsupportedAttribute, + ErrorCode::CommandNotFound => IMStatusCode::UnsupportedCommand, + ErrorCode::EventNotFound => IMStatusCode::UnsupportedEvent, + ErrorCode::InvalidAction => IMStatusCode::InvalidAction, + ErrorCode::InvalidCommand => IMStatusCode::InvalidCommand, + ErrorCode::InvalidDataType => IMStatusCode::InvalidDataType, + ErrorCode::UnsupportedAccess => IMStatusCode::UnsupportedAccess, + ErrorCode::Busy => IMStatusCode::Busy, + ErrorCode::DataVersionMismatch => IMStatusCode::DataVersionMismatch, + ErrorCode::ResourceExhausted => IMStatusCode::ResourceExhausted, + ErrorCode::FailSafeRequired => IMStatusCode::FailSafeRequired, + ErrorCode::NeedsTimedInteraction => IMStatusCode::NeedsTimedInteraction, + ErrorCode::ConstraintError => IMStatusCode::ConstraintError, + ErrorCode::DynamicConstraintError => IMStatusCode::DynamicConstraintError, + ErrorCode::NotFound => IMStatusCode::NotFound, + ErrorCode::Failure => IMStatusCode::Failure, + _ => IMStatusCode::Failure, + } + } +} + +impl From for IMStatusCode { + fn from(value: Error) -> Self { + Self::from(value.code()) + } +} + +impl IMStatusCode { + /// Convert a non-success IM status code to an `ErrorCode`. + /// + /// Returns `None` for `Success`, since success is not an error. + pub fn to_error_code(self) -> Option { + match self { + Self::Success => None, + Self::UnsupportedAccess => Some(ErrorCode::UnsupportedAccess), + Self::InvalidAction => Some(ErrorCode::InvalidAction), + Self::UnsupportedCommand => Some(ErrorCode::CommandNotFound), + Self::InvalidCommand => Some(ErrorCode::InvalidCommand), + Self::UnsupportedAttribute => Some(ErrorCode::AttributeNotFound), + Self::ConstraintError => Some(ErrorCode::ConstraintError), + Self::DynamicConstraintError => Some(ErrorCode::DynamicConstraintError), + Self::ResourceExhausted => Some(ErrorCode::ResourceExhausted), + Self::NotFound => Some(ErrorCode::NotFound), + Self::InvalidDataType => Some(ErrorCode::InvalidDataType), + Self::DataVersionMismatch => Some(ErrorCode::DataVersionMismatch), + Self::Busy => Some(ErrorCode::Busy), + Self::UnsupportedNode => Some(ErrorCode::NodeNotFound), + Self::UnsupportedEndpoint => Some(ErrorCode::EndpointNotFound), + Self::UnsupportedCluster => Some(ErrorCode::ClusterNotFound), + Self::UnsupportedEvent => Some(ErrorCode::EventNotFound), + Self::NeedsTimedInteraction => Some(ErrorCode::NeedsTimedInteraction), + Self::FailSafeRequired => Some(ErrorCode::FailSafeRequired), + _ => Some(ErrorCode::Failure), + } + } +} + +impl FromTLV<'_> for IMStatusCode { + fn from_tlv(t: &TLVElement) -> Result { + FromPrimitive::from_u16(t.u16()?).ok_or_else(|| ErrorCode::Invalid.into()) + } +} + +impl ToTLV for IMStatusCode { + fn to_tlv(&self, tag: &TLVTag, mut tw: W) -> Result<(), Error> { + tw.u16(tag, *self as _) + } + + fn tlv_iter(&self, tag: TLVTag) -> impl Iterator, Error>> { + TLV::u16(tag, *self as _).into_tlv_iter() + } +} + +/// An enumeration of all possible opcodes used in the Interaction Model. +#[derive(FromPrimitive, Debug, Copy, Clone, Eq, PartialEq)] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] +pub enum OpCode { + Reserved = 0, + StatusResponse = 1, + ReadRequest = 2, + SubscribeRequest = 3, + SubscribeResponse = 4, + ReportData = 5, + WriteRequest = 6, + WriteResponse = 7, + InvokeRequest = 8, + InvokeResponse = 9, + TimedRequest = 10, +} + +impl OpCode { + /// Return the opcode as a `MessageMeta` structure, which contains + /// the protocol ID, opcode, and reliability information. + /// + /// Reliability is set to `true` as all IM messages are reliable. + pub const fn meta(&self) -> MessageMeta { + MessageMeta { + proto_id: PROTO_ID_INTERACTION_MODEL, + proto_opcode: *self as u8, + reliable: true, + } + } + + /// Return `true` if the opcode payload is in TLV format. + /// + /// Currently, the payload of all IM opcodes except `Reserved` is in TLV format. + pub const fn is_tlv(&self) -> bool { + !matches!(self, Self::Reserved) + } +} + +impl From for MessageMeta { + fn from(opcode: OpCode) -> Self { + opcode.meta() + } +} + +/// A generic (possibly a wildcard) path with endpoint, clusters, and a leaf +/// +/// The leaf could be a command, an attribute, or an event +/// +/// Note that this type does not implement `FromTLV` / `ToTLV` because it does not correspond +/// to a specific TLV structure in the Interaction Model. +/// +/// Note also that it only captures a _subset_ of the fields of `AttrPath`, and as such, it should be used with care! +/// +/// Look at `AttrPath`, `CmdPath`, and `EventPath` for specific TLV structures, which +/// can be turned into `GenericPath` using their `to_gp()` method. +#[derive(Default, Clone, Debug, PartialEq)] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] +pub struct GenericPath { + /// The endpoint ID, if specified, otherwise `None` for wildcard + pub endpoint: Option, + /// The cluster ID, if specified, otherwise `None` for wildcard + pub cluster: Option, + /// The leaf ID, if specified, otherwise `None` for wildcard + pub leaf: Option, +} + +impl GenericPath { + /// Create a new `GenericPath` with the given endpoint, cluster, and leaf. + pub const fn new( + endpoint: Option, + cluster: Option, + leaf: Option, + ) -> Self { + Self { + endpoint, + cluster, + leaf, + } + } + + /// Return Ok, if the path is non wildcard, otherwise returns an error + pub fn not_wildcard(&self) -> Result<(EndptId, ClusterId, u32), Error> { + match *self { + GenericPath { + endpoint: Some(e), + cluster: Some(c), + leaf: Some(l), + } => Ok((e, c, l)), + _ => Err(ErrorCode::Invalid.into()), + } + } + + /// Return true, if the path is wildcard + pub const fn is_wildcard(&self) -> bool { + !matches!( + *self, + GenericPath { + endpoint: Some(_), + cluster: Some(_), + leaf: Some(_), + } + ) + } +} diff --git a/rs-matter/src/im/attr.rs b/rs-matter/src/im/encoding/attr.rs similarity index 100% rename from rs-matter/src/im/attr.rs rename to rs-matter/src/im/encoding/attr.rs diff --git a/rs-matter/src/im/attr/read.rs b/rs-matter/src/im/encoding/attr/read.rs similarity index 100% rename from rs-matter/src/im/attr/read.rs rename to rs-matter/src/im/encoding/attr/read.rs diff --git a/rs-matter/src/im/attr/read_builder.rs b/rs-matter/src/im/encoding/attr/read_builder.rs similarity index 99% rename from rs-matter/src/im/attr/read_builder.rs rename to rs-matter/src/im/encoding/attr/read_builder.rs index 197ab6f85..ea0d7cf5e 100644 --- a/rs-matter/src/im/attr/read_builder.rs +++ b/rs-matter/src/im/encoding/attr/read_builder.rs @@ -18,7 +18,7 @@ //! Streaming TLV builders for `ReadRequestMessage` and its sub-structures. //! //! Compare with `WriteReqBuilder` in -//! [`crate::im::attr::write_builder`]: same typestate-machine shape, +//! [`crate::im::encoding::attr::write_builder`]: same typestate-machine shape, //! same implicit-skip convention (optional fields are omitted by not //! calling their setter; later-field setters are available on //! earlier states so the user can write a minimal request in one diff --git a/rs-matter/src/im/attr/subscribe.rs b/rs-matter/src/im/encoding/attr/subscribe.rs similarity index 100% rename from rs-matter/src/im/attr/subscribe.rs rename to rs-matter/src/im/encoding/attr/subscribe.rs diff --git a/rs-matter/src/im/attr/subscribe_builder.rs b/rs-matter/src/im/encoding/attr/subscribe_builder.rs similarity index 99% rename from rs-matter/src/im/attr/subscribe_builder.rs rename to rs-matter/src/im/encoding/attr/subscribe_builder.rs index 623ca58fb..4ad89a6fe 100644 --- a/rs-matter/src/im/attr/subscribe_builder.rs +++ b/rs-matter/src/im/encoding/attr/subscribe_builder.rs @@ -18,7 +18,7 @@ //! Streaming TLV builder for `SubscribeRequestMessage`. //! //! Same typestate-machine + implicit-skip convention as -//! [`crate::im::attr::read_builder::ReadReqBuilder`]: mandatory +//! [`crate::im::encoding::attr::read_builder::ReadReqBuilder`]: mandatory //! fields must be written in order (`keep_subs`, `min_int_floor`, //! `max_int_ceil`, `fabric_filtered`); optional intermediate fields //! (`AttributeRequests`, `EventRequests`, `EventFilters`, @@ -26,7 +26,7 @@ //! setter — later-field setters are available on earlier states so //! the user can write a minimal request in one straight chain. The //! `AttrPath` array sub-builder is re-used from -//! [`crate::im::attr::read_builder`] since the wire shape is +//! [`crate::im::encoding::attr::read_builder`] since the wire shape is //! identical to the read variant. //! //! # Layout diff --git a/rs-matter/src/im/attr/write.rs b/rs-matter/src/im/encoding/attr/write.rs similarity index 100% rename from rs-matter/src/im/attr/write.rs rename to rs-matter/src/im/encoding/attr/write.rs diff --git a/rs-matter/src/im/attr/write_builder.rs b/rs-matter/src/im/encoding/attr/write_builder.rs similarity index 100% rename from rs-matter/src/im/attr/write_builder.rs rename to rs-matter/src/im/encoding/attr/write_builder.rs diff --git a/rs-matter/src/im/event.rs b/rs-matter/src/im/encoding/event.rs similarity index 100% rename from rs-matter/src/im/event.rs rename to rs-matter/src/im/encoding/event.rs diff --git a/rs-matter/src/im/invoke.rs b/rs-matter/src/im/encoding/invoke.rs similarity index 100% rename from rs-matter/src/im/invoke.rs rename to rs-matter/src/im/encoding/invoke.rs diff --git a/rs-matter/src/im/invoke_builder.rs b/rs-matter/src/im/encoding/invoke_builder.rs similarity index 99% rename from rs-matter/src/im/invoke_builder.rs rename to rs-matter/src/im/encoding/invoke_builder.rs index 6bf51a2ec..8012db024 100644 --- a/rs-matter/src/im/invoke_builder.rs +++ b/rs-matter/src/im/encoding/invoke_builder.rs @@ -18,7 +18,7 @@ //! Streaming TLV builders for `InvokeRequestMessage` and its //! sub-structures. //! -//! This is the analog of [`crate::im::attr::write_builder`] for +//! This is the analog of [`crate::im::encoding::attr::write_builder`] for //! command invokes — and the genuine MCU win for client clusters: a //! switch wanting to send `OnOff::Toggle` to a bound bulb constructs //! the command-request payload directly into the TX `WriteBuf` via diff --git a/rs-matter/src/im/status.rs b/rs-matter/src/im/encoding/status.rs similarity index 100% rename from rs-matter/src/im/status.rs rename to rs-matter/src/im/encoding/status.rs diff --git a/rs-matter/src/im/timed.rs b/rs-matter/src/im/encoding/timed.rs similarity index 100% rename from rs-matter/src/im/timed.rs rename to rs-matter/src/im/encoding/timed.rs diff --git a/rs-matter/src/im/types.rs b/rs-matter/src/im/encoding/types.rs similarity index 100% rename from rs-matter/src/im/types.rs rename to rs-matter/src/im/encoding/types.rs From 657db0e76db89cebd215cad1b3996d0484e39bbd Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Fri, 19 Jun 2026 11:19:52 +0000 Subject: [PATCH 10/14] Fixc two clippy lints --- rs-matter/src/transport.rs | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/rs-matter/src/transport.rs b/rs-matter/src/transport.rs index e217167c1..cffc91526 100644 --- a/rs-matter/src/transport.rs +++ b/rs-matter/src/transport.rs @@ -358,19 +358,17 @@ impl Transport { let (sii, sai, sat) = answer.session_params(); self.mdns_resolve.modify(|state| match state { - MdnsResolveState::InFlight { service } => { - if service.matches_instance(&answer.instance_name) { - *state = MdnsResolveState::Resolved { - ip, - port, - sii, - sai, - sat, - }; - (true, ()) - } else { - (false, ()) - } + MdnsResolveState::InFlight { service } + if service.matches_instance(&answer.instance_name) => + { + *state = MdnsResolveState::Resolved { + ip, + port, + sii, + sai, + sat, + }; + (true, ()) } // Already resolved (same in-flight target — the rendezvous is // single-slot) but not yet consumed: keep the better-scoring address @@ -542,13 +540,11 @@ impl Transport { }; self.mdns_browse.modify(|state| match state { - MdnsBrowseState::InFlight { filter, exclude } => { - if !exclude.contains(&id) && filter.matches(answer) { - *state = MdnsBrowseState::Found { ip, port, id }; - (true, ()) - } else { - (false, ()) - } + MdnsBrowseState::InFlight { filter, exclude } + if !exclude.contains(&id) && filter.matches(answer) => + { + *state = MdnsBrowseState::Found { ip, port, id }; + (true, ()) } // Already matched this same instance but not yet consumed: keep the // better-scoring address. Backends that surface one address per From cfc14c5b52417f894deaed2c14a93c0ecbced57a Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Fri, 19 Jun 2026 11:41:52 +0000 Subject: [PATCH 11/14] Do not use GlobalElements in im::encoding --- rs-matter/src/acl.rs | 4 ++-- rs-matter/src/dm/clusters/basic_info.rs | 14 ++++++++++---- rs-matter/src/dm/types/reply.rs | 4 ++-- rs-matter/src/im.rs | 10 +++++----- rs-matter/src/im/encoding.rs | 16 +++++++++++----- rs-matter/src/im/encoding/attr.rs | 3 +-- rs-matter/src/im/encoding/attr/read_builder.rs | 4 ++-- rs-matter/src/im/encoding/attr/subscribe.rs | 3 +-- .../src/im/encoding/attr/subscribe_builder.rs | 3 +-- rs-matter/src/im/encoding/attr/write.rs | 4 ++-- rs-matter/src/im/encoding/attr/write_builder.rs | 4 ++-- rs-matter/src/im/encoding/invoke.rs | 3 +-- rs-matter/src/im/encoding/invoke_builder.rs | 4 ++-- rs-matter/src/im/encoding/status.rs | 3 +-- rs-matter/src/im/encoding/timed.rs | 3 +-- 15 files changed, 44 insertions(+), 38 deletions(-) diff --git a/rs-matter/src/acl.rs b/rs-matter/src/acl.rs index b7e1ff381..23466bf29 100644 --- a/rs-matter/src/acl.rs +++ b/rs-matter/src/acl.rs @@ -29,7 +29,7 @@ use crate::dm::clusters::acl::{ AccessControlAuxiliaryTypeEnum, AccessControlEntryAuthModeEnum, AccessControlEntryPrivilegeEnum, AccessControlEntryStruct, AccessControlEntryStructBuilder, }; -use crate::dm::{Access, ClusterId, DeviceType, EndptId, GlobalElements, NodeId, Privilege}; +use crate::dm::{Access, ClusterId, DeviceType, EndptId, NodeId, Privilege}; use crate::error::{Error, ErrorCode}; use crate::im::GenericPath; use crate::tlv::{FromTLV, Nullable, TLVBuilderParent, TLVElement, TLVTag, TLVWrite, ToTLV, TLV}; @@ -578,7 +578,7 @@ pub struct AclEntry { auxiliary_type: Option, // Note that this field will always be `Some(NN)` when the entry is persisted in storage, // however, it will be `None` when the entry is coming from the other peer. - #[tagval(GlobalElements::FabricIndex as u8)] + #[tagval(crate::im::encoding::FABRIC_INDEX_TAG)] pub fab_idx: Option, } diff --git a/rs-matter/src/dm/clusters/basic_info.rs b/rs-matter/src/dm/clusters/basic_info.rs index 0b828e05f..5e7f05b23 100644 --- a/rs-matter/src/dm/clusters/basic_info.rs +++ b/rs-matter/src/dm/clusters/basic_info.rs @@ -22,7 +22,6 @@ use core::str::FromStr; use crate::dm::{Cluster, Dataver, InvokeContext, ReadContext, WriteContext}; use crate::error::{Error, ErrorCode}; use crate::fabric::MAX_FABRICS; -use crate::im::subscriptions::DEFAULT_MAX_SUBSCRIPTIONS; use crate::persist::{KvBlobStore, Persist, BASIC_INFO_KEY}; use crate::tlv::{FromTLV, Nullable, TLVBuilderParent, TLVElement, ToTLV, Utf8StrBuilder}; use crate::transport::exchange::Exchange; @@ -264,13 +263,20 @@ pub struct CapabilityMinima { pub subscriptions_per_fabric: u16, } +/// The Matter spec mandates `CapabilityMinima.SubscriptionsPerFabric >= 3`. +/// rs-matter sizes its default subscription table as `MAX_FABRICS * 3` (see +/// [`DEFAULT_MAX_SUBSCRIPTIONS`](crate::im::subscriptions::DEFAULT_MAX_SUBSCRIPTIONS)), +/// so this per-fabric minimum is what the device guarantees. +const SUBSCRIPTIONS_PER_FABRIC: u16 = 3; + impl CapabilityMinima { - /// Create a default instance of `CapabilityMinima`, - /// with actual CASE sessions per fabric and subscriptions per fabric based on `DEFAULT_MAX_SUBSCRIPTIONS`. + /// Create a default instance of `CapabilityMinima`, with CASE sessions per + /// fabric derived from the session table and the spec-minimum subscriptions + /// per fabric. pub const fn new() -> Self { Self { case_sessions_per_fabric: (MAX_SESSIONS / MAX_FABRICS) as _, - subscriptions_per_fabric: (DEFAULT_MAX_SUBSCRIPTIONS / MAX_FABRICS) as _, + subscriptions_per_fabric: SUBSCRIPTIONS_PER_FABRIC, } } } diff --git a/rs-matter/src/dm/types/reply.rs b/rs-matter/src/dm/types/reply.rs index 97925c301..fc74ff4f7 100644 --- a/rs-matter/src/dm/types/reply.rs +++ b/rs-matter/src/dm/types/reply.rs @@ -16,7 +16,7 @@ */ use crate::acl::Accessor; -use crate::dm::{AsyncHandler, GlobalElements, HandlerContext, Node}; +use crate::dm::{AsyncHandler, HandlerContext, Node}; use crate::error::{Error, ErrorCode}; use crate::im::encoding::{ AttrDataTag, AttrPath, AttrResp, AttrRespTag, AttrStatus, CmdDataTag, CmdPath, CmdResp, @@ -400,7 +400,7 @@ impl EventReader { return true; }; - let Ok(elem) = payload.find_ctx(GlobalElements::FabricIndex as u8) else { + let Ok(elem) = payload.find_ctx(crate::im::encoding::FABRIC_INDEX_TAG) else { // No `FabricIndex` field — non-fabric-sensitive, allow. return true; }; diff --git a/rs-matter/src/im.rs b/rs-matter/src/im.rs index d64d42515..766840004 100644 --- a/rs-matter/src/im.rs +++ b/rs-matter/src/im.rs @@ -41,8 +41,8 @@ use crate::dm::networks::wireless::{NoopWirelessNetCtl, WirelessMgr, MAX_CREDS_S use crate::dm::networks::NetChangeNotif; use crate::dm::{ expand_invoke, expand_read, expand_write, AsyncHandler, AttrChangeNotifier, AttrDetails, - Attribute, DataModel, EventEmitter, EventReader, GlobalElements, HandlerContext, - HandlerInvoker, MatchContextInstance, Metadata, + Attribute, DataModel, EventEmitter, EventReader, HandlerContext, HandlerInvoker, + MatchContextInstance, Metadata, }; use crate::error::{Error, ErrorCode}; use crate::im::events::{EventTLVWrite, Events, DEFAULT_MAX_EVENTS_BUF_SIZE}; @@ -1863,7 +1863,7 @@ where // strictly and refuses to commission devices that omit it; the // reference chip-tool happens to tolerate the absence. wb.u8( - &TLVTag::Context(GlobalElements::InteractionModelRevision as u8), + &TLVTag::Context(crate::im::encoding::IM_REVISION_TAG), IM_REVISION, )?; @@ -1939,7 +1939,7 @@ where // Mandatory `interactionModelRevision` (tag 0xFF); see note in // the ReportData emitter above. wb.u8( - &TLVTag::Context(GlobalElements::InteractionModelRevision as u8), + &TLVTag::Context(crate::im::encoding::IM_REVISION_TAG), IM_REVISION, )?; wb.end_container()?; @@ -2020,7 +2020,7 @@ where // every IM message — see the matching note in the ReportData // emitter above. wb.u8( - &TLVTag::Context(GlobalElements::InteractionModelRevision as u8), + &TLVTag::Context(crate::im::encoding::IM_REVISION_TAG), IM_REVISION, )?; wb.end_container()?; diff --git a/rs-matter/src/im/encoding.rs b/rs-matter/src/im/encoding.rs index dc8955070..912d5652a 100644 --- a/rs-matter/src/im/encoding.rs +++ b/rs-matter/src/im/encoding.rs @@ -57,17 +57,23 @@ pub const PROTO_ID_INTERACTION_MODEL: u16 = 0x01; /// `interactionModelRevision` value emitted on every outgoing IM message /// rs-matter sends — both responder-side (ReportData / WriteResponse / /// InvokeResponse / StatusResponse / SubscribeResponse, in [`crate::dm`] -/// and [`crate::im::status`] / [`crate::im::attr::subscribe`]) and -/// requestor-side (the client builders in [`crate::im::client`] and -/// [`crate::im::TimedReq`]). +/// and [`status`] / [`attr::subscribe`]) and requestor-side (the client +/// builders in [`crate::im::client`] and [`TimedReq`]). /// -/// The TLV context tag is [`GlobalElements::InteractionModelRevision`] -/// (= `0xFF`). +/// The TLV context tag it is emitted under is [`IM_REVISION_TAG`] (= `0xFF`). /// /// `13` has been the spec-mandated value since Matter 1.3; see the /// "Revision History" of the Matter Core Specification. pub const IM_REVISION: u8 = 13; +/// TLV context tag for the trailing `interactionModelRevision` field present on +/// every IM message (carries [`IM_REVISION`]). A Matter global element tag. +pub const IM_REVISION_TAG: u8 = 0xFF; + +/// TLV context tag for the `fabricIndex` field of fabric-scoped structs. +/// A Matter global element tag. +pub const FABRIC_INDEX_TAG: u8 = 0xFE; + /// An enumeration of all possible error codes that can be returned by the Interaction Model. #[derive(FromPrimitive, Debug, Clone, Copy, PartialEq, Eq, Hash)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] diff --git a/rs-matter/src/im/encoding/attr.rs b/rs-matter/src/im/encoding/attr.rs index f909c77c2..e9b23085c 100644 --- a/rs-matter/src/im/encoding/attr.rs +++ b/rs-matter/src/im/encoding/attr.rs @@ -15,7 +15,6 @@ * limitations under the License. */ -use crate::dm::GlobalElements; use crate::error::{Error, ErrorCode}; use crate::im::{EventFilter, NodeId}; use crate::tlv::{FromTLV, Nullable, TLVArray, TLVElement, ToTLV}; @@ -309,7 +308,7 @@ pub struct ReportDataResp<'a> { /// `interactionModelRevision` (TLV context tag `0xFF`). Mandatory in /// every IM message we send; modelled as `Option` so we tolerate /// peers that omit it (the C++ SDK is tolerant in practice). - #[tagval(GlobalElements::InteractionModelRevision as u8)] + #[tagval(crate::im::encoding::IM_REVISION_TAG)] pub interaction_model_revision: Option, } diff --git a/rs-matter/src/im/encoding/attr/read_builder.rs b/rs-matter/src/im/encoding/attr/read_builder.rs index ea0d7cf5e..5401cb7c0 100644 --- a/rs-matter/src/im/encoding/attr/read_builder.rs +++ b/rs-matter/src/im/encoding/attr/read_builder.rs @@ -63,8 +63,8 @@ use core::marker::PhantomData; -use crate::dm::{AttrId, ClusterId, EndptId, GlobalElements}; use crate::error::Error; +use crate::im::encoding::{AttrId, ClusterId, EndptId}; use crate::im::{ AttrPath, AttrPathTag, DataVersionFilter, EventFilter, EventPath, NodeId, ReadReqTag, IM_REVISION, @@ -344,7 +344,7 @@ where /// older revision). pub fn interaction_model_revision(mut self, value: u8) -> Result, Error> { self.p.writer().u8( - &TLVTag::Context(GlobalElements::InteractionModelRevision as u8), + &TLVTag::Context(crate::im::encoding::IM_REVISION_TAG), value, )?; Ok(ReadReqBuilder { p: self.p }) diff --git a/rs-matter/src/im/encoding/attr/subscribe.rs b/rs-matter/src/im/encoding/attr/subscribe.rs index 0a42d3b60..11b66719f 100644 --- a/rs-matter/src/im/encoding/attr/subscribe.rs +++ b/rs-matter/src/im/encoding/attr/subscribe.rs @@ -17,7 +17,6 @@ use core::fmt; -use crate::dm::GlobalElements; use crate::error::Error; use crate::im::{AttrPath, DataVersionFilter, EventFilter, EventPath, IM_REVISION}; use crate::tlv::{FromTLV, TLVArray, TLVElement, TagType, ToTLV}; @@ -142,7 +141,7 @@ pub struct SubscribeResp { /// `interactionModelRevision` — mandatory in every IM message we send; /// modelled as `Option` so we tolerate peers that omit it (the C++ /// SDK is tolerant in practice). - #[tagval(GlobalElements::InteractionModelRevision as u8)] + #[tagval(crate::im::encoding::IM_REVISION_TAG)] pub interaction_model_revision: Option, } diff --git a/rs-matter/src/im/encoding/attr/subscribe_builder.rs b/rs-matter/src/im/encoding/attr/subscribe_builder.rs index 4ad89a6fe..46a4d2aa7 100644 --- a/rs-matter/src/im/encoding/attr/subscribe_builder.rs +++ b/rs-matter/src/im/encoding/attr/subscribe_builder.rs @@ -69,7 +69,6 @@ //! }).await //! ``` -use crate::dm::GlobalElements; use crate::error::Error; use crate::im::{ AttrPath, AttrPathArrayBuilder, DataVersionFilter, EventFilter, EventPath, SubscribeReqTag, @@ -413,7 +412,7 @@ where value: u8, ) -> Result, Error> { self.p.writer().u8( - &TLVTag::Context(GlobalElements::InteractionModelRevision as u8), + &TLVTag::Context(crate::im::encoding::IM_REVISION_TAG), value, )?; Ok(SubscribeReqBuilder { p: self.p }) diff --git a/rs-matter/src/im/encoding/attr/write.rs b/rs-matter/src/im/encoding/attr/write.rs index b16753fef..5b01ed88d 100644 --- a/rs-matter/src/im/encoding/attr/write.rs +++ b/rs-matter/src/im/encoding/attr/write.rs @@ -17,8 +17,8 @@ use core::fmt; -use crate::dm::{AttrId, ClusterId, EndptId, GlobalElements}; use crate::error::{Error, ErrorCode}; +use crate::im::encoding::{AttrId, ClusterId, EndptId}; use crate::im::{AttrData, AttrStatus}; use crate::tlv::{FromTLV, TLVArray, TLVElement, ToTLV}; @@ -121,7 +121,7 @@ pub struct WriteResp<'a> { /// `interactionModelRevision` (TLV context tag `0xFF`). Mandatory in /// every IM message we send; modelled as `Option` so we tolerate /// peers that omit it (the C++ SDK is tolerant in practice). - #[tagval(GlobalElements::InteractionModelRevision as u8)] + #[tagval(crate::im::encoding::IM_REVISION_TAG)] pub interaction_model_revision: Option, } diff --git a/rs-matter/src/im/encoding/attr/write_builder.rs b/rs-matter/src/im/encoding/attr/write_builder.rs index ce2916058..69791a4f3 100644 --- a/rs-matter/src/im/encoding/attr/write_builder.rs +++ b/rs-matter/src/im/encoding/attr/write_builder.rs @@ -101,8 +101,8 @@ use core::marker::PhantomData; -use crate::dm::{AttrId, ClusterId, EndptId, GlobalElements}; use crate::error::Error; +use crate::im::encoding::{AttrId, ClusterId, EndptId}; use crate::im::{AttrDataTag, AttrPathTag, WriteReqTag, IM_REVISION}; use crate::tlv::{TLVBuilder, TLVBuilderParent, TLVTag, TLVWrite}; @@ -296,7 +296,7 @@ where /// omit and `end()` injects [`IM_REVISION`] automatically. pub fn interaction_model_revision(mut self, value: u8) -> Result, Error> { self.p.writer().u8( - &TLVTag::Context(GlobalElements::InteractionModelRevision as u8), + &TLVTag::Context(crate::im::encoding::IM_REVISION_TAG), value, )?; Ok(WriteReqBuilder { p: self.p }) diff --git a/rs-matter/src/im/encoding/invoke.rs b/rs-matter/src/im/encoding/invoke.rs index dacd31313..56826b292 100644 --- a/rs-matter/src/im/encoding/invoke.rs +++ b/rs-matter/src/im/encoding/invoke.rs @@ -19,7 +19,6 @@ use core::fmt; -use crate::dm::GlobalElements; use crate::error::{Error, ErrorCode}; use crate::tlv::{FromTLV, TLVArray, TLVElement, ToTLV}; @@ -316,7 +315,7 @@ pub struct InvokeResp<'a> { /// `interactionModelRevision` (TLV context tag `0xFF`). Mandatory in /// every IM message we send; modelled as `Option` so we tolerate /// peers that omit it (the C++ SDK is tolerant in practice). - #[tagval(GlobalElements::InteractionModelRevision as u8)] + #[tagval(crate::im::encoding::IM_REVISION_TAG)] pub interaction_model_revision: Option, } diff --git a/rs-matter/src/im/encoding/invoke_builder.rs b/rs-matter/src/im/encoding/invoke_builder.rs index 8012db024..285bfafb4 100644 --- a/rs-matter/src/im/encoding/invoke_builder.rs +++ b/rs-matter/src/im/encoding/invoke_builder.rs @@ -83,8 +83,8 @@ use core::marker::PhantomData; -use crate::dm::{ClusterId, CmdId, EndptId, GlobalElements}; use crate::error::Error; +use crate::im::encoding::{ClusterId, CmdId, EndptId}; use crate::im::{CmdDataTag, CmdPathTag, InvReqTag, IM_REVISION}; use crate::tlv::{TLVBuilder, TLVBuilderParent, TLVTag, TLVWrite, ToTLV}; @@ -250,7 +250,7 @@ where /// omit and `end()` injects [`IM_REVISION`] automatically. pub fn interaction_model_revision(mut self, value: u8) -> Result, Error> { self.p.writer().u8( - &TLVTag::Context(GlobalElements::InteractionModelRevision as u8), + &TLVTag::Context(crate::im::encoding::IM_REVISION_TAG), value, )?; Ok(InvReqBuilder { p: self.p }) diff --git a/rs-matter/src/im/encoding/status.rs b/rs-matter/src/im/encoding/status.rs index 964d7f703..37a22bf44 100644 --- a/rs-matter/src/im/encoding/status.rs +++ b/rs-matter/src/im/encoding/status.rs @@ -17,7 +17,6 @@ //! This module defines the `Status` and `StatusResp` structures used in the Interaction Model. -use crate::dm::GlobalElements; use crate::error::Error; use crate::tlv::{FromTLV, TagType, ToTLV}; use crate::utils::storage::WriteBuf; @@ -56,7 +55,7 @@ pub struct StatusResp { /// `interactionModelRevision` — mandatory in every IM message we send; /// modelled as `Option` so we tolerate peers that omit it (the C++ /// SDK is tolerant in practice). - #[tagval(GlobalElements::InteractionModelRevision as u8)] + #[tagval(crate::im::encoding::IM_REVISION_TAG)] pub interaction_model_revision: Option, } diff --git a/rs-matter/src/im/encoding/timed.rs b/rs-matter/src/im/encoding/timed.rs index 2c614f89c..496c3123b 100644 --- a/rs-matter/src/im/encoding/timed.rs +++ b/rs-matter/src/im/encoding/timed.rs @@ -19,7 +19,6 @@ use embassy_time::{Duration, Instant}; -use crate::dm::GlobalElements; use crate::im::IM_REVISION; use crate::tlv::{FromTLV, ToTLV}; @@ -34,7 +33,7 @@ pub struct TimedReq { /// `interactionModelRevision` — mandatory in every IM message we send; /// modelled as `Option` so we tolerate peers that omit it (the C++ /// SDK is tolerant in practice). - #[tagval(GlobalElements::InteractionModelRevision as u8)] + #[tagval(crate::im::encoding::IM_REVISION_TAG)] pub interaction_model_revision: Option, } From 893c9ea01c22c4d5e8a600e7b12ec5e81c648945 Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Fri, 19 Jun 2026 12:04:55 +0000 Subject: [PATCH 12/14] Update copyright headers --- rs-matter/src/im/encoding.rs | 2 +- rs-matter/src/im/encoding/attr/read.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rs-matter/src/im/encoding.rs b/rs-matter/src/im/encoding.rs index 912d5652a..cd94355cf 100644 --- a/rs-matter/src/im/encoding.rs +++ b/rs-matter/src/im/encoding.rs @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2022-2026 Project CHIP Authors + * Copyright (c) 2026 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/rs-matter/src/im/encoding/attr/read.rs b/rs-matter/src/im/encoding/attr/read.rs index bec71949a..2fcc4d814 100644 --- a/rs-matter/src/im/encoding/attr/read.rs +++ b/rs-matter/src/im/encoding/attr/read.rs @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2025 Project CHIP Authors + * Copyright (c) 2025-2026 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From cbad7d18b3c407f9759f1803cbe3542bdddb7f09 Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Fri, 19 Jun 2026 18:45:26 +0000 Subject: [PATCH 13/14] Add a utility method to connect to a specified network once --- rs-matter/src/im.rs | 51 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/rs-matter/src/im.rs b/rs-matter/src/im.rs index 766840004..f011d00e2 100644 --- a/rs-matter/src/im.rs +++ b/rs-matter/src/im.rs @@ -158,6 +158,37 @@ impl InteractionModelState Ok(()) } + /// Reset this state's persisted contents to factory defaults - the + /// events-queue epoch and the network store - removing both from `kv` using + /// this state's own scratch buffer. Call once during a factory reset, with + /// exclusive (`&mut`) access (i.e. before the state is shared with a + /// [`InteractionModel`]). + pub async fn reset_persist(&mut self, mut kv: S) -> Result<(), Error> + where + S: KvBlobStore, + N: Networks, + { + // We hold `&mut self`, so borrow the scratch buffer directly - no locking. + let Self { + events, + networks, + kv_buf, + .. + } = self; + + let buf = &mut kv_buf.get_mut().get_mut()[..]; + + // The event-number epoch. + events.reset_persist(&mut kv, buf).await?; + + // The network store. + let networks = networks.get_mut().get_mut(); + networks.reset()?; + kv.remove(NETWORKS_KEY, buf)?; + + Ok(()) + } + /// Borrow this state's owned scratch buffer for one-time startup loads (e.g. /// [`Matter::load_persist`] or a cluster's `load_persist`), so callers need /// not allocate a separate buffer. @@ -508,6 +539,26 @@ where mgr.run().await } + /// Perform a single, one-shot connect to the wireless network with the given + /// ID, immediately and regardless of the commissioning status. + /// + /// This drives the same [`WirelessMgr`] used by [`InteractionModel::run`] + /// (over this model's network controller and the network store owned by its + /// [`InteractionModelState`]), but calls [`WirelessMgr::connect_once`] rather + /// than the operational loop. It exists so a stack performing **non-concurrent** + /// (BLE-only) commissioning can replay the deferred `ConnectNetwork` once the + /// operational radio is up but before commissioning completes - without having + /// to own a `WirelessMgr` (or the networks) itself. + pub async fn connect_once(&self, network_id: &[u8]) -> Result<(), Error> + where + NC: NetCtl + WirelessDiag + NetChangeNotif, + { + let mut buf = [0u8; MAX_CREDS_SIZE]; + let mut mgr = WirelessMgr::new(self.state.networks(), &self.net_ctl, &mut buf); + + mgr.connect_once(network_id).await + } + async fn run_timeout_checks(&self) -> Result<(), Error> { const CHECK_INTERVAL_SECS: u64 = 1; From 7257920ccdbf0bf4fafaa812562cca7990068af6 Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Fri, 19 Jun 2026 20:59:57 +0000 Subject: [PATCH 14/14] Rework the KV story --- bloat-check/src/bin/bloat-check.rs | 29 ++- examples/src/bin/bridge.rs | 22 +- examples/src/bin/camera_tests.rs | 19 +- examples/src/bin/dimmable_light.rs | 21 +- examples/src/bin/light_tests.rs | 19 +- examples/src/bin/media_player.rs | 22 +- examples/src/bin/onoff_light.rs | 22 +- examples/src/bin/onoff_light_bt.rs | 17 +- examples/src/bin/onoff_light_switch.rs | 22 +- examples/src/bin/onoff_light_work_stealing.rs | 20 +- examples/src/bin/ota_requestor.rs | 23 +- examples/src/bin/scenes_tests.rs | 22 +- examples/src/bin/speaker.rs | 22 +- examples/src/bin/system_tests.rs | 24 +- examples/src/bin/webrtc_camera.rs | 20 +- rs-matter/Cargo.toml | 9 + rs-matter/src/dm/clusters/basic_info.rs | 4 +- rs-matter/src/dm/clusters/time_sync.rs | 8 +- rs-matter/src/fabric.rs | 4 +- rs-matter/src/im.rs | 233 ++++++------------ rs-matter/src/im/events.rs | 49 ++-- rs-matter/src/lib.rs | 85 ++++--- rs-matter/src/persist.rs | 119 +++++---- rs-matter/src/respond.rs | 30 ++- rs-matter/tests/commissioning.rs | 6 +- rs-matter/tests/common/e2e.rs | 6 +- rs-matter/tests/data_model/events.rs | 10 +- 27 files changed, 437 insertions(+), 450 deletions(-) diff --git a/bloat-check/src/bin/bloat-check.rs b/bloat-check/src/bin/bloat-check.rs index 6f349002c..fdd79b944 100644 --- a/bloat-check/src/bin/bloat-check.rs +++ b/bloat-check/src/bin/bloat-check.rs @@ -81,7 +81,7 @@ use rs_matter::error::Error; use rs_matter::im::{InteractionModel, WirelessInteractionModelState}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; -use rs_matter::persist::{DummyKvBlobStore, SharedKvBlobStore, DEFAULT_KV_BUF_SIZE}; +use rs_matter::persist::{DummyKvBlobStore, SharedKvBlobStore}; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::tlv::Nullable; @@ -91,7 +91,9 @@ use rs_matter::transport::network::mdns::builtin::{BuiltinMdns, Host}; use rs_matter::transport::network::{ Address, ChainedNetwork, Ipv4Addr, Ipv6Addr, NetworkReceive, NetworkSend, NoNetwork, }; +use rs_matter::utils::cell::RefCell; use rs_matter::utils::init::{init, Init, InitMaybeUninit}; +use rs_matter::utils::sync::blocking::Mutex; use rs_matter::utils::sync::DynBase; use rs_matter::{clusters, devices, handler_chain_type, root_endpoint, Matter, MATTER_PORT}; @@ -192,12 +194,18 @@ type AppDmHandler<'a> = handler_chain_type!( | WifiSysHandler<'a, &'a AppNetCtl<'a>> ); type AppCrypto = RustCrypto<'static, WeakTestOnlyRand>; +// A nameable no-op `KvBlobStoreAccess` for the static `#[task]` aliases below: a +// `SharedKvBlobStore` over a `DummyKvBlobStore` with an empty (`KB = 0`) scratch buffer. +// The real per-app buffer lives inside `Matter` (counted in the "Matter" line above), so +// `KB = 0` here keeps this probe from double-counting it. +type AppKvBuf = Mutex>; +type AppKv = SharedKvBlobStore<'static, DummyKvBlobStore, 0>; type AppInteractionModel<'a> = InteractionModel< 'a, &'a AppCrypto, MatterBuffers, (Node<'a>, &'a AppDmHandler<'a>), - DummyKvBlobStore, + &'static AppKv, WifiNetworks<3>, &'a AppNetCtl<'a>, >; @@ -207,7 +215,7 @@ type AppResponder<'d, 'a> = DefaultResponder< &'a AppCrypto, MatterBuffers, (Node<'a>, &'a AppDmHandler<'a>), - DummyKvBlobStore, + &'static AppKv, WifiNetworks<3>, &'a AppNetCtl<'a>, >; @@ -281,10 +289,8 @@ fn main() -> ! { &mut stack_total, ); report_size("BTP", size_of_val(&stack.btp), &mut stack_total); - // The KV/persister scratch buffer now lives inside `InteractionModelState` (behind a - // blocking mutex) rather than in the `SharedKvBlobStore`. It is not visible - // through the per-component accessors above, so account for it explicitly. - report_size("KV scratch buffer", DEFAULT_KV_BUF_SIZE, &mut stack_total); + // The KV/persister scratch buffer now lives inside `Matter` (feature-sized via the + // `kv-blob-store-NNNN` features), so it is already included in the "Matter" line above. report_subtotal_size("TOTAL MATTER STACK ", stack_total); @@ -313,9 +319,12 @@ fn main() -> ! { let mut rand = unwrap!(crypto.weak_rand()); - // The KV scratch buffer now lives inside `InteractionModelState` (see the "KV scratch - // buffer" line in the memory report); the store itself is buffer-less. - let kv = SharedKvBlobStore::new(DummyKvBlobStore); + // A real app gets its `KvBlobStoreAccess` from `Matter::kv(store)`, but that returns an + // unnameable `impl KvBlobStoreAccess`, which the static `#[task]` aliases above can't + // name. This bloat probe fakes persistence anyway, so build a nameable `SharedKvBlobStore` + // over a `DummyKvBlobStore` with an empty buffer; the data model holds it as `&'a K`. + let kv_buf = mk_static!(AppKvBuf, Mutex::new(RefCell::new([0u8; 0]))); + let kv = &*mk_static!(AppKv, SharedKvBlobStore::new(DummyKvBlobStore, kv_buf)); // A Wireless handler with a sample app cluster (on-off) let handler = mk_static!( diff --git a/examples/src/bin/bridge.rs b/examples/src/bin/bridge.rs index 494b893c5..7189afec2 100644 --- a/examples/src/bin/bridge.rs +++ b/examples/src/bin/bridge.rs @@ -44,7 +44,7 @@ use rs_matter::error::Error; use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; -use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; +use rs_matter::persist::DirKvBlobStore; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::tlv::{TLVBuilderParent, Utf8StrBuilder}; @@ -66,24 +66,24 @@ fn main() -> Result<(), Error> { ); // Create the Matter object - let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); + let matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); // Persistence - let mut kv = DirKvBlobStore::new_default(); + let store = DirKvBlobStore::new_default(); // Create the transport buffers let buffers: MatterBuffers = MatterBuffers::new(); - // Create the data model state (subscriptions, events, network store). It owns - // the KV scratch buffer, which the startup loads below reuse rather than - // allocating a separate one. + // Create the data model state (subscriptions, events, network store). let mut state: EthInteractionModelState = EthInteractionModelState::new(EthNetwork::new_default()); - // Re-hydrate the `Matter` instance and the data model state (event-number - // epoch) using the state's own scratch buffer. - futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; - futures_lite::future::block_on(state.load_persist(&mut kv))?; + // Bind the KV access object (the KV scratch buffer lives in `Matter`). + let kv = matter.kv(store); + + // Re-hydrate the `Matter` instance and the data model state (event-number epoch). + futures_lite::future::block_on(matter.load_persist(&kv))?; + futures_lite::future::block_on(state.load_persist(&kv))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -108,7 +108,7 @@ fn main() -> Result<(), Error> { &crypto, &buffers, data_model(rand, &on_off_handler_ep2, &on_off_handler_ep3), - SharedKvBlobStore::new(kv), + &kv, &state, ); diff --git a/examples/src/bin/camera_tests.rs b/examples/src/bin/camera_tests.rs index 2df9ea179..105e3186c 100644 --- a/examples/src/bin/camera_tests.rs +++ b/examples/src/bin/camera_tests.rs @@ -82,7 +82,6 @@ use rs_matter::im::FabricIndex; use rs_matter::im::InteractionModel; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; -use rs_matter::persist::SharedKvBlobStore; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::tlv::{TLVArray, TLVBuilderParent}; @@ -406,20 +405,20 @@ fn main() -> Result<(), Error> { args::port_override(), )); - let mut kv = args::file_kv_store(); + let store = args::file_kv_store(); let buffers = BUFFERS.uninit().init_with(MatterBuffers::init()); - // Create the data model state (subscriptions, events, network store). It owns - // the KV scratch buffer, which the startup loads below reuse rather than - // allocating a separate one. + // Create the data model state (subscriptions, events, network store). let mut state: EthInteractionModelState = EthInteractionModelState::new(EthNetwork::new_default()); - // Re-hydrate the `Matter` instance and the data model state (event-number - // epoch) using the state's own scratch buffer. - futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; - futures_lite::future::block_on(state.load_persist(&mut kv))?; + // Bind the KV access object (the KV scratch buffer lives in `Matter`). + let kv = matter.kv(store); + + // Re-hydrate the `Matter` instance and the data model state (event-number epoch). + futures_lite::future::block_on(matter.load_persist(&kv))?; + futures_lite::future::block_on(state.load_persist(&kv))?; let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); let mut rand = crypto.rand()?; @@ -577,7 +576,7 @@ fn main() -> Result<(), Error> { push_av, chime, ), - SharedKvBlobStore::new(kv), + &kv, &state, ); diff --git a/examples/src/bin/dimmable_light.rs b/examples/src/bin/dimmable_light.rs index d8bfe3f82..52ca4625a 100644 --- a/examples/src/bin/dimmable_light.rs +++ b/examples/src/bin/dimmable_light.rs @@ -53,7 +53,6 @@ use rs_matter::error::{Error, ErrorCode}; use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; -use rs_matter::persist::SharedKvBlobStore; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::tlv::Nullable; @@ -70,24 +69,24 @@ fn main() -> Result<(), Error> { env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"), ); - let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); + let matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); // Persistence - let mut kv = rs_matter::persist::DirKvBlobStore::new_default(); + let store = rs_matter::persist::DirKvBlobStore::new_default(); // Create the transport buffers let buffers: MatterBuffers = MatterBuffers::new(); - // Create the data model state (subscriptions, events, network store). It owns - // the KV scratch buffer, which the startup loads below reuse rather than - // allocating a separate one. + // Create the data model state (subscriptions, events, network store). let mut state: EthInteractionModelState = EthInteractionModelState::new(EthNetwork::new_default()); - // Re-hydrate the `Matter` instance and the data model state (event-number - // epoch) using the state's own scratch buffer. - futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; - futures_lite::future::block_on(state.load_persist(&mut kv))?; + // Bind the KV access object (the KV scratch buffer lives in `Matter`). + let kv = matter.kv(store); + + // Re-hydrate the `Matter` instance and the data model state (event-number epoch). + futures_lite::future::block_on(matter.load_persist(&kv))?; + futures_lite::future::block_on(state.load_persist(&kv))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -120,7 +119,7 @@ fn main() -> Result<(), Error> { &crypto, &buffers, data_model(rand, &on_off_handler, &level_control_handler), - SharedKvBlobStore::new(kv), + &kv, &state, ); diff --git a/examples/src/bin/light_tests.rs b/examples/src/bin/light_tests.rs index 1ece066fc..830e82468 100644 --- a/examples/src/bin/light_tests.rs +++ b/examples/src/bin/light_tests.rs @@ -56,7 +56,6 @@ use rs_matter::error::{Error, ErrorCode}; use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; -use rs_matter::persist::SharedKvBlobStore; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::tlv::Nullable; @@ -102,19 +101,19 @@ fn run() -> Result<(), Error> { args::port_override(), )); - let mut kv = args::file_kv_store(); + let store = args::file_kv_store(); let buffers = BUFFERS.uninit().init_with(MatterBuffers::init()); - // Create the data model state (subscriptions, events, network store). It owns - // the KV scratch buffer, which the startup loads below reuse rather than - // allocating a separate one. + // Create the data model state (subscriptions, events, network store). let state = STATE.init(EthInteractionModelState::new(EthNetwork::new_default())); - // Re-hydrate the `Matter` instance and the data model state (event-number - // epoch) using the state's own scratch buffer. - futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; - futures_lite::future::block_on(state.load_persist(&mut kv))?; + // Bind the KV access object (the KV scratch buffer lives in `Matter`). + let kv = matter.kv(store); + + // Re-hydrate the `Matter` instance and the data model state (event-number epoch). + futures_lite::future::block_on(matter.load_persist(&kv))?; + futures_lite::future::block_on(state.load_persist(&kv))?; let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); let mut rand = crypto.rand()?; @@ -159,7 +158,7 @@ fn run() -> Result<(), Error> { &level_control_handler, &color_control_handler, ), - SharedKvBlobStore::new(kv), + &kv, state, ); diff --git a/examples/src/bin/media_player.rs b/examples/src/bin/media_player.rs index 3d0e3585f..4190a5ea1 100644 --- a/examples/src/bin/media_player.rs +++ b/examples/src/bin/media_player.rs @@ -65,7 +65,7 @@ use rs_matter::error::{Error, ErrorCode}; use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; -use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; +use rs_matter::persist::DirKvBlobStore; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::tlv::{TLVBuilderParent, Utf8StrArrayBuilder, Utf8StrBuilder}; @@ -83,24 +83,24 @@ fn main() -> Result<(), Error> { ); // Create the Matter object - let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); + let matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); // Persistence - let mut kv = DirKvBlobStore::new_default(); + let store = DirKvBlobStore::new_default(); // Create the transport buffers let buffers: MatterBuffers = MatterBuffers::new(); - // Create the data model state (subscriptions, events, network store). It owns - // the KV scratch buffer, which the startup loads below reuse rather than - // allocating a separate one. + // Create the data model state (subscriptions, events, network store). let mut state: EthInteractionModelState = EthInteractionModelState::new(EthNetwork::new_default()); - // Re-hydrate the `Matter` instance and the data model state (event-number - // epoch) using the state's own scratch buffer. - futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; - futures_lite::future::block_on(state.load_persist(&mut kv))?; + // Bind the KV access object (the KV scratch buffer lives in `Matter`). + let kv = matter.kv(store); + + // Re-hydrate the `Matter` instance and the data model state (event-number epoch). + futures_lite::future::block_on(matter.load_persist(&kv))?; + futures_lite::future::block_on(state.load_persist(&kv))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -120,7 +120,7 @@ fn main() -> Result<(), Error> { &crypto, &buffers, data_model(rand, &on_off_handler), - SharedKvBlobStore::new(kv), + &kv, &state, ); diff --git a/examples/src/bin/onoff_light.rs b/examples/src/bin/onoff_light.rs index 0697ee0fa..07f9ecb89 100644 --- a/examples/src/bin/onoff_light.rs +++ b/examples/src/bin/onoff_light.rs @@ -40,7 +40,7 @@ use rs_matter::error::Error; use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; -use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; +use rs_matter::persist::DirKvBlobStore; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::transport::exchange::MatterBuffers; @@ -56,23 +56,23 @@ fn main() -> Result<(), Error> { env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"), ); - let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); + let matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); // Persistence - let mut kv = DirKvBlobStore::new_default(); + let store = DirKvBlobStore::new_default(); // Create the transport buffers let buffers: MatterBuffers = MatterBuffers::new(); // Create the data model state (subscriptions table, events queue, network - // store). It owns the KV scratch buffer, which we reuse for the startup load - // below rather than allocating a separate one. - let mut state: EthInteractionModelState = - EthInteractionModelState::new(EthNetwork::new_default()); + // store). + let state: EthInteractionModelState = EthInteractionModelState::new(EthNetwork::new_default()); - // Re-hydrate the `Matter` instance (fabrics, ACLs, basic info) using the - // state's own scratch buffer. - futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; + // Bind the KV access object (the KV scratch buffer lives in `Matter`). + let kv = matter.kv(store); + + // Re-hydrate the `Matter` instance (fabrics, ACLs, basic info). + futures_lite::future::block_on(matter.load_persist(&kv))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -92,7 +92,7 @@ fn main() -> Result<(), Error> { &crypto, &buffers, data_model(rand, &on_off_handler), - SharedKvBlobStore::new(kv), + &kv, &state, ); diff --git a/examples/src/bin/onoff_light_bt.rs b/examples/src/bin/onoff_light_bt.rs index b5a3b4b87..8ce7620f8 100644 --- a/examples/src/bin/onoff_light_bt.rs +++ b/examples/src/bin/onoff_light_bt.rs @@ -58,7 +58,7 @@ use rs_matter::error::Error; use rs_matter::im::{InteractionModel, WirelessInteractionModelState}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; -use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; +use rs_matter::persist::DirKvBlobStore; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::transport::exchange::MatterBuffers; @@ -122,24 +122,25 @@ fn run( net_ctl: N, ) -> Result<(), Error> { // Create the Matter object - let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); + let matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); // Persistence - let mut kv = DirKvBlobStore::new_default(); + let store = DirKvBlobStore::new_default(); // Create the transport buffers let buffers: MatterBuffers = MatterBuffers::new(); // Create the data model state (subscriptions, events, the Wifi network store). - // It owns the KV scratch buffer, so the one-time startup loads below reuse it - // (`state.kv_buf_mut()`) rather than allocating a separate buffer. let mut state: WirelessInteractionModelState> = WirelessInteractionModelState::new(WifiNetworks::new()); + // Bind the KV access object (the KV scratch buffer lives in `Matter`). + let kv = matter.kv(store); + // Re-hydrate persisted state: the `Matter` instance (fabrics, ACLs, basic // info) and the data model state itself (event-number epoch + Wifi networks). - futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; - futures_lite::future::block_on(state.load_persist(&mut kv))?; + futures_lite::future::block_on(matter.load_persist(&kv))?; + futures_lite::future::block_on(state.load_persist(&kv))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -166,7 +167,7 @@ fn run( &crypto, &buffers, data_model(rand, &on_off_handler, &net_ctl, &net_ctl), - SharedKvBlobStore::new(kv), + &kv, &net_ctl, &state, ); diff --git a/examples/src/bin/onoff_light_switch.rs b/examples/src/bin/onoff_light_switch.rs index 0f1dd40c8..4a46fb83d 100644 --- a/examples/src/bin/onoff_light_switch.rs +++ b/examples/src/bin/onoff_light_switch.rs @@ -64,7 +64,7 @@ use rs_matter::error::Error; use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; -use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; +use rs_matter::persist::{DirKvBlobStore, KvBlobStoreAccess}; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::transport::exchange::Exchange; use rs_matter::transport::exchange::MatterBuffers; @@ -95,28 +95,30 @@ fn main() -> Result<(), Error> { env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"), ); - let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); + let matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); // Persistence - let mut kv = DirKvBlobStore::new_default(); + let store = DirKvBlobStore::new_default(); let buffers: MatterBuffers = MatterBuffers::new(); // Create the data model state. This device EMITS events (the Generic Switch // press events), so - unlike the examples that use `NoEvents` - the default // state carries a real (non-zero) event queue that holds them until - // subscribers read them. It also owns the KV scratch buffer, which all the - // startup loads below reuse rather than allocating a separate one. + // subscribers read them. let mut state: EthInteractionModelState = EthInteractionModelState::new(EthNetwork::new_default()); // The Binding registry (the switch's address book), loaded from persistence. let bindings = Bindings::::new(); - // Re-hydrate persisted state using the state's own scratch buffer. - futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; - futures_lite::future::block_on(bindings.load_persist(&mut kv, state.kv_buf_mut()))?; - futures_lite::future::block_on(state.load_persist(&mut kv))?; + // Bind the KV access object (the KV scratch buffer lives in `Matter`). + let kv = matter.kv(store); + + // Re-hydrate persisted state. + futures_lite::future::block_on(matter.load_persist(&kv))?; + kv.access(|store, buf| futures_lite::future::block_on(bindings.load_persist(store, buf)))?; + futures_lite::future::block_on(state.load_persist(&kv))?; let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); let rand = crypto.rand()?; @@ -126,7 +128,7 @@ fn main() -> Result<(), Error> { &crypto, &buffers, data_model(rand, &bindings), - SharedKvBlobStore::new(kv), + &kv, &state, ); diff --git a/examples/src/bin/onoff_light_work_stealing.rs b/examples/src/bin/onoff_light_work_stealing.rs index 7d915174e..1ac134b3a 100644 --- a/examples/src/bin/onoff_light_work_stealing.rs +++ b/examples/src/bin/onoff_light_work_stealing.rs @@ -40,7 +40,7 @@ use rs_matter::error::Error; use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; -use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; +use rs_matter::persist::DirKvBlobStore; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::transport::exchange::MatterBuffers; @@ -80,20 +80,20 @@ fn main() -> Result<(), Error> { )); // Persistence - let mut kv = DirKvBlobStore::new_default(); + let store = DirKvBlobStore::new_default(); // Create the transport buffers let buffers = &*BUFFERS.uninit().init_with(MatterBuffers::init()); - // Create the data model state (subscriptions, events, network store). It owns - // the KV scratch buffer, which the startup loads below reuse rather than - // allocating a separate one. + // Create the data model state (subscriptions, events, network store). let state = STATE.init(EthInteractionModelState::new(EthNetwork::new_default())); - // Re-hydrate the `Matter` instance and the data model state (event-number - // epoch) using the state's own scratch buffer. - futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; - futures_lite::future::block_on(state.load_persist(&mut kv))?; + // Bind the KV access object (the KV scratch buffer lives in `Matter`). + let kv = matter.kv(store); + + // Re-hydrate the `Matter` instance and the data model state (event-number epoch). + futures_lite::future::block_on(matter.load_persist(&kv))?; + futures_lite::future::block_on(state.load_persist(&kv))?; // Create the crypto instance let crypto = &*CRYPTO.init(RustCrypto::new(FakeRng, DAC_PRIVKEY)); @@ -113,7 +113,7 @@ fn main() -> Result<(), Error> { crypto, buffers, (NODE, data_model(rand, on_off_handler)), - SharedKvBlobStore::new(kv), + &kv, state, ); diff --git a/examples/src/bin/ota_requestor.rs b/examples/src/bin/ota_requestor.rs index f99bdabff..b08ab5382 100644 --- a/examples/src/bin/ota_requestor.rs +++ b/examples/src/bin/ota_requestor.rs @@ -55,7 +55,7 @@ use rs_matter::error::{Error, ErrorCode}; use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; -use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; +use rs_matter::persist::{DirKvBlobStore, KvBlobStoreAccess}; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::transport::exchange::Exchange; @@ -84,10 +84,10 @@ fn main() -> Result<(), Error> { env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "debug"), ); - let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); + let matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); // Persistence - let mut kv = DirKvBlobStore::new_default(); + let store = DirKvBlobStore::new_default(); // The OTA Requestor's transient, reported update state, for the cluster on // endpoint 1 (see `NODE`). State changes are pushed to subscribers via the @@ -96,19 +96,20 @@ fn main() -> Result<(), Error> { let buffers: MatterBuffers = MatterBuffers::new(); - // Create the data model state (subscriptions, events, network store). It owns - // the KV scratch buffer, which all the startup loads below reuse rather than - // allocating a separate one. + // Create the data model state (subscriptions, events, network store). let mut state: EthInteractionModelState = EthInteractionModelState::new(EthNetwork::new_default()); // The OTA Requestor's persistent provider list, re-hydrated from storage. let providers = Providers::new(); - // Re-hydrate persisted state using the state's own scratch buffer. - futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; - futures_lite::future::block_on(providers.load_persist(&mut kv, state.kv_buf_mut()))?; - futures_lite::future::block_on(state.load_persist(&mut kv))?; + // Bind the KV access object (the KV scratch buffer lives in `Matter`). + let kv = matter.kv(store); + + // Re-hydrate persisted state. + futures_lite::future::block_on(matter.load_persist(&kv))?; + kv.access(|store, buf| futures_lite::future::block_on(providers.load_persist(store, buf)))?; + futures_lite::future::block_on(state.load_persist(&kv))?; let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -119,7 +120,7 @@ fn main() -> Result<(), Error> { &crypto, &buffers, data_model(rand, &providers, &ota_state), - SharedKvBlobStore::new(kv), + &kv, &state, ); diff --git a/examples/src/bin/scenes_tests.rs b/examples/src/bin/scenes_tests.rs index 5478acba4..27e7fa69d 100644 --- a/examples/src/bin/scenes_tests.rs +++ b/examples/src/bin/scenes_tests.rs @@ -61,7 +61,7 @@ use rs_matter::error::{Error, ErrorCode}; use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; -use rs_matter::persist::SharedKvBlobStore; +use rs_matter::persist::KvBlobStoreAccess; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::tlv::Nullable; @@ -127,20 +127,20 @@ fn run() -> Result<(), Error> { )); // Persistence - let mut kv = args::file_kv_store(); + let store = args::file_kv_store(); // Create the transport buffers let buffers = BUFFERS.uninit().init_with(MatterBuffers::init()); - // Create the data model state (subscriptions, events, network store). It owns - // the KV scratch buffer, which the startup loads (here and the scenes load - // below) reuse rather than allocating a separate one. + // Create the data model state (subscriptions, events, network store). let state = STATE.init(EthInteractionModelState::new(EthNetwork::new_default())); - // Re-hydrate the `Matter` instance and the data model state (event-number - // epoch) using the state's own scratch buffer. - futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; - futures_lite::future::block_on(state.load_persist(&mut kv))?; + // Bind the KV access object (the KV scratch buffer lives in `Matter`). + let kv = matter.kv(store); + + // Re-hydrate the `Matter` instance and the data model state (event-number epoch). + futures_lite::future::block_on(matter.load_persist(&kv))?; + futures_lite::future::block_on(state.load_persist(&kv))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -154,7 +154,7 @@ fn run() -> Result<(), Error> { .init_with(RefCell::init(UnitTestingHandlerData::init())); let scenes_state = SCENES_STATE.uninit().init_with(ScenesState::init()); - futures_lite::future::block_on(scenes_state.load_persist(&mut kv, state.kv_buf_mut()))?; + kv.access(|store, buf| futures_lite::future::block_on(scenes_state.load_persist(store, buf)))?; // OnOff cluster setup let on_off_handler = @@ -197,7 +197,7 @@ fn run() -> Result<(), Error> { scenes_handler, unit_testing_data, ), - SharedKvBlobStore::new(kv), + &kv, state, ); diff --git a/examples/src/bin/speaker.rs b/examples/src/bin/speaker.rs index 86d8d67e3..7f70ad528 100644 --- a/examples/src/bin/speaker.rs +++ b/examples/src/bin/speaker.rs @@ -44,7 +44,7 @@ use rs_matter::error::Error; use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; -use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; +use rs_matter::persist::DirKvBlobStore; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::tlv::Nullable; @@ -62,24 +62,24 @@ fn main() -> Result<(), Error> { ); // Create the Matter object - let mut matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); + let matter = Matter::new(&TEST_DEV_DET, TEST_DEV_COMM, &TEST_DEV_ATT, MATTER_PORT); // Persistence - let mut kv = DirKvBlobStore::new_default(); + let store = DirKvBlobStore::new_default(); // Create the transport buffers let buffers: MatterBuffers = MatterBuffers::new(); - // Create the data model state (subscriptions, events, network store). It owns - // the KV scratch buffer, which the startup loads below reuse rather than - // allocating a separate one. + // Create the data model state (subscriptions, events, network store). let mut state: EthInteractionModelState = EthInteractionModelState::new(EthNetwork::new_default()); - // Re-hydrate the `Matter` instance and the data model state (event-number - // epoch) using the state's own scratch buffer. - futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; - futures_lite::future::block_on(state.load_persist(&mut kv))?; + // Bind the KV access object (the KV scratch buffer lives in `Matter`). + let kv = matter.kv(store); + + // Re-hydrate the `Matter` instance and the data model state (event-number epoch). + futures_lite::future::block_on(matter.load_persist(&kv))?; + futures_lite::future::block_on(state.load_persist(&kv))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -118,7 +118,7 @@ fn main() -> Result<(), Error> { &crypto, &buffers, data_model(rand, &on_off_handler, &level_control_handler), - SharedKvBlobStore::new(kv), + &kv, &state, ); diff --git a/examples/src/bin/system_tests.rs b/examples/src/bin/system_tests.rs index a358e981b..f2133c7af 100644 --- a/examples/src/bin/system_tests.rs +++ b/examples/src/bin/system_tests.rs @@ -84,7 +84,7 @@ use rs_matter::im::PROTO_ID_INTERACTION_MODEL; use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; -use rs_matter::persist::SharedKvBlobStore; +use rs_matter::persist::KvBlobStoreAccess; use rs_matter::respond::{ChainedExchangeHandler, Responder}; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::sc::SecureChannel; @@ -170,21 +170,21 @@ fn main() -> Result<(), Error> { .init_with(Matter::init(&BASIC_INFO, comm_data, &TEST_DEV_ATT, port)); // Persistence - let mut kv = args::file_kv_store(); + let store = args::file_kv_store(); // Create the transport buffers let buffers = BUFFERS.uninit().init_with(MatterBuffers::init()); - // Create the data model state (subscriptions, events, network store). It owns - // the KV scratch buffer, which all the startup loads (here and the user-label - // / binding loads below) reuse rather than allocating a separate one. + // Create the data model state (subscriptions, events, network store). let mut state: EthInteractionModelState = EthInteractionModelState::new(EthNetwork::new_default()); - // Re-hydrate the `Matter` instance and the data model state (event-number - // epoch) using the state's own scratch buffer. - futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; - futures_lite::future::block_on(state.load_persist(&mut kv))?; + // Bind the KV access object (the KV scratch buffer lives in `Matter`). + let kv = matter.kv(store); + + // Re-hydrate the `Matter` instance and the data model state (event-number epoch). + futures_lite::future::block_on(matter.load_persist(&kv))?; + futures_lite::future::block_on(state.load_persist(&kv))?; // Create the crypto instance let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); @@ -213,7 +213,7 @@ fn main() -> Result<(), Error> { // `TestUserLabelCluster` YAML test sees the labels the previous // boot wrote. let user_labels = USER_LABELS.uninit().init_with(UserLabels::init()); - futures_lite::future::block_on(user_labels.load_persist(&mut kv, state.kv_buf_mut()))?; + kv.access(|store, buf| futures_lite::future::block_on(user_labels.load_persist(store, buf)))?; let user_label_handler = UserLabelHandler::new(Dataver::new_rand(&mut rand), ROOT_ENDPOINT_ID, user_labels); @@ -222,7 +222,7 @@ fn main() -> Result<(), Error> { // UserLabels. Loaded from KV before the data model accepts traffic // so bindings written pre-reboot survive. let bindings = BINDINGS.uninit().init_with(Bindings::init()); - futures_lite::future::block_on(bindings.load_persist(&mut kv, state.kv_buf_mut()))?; + kv.access(|store, buf| futures_lite::future::block_on(bindings.load_persist(store, buf)))?; let binding_handler_ep0 = BindingHandler::new(Dataver::new_rand(&mut rand), ROOT_ENDPOINT_ID, bindings); @@ -300,7 +300,7 @@ fn main() -> Result<(), Error> { dlog_buffers, log_provider, ), - SharedKvBlobStore::new(kv), + &kv, &state, ); diff --git a/examples/src/bin/webrtc_camera.rs b/examples/src/bin/webrtc_camera.rs index c527ebfb3..78b7c22e7 100644 --- a/examples/src/bin/webrtc_camera.rs +++ b/examples/src/bin/webrtc_camera.rs @@ -114,7 +114,7 @@ use rs_matter::error::Error; use rs_matter::im::{EthInteractionModelState, InteractionModel}; use rs_matter::pairing::qr::QrTextType; use rs_matter::pairing::DiscoveryCapabilities; -use rs_matter::persist::{DirKvBlobStore, SharedKvBlobStore}; +use rs_matter::persist::DirKvBlobStore; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::tlv::TLVArray; @@ -1156,19 +1156,19 @@ fn main() -> Result<(), Error> { MATTER_PORT, )); - let mut kv = DirKvBlobStore::new_default(); + let store = DirKvBlobStore::new_default(); let buffers = BUFFERS.uninit().init_with(MatterBuffers::init()); - // Create the data model state (subscriptions, events, network store). It owns - // the KV scratch buffer, which the startup loads below reuse rather than - // allocating a separate one. + // Create the data model state (subscriptions, events, network store). let state = STATE.init(EthInteractionModelState::new(EthNetwork::new_default())); - // Re-hydrate the `Matter` instance and the data model state (event-number - // epoch) using the state's own scratch buffer. - futures_lite::future::block_on(matter.load_persist(&mut kv, state.kv_buf_mut()))?; - futures_lite::future::block_on(state.load_persist(&mut kv))?; + // Bind the KV access object (the KV scratch buffer lives in `Matter`). + let kv = matter.kv(store); + + // Re-hydrate the `Matter` instance and the data model state (event-number epoch). + futures_lite::future::block_on(matter.load_persist(&kv))?; + futures_lite::future::block_on(state.load_persist(&kv))?; let crypto = default_crypto(rand::thread_rng(), DAC_PRIVKEY); let mut rand = crypto.rand()?; @@ -1299,7 +1299,7 @@ fn main() -> Result<(), Error> { &crypto, buffers, data_model(rand, webrtc, cam_av, cam_av_settings, zone_mgmt), - SharedKvBlobStore::new(kv), + &kv, state, ); diff --git a/rs-matter/Cargo.toml b/rs-matter/Cargo.toml index 3b92f455d..2156add2c 100644 --- a/rs-matter/Cargo.toml +++ b/rs-matter/Cargo.toml @@ -28,6 +28,15 @@ max-fabrics-3 = [] # default max-fabrics-2 = [] max-fabrics-1 = [] +# Size (in bytes) of the key-value persistence scratch buffer owned by `Matter` +kv-blob-store-65536 = [] +kv-blob-store-32768 = [] +kv-blob-store-16384 = [] +kv-blob-store-8192 = [] +kv-blob-store-4096 = [] # default +kv-blob-store-2048 = [] +kv-blob-store-1024 = [] + # Number of groups per fabrics max-groups-per-fabric-32 = [] max-groups-per-fabric-16 = [] diff --git a/rs-matter/src/dm/clusters/basic_info.rs b/rs-matter/src/dm/clusters/basic_info.rs index 5e7f05b23..831ef6df1 100644 --- a/rs-matter/src/dm/clusters/basic_info.rs +++ b/rs-matter/src/dm/clusters/basic_info.rs @@ -395,7 +395,7 @@ impl BasicInfoSettings { /// # Arguments /// - `store`: the BLOB store to remove the settings from /// - `buf`: a temporary buffer to use for removing the settings - pub async fn reset_persist( + pub fn reset_persist( &mut self, mut store: S, buf: &mut [u8], @@ -427,7 +427,7 @@ impl BasicInfoSettings { /// # Arguments /// - `store`: the BLOB store to load the fabrics from /// - `buf`: a temporary buffer to use for loading the fabrics - pub async fn load_persist( + pub fn load_persist( &mut self, mut store: S, buf: &mut [u8], diff --git a/rs-matter/src/dm/clusters/time_sync.rs b/rs-matter/src/dm/clusters/time_sync.rs index 29c7eb883..01a8aa8f8 100644 --- a/rs-matter/src/dm/clusters/time_sync.rs +++ b/rs-matter/src/dm/clusters/time_sync.rs @@ -195,7 +195,7 @@ impl Rtc { self.trusted_time_source = None; } - pub async fn reset_persist( + pub fn reset_persist( &mut self, mut store: S, buf: &mut [u8], @@ -207,11 +207,7 @@ impl Rtc { Ok(()) } - pub async fn load_persist( - &mut self, - mut kv: S, - buf: &mut [u8], - ) -> Result<(), Error> { + pub fn load_persist(&mut self, mut kv: S, buf: &mut [u8]) -> Result<(), Error> { self.reset(); // Load the persisted Last-Known-Good UTC Time, if any. diff --git a/rs-matter/src/fabric.rs b/rs-matter/src/fabric.rs index 03410f0d8..420fd19d3 100644 --- a/rs-matter/src/fabric.rs +++ b/rs-matter/src/fabric.rs @@ -872,7 +872,7 @@ impl Fabrics { /// # Arguments /// - `store`: the BLOB store to remove the fabrics from /// - `buf`: a temporary buffer to use for removing the fabrics - pub async fn reset_persist( + pub fn reset_persist( &mut self, mut store: S, buf: &mut [u8], @@ -893,7 +893,7 @@ impl Fabrics { /// # Arguments /// - `store`: the BLOB store to load the fabrics from /// - `buf`: a temporary buffer to use for loading the fabrics - pub async fn load_persist( + pub fn load_persist( &mut self, mut store: S, buf: &mut [u8], diff --git a/rs-matter/src/im.rs b/rs-matter/src/im.rs index f011d00e2..0219f50ef 100644 --- a/rs-matter/src/im.rs +++ b/rs-matter/src/im.rs @@ -49,18 +49,14 @@ use crate::im::events::{EventTLVWrite, Events, DEFAULT_MAX_EVENTS_BUF_SIZE}; use crate::im::subscriptions::{ ReportContext, Subscriptions, SubscriptionsBuffers, DEFAULT_MAX_SUBSCRIPTIONS, }; -use crate::persist::{ - KvBlobStore, KvBlobStoreAccess, SharedKvBlobStore, DEFAULT_KV_BUF_SIZE, NETWORKS_KEY, -}; +use crate::persist::{KvBlobStoreAccess, NETWORKS_KEY}; use crate::respond::ExchangeHandler; use crate::tlv::{get_root_node_struct, FromTLV, Nullable, TLVElement, TLVTag, TLVWrite, ToTLV}; use crate::transport::exchange::{Exchange, ExchangeId, MAX_EXCHANGE_TX_BUF_SIZE}; -use crate::utils::cell::RefCell; use crate::utils::init::{init, Init}; use crate::utils::select::Coalesce; use crate::utils::storage::pooled::Buffers; use crate::utils::storage::WriteBuf; -use crate::utils::sync::blocking::Mutex; use crate::Matter; pub use encoding::*; @@ -92,111 +88,93 @@ pub struct InteractionModelState< N, const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, - const KB: usize = DEFAULT_KV_BUF_SIZE, > { subscriptions: Subscriptions, events: Events, networks: SharedNetworks, - /// The scratch buffer used by the key-value persistence machinery at runtime. - /// Behind a blocking mutex so the data model can recombine it with the - /// (store-only) [`SharedKvBlobStore`](crate::persist::SharedKvBlobStore). - kv_buf: Mutex>, } -impl InteractionModelState { +impl InteractionModelState { /// Create a new state instance backed by the given (raw) [`Networks`] store. pub const fn new(networks: N) -> Self { Self { subscriptions: Subscriptions::new(), events: Events::new(), networks: SharedNetworks::new(networks), - kv_buf: Mutex::new(RefCell::new([0; KB])), } } - /// Return an in-place initializer for the state (for large `NE`/`KB`, to + /// Return an in-place initializer for the state (for large `NE`, to /// avoid a big temporary on the stack). pub fn init(networks: impl Init) -> impl Init { init!(Self { subscriptions <- Subscriptions::init(), events <- Events::init(), networks <- SharedNetworks::init(networks), - kv_buf <- Mutex::init(RefCell::init(crate::utils::init::zeroed())), }) } /// Re-hydrate this state's persisted contents - the events-queue epoch (so /// event numbers are not reused across reboots) and the network store - using - /// this state's own (owned) scratch buffer. Call once at startup, before the + /// the scratch buffer provided by `kv`. Call once at startup, before the /// state is shared with a [`InteractionModel`]. - pub async fn load_persist(&mut self, mut kv: S) -> Result<(), Error> + pub async fn load_persist(&mut self, kv: &K) -> Result<(), Error> where - S: KvBlobStore, + K: KvBlobStoreAccess, N: Networks, { - // We hold `&mut self`, so borrow the scratch buffer directly - no locking - // (the mutex is only needed for shared, runtime access). + // We hold `&mut self`, so borrow the pieces directly - no locking + // (the inner mutexes are only needed for shared, runtime access). let Self { - events, - networks, - kv_buf, - .. + events, networks, .. } = self; - let buf = &mut kv_buf.get_mut().get_mut()[..]; + let events = events.inner_mut(); + let networks = networks.get_mut().get_mut(); - // The event-number epoch. - events.load_persist(&mut kv, buf).await?; + // The KV ops are sync, so do them all inside a single `access` closure. + kv.access(|store, buf| { + // The event-number epoch. + events.load_persist(&mut *store, buf)?; - // The network store. - let networks = networks.get_mut().get_mut(); - networks.reset()?; - if let Some(data) = kv.load(NETWORKS_KEY, buf)? { - networks.load(data)?; - } + // The network store. + networks.reset()?; + if let Some(data) = store.load(NETWORKS_KEY, buf)? { + networks.load(data)?; + } - Ok(()) + Ok(()) + }) } /// Reset this state's persisted contents to factory defaults - the /// events-queue epoch and the network store - removing both from `kv` using - /// this state's own scratch buffer. Call once during a factory reset, with - /// exclusive (`&mut`) access (i.e. before the state is shared with a + /// the scratch buffer provided by `kv`. Call once during a factory reset, + /// with exclusive (`&mut`) access (i.e. before the state is shared with a /// [`InteractionModel`]). - pub async fn reset_persist(&mut self, mut kv: S) -> Result<(), Error> + pub async fn reset_persist(&mut self, kv: &K) -> Result<(), Error> where - S: KvBlobStore, + K: KvBlobStoreAccess, N: Networks, { - // We hold `&mut self`, so borrow the scratch buffer directly - no locking. + // We hold `&mut self`, so borrow the pieces directly - no locking. let Self { - events, - networks, - kv_buf, - .. + events, networks, .. } = self; - let buf = &mut kv_buf.get_mut().get_mut()[..]; - - // The event-number epoch. - events.reset_persist(&mut kv, buf).await?; - - // The network store. + let events = events.inner_mut(); let networks = networks.get_mut().get_mut(); - networks.reset()?; - kv.remove(NETWORKS_KEY, buf)?; - Ok(()) - } + kv.access(|store, buf| { + // The event-number epoch. + events.reset_persist(&mut *store, buf)?; - /// Borrow this state's owned scratch buffer for one-time startup loads (e.g. - /// [`Matter::load_persist`] or a cluster's `load_persist`), so callers need - /// not allocate a separate buffer. - /// - /// Available only with exclusive (`&mut`) access - i.e. before the state is - /// shared with a [`InteractionModel`]. - pub fn kv_buf_mut(&mut self) -> &mut [u8] { - &mut self.kv_buf.get_mut().get_mut()[..] + // The network store. + networks.reset()?; + store.remove(NETWORKS_KEY, buf)?; + + Ok(()) + }) } /// The subscriptions table. @@ -215,33 +193,6 @@ impl InteractionModelState } } -/// Recombines a store-only [`SharedKvBlobStore`] with the scratch buffer owned by -/// a [`InteractionModelState`] to present a full [`KvBlobStoreAccess`]. -/// -/// The buffer lock is always taken first, then the store lock, so the two-lock -/// order is consistent across all persistence paths (and single-threaded -/// executors never actually block on either). -struct StateKvBlobStore<'a, S, const KB: usize> { - store: &'a SharedKvBlobStore, - buf: &'a Mutex>, -} - -impl KvBlobStoreAccess for StateKvBlobStore<'_, S, KB> -where - S: KvBlobStore, -{ - fn access(&self, f: F) -> R - where - F: FnOnce(&mut dyn KvBlobStore, &mut [u8]) -> R, - { - self.buf.lock(|cell| { - let mut buf = cell.borrow_mut(); - - self.store.with_store(|store| f(store, &mut buf[..])) - }) - } -} - /// The implementation needs a `DataModel` instance to interact with the underlying clusters of the data model. /// /// `NC` is the network controller type driving the (optional) wireless connection @@ -254,22 +205,21 @@ pub struct InteractionModel< C, B, T, - S, + K, N, NC = NoopWirelessNetCtl, const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, - const KB: usize = DEFAULT_KV_BUF_SIZE, > where B: Buffers, { matter: &'a Matter<'a>, crypto: C, buffers: &'a B, - kv: SharedKvBlobStore, + kv: K, net_ctl: NC, subscriptions_buffers: SubscriptionsBuffers<'a, B, NS>, - state: &'a InteractionModelState, + state: &'a InteractionModelState, handler: T, } @@ -279,8 +229,7 @@ pub struct InteractionModel< pub type EthInteractionModelState< const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, - const KB: usize = DEFAULT_KV_BUF_SIZE, -> = InteractionModelState, NS, NE, KB>; +> = InteractionModelState, NS, NE>; /// A [`InteractionModel`] for an Ethernet device (network store fixed to [`EthNetwork`]), /// so the `N` generic disappears from call sites. Pairs with [`EthInteractionModelState`]. @@ -289,12 +238,11 @@ pub type EthInteractionModel< C, B, T, - S, + K, NC = NoopWirelessNetCtl, const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, - const KB: usize = DEFAULT_KV_BUF_SIZE, -> = InteractionModel<'a, C, B, T, S, EthNetwork<'static>, NC, NS, NE, KB>; +> = InteractionModel<'a, C, B, T, K, EthNetwork<'static>, NC, NS, NE>; /// A [`InteractionModelState`] for a wireless device, parameterized by the concrete /// wireless network store `N` (e.g. `WifiNetworks<3>` or a Thread store). Pairs @@ -303,8 +251,7 @@ pub type WirelessInteractionModelState< N, const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, - const KB: usize = DEFAULT_KV_BUF_SIZE, -> = InteractionModelState; +> = InteractionModelState; /// A [`InteractionModel`] for a wireless device (network store `N`, network controller /// `NC`). Pairs with [`WirelessInteractionModelState`]. @@ -313,21 +260,20 @@ pub type WirelessInteractionModel< C, B, T, - S, + K, N, NC, const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, - const KB: usize = DEFAULT_KV_BUF_SIZE, -> = InteractionModel<'a, C, B, T, S, N, NC, NS, NE, KB>; +> = InteractionModel<'a, C, B, T, K, N, NC, NS, NE>; -impl<'a, C, B, T, S, N, const NS: usize, const NE: usize, const KB: usize> - InteractionModel<'a, C, B, T, S, N, NoopWirelessNetCtl, NS, NE, KB> +impl<'a, C, B, T, K, N, const NS: usize, const NE: usize> + InteractionModel<'a, C, B, T, K, N, NoopWirelessNetCtl, NS, NE> where C: Crypto, B: Buffers, T: DataModel, - S: KvBlobStore, + K: KvBlobStoreAccess, N: Networks, { /// Create the data model for a device that does not need an operational @@ -343,7 +289,8 @@ where /// - `handler` - an instance of type `T` which implements the `DataModel` trait. This instance is used for interacting with the underlying /// clusters of the data model. Note that the expectations is for the user to provide a handler that handles the Matter system clusters /// as well (Endpoint 0), possibly by decorating her own clusters with the `rs_matter::dm::root_endpoint::with_` methods - /// - `kv` - an instance of type `S` which implements the `KvBlobStoreAccess` trait. This instance is used for interacting with the key-value blob store. + /// - `kv` - an instance of type `K` which implements the `KvBlobStoreAccess` trait + /// (obtain one via [`Matter::kv`]). This instance is used for interacting with the key-value blob store. /// - `state` - a reference to the [`InteractionModelState`] holding the subscriptions table, the /// events queue and the network store (the latter parameterized by the `Networks` /// implementation `N`). @@ -353,8 +300,8 @@ where crypto: C, buffers: &'a B, handler: T, - kv: SharedKvBlobStore, - state: &'a InteractionModelState, + kv: K, + state: &'a InteractionModelState, ) -> Self { Self::new_with_net_ctl( matter, @@ -368,13 +315,13 @@ where } } -impl<'a, C, B, T, S, N, NC, const NS: usize, const NE: usize, const KB: usize> - InteractionModel<'a, C, B, T, S, N, NC, NS, NE, KB> +impl<'a, C, B, T, K, N, NC, const NS: usize, const NE: usize> + InteractionModel<'a, C, B, T, K, N, NC, NS, NE> where C: Crypto, B: Buffers, T: DataModel, - S: KvBlobStore, + K: KvBlobStoreAccess, N: Networks, { /// Create the data model with an explicit network controller `net_ctl`. @@ -390,7 +337,8 @@ where /// - `handler` - an instance of type `T` which implements the `DataModel` trait. This instance is used for interacting with the underlying /// clusters of the data model. Note that the expectations is for the user to provide a handler that handles the Matter system clusters /// as well (Endpoint 0), possibly by decorating her own clusters with the `rs_matter::dm::root_endpoint::with_` methods - /// - `kv` - an instance of type `S` which implements the `KvBlobStoreAccess` trait. This instance is used for interacting with the key-value blob store. + /// - `kv` - an instance of type `K` which implements the `KvBlobStoreAccess` trait + /// (obtain one via [`Matter::kv`]). This instance is used for interacting with the key-value blob store. /// - `net_ctl` - the network controller (`NetCtl` + `WirelessDiag` + `NetChangeNotif`) used by /// the operational wireless connection manager driven from [`InteractionModel::run`]. /// - `state` - a reference to the [`InteractionModelState`] holding the subscriptions table, the @@ -402,9 +350,9 @@ where crypto: C, buffers: &'a B, handler: T, - kv: SharedKvBlobStore, + kv: K, net_ctl: NC, - state: &'a InteractionModelState, + state: &'a InteractionModelState, ) -> Self { state.subscriptions.clear(); @@ -429,22 +377,6 @@ where &self.crypto } - /// Return a [`KvBlobStoreAccess`] for interacting with the key-value blob - /// store. This recombines the store-only `S` held by the data model with the - /// scratch buffer owned by the [`InteractionModelState`]. - pub fn kv(&self) -> impl KvBlobStoreAccess + '_ { - self.kv_access() - } - - /// Recombine the store-only KV (`self.kv`) with the scratch buffer owned by - /// [`InteractionModelState`] into a full [`KvBlobStoreAccess`]. - fn kv_access(&self) -> StateKvBlobStore<'_, S, KB> { - StateKvBlobStore { - store: &self.kv, - buf: &self.state.kv_buf, - } - } - /// Open the basic commissioning window. /// /// Equivalent to [`Matter::open_basic_comm_window`] but additionally @@ -494,8 +426,7 @@ where // `AttrChangeNotifier` so the cluster's `Dataver` is bumped // too (the `Matter`-level call by itself only routes // subscribers and persists). - self.matter - .bump_configuration_version(self.kv_access(), self) + self.matter.bump_configuration_version(&self.kv, self) } /// Run the Data Model instance. @@ -587,7 +518,7 @@ where &mut state.fabrics, &mut state.sessions, &self.state.networks, - self.kv_access(), + &self.kv, expire_sess_id, &mut notify_mdns, &mut notify_change, @@ -1327,13 +1258,13 @@ where } } -impl ExchangeHandler - for InteractionModel<'_, C, B, T, S, N, NC, NS, NE, KB> +impl ExchangeHandler + for InteractionModel<'_, C, B, T, K, N, NC, NS, NE> where C: Crypto, B: Buffers, T: DataModel, - S: KvBlobStore, + K: KvBlobStoreAccess, N: Networks, { async fn handle(&self, mut exchange: Exchange<'_>) -> Result<(), Error> { @@ -1341,13 +1272,13 @@ where } } -impl HandlerContext - for InteractionModel<'_, C, B, T, S, N, NC, NS, NE, KB> +impl HandlerContext + for InteractionModel<'_, C, B, T, K, N, NC, NS, NE> where C: Crypto, B: Buffers, T: DataModel, - S: KvBlobStore, + K: KvBlobStoreAccess, N: Networks, { fn matter(&self) -> &Matter<'_> { @@ -1359,7 +1290,7 @@ where } fn kv(&self) -> impl KvBlobStoreAccess + '_ { - self.kv_access() + &self.kv } fn networks(&self) -> impl NetworksAccess + '_ { @@ -1379,13 +1310,13 @@ where } } -impl AttrChangeNotifier - for InteractionModel<'_, C, B, T, S, N, NC, NS, NE, KB> +impl AttrChangeNotifier + for InteractionModel<'_, C, B, T, K, N, NC, NS, NE> where C: Crypto, B: Buffers, T: DataModel, - S: KvBlobStore, + K: KvBlobStoreAccess, N: Networks, { fn notify_attr_changed(&self, endpoint_id: EndptId, cluster_id: ClusterId, attr_id: AttrId) { @@ -1423,13 +1354,13 @@ where } } -impl EventEmitter - for InteractionModel<'_, C, B, T, S, N, NC, NS, NE, KB> +impl EventEmitter + for InteractionModel<'_, C, B, T, K, N, NC, NS, NE> where C: Crypto, B: Buffers, T: DataModel, - S: KvBlobStore, + K: KvBlobStoreAccess, N: Networks, { fn emit_event( @@ -1443,14 +1374,10 @@ where where F: FnOnce(EventTLVWrite<'_>) -> Result<(), Error>, { - let event_number = self.state.events.push( - endpoint_id, - cluster_id, - event_id, - priority, - self.kv_access(), - f, - )?; + let event_number = + self.state + .events + .push(endpoint_id, cluster_id, event_id, priority, &self.kv, f)?; self.state .subscriptions diff --git a/rs-matter/src/im/events.rs b/rs-matter/src/im/events.rs index 17690a764..efbd58b94 100644 --- a/rs-matter/src/im/events.rs +++ b/rs-matter/src/im/events.rs @@ -79,28 +79,13 @@ impl Events { self.inner.get_mut().borrow_mut().reset(); } - /// Remove persisted state from the given key-value store. - pub async fn reset_persist(&mut self, kv: S, buf: &mut [u8]) -> Result<(), Error> - where - S: KvBlobStore, - { - self.inner - .get_mut() - .borrow_mut() - .reset_persist(kv, buf) - .await - } - - /// Load persisted state from the given key-value store, so that we can continue emitting events without reusing event numbers. - pub async fn load_persist(&mut self, kv: S, buf: &mut [u8]) -> Result<(), Error> - where - S: KvBlobStore, - { - self.inner - .get_mut() - .borrow_mut() - .load_persist(kv, buf) - .await + /// Borrow the inner events state mutably. + /// + /// Available only with exclusive (`&mut`) access - used by + /// [`InteractionModelState`](crate::im::InteractionModelState) at startup to + /// drive the (sync) persistence helpers without locking. + pub(crate) fn inner_mut(&mut self) -> &mut EventsInner { + self.inner.get_mut().get_mut() } pub(crate) fn fetch(&self, f: F) -> R @@ -203,7 +188,7 @@ impl Default for Events { /// Instead we opted to replicate the approach used in the C++ impl, which we believe is reasonable but also seemingly in violation of the spec. #[derive(Debug)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] -struct EventsInner { +pub(crate) struct EventsInner { // TODO(events): Allow per-ring const generics, so the rings can be sized independently buf_debug: EventsBuf, buf_info: EventsBuf, @@ -240,10 +225,11 @@ impl EventsInner { } /// Remove persisted state from the given key-value store. - async fn reset_persist(&mut self, mut kv: S, buf: &mut [u8]) -> Result<(), Error> - where - S: KvBlobStore, - { + pub(crate) fn reset_persist( + &mut self, + kv: &mut dyn KvBlobStore, + buf: &mut [u8], + ) -> Result<(), Error> { self.reset(); kv.remove(EVENT_EPOCH_KEY, buf)?; @@ -254,10 +240,11 @@ impl EventsInner { } /// Load persisted state from the given key-value store, so that we can continue emitting events without reusing event numbers. - async fn load_persist(&mut self, mut kv: S, buf: &mut [u8]) -> Result<(), Error> - where - S: KvBlobStore, - { + pub(crate) fn load_persist( + &mut self, + kv: &mut dyn KvBlobStore, + buf: &mut [u8], + ) -> Result<(), Error> { self.reset(); if let Some(data) = kv.load(EVENT_EPOCH_KEY, buf)? { diff --git a/rs-matter/src/lib.rs b/rs-matter/src/lib.rs index abf72bbd4..09dda6bfc 100644 --- a/rs-matter/src/lib.rs +++ b/rs-matter/src/lib.rs @@ -142,6 +142,13 @@ pub struct Matter<'a> { dev_att: &'a dyn DeviceAttestation, /// The port number on which the Matter stack will listen for incoming connections port: u16, + /// The scratch buffer used by the key-value persistence machinery for + /// (de)serializing BLOBs. Behind a blocking mutex so [`Matter::kv`] can + /// recombine it with the user's raw [`KvBlobStore`](crate::persist::KvBlobStore) + /// into a full [`KvBlobStoreAccess`](crate::persist::KvBlobStoreAccess). Its + /// size is set by the `kv-blob-store-*` Cargo features (see + /// [`KV_BUF_SIZE`](crate::persist::KV_BUF_SIZE)). + kv_buf: Mutex>, } impl<'a> Matter<'a> { @@ -169,6 +176,7 @@ impl<'a> Matter<'a> { dev_comm, dev_att, port, + kv_buf: Mutex::new(RefCell::new([0; crate::persist::KV_BUF_SIZE])), } } @@ -196,6 +204,7 @@ impl<'a> Matter<'a> { dev_comm, dev_att, port, + kv_buf <- Mutex::init(RefCell::init(crate::utils::init::zeroed())), } ) } @@ -216,6 +225,23 @@ impl<'a> Matter<'a> { self.port } + /// Combine a user-provided raw [`KvBlobStore`] with the scratch buffer owned + /// by this `Matter` object to obtain a full [`KvBlobStoreAccess`]. + /// + /// This is the single entry point for persistence: the application passes its + /// raw store (sync `load`/`store`/`remove`) and gets back an access object + /// that recombines it with `Matter`'s feature-sized scratch buffer (see + /// [`KV_BUF_SIZE`](crate::persist::KV_BUF_SIZE)). The returned value is then + /// lent (by `&`) to [`Matter::load_persist`], [`Matter::reset_persist`], + /// [`InteractionModelState::load_persist`](crate::im::InteractionModelState::load_persist) + /// and [`InteractionModel::new`](crate::im::InteractionModel::new). + /// + /// # Arguments + /// - `store` - the raw [`KvBlobStore`] implementation to wrap + pub fn kv<'s, S: KvBlobStore + 's>(&'s self, store: S) -> impl KvBlobStoreAccess + 's { + crate::persist::SharedKvBlobStore::new(store, &self.kv_buf) + } + /// Get a reference to the transport state of this Matter object. /// /// All transport-related state and operations (mDNS change/resolve @@ -524,24 +550,19 @@ impl<'a> Matter<'a> { /// Reset the Matter persistable state by removing all fabrics and resetting basic info settings /// /// Arguments: - /// - `kv`: The key-value store to load the fabrics and basic info settings from - /// - `buf`: A buffer to use for loading the fabrics and basic info settings - pub async fn reset_persist( - &mut self, - mut kv: S, - buf: &mut [u8], - ) -> Result<(), Error> { - { - let state = self.state.get_mut(); - let mut state = state.borrow_mut(); - - state.fabrics.reset_persist(&mut kv, buf).await?; - state - .basic_info_settings - .reset_persist(&mut kv, buf) - .await?; - state.rtc.reset_persist(&mut kv, buf).await?; - } + /// - `kv`: The key-value store access (obtained via [`Matter::kv`]) to remove the fabrics + /// and basic info settings from. Provides both the store and the scratch buffer. + pub async fn reset_persist(&self, kv: &impl KvBlobStoreAccess) -> Result<(), Error> { + self.with_state(|state| { + // The KV ops are sync, so do them all inside a single `access` closure. + kv.access(|mut store, buf| { + state.fabrics.reset_persist(&mut store, buf)?; + state.basic_info_settings.reset_persist(&mut store, buf)?; + state.rtc.reset_persist(&mut store, buf)?; + + Ok::<_, Error>(()) + }) + })?; self.transport().notify_mdns_changed(); @@ -551,21 +572,19 @@ impl<'a> Matter<'a> { /// Load fabrics from the given data /// /// Arguments: - /// - `kv`: The key-value store to load the fabrics and basic info settings from - /// - `buf`: A buffer to use for loading the fabrics and basic info settings - pub async fn load_persist( - &mut self, - mut kv: S, - buf: &mut [u8], - ) -> Result<(), Error> { - { - let state = self.state.get_mut(); - let mut state = state.borrow_mut(); - - state.fabrics.load_persist(&mut kv, buf).await?; - state.basic_info_settings.load_persist(&mut kv, buf).await?; - state.rtc.load_persist(&mut kv, buf).await?; - } + /// - `kv`: The key-value store access (obtained via [`Matter::kv`]) to load the fabrics + /// and basic info settings from. Provides both the store and the scratch buffer. + pub async fn load_persist(&self, kv: &impl KvBlobStoreAccess) -> Result<(), Error> { + self.with_state(|state| { + // The KV ops are sync, so do them all inside a single `access` closure. + kv.access(|mut store, buf| { + state.fabrics.load_persist(&mut store, buf)?; + state.basic_info_settings.load_persist(&mut store, buf)?; + state.rtc.load_persist(&mut store, buf)?; + + Ok::<_, Error>(()) + }) + })?; self.transport().notify_mdns_changed(); diff --git a/rs-matter/src/persist.rs b/rs-matter/src/persist.rs index ad6e5d516..0cf5ed1e1 100644 --- a/rs-matter/src/persist.rs +++ b/rs-matter/src/persist.rs @@ -17,6 +17,8 @@ //! This module provides the key-value BLOB store traits used throughout `rs-matter` for persistence, as well as some implementations for those. +use cfg_if::cfg_if; + use crate::error::Error; use crate::tlv::{TLVTag, ToTLV}; use crate::utils::cell::RefCell; @@ -26,11 +28,45 @@ use crate::utils::sync::blocking::Mutex; #[cfg(feature = "std")] pub use fileio::*; +cfg_if! { + if #[cfg(feature = "kv-blob-store-65536")] { + /// The size (in bytes) of the scratch buffer used by the key-value + /// persistence machinery for (de)serializing BLOBs. This is the buffer + /// owned by [`Matter`](crate::Matter) and recombined with the user's + /// raw [`KvBlobStore`] by [`Matter::kv`](crate::Matter::kv) into a full + /// [`KvBlobStoreAccess`]. + pub const KV_BUF_SIZE: usize = 65536; + } else if #[cfg(feature = "kv-blob-store-32768")] { + /// The size (in bytes) of the scratch buffer used by the key-value + /// persistence machinery for (de)serializing BLOBs. + pub const KV_BUF_SIZE: usize = 32768; + } else if #[cfg(feature = "kv-blob-store-16384")] { + /// The size (in bytes) of the scratch buffer used by the key-value + /// persistence machinery for (de)serializing BLOBs. + pub const KV_BUF_SIZE: usize = 16384; + } else if #[cfg(feature = "kv-blob-store-8192")] { + /// The size (in bytes) of the scratch buffer used by the key-value + /// persistence machinery for (de)serializing BLOBs. + pub const KV_BUF_SIZE: usize = 8192; + } else if #[cfg(feature = "kv-blob-store-2048")] { + /// The size (in bytes) of the scratch buffer used by the key-value + /// persistence machinery for (de)serializing BLOBs. + pub const KV_BUF_SIZE: usize = 2048; + } else if #[cfg(feature = "kv-blob-store-1024")] { + /// The size (in bytes) of the scratch buffer used by the key-value + /// persistence machinery for (de)serializing BLOBs. + pub const KV_BUF_SIZE: usize = 1024; + } else { // Default (`kv-blob-store-4096`) + /// The size (in bytes) of the scratch buffer used by the key-value + /// persistence machinery for (de)serializing BLOBs. + pub const KV_BUF_SIZE: usize = 4096; + } +} + /// The default size (in bytes) of the scratch buffer used by the key-value -/// persistence machinery for (de)serializing BLOBs. This is the buffer that -/// [`InteractionModelState`](crate::im::InteractionModelState) owns and the data model -/// recombines with the (store-only) [`SharedKvBlobStore`] at runtime. -pub const DEFAULT_KV_BUF_SIZE: usize = 4096; +/// persistence machinery for (de)serializing BLOBs. +#[deprecated(note = "Use `KV_BUF_SIZE` instead")] +pub const DEFAULT_KV_BUF_SIZE: usize = KV_BUF_SIZE; /// The first key available for the vendor-specific data. pub const VENDOR_KEYS_START: u16 = 0x1000; @@ -190,52 +226,47 @@ where } } -/// A noop implementation of the `KvBlobStoreAccess` trait (uses an empty buffer). +/// Combines a (store-only) raw [`KvBlobStore`] with a scratch buffer to present a +/// full [`KvBlobStoreAccess`]. /// -/// Useful for tests and for exercising persistence-consuming APIs without a real -/// store. -pub struct DummyKvBlobStoreAccess; - -impl KvBlobStoreAccess for DummyKvBlobStoreAccess { - fn access(&self, f: F) -> R - where - F: FnOnce(&mut dyn KvBlobStore, &mut [u8]) -> R, - { - f(&mut DummyKvBlobStore, &mut []) - } -} - -/// A store-only wrapper around a shared `KvBlobStore` instance behind a blocking -/// mutex. +/// This is the concrete type returned by [`Matter::kv`](crate::Matter::kv), where +/// the buffer is owned by [`Matter`](crate::Matter). It owns the user's raw store +/// (behind a blocking mutex for interior mutability) and borrows the buffer. The +/// buffer lock is always taken first, then the store lock, so the two-lock order +/// is consistent across all persistence paths (and single-threaded executors never +/// actually block on either). /// -/// The scratch buffer used for (de)serialization is not owned here; it is owned -/// by [`InteractionModelState`](crate::im::InteractionModelState) and recombined with this -/// store by the data model into a full [`KvBlobStoreAccess`]. -pub struct SharedKvBlobStore(Mutex>); +/// It can also be constructed directly (e.g. in tests, or to exercise a +/// persistence-consuming API without a real store) by pairing a +/// [`DummyKvBlobStore`] with a caller-owned buffer. +pub struct SharedKvBlobStore<'a, S, const KB: usize> { + store: Mutex>, + buf: &'a Mutex>, +} -impl SharedKvBlobStore { - /// Create a new `SharedKvBlobStore` instance. - /// - /// # Arguments - /// - `store` - the wrapped `KvBlobStore` instance - pub const fn new(store: S) -> Self { - Self(Mutex::new(RefCell::new(store))) +impl<'a, S, const KB: usize> SharedKvBlobStore<'a, S, KB> { + /// Create a new access object owning `store` and borrowing `buf`. + pub const fn new(store: S, buf: &'a Mutex>) -> Self { + Self { + store: Mutex::new(RefCell::new(store)), + buf, + } } +} - /// Get exclusive (locked) access to the wrapped `KvBlobStore`. - /// - /// The data model uses this to recombine the store with the scratch buffer - /// owned by [`InteractionModelState`](crate::im::InteractionModelState) into a full - /// [`KvBlobStoreAccess`]. - pub fn with_store(&self, f: F) -> R +impl KvBlobStoreAccess for SharedKvBlobStore<'_, S, KB> +where + S: KvBlobStore, +{ + fn access(&self, f: F) -> R where - S: KvBlobStore, - F: FnOnce(&mut dyn KvBlobStore) -> R, + F: FnOnce(&mut dyn KvBlobStore, &mut [u8]) -> R, { - self.0.lock(|cell| { - let mut store = cell.borrow_mut(); + self.buf.lock(|cell| { + let mut buf = cell.borrow_mut(); - f(&mut *store) + self.store + .lock(|store| f(&mut *store.borrow_mut(), &mut *buf)) }) } } @@ -262,7 +293,7 @@ where ) -> Result<(), Error> { self.kvb.access(|kvb, buf| { if !buf.is_empty() { - // DummyKvBlobStoreAccess uses an empty buffer + // A no-op access (e.g. a dummy store with an empty buffer) skips persistence if let Some(len) = f(buf)? { let (data, buf) = buf.split_at_mut(len); kvb.store(key, data, buf)?; @@ -288,7 +319,7 @@ where pub fn remove(&mut self, key: u16) -> Result<(), Error> { self.kvb.access(|kvb, buf| { if !buf.is_empty() { - // DummyKvBlobStoreAccess uses an empty buffer + // A no-op access (e.g. a dummy store with an empty buffer) skips persistence kvb.remove(key, buf)?; } diff --git a/rs-matter/src/respond.rs b/rs-matter/src/respond.rs index 5a1935ef7..c054cf72d 100644 --- a/rs-matter/src/respond.rs +++ b/rs-matter/src/respond.rs @@ -30,7 +30,7 @@ use crate::im::busy::BusyInteractionModel; use crate::im::events::DEFAULT_MAX_EVENTS_BUF_SIZE; use crate::im::subscriptions::DEFAULT_MAX_SUBSCRIPTIONS; use crate::im::{IMBuffer, InteractionModel, PROTO_ID_INTERACTION_MODEL}; -use crate::persist::{KvBlobStore, DEFAULT_KV_BUF_SIZE}; +use crate::persist::KvBlobStoreAccess; use crate::sc::busy::BusySecureChannel; use crate::sc::SecureChannel; use crate::transport::exchange::Exchange; @@ -269,19 +269,18 @@ pub type DefaultExchangeHandler< C, B, T, - S, + K, N, NC = NoopWirelessNetCtl, const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, - const KB: usize = DEFAULT_KV_BUF_SIZE, > = ChainedExchangeHandler< - &'d InteractionModel<'a, C, B, T, S, N, NC, NS, NE, KB>, + &'d InteractionModel<'a, C, B, T, K, N, NC, NS, NE>, SecureChannel<'d, &'d C>, >; -impl<'d, 'a, C, B, T, S, N, NC, const NS: usize, const NE: usize, const KB: usize> - Responder<'a, DefaultExchangeHandler<'d, 'a, C, B, T, S, N, NC, NS, NE, KB>> +impl<'d, 'a, C, B, T, K, N, NC, const NS: usize, const NE: usize> + Responder<'a, DefaultExchangeHandler<'d, 'a, C, B, T, K, N, NC, NS, NE>> where B: Buffers, { @@ -289,12 +288,12 @@ where /// (`SecureChannel` and `InteractionModel`) for handling the Secure Channel protocol and the Interaction Model protocol. #[inline(always)] pub const fn new_default( - data_model: &'d InteractionModel<'a, C, B, T, S, N, NC, NS, NE, KB>, + data_model: &'d InteractionModel<'a, C, B, T, K, N, NC, NS, NE>, ) -> Self where C: Crypto, T: DataModel, - S: KvBlobStore, + K: KvBlobStoreAccess, N: net_comm::Networks, { Self::new( @@ -342,31 +341,30 @@ pub struct DefaultResponder< C, B, T, - S, + K, N, NC = NoopWirelessNetCtl, const NS: usize = DEFAULT_MAX_SUBSCRIPTIONS, const NE: usize = DEFAULT_MAX_EVENTS_BUF_SIZE, - const KB: usize = DEFAULT_KV_BUF_SIZE, > where B: Buffers, { - responder: Responder<'a, DefaultExchangeHandler<'d, 'a, C, B, T, S, N, NC, NS, NE, KB>>, + responder: Responder<'a, DefaultExchangeHandler<'d, 'a, C, B, T, K, N, NC, NS, NE>>, busy_responder: Responder<'a, BusyExchangeHandler>, } -impl<'d, 'a, C, B, T, S, N, NC, const NS: usize, const NE: usize, const KB: usize> - DefaultResponder<'d, 'a, C, B, T, S, N, NC, NS, NE, KB> +impl<'d, 'a, C, B, T, K, N, NC, const NS: usize, const NE: usize> + DefaultResponder<'d, 'a, C, B, T, K, N, NC, NS, NE> where C: Crypto, B: Buffers, T: DataModel, - S: KvBlobStore, + K: KvBlobStoreAccess, N: net_comm::Networks, { /// Creates the responder composition. #[inline(always)] - pub const fn new(data_model: &'d InteractionModel<'a, C, B, T, S, N, NC, NS, NE, KB>) -> Self { + pub const fn new(data_model: &'d InteractionModel<'a, C, B, T, K, N, NC, NS, NE>) -> Self { Self { responder: Responder::new_default(data_model), busy_responder: Responder::new_busy(data_model.matter(), RESPOND_BUSY_MS), @@ -390,7 +388,7 @@ where ) -> &Responder< 'a, ChainedExchangeHandler< - &'d InteractionModel<'a, C, B, T, S, N, NC, NS, NE, KB>, + &'d InteractionModel<'a, C, B, T, K, N, NC, NS, NE>, SecureChannel<'d, &'d C>, >, > { diff --git a/rs-matter/tests/commissioning.rs b/rs-matter/tests/commissioning.rs index 698e782d5..3d20fdf3b 100644 --- a/rs-matter/tests/commissioning.rs +++ b/rs-matter/tests/commissioning.rs @@ -69,7 +69,7 @@ use rs_matter::im::{InteractionModel, InteractionModelState}; use rs_matter::onboard::cac::{IcacGenerator, RcacGenerator}; use rs_matter::onboard::noc::NocGenerator; use rs_matter::onboard::{CommissionOptions, Commissioner}; -use rs_matter::persist::{DummyKvBlobStore, SharedKvBlobStore}; +use rs_matter::persist::DummyKvBlobStore; use rs_matter::respond::DefaultResponder; use rs_matter::sc::pase::MAX_COMM_WINDOW_TIMEOUT_SECS; use rs_matter::transport::exchange::Exchange; @@ -194,12 +194,14 @@ macro_rules! commissioning_test { TestOnOffDeviceLogic::new(false), ); + let device_kv = device_matter.kv(DummyKvBlobStore); + let dm = InteractionModel::new( device_matter, &device_crypto, device_buffers, data_model(rand, &on_off_handler), - SharedKvBlobStore::new(DummyKvBlobStore), + &device_kv, device_state, ); diff --git a/rs-matter/tests/common/e2e.rs b/rs-matter/tests/common/e2e.rs index f1432838b..e5610be23 100644 --- a/rs-matter/tests/common/e2e.rs +++ b/rs-matter/tests/common/e2e.rs @@ -29,7 +29,7 @@ use rs_matter::dm::devices::test::{TEST_DEV_ATT, TEST_DEV_COMM, TEST_DEV_DET}; use rs_matter::dm::{DataModel, Privilege}; use rs_matter::error::Error; use rs_matter::im::{InteractionModel, InteractionModelState}; -use rs_matter::persist::{DummyKvBlobStore, SharedKvBlobStore}; +use rs_matter::persist::DummyKvBlobStore; use rs_matter::respond::{ExchangeHandler, Responder}; use rs_matter::transport::exchange::Exchange; use rs_matter::transport::exchange::MatterBuffers; @@ -177,12 +177,14 @@ impl E2eRunner { let matter_client = &self.matter_client; + let kv = self.matter.kv(DummyKvBlobStore); + let dm = InteractionModel::new( &self.matter, &self.crypto, &self.buffers, handler, - SharedKvBlobStore::new(DummyKvBlobStore), + &kv, &self.state, ); diff --git a/rs-matter/tests/data_model/events.rs b/rs-matter/tests/data_model/events.rs index a9e646871..33ed5a7d9 100644 --- a/rs-matter/tests/data_model/events.rs +++ b/rs-matter/tests/data_model/events.rs @@ -24,9 +24,11 @@ use rs_matter::im::GenericPath; use rs_matter::im::IMStatusCode; use rs_matter::im::StatusResp; use rs_matter::im::SubscribeResp; -use rs_matter::persist::DummyKvBlobStoreAccess; +use rs_matter::persist::{DummyKvBlobStore, SharedKvBlobStore}; use rs_matter::tlv::{TLVTag, TLVWrite}; +use rs_matter::utils::cell::RefCell; use rs_matter::utils::storage::WriteBuf; +use rs_matter::utils::sync::blocking::Mutex; use crate::common::e2e::im::echo_cluster; use crate::common::e2e::im::events::TestEventData; @@ -365,6 +367,10 @@ fn push_events(im: &crate::common::e2e::E2eRunner, events: &[TestEventData where C: rs_matter::crypto::Crypto, { + // A no-op KV access (empty buffer + dummy store) — these tests don't persist. + let kv_buf = Mutex::new(RefCell::new([0u8; 0])); + let kv = SharedKvBlobStore::new(DummyKvBlobStore, &kv_buf); + for ev in events { im.state .events() @@ -373,7 +379,7 @@ where ev.path.cluster.unwrap(), ev.path.event.unwrap(), ev.priority, - DummyKvBlobStoreAccess, + &kv, |mut tw| -> Result<(), Error> { if let Some(data) = ev.data { let mut buf = [0u8; 2048];