#![warn(clippy::all)]
#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
use bitflags::bitflags;
use fidl::client::QueryResponseFut;
use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
use fidl::endpoints::{ControlHandle as _, Responder as _};
use futures::future::{self, MaybeDone, TryFutureExt};
use zx_status;
pub const MAX_FILTERED: u16 = 100;
pub const MAX_NEIGHBORS: u32 = 1024;
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(i32)]
pub enum MacAddressFilterMode {
Disabled = 0,
Allow = 1,
Deny = 2,
}
impl MacAddressFilterMode {
#[inline]
pub fn from_primitive(prim: i32) -> Option<Self> {
match prim {
0 => Some(Self::Disabled),
1 => Some(Self::Allow),
2 => Some(Self::Deny),
_ => None,
}
}
#[inline]
pub const fn into_primitive(self) -> i32 {
self as i32
}
#[deprecated = "Strict enums should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct DeviceTestConnectorConnectRequest {
pub name: String,
pub server_end: fidl::endpoints::ServerEnd<DeviceTestMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for DeviceTestConnectorConnectRequest
{
}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct DeviceTestGetCurrentChannelResponse {
pub channel_index: u16,
}
impl fidl::Persistable for DeviceTestGetCurrentChannelResponse {}
#[derive(Clone, Debug, PartialEq)]
pub struct DeviceTestGetCurrentMacAddressResponse {
pub address: fidl_fuchsia_lowpan::MacAddress,
}
impl fidl::Persistable for DeviceTestGetCurrentMacAddressResponse {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct DeviceTestGetCurrentRssiResponse {
pub rssi: i8,
}
impl fidl::Persistable for DeviceTestGetCurrentRssiResponse {}
#[derive(Clone, Debug, PartialEq)]
pub struct DeviceTestGetFactoryMacAddressResponse {
pub address: fidl_fuchsia_lowpan::MacAddress,
}
impl fidl::Persistable for DeviceTestGetFactoryMacAddressResponse {}
#[derive(Clone, Debug, PartialEq)]
pub struct DeviceTestGetMacAddressFilterSettingsResponse {
pub settings: MacAddressFilterSettings,
}
impl fidl::Persistable for DeviceTestGetMacAddressFilterSettingsResponse {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct DeviceTestGetNcpVersionResponse {
pub version: String,
}
impl fidl::Persistable for DeviceTestGetNcpVersionResponse {}
#[derive(Clone, Debug, PartialEq)]
pub struct DeviceTestGetNeighborTableResponse {
pub neighbor_table: Vec<NeighborInfo>,
}
impl fidl::Persistable for DeviceTestGetNeighborTableResponse {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct DeviceTestGetPartitionIdResponse {
pub pid: u32,
}
impl fidl::Persistable for DeviceTestGetPartitionIdResponse {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct DeviceTestGetThreadRloc16Response {
pub rloc: u16,
}
impl fidl::Persistable for DeviceTestGetThreadRloc16Response {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct DeviceTestGetThreadRouterIdResponse {
pub router_id: u8,
}
impl fidl::Persistable for DeviceTestGetThreadRouterIdResponse {}
#[derive(Clone, Debug, PartialEq)]
pub struct DeviceTestReplaceMacAddressFilterSettingsRequest {
pub settings: MacAddressFilterSettings,
}
impl fidl::Persistable for DeviceTestReplaceMacAddressFilterSettingsRequest {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MacAddressFilterItem {
pub mac_address: Option<fidl_fuchsia_lowpan::MacAddress>,
pub rssi: Option<i8>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for MacAddressFilterItem {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MacAddressFilterSettings {
pub mode: Option<MacAddressFilterMode>,
pub items: Option<Vec<MacAddressFilterItem>>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for MacAddressFilterSettings {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct NeighborInfo {
pub mac_address: Option<fidl_fuchsia_lowpan::MacAddress>,
pub short_address: Option<u16>,
pub age: Option<i64>,
pub is_child: Option<bool>,
pub link_frame_count: Option<u32>,
pub mgmt_frame_count: Option<u32>,
pub last_rssi_in: Option<i32>,
pub avg_rssi_in: Option<i8>,
pub lqi_in: Option<u8>,
pub thread_mode: Option<u8>,
pub frame_error_rate: Option<u16>,
pub ipv6_error_rate: Option<u16>,
pub child_is_csl_synced: Option<bool>,
pub child_is_state_restoring: Option<bool>,
pub net_data_version: Option<u8>,
pub queued_messages: Option<u16>,
pub thread_mle_version: Option<u8>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for NeighborInfo {}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct DeviceTestMarker;
impl fidl::endpoints::ProtocolMarker for DeviceTestMarker {
type Proxy = DeviceTestProxy;
type RequestStream = DeviceTestRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = DeviceTestSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) DeviceTest";
}
pub trait DeviceTestProxyInterface: Send + Sync {
type ResetResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#reset(&self) -> Self::ResetResponseFut;
type GetNcpVersionResponseFut: std::future::Future<Output = Result<String, fidl::Error>> + Send;
fn r#get_ncp_version(&self) -> Self::GetNcpVersionResponseFut;
type GetCurrentRssiResponseFut: std::future::Future<Output = Result<i8, fidl::Error>> + Send;
fn r#get_current_rssi(&self) -> Self::GetCurrentRssiResponseFut;
type GetFactoryMacAddressResponseFut: std::future::Future<Output = Result<fidl_fuchsia_lowpan::MacAddress, fidl::Error>>
+ Send;
fn r#get_factory_mac_address(&self) -> Self::GetFactoryMacAddressResponseFut;
type GetCurrentMacAddressResponseFut: std::future::Future<Output = Result<fidl_fuchsia_lowpan::MacAddress, fidl::Error>>
+ Send;
fn r#get_current_mac_address(&self) -> Self::GetCurrentMacAddressResponseFut;
type GetCurrentChannelResponseFut: std::future::Future<Output = Result<u16, fidl::Error>> + Send;
fn r#get_current_channel(&self) -> Self::GetCurrentChannelResponseFut;
type GetPartitionIdResponseFut: std::future::Future<Output = Result<u32, fidl::Error>> + Send;
fn r#get_partition_id(&self) -> Self::GetPartitionIdResponseFut;
type GetThreadRloc16ResponseFut: std::future::Future<Output = Result<u16, fidl::Error>> + Send;
fn r#get_thread_rloc16(&self) -> Self::GetThreadRloc16ResponseFut;
type GetThreadRouterIdResponseFut: std::future::Future<Output = Result<u8, fidl::Error>> + Send;
fn r#get_thread_router_id(&self) -> Self::GetThreadRouterIdResponseFut;
type ReplaceMacAddressFilterSettingsResponseFut: std::future::Future<Output = Result<(), fidl::Error>>
+ Send;
fn r#replace_mac_address_filter_settings(
&self,
settings: &MacAddressFilterSettings,
) -> Self::ReplaceMacAddressFilterSettingsResponseFut;
type GetMacAddressFilterSettingsResponseFut: std::future::Future<Output = Result<MacAddressFilterSettings, fidl::Error>>
+ Send;
fn r#get_mac_address_filter_settings(&self) -> Self::GetMacAddressFilterSettingsResponseFut;
type GetNeighborTableResponseFut: std::future::Future<Output = Result<Vec<NeighborInfo>, fidl::Error>>
+ Send;
fn r#get_neighbor_table(&self) -> Self::GetNeighborTableResponseFut;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct DeviceTestSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for DeviceTestSynchronousProxy {
type Proxy = DeviceTestProxy;
type Protocol = DeviceTestMarker;
fn from_channel(inner: fidl::Channel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
fn as_channel(&self) -> &fidl::Channel {
self.client.as_channel()
}
}
#[cfg(target_os = "fuchsia")]
impl DeviceTestSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <DeviceTestMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
}
pub fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
pub fn wait_for_event(
&self,
deadline: zx::MonotonicInstant,
) -> Result<DeviceTestEvent, fidl::Error> {
DeviceTestEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#reset(&self, ___deadline: zx::MonotonicInstant) -> Result<(), fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
(),
0x772795fd82e287e,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#get_ncp_version(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<String, fidl::Error> {
let _response = self
.client
.send_query::<fidl::encoding::EmptyPayload, DeviceTestGetNcpVersionResponse>(
(),
0x5006d66ecaa992f2,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.version)
}
pub fn r#get_current_rssi(&self, ___deadline: zx::MonotonicInstant) -> Result<i8, fidl::Error> {
let _response = self
.client
.send_query::<fidl::encoding::EmptyPayload, DeviceTestGetCurrentRssiResponse>(
(),
0x6ac289cf16a976ab,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.rssi)
}
pub fn r#get_factory_mac_address(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<fidl_fuchsia_lowpan::MacAddress, fidl::Error> {
let _response = self
.client
.send_query::<fidl::encoding::EmptyPayload, DeviceTestGetFactoryMacAddressResponse>(
(),
0x2a32094f1da3372,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.address)
}
pub fn r#get_current_mac_address(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<fidl_fuchsia_lowpan::MacAddress, fidl::Error> {
let _response = self
.client
.send_query::<fidl::encoding::EmptyPayload, DeviceTestGetCurrentMacAddressResponse>(
(),
0x39fc2f974a484b62,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.address)
}
pub fn r#get_current_channel(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<u16, fidl::Error> {
let _response = self
.client
.send_query::<fidl::encoding::EmptyPayload, DeviceTestGetCurrentChannelResponse>(
(),
0x2bd32ba980668d13,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.channel_index)
}
pub fn r#get_partition_id(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<u32, fidl::Error> {
let _response = self
.client
.send_query::<fidl::encoding::EmptyPayload, DeviceTestGetPartitionIdResponse>(
(),
0x32be448a6dc88b33,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.pid)
}
pub fn r#get_thread_rloc16(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<u16, fidl::Error> {
let _response = self
.client
.send_query::<fidl::encoding::EmptyPayload, DeviceTestGetThreadRloc16Response>(
(),
0x4e554e42c1953d31,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.rloc)
}
pub fn r#get_thread_router_id(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<u8, fidl::Error> {
let _response = self
.client
.send_query::<fidl::encoding::EmptyPayload, DeviceTestGetThreadRouterIdResponse>(
(),
0x753df71fce9f3563,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.router_id)
}
pub fn r#replace_mac_address_filter_settings(
&self,
mut settings: &MacAddressFilterSettings,
___deadline: zx::MonotonicInstant,
) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
DeviceTestReplaceMacAddressFilterSettingsRequest,
fidl::encoding::EmptyPayload,
>(
(settings,),
0x66eb4780f869de19,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#get_mac_address_filter_settings(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<MacAddressFilterSettings, fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
DeviceTestGetMacAddressFilterSettingsResponse,
>(
(),
0x2d727bf2dd3e231c,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.settings)
}
pub fn r#get_neighbor_table(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<Vec<NeighborInfo>, fidl::Error> {
let _response = self
.client
.send_query::<fidl::encoding::EmptyPayload, DeviceTestGetNeighborTableResponse>(
(),
0x6f2db4573c413cde,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.neighbor_table)
}
}
#[derive(Debug, Clone)]
pub struct DeviceTestProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for DeviceTestProxy {
type Protocol = DeviceTestMarker;
fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
self.client.into_channel().map_err(|client| Self { client })
}
fn as_channel(&self) -> &::fidl::AsyncChannel {
self.client.as_channel()
}
}
impl DeviceTestProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name = <DeviceTestMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> DeviceTestEventStream {
DeviceTestEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#reset(
&self,
) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
DeviceTestProxyInterface::r#reset(self)
}
pub fn r#get_ncp_version(
&self,
) -> fidl::client::QueryResponseFut<String, fidl::encoding::DefaultFuchsiaResourceDialect> {
DeviceTestProxyInterface::r#get_ncp_version(self)
}
pub fn r#get_current_rssi(
&self,
) -> fidl::client::QueryResponseFut<i8, fidl::encoding::DefaultFuchsiaResourceDialect> {
DeviceTestProxyInterface::r#get_current_rssi(self)
}
pub fn r#get_factory_mac_address(
&self,
) -> fidl::client::QueryResponseFut<
fidl_fuchsia_lowpan::MacAddress,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
DeviceTestProxyInterface::r#get_factory_mac_address(self)
}
pub fn r#get_current_mac_address(
&self,
) -> fidl::client::QueryResponseFut<
fidl_fuchsia_lowpan::MacAddress,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
DeviceTestProxyInterface::r#get_current_mac_address(self)
}
pub fn r#get_current_channel(
&self,
) -> fidl::client::QueryResponseFut<u16, fidl::encoding::DefaultFuchsiaResourceDialect> {
DeviceTestProxyInterface::r#get_current_channel(self)
}
pub fn r#get_partition_id(
&self,
) -> fidl::client::QueryResponseFut<u32, fidl::encoding::DefaultFuchsiaResourceDialect> {
DeviceTestProxyInterface::r#get_partition_id(self)
}
pub fn r#get_thread_rloc16(
&self,
) -> fidl::client::QueryResponseFut<u16, fidl::encoding::DefaultFuchsiaResourceDialect> {
DeviceTestProxyInterface::r#get_thread_rloc16(self)
}
pub fn r#get_thread_router_id(
&self,
) -> fidl::client::QueryResponseFut<u8, fidl::encoding::DefaultFuchsiaResourceDialect> {
DeviceTestProxyInterface::r#get_thread_router_id(self)
}
pub fn r#replace_mac_address_filter_settings(
&self,
mut settings: &MacAddressFilterSettings,
) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
DeviceTestProxyInterface::r#replace_mac_address_filter_settings(self, settings)
}
pub fn r#get_mac_address_filter_settings(
&self,
) -> fidl::client::QueryResponseFut<
MacAddressFilterSettings,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
DeviceTestProxyInterface::r#get_mac_address_filter_settings(self)
}
pub fn r#get_neighbor_table(
&self,
) -> fidl::client::QueryResponseFut<
Vec<NeighborInfo>,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
DeviceTestProxyInterface::r#get_neighbor_table(self)
}
}
impl DeviceTestProxyInterface for DeviceTestProxy {
type ResetResponseFut =
fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#reset(&self) -> Self::ResetResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x772795fd82e287e,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
(),
0x772795fd82e287e,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type GetNcpVersionResponseFut =
fidl::client::QueryResponseFut<String, fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#get_ncp_version(&self) -> Self::GetNcpVersionResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<String, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
DeviceTestGetNcpVersionResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x5006d66ecaa992f2,
>(_buf?)?;
Ok(_response.version)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, String>(
(),
0x5006d66ecaa992f2,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type GetCurrentRssiResponseFut =
fidl::client::QueryResponseFut<i8, fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#get_current_rssi(&self) -> Self::GetCurrentRssiResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<i8, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
DeviceTestGetCurrentRssiResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x6ac289cf16a976ab,
>(_buf?)?;
Ok(_response.rssi)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i8>(
(),
0x6ac289cf16a976ab,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type GetFactoryMacAddressResponseFut = fidl::client::QueryResponseFut<
fidl_fuchsia_lowpan::MacAddress,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#get_factory_mac_address(&self) -> Self::GetFactoryMacAddressResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<fidl_fuchsia_lowpan::MacAddress, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
DeviceTestGetFactoryMacAddressResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x2a32094f1da3372,
>(_buf?)?;
Ok(_response.address)
}
self.client
.send_query_and_decode::<fidl::encoding::EmptyPayload, fidl_fuchsia_lowpan::MacAddress>(
(),
0x2a32094f1da3372,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type GetCurrentMacAddressResponseFut = fidl::client::QueryResponseFut<
fidl_fuchsia_lowpan::MacAddress,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#get_current_mac_address(&self) -> Self::GetCurrentMacAddressResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<fidl_fuchsia_lowpan::MacAddress, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
DeviceTestGetCurrentMacAddressResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x39fc2f974a484b62,
>(_buf?)?;
Ok(_response.address)
}
self.client
.send_query_and_decode::<fidl::encoding::EmptyPayload, fidl_fuchsia_lowpan::MacAddress>(
(),
0x39fc2f974a484b62,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type GetCurrentChannelResponseFut =
fidl::client::QueryResponseFut<u16, fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#get_current_channel(&self) -> Self::GetCurrentChannelResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<u16, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
DeviceTestGetCurrentChannelResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x2bd32ba980668d13,
>(_buf?)?;
Ok(_response.channel_index)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, u16>(
(),
0x2bd32ba980668d13,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type GetPartitionIdResponseFut =
fidl::client::QueryResponseFut<u32, fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#get_partition_id(&self) -> Self::GetPartitionIdResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<u32, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
DeviceTestGetPartitionIdResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x32be448a6dc88b33,
>(_buf?)?;
Ok(_response.pid)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, u32>(
(),
0x32be448a6dc88b33,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type GetThreadRloc16ResponseFut =
fidl::client::QueryResponseFut<u16, fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#get_thread_rloc16(&self) -> Self::GetThreadRloc16ResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<u16, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
DeviceTestGetThreadRloc16Response,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x4e554e42c1953d31,
>(_buf?)?;
Ok(_response.rloc)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, u16>(
(),
0x4e554e42c1953d31,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type GetThreadRouterIdResponseFut =
fidl::client::QueryResponseFut<u8, fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#get_thread_router_id(&self) -> Self::GetThreadRouterIdResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<u8, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
DeviceTestGetThreadRouterIdResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x753df71fce9f3563,
>(_buf?)?;
Ok(_response.router_id)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, u8>(
(),
0x753df71fce9f3563,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type ReplaceMacAddressFilterSettingsResponseFut =
fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#replace_mac_address_filter_settings(
&self,
mut settings: &MacAddressFilterSettings,
) -> Self::ReplaceMacAddressFilterSettingsResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x66eb4780f869de19,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<DeviceTestReplaceMacAddressFilterSettingsRequest, ()>(
(settings,),
0x66eb4780f869de19,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type GetMacAddressFilterSettingsResponseFut = fidl::client::QueryResponseFut<
MacAddressFilterSettings,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#get_mac_address_filter_settings(&self) -> Self::GetMacAddressFilterSettingsResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<MacAddressFilterSettings, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
DeviceTestGetMacAddressFilterSettingsResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x2d727bf2dd3e231c,
>(_buf?)?;
Ok(_response.settings)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, MacAddressFilterSettings>(
(),
0x2d727bf2dd3e231c,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type GetNeighborTableResponseFut = fidl::client::QueryResponseFut<
Vec<NeighborInfo>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#get_neighbor_table(&self) -> Self::GetNeighborTableResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<Vec<NeighborInfo>, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
DeviceTestGetNeighborTableResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x6f2db4573c413cde,
>(_buf?)?;
Ok(_response.neighbor_table)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<NeighborInfo>>(
(),
0x6f2db4573c413cde,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
}
pub struct DeviceTestEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for DeviceTestEventStream {}
impl futures::stream::FusedStream for DeviceTestEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for DeviceTestEventStream {
type Item = Result<DeviceTestEvent, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
&mut self.event_receiver,
cx
)?) {
Some(buf) => std::task::Poll::Ready(Some(DeviceTestEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum DeviceTestEvent {}
impl DeviceTestEvent {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<DeviceTestEvent, fidl::Error> {
let (bytes, _handles) = buf.split_mut();
let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
debug_assert_eq!(tx_header.tx_id, 0);
match tx_header.ordinal {
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: tx_header.ordinal,
protocol_name: <DeviceTestMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct DeviceTestRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for DeviceTestRequestStream {}
impl futures::stream::FusedStream for DeviceTestRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for DeviceTestRequestStream {
type Protocol = DeviceTestMarker;
type ControlHandle = DeviceTestControlHandle;
fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
}
fn control_handle(&self) -> Self::ControlHandle {
DeviceTestControlHandle { inner: self.inner.clone() }
}
fn into_inner(
self,
) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
{
(self.inner, self.is_terminated)
}
fn from_inner(
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for DeviceTestRequestStream {
type Item = Result<DeviceTestRequest, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
let this = &mut *self;
if this.inner.check_shutdown(cx) {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
if this.is_terminated {
panic!("polled DeviceTestRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
|bytes, handles| {
match this.inner.channel().read_etc(cx, bytes, handles) {
std::task::Poll::Ready(Ok(())) => {}
std::task::Poll::Pending => return std::task::Poll::Pending,
std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
std::task::Poll::Ready(Err(e)) => {
return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
e.into(),
))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x772795fd82e287e => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = DeviceTestControlHandle { inner: this.inner.clone() };
Ok(DeviceTestRequest::Reset {
responder: DeviceTestResetResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x5006d66ecaa992f2 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = DeviceTestControlHandle { inner: this.inner.clone() };
Ok(DeviceTestRequest::GetNcpVersion {
responder: DeviceTestGetNcpVersionResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x6ac289cf16a976ab => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = DeviceTestControlHandle { inner: this.inner.clone() };
Ok(DeviceTestRequest::GetCurrentRssi {
responder: DeviceTestGetCurrentRssiResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x2a32094f1da3372 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = DeviceTestControlHandle { inner: this.inner.clone() };
Ok(DeviceTestRequest::GetFactoryMacAddress {
responder: DeviceTestGetFactoryMacAddressResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x39fc2f974a484b62 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = DeviceTestControlHandle { inner: this.inner.clone() };
Ok(DeviceTestRequest::GetCurrentMacAddress {
responder: DeviceTestGetCurrentMacAddressResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x2bd32ba980668d13 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = DeviceTestControlHandle { inner: this.inner.clone() };
Ok(DeviceTestRequest::GetCurrentChannel {
responder: DeviceTestGetCurrentChannelResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x32be448a6dc88b33 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = DeviceTestControlHandle { inner: this.inner.clone() };
Ok(DeviceTestRequest::GetPartitionId {
responder: DeviceTestGetPartitionIdResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x4e554e42c1953d31 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = DeviceTestControlHandle { inner: this.inner.clone() };
Ok(DeviceTestRequest::GetThreadRloc16 {
responder: DeviceTestGetThreadRloc16Responder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x753df71fce9f3563 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = DeviceTestControlHandle { inner: this.inner.clone() };
Ok(DeviceTestRequest::GetThreadRouterId {
responder: DeviceTestGetThreadRouterIdResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x66eb4780f869de19 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
DeviceTestReplaceMacAddressFilterSettingsRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DeviceTestReplaceMacAddressFilterSettingsRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = DeviceTestControlHandle { inner: this.inner.clone() };
Ok(DeviceTestRequest::ReplaceMacAddressFilterSettings {
settings: req.settings,
responder: DeviceTestReplaceMacAddressFilterSettingsResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x2d727bf2dd3e231c => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = DeviceTestControlHandle { inner: this.inner.clone() };
Ok(DeviceTestRequest::GetMacAddressFilterSettings {
responder: DeviceTestGetMacAddressFilterSettingsResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x6f2db4573c413cde => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = DeviceTestControlHandle { inner: this.inner.clone() };
Ok(DeviceTestRequest::GetNeighborTable {
responder: DeviceTestGetNeighborTableResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name:
<DeviceTestMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum DeviceTestRequest {
Reset {
responder: DeviceTestResetResponder,
},
GetNcpVersion {
responder: DeviceTestGetNcpVersionResponder,
},
GetCurrentRssi {
responder: DeviceTestGetCurrentRssiResponder,
},
GetFactoryMacAddress {
responder: DeviceTestGetFactoryMacAddressResponder,
},
GetCurrentMacAddress {
responder: DeviceTestGetCurrentMacAddressResponder,
},
GetCurrentChannel {
responder: DeviceTestGetCurrentChannelResponder,
},
GetPartitionId {
responder: DeviceTestGetPartitionIdResponder,
},
GetThreadRloc16 {
responder: DeviceTestGetThreadRloc16Responder,
},
GetThreadRouterId {
responder: DeviceTestGetThreadRouterIdResponder,
},
ReplaceMacAddressFilterSettings {
settings: MacAddressFilterSettings,
responder: DeviceTestReplaceMacAddressFilterSettingsResponder,
},
GetMacAddressFilterSettings {
responder: DeviceTestGetMacAddressFilterSettingsResponder,
},
GetNeighborTable {
responder: DeviceTestGetNeighborTableResponder,
},
}
impl DeviceTestRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_reset(self) -> Option<(DeviceTestResetResponder)> {
if let DeviceTestRequest::Reset { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_get_ncp_version(self) -> Option<(DeviceTestGetNcpVersionResponder)> {
if let DeviceTestRequest::GetNcpVersion { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_get_current_rssi(self) -> Option<(DeviceTestGetCurrentRssiResponder)> {
if let DeviceTestRequest::GetCurrentRssi { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_get_factory_mac_address(self) -> Option<(DeviceTestGetFactoryMacAddressResponder)> {
if let DeviceTestRequest::GetFactoryMacAddress { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_get_current_mac_address(self) -> Option<(DeviceTestGetCurrentMacAddressResponder)> {
if let DeviceTestRequest::GetCurrentMacAddress { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_get_current_channel(self) -> Option<(DeviceTestGetCurrentChannelResponder)> {
if let DeviceTestRequest::GetCurrentChannel { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_get_partition_id(self) -> Option<(DeviceTestGetPartitionIdResponder)> {
if let DeviceTestRequest::GetPartitionId { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_get_thread_rloc16(self) -> Option<(DeviceTestGetThreadRloc16Responder)> {
if let DeviceTestRequest::GetThreadRloc16 { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_get_thread_router_id(self) -> Option<(DeviceTestGetThreadRouterIdResponder)> {
if let DeviceTestRequest::GetThreadRouterId { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_replace_mac_address_filter_settings(
self,
) -> Option<(MacAddressFilterSettings, DeviceTestReplaceMacAddressFilterSettingsResponder)>
{
if let DeviceTestRequest::ReplaceMacAddressFilterSettings { settings, responder } = self {
Some((settings, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_get_mac_address_filter_settings(
self,
) -> Option<(DeviceTestGetMacAddressFilterSettingsResponder)> {
if let DeviceTestRequest::GetMacAddressFilterSettings { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_get_neighbor_table(self) -> Option<(DeviceTestGetNeighborTableResponder)> {
if let DeviceTestRequest::GetNeighborTable { responder } = self {
Some((responder))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
DeviceTestRequest::Reset { .. } => "reset",
DeviceTestRequest::GetNcpVersion { .. } => "get_ncp_version",
DeviceTestRequest::GetCurrentRssi { .. } => "get_current_rssi",
DeviceTestRequest::GetFactoryMacAddress { .. } => "get_factory_mac_address",
DeviceTestRequest::GetCurrentMacAddress { .. } => "get_current_mac_address",
DeviceTestRequest::GetCurrentChannel { .. } => "get_current_channel",
DeviceTestRequest::GetPartitionId { .. } => "get_partition_id",
DeviceTestRequest::GetThreadRloc16 { .. } => "get_thread_rloc16",
DeviceTestRequest::GetThreadRouterId { .. } => "get_thread_router_id",
DeviceTestRequest::ReplaceMacAddressFilterSettings { .. } => {
"replace_mac_address_filter_settings"
}
DeviceTestRequest::GetMacAddressFilterSettings { .. } => {
"get_mac_address_filter_settings"
}
DeviceTestRequest::GetNeighborTable { .. } => "get_neighbor_table",
}
}
}
#[derive(Debug, Clone)]
pub struct DeviceTestControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for DeviceTestControlHandle {
fn shutdown(&self) {
self.inner.shutdown()
}
fn shutdown_with_epitaph(&self, status: zx_status::Status) {
self.inner.shutdown_with_epitaph(status)
}
fn is_closed(&self) -> bool {
self.inner.channel().is_closed()
}
fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
self.inner.channel().on_closed()
}
#[cfg(target_os = "fuchsia")]
fn signal_peer(
&self,
clear_mask: zx::Signals,
set_mask: zx::Signals,
) -> Result<(), zx_status::Status> {
use fidl::Peered;
self.inner.channel().signal_peer(clear_mask, set_mask)
}
}
impl DeviceTestControlHandle {}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct DeviceTestResetResponder {
control_handle: std::mem::ManuallyDrop<DeviceTestControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for DeviceTestResetResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for DeviceTestResetResponder {
type ControlHandle = DeviceTestControlHandle;
fn control_handle(&self) -> &DeviceTestControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl DeviceTestResetResponder {
pub fn send(self) -> Result<(), fidl::Error> {
let _result = self.send_raw();
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
let _result = self.send_raw();
self.drop_without_shutdown();
_result
}
fn send_raw(&self) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
(),
self.tx_id,
0x772795fd82e287e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct DeviceTestGetNcpVersionResponder {
control_handle: std::mem::ManuallyDrop<DeviceTestControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for DeviceTestGetNcpVersionResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for DeviceTestGetNcpVersionResponder {
type ControlHandle = DeviceTestControlHandle;
fn control_handle(&self) -> &DeviceTestControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl DeviceTestGetNcpVersionResponder {
pub fn send(self, mut version: &str) -> Result<(), fidl::Error> {
let _result = self.send_raw(version);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut version: &str) -> Result<(), fidl::Error> {
let _result = self.send_raw(version);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut version: &str) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<DeviceTestGetNcpVersionResponse>(
(version,),
self.tx_id,
0x5006d66ecaa992f2,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct DeviceTestGetCurrentRssiResponder {
control_handle: std::mem::ManuallyDrop<DeviceTestControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for DeviceTestGetCurrentRssiResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for DeviceTestGetCurrentRssiResponder {
type ControlHandle = DeviceTestControlHandle;
fn control_handle(&self) -> &DeviceTestControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl DeviceTestGetCurrentRssiResponder {
pub fn send(self, mut rssi: i8) -> Result<(), fidl::Error> {
let _result = self.send_raw(rssi);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut rssi: i8) -> Result<(), fidl::Error> {
let _result = self.send_raw(rssi);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut rssi: i8) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<DeviceTestGetCurrentRssiResponse>(
(rssi,),
self.tx_id,
0x6ac289cf16a976ab,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct DeviceTestGetFactoryMacAddressResponder {
control_handle: std::mem::ManuallyDrop<DeviceTestControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for DeviceTestGetFactoryMacAddressResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for DeviceTestGetFactoryMacAddressResponder {
type ControlHandle = DeviceTestControlHandle;
fn control_handle(&self) -> &DeviceTestControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl DeviceTestGetFactoryMacAddressResponder {
pub fn send(self, mut address: &fidl_fuchsia_lowpan::MacAddress) -> Result<(), fidl::Error> {
let _result = self.send_raw(address);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut address: &fidl_fuchsia_lowpan::MacAddress,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(address);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut address: &fidl_fuchsia_lowpan::MacAddress) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<DeviceTestGetFactoryMacAddressResponse>(
(address,),
self.tx_id,
0x2a32094f1da3372,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct DeviceTestGetCurrentMacAddressResponder {
control_handle: std::mem::ManuallyDrop<DeviceTestControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for DeviceTestGetCurrentMacAddressResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for DeviceTestGetCurrentMacAddressResponder {
type ControlHandle = DeviceTestControlHandle;
fn control_handle(&self) -> &DeviceTestControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl DeviceTestGetCurrentMacAddressResponder {
pub fn send(self, mut address: &fidl_fuchsia_lowpan::MacAddress) -> Result<(), fidl::Error> {
let _result = self.send_raw(address);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut address: &fidl_fuchsia_lowpan::MacAddress,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(address);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut address: &fidl_fuchsia_lowpan::MacAddress) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<DeviceTestGetCurrentMacAddressResponse>(
(address,),
self.tx_id,
0x39fc2f974a484b62,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct DeviceTestGetCurrentChannelResponder {
control_handle: std::mem::ManuallyDrop<DeviceTestControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for DeviceTestGetCurrentChannelResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for DeviceTestGetCurrentChannelResponder {
type ControlHandle = DeviceTestControlHandle;
fn control_handle(&self) -> &DeviceTestControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl DeviceTestGetCurrentChannelResponder {
pub fn send(self, mut channel_index: u16) -> Result<(), fidl::Error> {
let _result = self.send_raw(channel_index);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut channel_index: u16) -> Result<(), fidl::Error> {
let _result = self.send_raw(channel_index);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut channel_index: u16) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<DeviceTestGetCurrentChannelResponse>(
(channel_index,),
self.tx_id,
0x2bd32ba980668d13,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct DeviceTestGetPartitionIdResponder {
control_handle: std::mem::ManuallyDrop<DeviceTestControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for DeviceTestGetPartitionIdResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for DeviceTestGetPartitionIdResponder {
type ControlHandle = DeviceTestControlHandle;
fn control_handle(&self) -> &DeviceTestControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl DeviceTestGetPartitionIdResponder {
pub fn send(self, mut pid: u32) -> Result<(), fidl::Error> {
let _result = self.send_raw(pid);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut pid: u32) -> Result<(), fidl::Error> {
let _result = self.send_raw(pid);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut pid: u32) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<DeviceTestGetPartitionIdResponse>(
(pid,),
self.tx_id,
0x32be448a6dc88b33,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct DeviceTestGetThreadRloc16Responder {
control_handle: std::mem::ManuallyDrop<DeviceTestControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for DeviceTestGetThreadRloc16Responder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for DeviceTestGetThreadRloc16Responder {
type ControlHandle = DeviceTestControlHandle;
fn control_handle(&self) -> &DeviceTestControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl DeviceTestGetThreadRloc16Responder {
pub fn send(self, mut rloc: u16) -> Result<(), fidl::Error> {
let _result = self.send_raw(rloc);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut rloc: u16) -> Result<(), fidl::Error> {
let _result = self.send_raw(rloc);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut rloc: u16) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<DeviceTestGetThreadRloc16Response>(
(rloc,),
self.tx_id,
0x4e554e42c1953d31,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct DeviceTestGetThreadRouterIdResponder {
control_handle: std::mem::ManuallyDrop<DeviceTestControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for DeviceTestGetThreadRouterIdResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for DeviceTestGetThreadRouterIdResponder {
type ControlHandle = DeviceTestControlHandle;
fn control_handle(&self) -> &DeviceTestControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl DeviceTestGetThreadRouterIdResponder {
pub fn send(self, mut router_id: u8) -> Result<(), fidl::Error> {
let _result = self.send_raw(router_id);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut router_id: u8) -> Result<(), fidl::Error> {
let _result = self.send_raw(router_id);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut router_id: u8) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<DeviceTestGetThreadRouterIdResponse>(
(router_id,),
self.tx_id,
0x753df71fce9f3563,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct DeviceTestReplaceMacAddressFilterSettingsResponder {
control_handle: std::mem::ManuallyDrop<DeviceTestControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for DeviceTestReplaceMacAddressFilterSettingsResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for DeviceTestReplaceMacAddressFilterSettingsResponder {
type ControlHandle = DeviceTestControlHandle;
fn control_handle(&self) -> &DeviceTestControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl DeviceTestReplaceMacAddressFilterSettingsResponder {
pub fn send(self) -> Result<(), fidl::Error> {
let _result = self.send_raw();
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
let _result = self.send_raw();
self.drop_without_shutdown();
_result
}
fn send_raw(&self) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
(),
self.tx_id,
0x66eb4780f869de19,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct DeviceTestGetMacAddressFilterSettingsResponder {
control_handle: std::mem::ManuallyDrop<DeviceTestControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for DeviceTestGetMacAddressFilterSettingsResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for DeviceTestGetMacAddressFilterSettingsResponder {
type ControlHandle = DeviceTestControlHandle;
fn control_handle(&self) -> &DeviceTestControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl DeviceTestGetMacAddressFilterSettingsResponder {
pub fn send(self, mut settings: &MacAddressFilterSettings) -> Result<(), fidl::Error> {
let _result = self.send_raw(settings);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut settings: &MacAddressFilterSettings,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(settings);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut settings: &MacAddressFilterSettings) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<DeviceTestGetMacAddressFilterSettingsResponse>(
(settings,),
self.tx_id,
0x2d727bf2dd3e231c,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct DeviceTestGetNeighborTableResponder {
control_handle: std::mem::ManuallyDrop<DeviceTestControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for DeviceTestGetNeighborTableResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for DeviceTestGetNeighborTableResponder {
type ControlHandle = DeviceTestControlHandle;
fn control_handle(&self) -> &DeviceTestControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl DeviceTestGetNeighborTableResponder {
pub fn send(self, mut neighbor_table: &[NeighborInfo]) -> Result<(), fidl::Error> {
let _result = self.send_raw(neighbor_table);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut neighbor_table: &[NeighborInfo],
) -> Result<(), fidl::Error> {
let _result = self.send_raw(neighbor_table);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut neighbor_table: &[NeighborInfo]) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<DeviceTestGetNeighborTableResponse>(
(neighbor_table,),
self.tx_id,
0x6f2db4573c413cde,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct DeviceTestConnectorMarker;
impl fidl::endpoints::ProtocolMarker for DeviceTestConnectorMarker {
type Proxy = DeviceTestConnectorProxy;
type RequestStream = DeviceTestConnectorRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = DeviceTestConnectorSynchronousProxy;
const DEBUG_NAME: &'static str = "fuchsia.lowpan.test.DeviceTestConnector";
}
impl fidl::endpoints::DiscoverableProtocolMarker for DeviceTestConnectorMarker {}
pub trait DeviceTestConnectorProxyInterface: Send + Sync {
fn r#connect(
&self,
name: &str,
server_end: fidl::endpoints::ServerEnd<DeviceTestMarker>,
) -> Result<(), fidl::Error>;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct DeviceTestConnectorSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for DeviceTestConnectorSynchronousProxy {
type Proxy = DeviceTestConnectorProxy;
type Protocol = DeviceTestConnectorMarker;
fn from_channel(inner: fidl::Channel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
fn as_channel(&self) -> &fidl::Channel {
self.client.as_channel()
}
}
#[cfg(target_os = "fuchsia")]
impl DeviceTestConnectorSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name =
<DeviceTestConnectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
}
pub fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
pub fn wait_for_event(
&self,
deadline: zx::MonotonicInstant,
) -> Result<DeviceTestConnectorEvent, fidl::Error> {
DeviceTestConnectorEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#connect(
&self,
mut name: &str,
mut server_end: fidl::endpoints::ServerEnd<DeviceTestMarker>,
) -> Result<(), fidl::Error> {
self.client.send::<DeviceTestConnectorConnectRequest>(
(name, server_end),
0x366c1167cee8caa3,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Clone)]
pub struct DeviceTestConnectorProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for DeviceTestConnectorProxy {
type Protocol = DeviceTestConnectorMarker;
fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
self.client.into_channel().map_err(|client| Self { client })
}
fn as_channel(&self) -> &::fidl::AsyncChannel {
self.client.as_channel()
}
}
impl DeviceTestConnectorProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name =
<DeviceTestConnectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> DeviceTestConnectorEventStream {
DeviceTestConnectorEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#connect(
&self,
mut name: &str,
mut server_end: fidl::endpoints::ServerEnd<DeviceTestMarker>,
) -> Result<(), fidl::Error> {
DeviceTestConnectorProxyInterface::r#connect(self, name, server_end)
}
}
impl DeviceTestConnectorProxyInterface for DeviceTestConnectorProxy {
fn r#connect(
&self,
mut name: &str,
mut server_end: fidl::endpoints::ServerEnd<DeviceTestMarker>,
) -> Result<(), fidl::Error> {
self.client.send::<DeviceTestConnectorConnectRequest>(
(name, server_end),
0x366c1167cee8caa3,
fidl::encoding::DynamicFlags::empty(),
)
}
}
pub struct DeviceTestConnectorEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for DeviceTestConnectorEventStream {}
impl futures::stream::FusedStream for DeviceTestConnectorEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for DeviceTestConnectorEventStream {
type Item = Result<DeviceTestConnectorEvent, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
&mut self.event_receiver,
cx
)?) {
Some(buf) => std::task::Poll::Ready(Some(DeviceTestConnectorEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum DeviceTestConnectorEvent {}
impl DeviceTestConnectorEvent {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<DeviceTestConnectorEvent, fidl::Error> {
let (bytes, _handles) = buf.split_mut();
let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
debug_assert_eq!(tx_header.tx_id, 0);
match tx_header.ordinal {
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: tx_header.ordinal,
protocol_name:
<DeviceTestConnectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct DeviceTestConnectorRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for DeviceTestConnectorRequestStream {}
impl futures::stream::FusedStream for DeviceTestConnectorRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for DeviceTestConnectorRequestStream {
type Protocol = DeviceTestConnectorMarker;
type ControlHandle = DeviceTestConnectorControlHandle;
fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
}
fn control_handle(&self) -> Self::ControlHandle {
DeviceTestConnectorControlHandle { inner: self.inner.clone() }
}
fn into_inner(
self,
) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
{
(self.inner, self.is_terminated)
}
fn from_inner(
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for DeviceTestConnectorRequestStream {
type Item = Result<DeviceTestConnectorRequest, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
let this = &mut *self;
if this.inner.check_shutdown(cx) {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
if this.is_terminated {
panic!("polled DeviceTestConnectorRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
|bytes, handles| {
match this.inner.channel().read_etc(cx, bytes, handles) {
std::task::Poll::Ready(Ok(())) => {}
std::task::Poll::Pending => return std::task::Poll::Pending,
std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
std::task::Poll::Ready(Err(e)) => {
return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
e.into(),
))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x366c1167cee8caa3 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(DeviceTestConnectorConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DeviceTestConnectorConnectRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = DeviceTestConnectorControlHandle {
inner: this.inner.clone(),
};
Ok(DeviceTestConnectorRequest::Connect {name: req.name,
server_end: req.server_end,
control_handle,
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name: <DeviceTestConnectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum DeviceTestConnectorRequest {
Connect {
name: String,
server_end: fidl::endpoints::ServerEnd<DeviceTestMarker>,
control_handle: DeviceTestConnectorControlHandle,
},
}
impl DeviceTestConnectorRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_connect(
self,
) -> Option<(
String,
fidl::endpoints::ServerEnd<DeviceTestMarker>,
DeviceTestConnectorControlHandle,
)> {
if let DeviceTestConnectorRequest::Connect { name, server_end, control_handle } = self {
Some((name, server_end, control_handle))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
DeviceTestConnectorRequest::Connect { .. } => "connect",
}
}
}
#[derive(Debug, Clone)]
pub struct DeviceTestConnectorControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for DeviceTestConnectorControlHandle {
fn shutdown(&self) {
self.inner.shutdown()
}
fn shutdown_with_epitaph(&self, status: zx_status::Status) {
self.inner.shutdown_with_epitaph(status)
}
fn is_closed(&self) -> bool {
self.inner.channel().is_closed()
}
fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
self.inner.channel().on_closed()
}
#[cfg(target_os = "fuchsia")]
fn signal_peer(
&self,
clear_mask: zx::Signals,
set_mask: zx::Signals,
) -> Result<(), zx_status::Status> {
use fidl::Peered;
self.inner.channel().signal_peer(clear_mask, set_mask)
}
}
impl DeviceTestConnectorControlHandle {}
mod internal {
use super::*;
unsafe impl fidl::encoding::TypeMarker for MacAddressFilterMode {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
std::mem::align_of::<i32>()
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
std::mem::size_of::<i32>()
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
false
}
}
impl fidl::encoding::ValueTypeMarker for MacAddressFilterMode {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
for MacAddressFilterMode
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MacAddressFilterMode {
#[inline(always)]
fn new_empty() -> Self {
Self::Disabled
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<i32>(offset);
*self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
Ok(())
}
}
impl fidl::encoding::ResourceTypeMarker for DeviceTestConnectorConnectRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DeviceTestConnectorConnectRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
24
}
}
unsafe impl
fidl::encoding::Encode<
DeviceTestConnectorConnectRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut DeviceTestConnectorConnectRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestConnectorConnectRequest>(offset);
fidl::encoding::Encode::<DeviceTestConnectorConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
(
<fidl::encoding::BoundedString<32> as fidl::encoding::ValueTypeMarker>::borrow(&self.name),
<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DeviceTestMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.server_end),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<
fidl::encoding::BoundedString<32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T1: fidl::encoding::Encode<
fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DeviceTestMarker>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
>
fidl::encoding::Encode<
DeviceTestConnectorConnectRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestConnectorConnectRequest>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 16, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
for DeviceTestConnectorConnectRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
name: fidl::new_empty!(
fidl::encoding::BoundedString<32>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
server_end: fidl::new_empty!(
fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DeviceTestMarker>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(
fidl::encoding::BoundedString<32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.name,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DeviceTestMarker>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.server_end,
decoder,
offset + 16,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DeviceTestGetCurrentChannelResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DeviceTestGetCurrentChannelResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
2
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
2
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<DeviceTestGetCurrentChannelResponse, D>
for &DeviceTestGetCurrentChannelResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestGetCurrentChannelResponse>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut DeviceTestGetCurrentChannelResponse)
.write_unaligned((self as *const DeviceTestGetCurrentChannelResponse).read());
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
fidl::encoding::Encode<DeviceTestGetCurrentChannelResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestGetCurrentChannelResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for DeviceTestGetCurrentChannelResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { channel_index: fidl::new_empty!(u16, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DeviceTestGetCurrentMacAddressResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DeviceTestGetCurrentMacAddressResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
8
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<DeviceTestGetCurrentMacAddressResponse, D>
for &DeviceTestGetCurrentMacAddressResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestGetCurrentMacAddressResponse>(offset);
fidl::encoding::Encode::<DeviceTestGetCurrentMacAddressResponse, D>::encode(
(<fidl_fuchsia_lowpan::MacAddress as fidl::encoding::ValueTypeMarker>::borrow(
&self.address,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl_fuchsia_lowpan::MacAddress, D>,
> fidl::encoding::Encode<DeviceTestGetCurrentMacAddressResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestGetCurrentMacAddressResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for DeviceTestGetCurrentMacAddressResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { address: fidl::new_empty!(fidl_fuchsia_lowpan::MacAddress, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl_fuchsia_lowpan::MacAddress,
D,
&mut self.address,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DeviceTestGetCurrentRssiResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DeviceTestGetCurrentRssiResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<DeviceTestGetCurrentRssiResponse, D>
for &DeviceTestGetCurrentRssiResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestGetCurrentRssiResponse>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut DeviceTestGetCurrentRssiResponse)
.write_unaligned((self as *const DeviceTestGetCurrentRssiResponse).read());
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i8, D>>
fidl::encoding::Encode<DeviceTestGetCurrentRssiResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestGetCurrentRssiResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for DeviceTestGetCurrentRssiResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { rssi: fidl::new_empty!(i8, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DeviceTestGetFactoryMacAddressResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DeviceTestGetFactoryMacAddressResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
8
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<DeviceTestGetFactoryMacAddressResponse, D>
for &DeviceTestGetFactoryMacAddressResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestGetFactoryMacAddressResponse>(offset);
fidl::encoding::Encode::<DeviceTestGetFactoryMacAddressResponse, D>::encode(
(<fidl_fuchsia_lowpan::MacAddress as fidl::encoding::ValueTypeMarker>::borrow(
&self.address,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl_fuchsia_lowpan::MacAddress, D>,
> fidl::encoding::Encode<DeviceTestGetFactoryMacAddressResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestGetFactoryMacAddressResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for DeviceTestGetFactoryMacAddressResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { address: fidl::new_empty!(fidl_fuchsia_lowpan::MacAddress, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl_fuchsia_lowpan::MacAddress,
D,
&mut self.address,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DeviceTestGetMacAddressFilterSettingsResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DeviceTestGetMacAddressFilterSettingsResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<DeviceTestGetMacAddressFilterSettingsResponse, D>
for &DeviceTestGetMacAddressFilterSettingsResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestGetMacAddressFilterSettingsResponse>(offset);
fidl::encoding::Encode::<DeviceTestGetMacAddressFilterSettingsResponse, D>::encode(
(<MacAddressFilterSettings as fidl::encoding::ValueTypeMarker>::borrow(
&self.settings,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<MacAddressFilterSettings, D>,
> fidl::encoding::Encode<DeviceTestGetMacAddressFilterSettingsResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestGetMacAddressFilterSettingsResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for DeviceTestGetMacAddressFilterSettingsResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { settings: fidl::new_empty!(MacAddressFilterSettings, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
MacAddressFilterSettings,
D,
&mut self.settings,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DeviceTestGetNcpVersionResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DeviceTestGetNcpVersionResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<DeviceTestGetNcpVersionResponse, D>
for &DeviceTestGetNcpVersionResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestGetNcpVersionResponse>(offset);
fidl::encoding::Encode::<DeviceTestGetNcpVersionResponse, D>::encode(
(<fidl::encoding::BoundedString<256> as fidl::encoding::ValueTypeMarker>::borrow(
&self.version,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::BoundedString<256>, D>,
> fidl::encoding::Encode<DeviceTestGetNcpVersionResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestGetNcpVersionResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for DeviceTestGetNcpVersionResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { version: fidl::new_empty!(fidl::encoding::BoundedString<256>, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::BoundedString<256>,
D,
&mut self.version,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DeviceTestGetNeighborTableResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DeviceTestGetNeighborTableResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<DeviceTestGetNeighborTableResponse, D>
for &DeviceTestGetNeighborTableResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestGetNeighborTableResponse>(offset);
fidl::encoding::Encode::<DeviceTestGetNeighborTableResponse, D>::encode(
(
<fidl::encoding::Vector<NeighborInfo, 1024> as fidl::encoding::ValueTypeMarker>::borrow(&self.neighbor_table),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Vector<NeighborInfo, 1024>, D>,
> fidl::encoding::Encode<DeviceTestGetNeighborTableResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestGetNeighborTableResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for DeviceTestGetNeighborTableResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { neighbor_table: fidl::new_empty!(fidl::encoding::Vector<NeighborInfo, 1024>, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(fidl::encoding::Vector<NeighborInfo, 1024>, D, &mut self.neighbor_table, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DeviceTestGetPartitionIdResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DeviceTestGetPartitionIdResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<DeviceTestGetPartitionIdResponse, D>
for &DeviceTestGetPartitionIdResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestGetPartitionIdResponse>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut DeviceTestGetPartitionIdResponse)
.write_unaligned((self as *const DeviceTestGetPartitionIdResponse).read());
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
fidl::encoding::Encode<DeviceTestGetPartitionIdResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestGetPartitionIdResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for DeviceTestGetPartitionIdResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { pid: fidl::new_empty!(u32, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DeviceTestGetThreadRloc16Response {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DeviceTestGetThreadRloc16Response {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
2
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
2
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<DeviceTestGetThreadRloc16Response, D>
for &DeviceTestGetThreadRloc16Response
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestGetThreadRloc16Response>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut DeviceTestGetThreadRloc16Response)
.write_unaligned((self as *const DeviceTestGetThreadRloc16Response).read());
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
fidl::encoding::Encode<DeviceTestGetThreadRloc16Response, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestGetThreadRloc16Response>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for DeviceTestGetThreadRloc16Response
{
#[inline(always)]
fn new_empty() -> Self {
Self { rloc: fidl::new_empty!(u16, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DeviceTestGetThreadRouterIdResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DeviceTestGetThreadRouterIdResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<DeviceTestGetThreadRouterIdResponse, D>
for &DeviceTestGetThreadRouterIdResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestGetThreadRouterIdResponse>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut DeviceTestGetThreadRouterIdResponse)
.write_unaligned((self as *const DeviceTestGetThreadRouterIdResponse).read());
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
fidl::encoding::Encode<DeviceTestGetThreadRouterIdResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestGetThreadRouterIdResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for DeviceTestGetThreadRouterIdResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { router_id: fidl::new_empty!(u8, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DeviceTestReplaceMacAddressFilterSettingsRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DeviceTestReplaceMacAddressFilterSettingsRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<DeviceTestReplaceMacAddressFilterSettingsRequest, D>
for &DeviceTestReplaceMacAddressFilterSettingsRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestReplaceMacAddressFilterSettingsRequest>(offset);
fidl::encoding::Encode::<DeviceTestReplaceMacAddressFilterSettingsRequest, D>::encode(
(<MacAddressFilterSettings as fidl::encoding::ValueTypeMarker>::borrow(
&self.settings,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<MacAddressFilterSettings, D>,
> fidl::encoding::Encode<DeviceTestReplaceMacAddressFilterSettingsRequest, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceTestReplaceMacAddressFilterSettingsRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for DeviceTestReplaceMacAddressFilterSettingsRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { settings: fidl::new_empty!(MacAddressFilterSettings, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
MacAddressFilterSettings,
D,
&mut self.settings,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl MacAddressFilterItem {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.rssi {
return 2;
}
if let Some(_) = self.mac_address {
return 1;
}
0
}
}
impl fidl::encoding::ValueTypeMarker for MacAddressFilterItem {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MacAddressFilterItem {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MacAddressFilterItem, D>
for &MacAddressFilterItem
{
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MacAddressFilterItem>(offset);
let max_ordinal: u64 = self.max_ordinal_present();
encoder.write_num(max_ordinal, offset);
encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
if max_ordinal == 0 {
return Ok(());
}
depth.increment()?;
let envelope_size = 8;
let bytes_len = max_ordinal as usize * envelope_size;
#[allow(unused_variables)]
let offset = encoder.out_of_line_offset(bytes_len);
let mut _prev_end_offset: usize = 0;
if 1 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (1 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_lowpan::MacAddress, D>(
self.mac_address.as_ref().map(
<fidl_fuchsia_lowpan::MacAddress as fidl::encoding::ValueTypeMarker>::borrow,
),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 2 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (2 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<i8, D>(
self.rssi.as_ref().map(<i8 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MacAddressFilterItem {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
None => return Err(fidl::Error::NotNullable),
Some(len) => len,
};
if len == 0 {
return Ok(());
};
depth.increment()?;
let envelope_size = 8;
let bytes_len = len * envelope_size;
let offset = decoder.out_of_line_offset(bytes_len)?;
let mut _next_ordinal_to_read = 0;
let mut next_offset = offset;
let end_offset = offset + bytes_len;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 1 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<fidl_fuchsia_lowpan::MacAddress as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self
.mac_address
.get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_lowpan::MacAddress, D));
fidl::decode!(
fidl_fuchsia_lowpan::MacAddress,
D,
val_ref,
decoder,
inner_offset,
inner_depth
)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 2 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<i8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.rssi.get_or_insert_with(|| fidl::new_empty!(i8, D));
fidl::decode!(i8, D, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
while next_offset < end_offset {
_next_ordinal_to_read += 1;
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
next_offset += envelope_size;
}
Ok(())
}
}
impl MacAddressFilterSettings {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.items {
return 2;
}
if let Some(_) = self.mode {
return 1;
}
0
}
}
impl fidl::encoding::ValueTypeMarker for MacAddressFilterSettings {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MacAddressFilterSettings {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<MacAddressFilterSettings, D> for &MacAddressFilterSettings
{
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MacAddressFilterSettings>(offset);
let max_ordinal: u64 = self.max_ordinal_present();
encoder.write_num(max_ordinal, offset);
encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
if max_ordinal == 0 {
return Ok(());
}
depth.increment()?;
let envelope_size = 8;
let bytes_len = max_ordinal as usize * envelope_size;
#[allow(unused_variables)]
let offset = encoder.out_of_line_offset(bytes_len);
let mut _prev_end_offset: usize = 0;
if 1 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (1 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<MacAddressFilterMode, D>(
self.mode
.as_ref()
.map(<MacAddressFilterMode as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 2 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (2 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<MacAddressFilterItem, 100>, D>(
self.items.as_ref().map(<fidl::encoding::Vector<MacAddressFilterItem, 100> as fidl::encoding::ValueTypeMarker>::borrow),
encoder, offset + cur_offset, depth
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MacAddressFilterSettings
{
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
None => return Err(fidl::Error::NotNullable),
Some(len) => len,
};
if len == 0 {
return Ok(());
};
depth.increment()?;
let envelope_size = 8;
let bytes_len = len * envelope_size;
let offset = decoder.out_of_line_offset(bytes_len)?;
let mut _next_ordinal_to_read = 0;
let mut next_offset = offset;
let end_offset = offset + bytes_len;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 1 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<MacAddressFilterMode as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref =
self.mode.get_or_insert_with(|| fidl::new_empty!(MacAddressFilterMode, D));
fidl::decode!(
MacAddressFilterMode,
D,
val_ref,
decoder,
inner_offset,
inner_depth
)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 2 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size = <fidl::encoding::Vector<MacAddressFilterItem, 100> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.items.get_or_insert_with(
|| fidl::new_empty!(fidl::encoding::Vector<MacAddressFilterItem, 100>, D),
);
fidl::decode!(fidl::encoding::Vector<MacAddressFilterItem, 100>, D, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
while next_offset < end_offset {
_next_ordinal_to_read += 1;
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
next_offset += envelope_size;
}
Ok(())
}
}
impl NeighborInfo {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.thread_mle_version {
return 17;
}
if let Some(_) = self.queued_messages {
return 16;
}
if let Some(_) = self.net_data_version {
return 15;
}
if let Some(_) = self.child_is_state_restoring {
return 14;
}
if let Some(_) = self.child_is_csl_synced {
return 13;
}
if let Some(_) = self.ipv6_error_rate {
return 12;
}
if let Some(_) = self.frame_error_rate {
return 11;
}
if let Some(_) = self.thread_mode {
return 10;
}
if let Some(_) = self.lqi_in {
return 9;
}
if let Some(_) = self.avg_rssi_in {
return 8;
}
if let Some(_) = self.last_rssi_in {
return 7;
}
if let Some(_) = self.mgmt_frame_count {
return 6;
}
if let Some(_) = self.link_frame_count {
return 5;
}
if let Some(_) = self.is_child {
return 4;
}
if let Some(_) = self.age {
return 3;
}
if let Some(_) = self.short_address {
return 2;
}
if let Some(_) = self.mac_address {
return 1;
}
0
}
}
impl fidl::encoding::ValueTypeMarker for NeighborInfo {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for NeighborInfo {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<NeighborInfo, D>
for &NeighborInfo
{
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<NeighborInfo>(offset);
let max_ordinal: u64 = self.max_ordinal_present();
encoder.write_num(max_ordinal, offset);
encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
if max_ordinal == 0 {
return Ok(());
}
depth.increment()?;
let envelope_size = 8;
let bytes_len = max_ordinal as usize * envelope_size;
#[allow(unused_variables)]
let offset = encoder.out_of_line_offset(bytes_len);
let mut _prev_end_offset: usize = 0;
if 1 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (1 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_lowpan::MacAddress, D>(
self.mac_address.as_ref().map(
<fidl_fuchsia_lowpan::MacAddress as fidl::encoding::ValueTypeMarker>::borrow,
),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 2 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (2 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<u16, D>(
self.short_address.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 3 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (3 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<i64, D>(
self.age.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 4 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (4 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<bool, D>(
self.is_child.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 5 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (5 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<u32, D>(
self.link_frame_count
.as_ref()
.map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 6 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (6 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<u32, D>(
self.mgmt_frame_count
.as_ref()
.map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 7 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (7 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<i32, D>(
self.last_rssi_in.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 8 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (8 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<i8, D>(
self.avg_rssi_in.as_ref().map(<i8 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 9 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (9 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<u8, D>(
self.lqi_in.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 10 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (10 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<u8, D>(
self.thread_mode.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 11 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (11 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<u16, D>(
self.frame_error_rate
.as_ref()
.map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 12 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (12 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<u16, D>(
self.ipv6_error_rate.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 13 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (13 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<bool, D>(
self.child_is_csl_synced
.as_ref()
.map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 14 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (14 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<bool, D>(
self.child_is_state_restoring
.as_ref()
.map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 15 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (15 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<u8, D>(
self.net_data_version.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 16 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (16 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<u16, D>(
self.queued_messages.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
if 17 > max_ordinal {
return Ok(());
}
let cur_offset: usize = (17 - 1) * envelope_size;
encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
fidl::encoding::encode_in_envelope_optional::<u8, D>(
self.thread_mle_version
.as_ref()
.map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for NeighborInfo {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
None => return Err(fidl::Error::NotNullable),
Some(len) => len,
};
if len == 0 {
return Ok(());
};
depth.increment()?;
let envelope_size = 8;
let bytes_len = len * envelope_size;
let offset = decoder.out_of_line_offset(bytes_len)?;
let mut _next_ordinal_to_read = 0;
let mut next_offset = offset;
let end_offset = offset + bytes_len;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 1 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<fidl_fuchsia_lowpan::MacAddress as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self
.mac_address
.get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_lowpan::MacAddress, D));
fidl::decode!(
fidl_fuchsia_lowpan::MacAddress,
D,
val_ref,
decoder,
inner_offset,
inner_depth
)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 2 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.short_address.get_or_insert_with(|| fidl::new_empty!(u16, D));
fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 3 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.age.get_or_insert_with(|| fidl::new_empty!(i64, D));
fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 4 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.is_child.get_or_insert_with(|| fidl::new_empty!(bool, D));
fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 5 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.link_frame_count.get_or_insert_with(|| fidl::new_empty!(u32, D));
fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 6 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.mgmt_frame_count.get_or_insert_with(|| fidl::new_empty!(u32, D));
fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 7 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.last_rssi_in.get_or_insert_with(|| fidl::new_empty!(i32, D));
fidl::decode!(i32, D, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 8 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<i8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.avg_rssi_in.get_or_insert_with(|| fidl::new_empty!(i8, D));
fidl::decode!(i8, D, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 9 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.lqi_in.get_or_insert_with(|| fidl::new_empty!(u8, D));
fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 10 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.thread_mode.get_or_insert_with(|| fidl::new_empty!(u8, D));
fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 11 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.frame_error_rate.get_or_insert_with(|| fidl::new_empty!(u16, D));
fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 12 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.ipv6_error_rate.get_or_insert_with(|| fidl::new_empty!(u16, D));
fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 13 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref =
self.child_is_csl_synced.get_or_insert_with(|| fidl::new_empty!(bool, D));
fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 14 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref =
self.child_is_state_restoring.get_or_insert_with(|| fidl::new_empty!(bool, D));
fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 15 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.net_data_version.get_or_insert_with(|| fidl::new_empty!(u8, D));
fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 16 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref = self.queued_messages.get_or_insert_with(|| fidl::new_empty!(u16, D));
fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
_next_ordinal_to_read += 1;
if next_offset >= end_offset {
return Ok(());
}
while _next_ordinal_to_read < 17 {
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
_next_ordinal_to_read += 1;
next_offset += envelope_size;
}
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
if let Some((inlined, num_bytes, num_handles)) =
fidl::encoding::decode_envelope_header(decoder, next_offset)?
{
let member_inline_size =
<u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let inner_offset;
let mut inner_depth = depth.clone();
if inlined {
decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
inner_offset = next_offset;
} else {
inner_offset = decoder.out_of_line_offset(member_inline_size)?;
inner_depth.increment()?;
}
let val_ref =
self.thread_mle_version.get_or_insert_with(|| fidl::new_empty!(u8, D));
fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
{
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
}
next_offset += envelope_size;
while next_offset < end_offset {
_next_ordinal_to_read += 1;
fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
next_offset += envelope_size;
}
Ok(())
}
}
}