#![warn(clippy::all)]
#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
use {
bitflags::bitflags,
fidl::{
client::QueryResponseFut,
endpoints::{ControlHandle as _, Responder as _},
},
fuchsia_zircon_status as zx_status,
futures::future::{self, MaybeDone, TryFutureExt},
};
#[cfg(target_os = "fuchsia")]
use fuchsia_zircon as zx;
pub const WLAN_MAC_MAX_RATES: u32 = 263;
bitflags! {
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct WlanRxInfoFlags: u32 {
const FCS_INVALID = 1;
const FRAME_BODY_PADDING_4 = 2;
}
}
impl WlanRxInfoFlags {
#[inline(always)]
pub fn from_bits_allow_unknown(bits: u32) -> Self {
Self::from_bits_retain(bits)
}
#[inline(always)]
pub fn has_unknown_bits(&self) -> bool {
self.get_unknown_bits() != 0
}
#[inline(always)]
pub fn get_unknown_bits(&self) -> u32 {
self.bits() & !Self::all().bits()
}
}
bitflags! {
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct WlanRxInfoValid: u32 {
const PHY = 1;
const DATA_RATE = 2;
const CHAN_WIDTH = 4;
const MCS = 8;
const RSSI = 16;
const SNR = 32;
}
}
impl WlanRxInfoValid {
#[inline(always)]
pub fn from_bits_allow_unknown(bits: u32) -> Self {
Self::from_bits_retain(bits)
}
#[inline(always)]
pub fn has_unknown_bits(&self) -> bool {
self.get_unknown_bits() != 0
}
#[inline(always)]
pub fn get_unknown_bits(&self) -> u32 {
self.bits() & !Self::all().bits()
}
}
bitflags! {
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct WlanTxInfoFlags: u32 {
const PROTECTED = 1;
const FAVOR_RELIABILITY = 2;
const QOS = 4;
}
}
impl WlanTxInfoFlags {
#[inline(always)]
pub fn from_bits_allow_unknown(bits: u32) -> Self {
Self::from_bits_retain(bits)
}
#[inline(always)]
pub fn has_unknown_bits(&self) -> bool {
self.get_unknown_bits() != 0
}
#[inline(always)]
pub fn get_unknown_bits(&self) -> u32 {
self.bits() & !Self::all().bits()
}
}
bitflags! {
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct WlanTxInfoValid: u32 {
const DATA_RATE = 1;
const TX_VECTOR_IDX = 2;
const PHY = 4;
const CHANNEL_BANDWIDTH = 8;
const MCS = 16;
}
}
impl WlanTxInfoValid {
#[inline(always)]
pub fn from_bits_allow_unknown(bits: u32) -> Self {
Self::from_bits_retain(bits)
}
#[inline(always)]
pub fn has_unknown_bits(&self) -> bool {
self.get_unknown_bits() != 0
}
#[inline(always)]
pub fn get_unknown_bits(&self) -> u32 {
self.bits() & !Self::all().bits()
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(u8)]
pub enum WlanProtection {
None = 0,
Rx = 1,
Tx = 2,
RxTx = 3,
}
impl WlanProtection {
#[inline]
pub fn from_primitive(prim: u8) -> Option<Self> {
match prim {
0 => Some(Self::None),
1 => Some(Self::Rx),
2 => Some(Self::Tx),
3 => Some(Self::RxTx),
_ => None,
}
}
#[inline]
pub const fn into_primitive(self) -> u8 {
self as u8
}
#[deprecated = "Strict enums should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
#[derive(Clone, Debug, PartialEq)]
pub struct WlanRxInfo {
pub rx_flags: WlanRxInfoFlags,
pub valid_fields: WlanRxInfoValid,
pub phy: fidl_fuchsia_wlan_common::WlanPhyType,
pub data_rate: u32,
pub channel: fidl_fuchsia_wlan_common::WlanChannel,
pub mcs: u8,
pub rssi_dbm: i8,
pub snr_dbh: i16,
}
impl fidl::Persistable for WlanRxInfo {}
#[derive(Clone, Debug, PartialEq)]
pub struct WlanRxPacket {
pub mac_frame: Vec<u8>,
pub info: WlanRxInfo,
}
impl fidl::Persistable for WlanRxPacket {}
#[derive(Clone, Debug, PartialEq)]
pub struct WlanSoftmacBaseJoinBssRequest {
pub join_request: fidl_fuchsia_wlan_common::JoinBssRequest,
}
impl fidl::Persistable for WlanSoftmacBaseJoinBssRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct WlanSoftmacBaseNotifyAssociationCompleteRequest {
pub assoc_cfg: WlanAssociationConfig,
}
impl fidl::Persistable for WlanSoftmacBaseNotifyAssociationCompleteRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct WlanSoftmacBaseQueryDiscoverySupportResponse {
pub resp: fidl_fuchsia_wlan_common::DiscoverySupport,
}
impl fidl::Persistable for WlanSoftmacBaseQueryDiscoverySupportResponse {}
#[derive(Clone, Debug, PartialEq)]
pub struct WlanSoftmacBaseQueryMacSublayerSupportResponse {
pub resp: fidl_fuchsia_wlan_common::MacSublayerSupport,
}
impl fidl::Persistable for WlanSoftmacBaseQueryMacSublayerSupportResponse {}
#[derive(Clone, Debug, PartialEq)]
pub struct WlanSoftmacBaseQuerySecuritySupportResponse {
pub resp: fidl_fuchsia_wlan_common::SecuritySupport,
}
impl fidl::Persistable for WlanSoftmacBaseQuerySecuritySupportResponse {}
#[derive(Clone, Debug, PartialEq)]
pub struct WlanSoftmacBaseQuerySpectrumManagementSupportResponse {
pub resp: fidl_fuchsia_wlan_common::SpectrumManagementSupport,
}
impl fidl::Persistable for WlanSoftmacBaseQuerySpectrumManagementSupportResponse {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct WlanSoftmacBridgeSetEthernetStatusRequest {
pub status: u32,
}
impl fidl::Persistable for WlanSoftmacBridgeSetEthernetStatusRequest {}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct WlanSoftmacBridgeStartRequest {
pub ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
pub frame_processor: u64,
}
impl fidl::Standalone for WlanSoftmacBridgeStartRequest {}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct WlanSoftmacBridgeStartResponse {
pub sme_channel: fidl::Channel,
}
impl fidl::Standalone for WlanSoftmacBridgeStartResponse {}
#[derive(Clone, Debug, PartialEq)]
pub struct WlanSoftmacIfcBaseReportTxResultRequest {
pub tx_result: fidl_fuchsia_wlan_common::WlanTxResult,
}
impl fidl::Persistable for WlanSoftmacIfcBaseReportTxResultRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct WlanTxInfo {
pub tx_flags: u32,
pub valid_fields: u32,
pub tx_vector_idx: u16,
pub phy: fidl_fuchsia_wlan_common::WlanPhyType,
pub channel_bandwidth: fidl_fuchsia_wlan_common::ChannelBandwidth,
pub mcs: u8,
}
impl fidl::Persistable for WlanTxInfo {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct WlanTxPacket {
pub mac_frame: Vec<u8>,
pub info: WlanTxInfo,
}
impl fidl::Persistable for WlanTxPacket {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct FrameProcessorEthernetTxRequest {
pub packet_address: Option<u64>,
pub packet_size: Option<u64>,
pub async_id: Option<u64>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for FrameProcessorEthernetTxRequest {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct FrameProcessorWlanRxRequest {
pub packet_address: Option<u64>,
pub packet_size: Option<u64>,
pub packet_info: Option<WlanRxInfo>,
pub async_id: Option<u64>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for FrameProcessorWlanRxRequest {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct FrameSenderEthernetRxRequest {
pub packet_address: Option<u64>,
pub packet_size: Option<u64>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for FrameSenderEthernetRxRequest {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct FrameSenderWlanTxRequest {
pub packet_address: Option<u64>,
pub packet_size: Option<u64>,
pub packet_info: Option<WlanTxInfo>,
pub async_id: Option<u64>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for FrameSenderWlanTxRequest {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct WlanAssociationConfig {
pub bssid: Option<[u8; 6]>,
pub aid: Option<u16>,
pub listen_interval: Option<u16>,
pub channel: Option<fidl_fuchsia_wlan_common::WlanChannel>,
pub qos: Option<bool>,
pub wmm_params: Option<fidl_fuchsia_wlan_common::WlanWmmParameters>,
pub rates: Option<Vec<u8>>,
pub capability_info: Option<u16>,
pub ht_cap: Option<fidl_fuchsia_wlan_ieee80211::HtCapabilities>,
pub ht_op: Option<fidl_fuchsia_wlan_ieee80211::HtOperation>,
pub vht_cap: Option<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>,
pub vht_op: Option<fidl_fuchsia_wlan_ieee80211::VhtOperation>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for WlanAssociationConfig {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct WlanKeyConfiguration {
pub protection: Option<WlanProtection>,
pub cipher_oui: Option<[u8; 3]>,
pub cipher_type: Option<u8>,
pub key_type: Option<fidl_fuchsia_wlan_common::WlanKeyType>,
pub peer_addr: Option<[u8; 6]>,
pub key_idx: Option<u8>,
pub key: Option<Vec<u8>>,
pub rsc: Option<u64>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for WlanKeyConfiguration {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct WlanSoftmacBandCapability {
pub band: Option<fidl_fuchsia_wlan_common::WlanBand>,
pub basic_rate_count: Option<u8>,
pub basic_rate_list: Option<[u8; 12]>,
pub ht_supported: Option<bool>,
pub ht_caps: Option<fidl_fuchsia_wlan_ieee80211::HtCapabilities>,
pub vht_supported: Option<bool>,
pub vht_caps: Option<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>,
pub operating_channel_count: Option<u16>,
pub operating_channel_list: Option<[u8; 256]>,
pub basic_rates: Option<Vec<u8>>,
pub operating_channels: Option<Vec<u8>>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for WlanSoftmacBandCapability {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct WlanSoftmacBaseCancelScanRequest {
pub scan_id: Option<u64>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for WlanSoftmacBaseCancelScanRequest {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct WlanSoftmacBaseClearAssociationRequest {
pub peer_addr: Option<[u8; 6]>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for WlanSoftmacBaseClearAssociationRequest {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct WlanSoftmacBaseEnableBeaconingRequest {
pub packet_template: Option<WlanTxPacket>,
pub tim_ele_offset: Option<u64>,
pub beacon_interval: Option<u16>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for WlanSoftmacBaseEnableBeaconingRequest {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct WlanSoftmacBaseSetChannelRequest {
pub channel: Option<fidl_fuchsia_wlan_common::WlanChannel>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for WlanSoftmacBaseSetChannelRequest {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct WlanSoftmacBaseStartPassiveScanRequest {
pub channels: Option<Vec<u8>>,
pub min_channel_time: Option<i64>,
pub max_channel_time: Option<i64>,
pub min_home_time: Option<i64>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for WlanSoftmacBaseStartPassiveScanRequest {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct WlanSoftmacBaseUpdateWmmParametersRequest {
pub ac: Option<fidl_fuchsia_wlan_ieee80211::WlanAccessCategory>,
pub params: Option<fidl_fuchsia_wlan_common::WlanWmmParameters>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for WlanSoftmacBaseUpdateWmmParametersRequest {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct WlanSoftmacBaseStartActiveScanResponse {
pub scan_id: Option<u64>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for WlanSoftmacBaseStartActiveScanResponse {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct WlanSoftmacBaseStartPassiveScanResponse {
pub scan_id: Option<u64>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for WlanSoftmacBaseStartPassiveScanResponse {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct WlanSoftmacIfcBaseNotifyScanCompleteRequest {
pub status: Option<i32>,
pub scan_id: Option<u64>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for WlanSoftmacIfcBaseNotifyScanCompleteRequest {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct WlanSoftmacQueryResponse {
pub sta_addr: Option<[u8; 6]>,
pub mac_role: Option<fidl_fuchsia_wlan_common::WlanMacRole>,
pub supported_phys: Option<Vec<fidl_fuchsia_wlan_common::WlanPhyType>>,
pub hardware_capability: Option<u32>,
pub band_caps: Option<Vec<WlanSoftmacBandCapability>>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for WlanSoftmacQueryResponse {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct WlanSoftmacStartActiveScanRequest {
pub channels: Option<Vec<u8>>,
pub ssids: Option<Vec<fidl_fuchsia_wlan_ieee80211::CSsid>>,
pub mac_header: Option<Vec<u8>>,
pub ies: Option<Vec<u8>>,
pub min_channel_time: Option<i64>,
pub max_channel_time: Option<i64>,
pub min_home_time: Option<i64>,
pub min_probes_per_channel: Option<u8>,
pub max_probes_per_channel: Option<u8>,
#[doc(hidden)]
pub __source_breaking: fidl::marker::SourceBreaking,
}
impl fidl::Persistable for WlanSoftmacStartActiveScanRequest {}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct FrameProcessorMarker;
impl fidl::endpoints::ProtocolMarker for FrameProcessorMarker {
type Proxy = FrameProcessorProxy;
type RequestStream = FrameProcessorRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = FrameProcessorSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) FrameProcessor";
}
pub type FrameProcessorEthernetTxResult = Result<(), i32>;
pub trait FrameProcessorProxyInterface: Send + Sync {
type WlanRxResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#wlan_rx(&self, payload: &FrameProcessorWlanRxRequest) -> Self::WlanRxResponseFut;
type EthernetTxResponseFut: std::future::Future<Output = Result<FrameProcessorEthernetTxResult, fidl::Error>>
+ Send;
fn r#ethernet_tx(
&self,
payload: &FrameProcessorEthernetTxRequest,
) -> Self::EthernetTxResponseFut;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct FrameProcessorSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for FrameProcessorSynchronousProxy {
type Proxy = FrameProcessorProxy;
type Protocol = FrameProcessorMarker;
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 FrameProcessorSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <FrameProcessorMarker 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::Time) -> Result<FrameProcessorEvent, fidl::Error> {
FrameProcessorEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#wlan_rx(
&self,
mut payload: &FrameProcessorWlanRxRequest,
___deadline: zx::Time,
) -> Result<(), fidl::Error> {
let _response =
self.client.send_query::<FrameProcessorWlanRxRequest, fidl::encoding::EmptyPayload>(
payload,
0x6cbb70cd6ef9fa93,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#ethernet_tx(
&self,
mut payload: &FrameProcessorEthernetTxRequest,
___deadline: zx::Time,
) -> Result<FrameProcessorEthernetTxResult, fidl::Error> {
let _response = self.client.send_query::<
FrameProcessorEthernetTxRequest,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
payload,
0x10c48cb867252f0,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
}
#[derive(Debug, Clone)]
pub struct FrameProcessorProxy {
client: fidl::client::Client,
}
impl fidl::endpoints::Proxy for FrameProcessorProxy {
type Protocol = FrameProcessorMarker;
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 FrameProcessorProxy {
pub fn new(channel: fidl::AsyncChannel) -> Self {
let protocol_name = <FrameProcessorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> FrameProcessorEventStream {
FrameProcessorEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#wlan_rx(
&self,
mut payload: &FrameProcessorWlanRxRequest,
) -> fidl::client::QueryResponseFut<()> {
FrameProcessorProxyInterface::r#wlan_rx(self, payload)
}
pub fn r#ethernet_tx(
&self,
mut payload: &FrameProcessorEthernetTxRequest,
) -> fidl::client::QueryResponseFut<FrameProcessorEthernetTxResult> {
FrameProcessorProxyInterface::r#ethernet_tx(self, payload)
}
}
impl FrameProcessorProxyInterface for FrameProcessorProxy {
type WlanRxResponseFut = fidl::client::QueryResponseFut<()>;
fn r#wlan_rx(&self, mut payload: &FrameProcessorWlanRxRequest) -> Self::WlanRxResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::EmptyPayload,
0x6cbb70cd6ef9fa93,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<FrameProcessorWlanRxRequest, ()>(
payload,
0x6cbb70cd6ef9fa93,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type EthernetTxResponseFut = fidl::client::QueryResponseFut<FrameProcessorEthernetTxResult>;
fn r#ethernet_tx(
&self,
mut payload: &FrameProcessorEthernetTxRequest,
) -> Self::EthernetTxResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<FrameProcessorEthernetTxResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
0x10c48cb867252f0,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
FrameProcessorEthernetTxRequest,
FrameProcessorEthernetTxResult,
>(
payload,
0x10c48cb867252f0,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
}
pub struct FrameProcessorEventStream {
event_receiver: fidl::client::EventReceiver,
}
impl std::marker::Unpin for FrameProcessorEventStream {}
impl futures::stream::FusedStream for FrameProcessorEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for FrameProcessorEventStream {
type Item = Result<FrameProcessorEvent, 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(FrameProcessorEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum FrameProcessorEvent {}
impl FrameProcessorEvent {
fn decode(mut buf: fidl::MessageBufEtc) -> Result<FrameProcessorEvent, 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:
<FrameProcessorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct FrameProcessorRequestStream {
inner: std::sync::Arc<fidl::ServeInner>,
is_terminated: bool,
}
impl std::marker::Unpin for FrameProcessorRequestStream {}
impl futures::stream::FusedStream for FrameProcessorRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for FrameProcessorRequestStream {
type Protocol = FrameProcessorMarker;
type ControlHandle = FrameProcessorControlHandle;
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 {
FrameProcessorControlHandle { inner: self.inner.clone() }
}
fn into_inner(self) -> (::std::sync::Arc<fidl::ServeInner>, bool) {
(self.inner, self.is_terminated)
}
fn from_inner(inner: std::sync::Arc<fidl::ServeInner>, is_terminated: bool) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for FrameProcessorRequestStream {
type Item = Result<FrameProcessorRequest, 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 FrameProcessorRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf(|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))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x6cbb70cd6ef9fa93 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(FrameProcessorWlanRxRequest);
fidl::encoding::Decoder::decode_into::<FrameProcessorWlanRxRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = FrameProcessorControlHandle { inner: this.inner.clone() };
Ok(FrameProcessorRequest::WlanRx {
payload: req,
responder: FrameProcessorWlanRxResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x10c48cb867252f0 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(FrameProcessorEthernetTxRequest);
fidl::encoding::Decoder::decode_into::<FrameProcessorEthernetTxRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = FrameProcessorControlHandle { inner: this.inner.clone() };
Ok(FrameProcessorRequest::EthernetTx {
payload: req,
responder: FrameProcessorEthernetTxResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name:
<FrameProcessorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
})
}
}
#[derive(Debug)]
pub enum FrameProcessorRequest {
WlanRx {
payload: FrameProcessorWlanRxRequest,
responder: FrameProcessorWlanRxResponder,
},
EthernetTx {
payload: FrameProcessorEthernetTxRequest,
responder: FrameProcessorEthernetTxResponder,
},
}
impl FrameProcessorRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_wlan_rx(
self,
) -> Option<(FrameProcessorWlanRxRequest, FrameProcessorWlanRxResponder)> {
if let FrameProcessorRequest::WlanRx { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_ethernet_tx(
self,
) -> Option<(FrameProcessorEthernetTxRequest, FrameProcessorEthernetTxResponder)> {
if let FrameProcessorRequest::EthernetTx { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
FrameProcessorRequest::WlanRx { .. } => "wlan_rx",
FrameProcessorRequest::EthernetTx { .. } => "ethernet_tx",
}
}
}
#[derive(Debug, Clone)]
pub struct FrameProcessorControlHandle {
inner: std::sync::Arc<fidl::ServeInner>,
}
impl fidl::endpoints::ControlHandle for FrameProcessorControlHandle {
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()
}
}
impl FrameProcessorControlHandle {}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct FrameProcessorWlanRxResponder {
control_handle: std::mem::ManuallyDrop<FrameProcessorControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for FrameProcessorWlanRxResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for FrameProcessorWlanRxResponder {
type ControlHandle = FrameProcessorControlHandle;
fn control_handle(&self) -> &FrameProcessorControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl FrameProcessorWlanRxResponder {
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,
0x6cbb70cd6ef9fa93,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct FrameProcessorEthernetTxResponder {
control_handle: std::mem::ManuallyDrop<FrameProcessorControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for FrameProcessorEthernetTxResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for FrameProcessorEthernetTxResponder {
type ControlHandle = FrameProcessorControlHandle;
fn control_handle(&self) -> &FrameProcessorControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl FrameProcessorEthernetTxResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0x10c48cb867252f0,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct FrameSenderMarker;
impl fidl::endpoints::ProtocolMarker for FrameSenderMarker {
type Proxy = FrameSenderProxy;
type RequestStream = FrameSenderRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = FrameSenderSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) FrameSender";
}
pub type FrameSenderWlanTxResult = Result<(), i32>;
pub type FrameSenderEthernetRxResult = Result<(), i32>;
pub trait FrameSenderProxyInterface: Send + Sync {
type WlanTxResponseFut: std::future::Future<Output = Result<FrameSenderWlanTxResult, fidl::Error>>
+ Send;
fn r#wlan_tx(&self, payload: &FrameSenderWlanTxRequest) -> Self::WlanTxResponseFut;
type EthernetRxResponseFut: std::future::Future<Output = Result<FrameSenderEthernetRxResult, fidl::Error>>
+ Send;
fn r#ethernet_rx(&self, payload: &FrameSenderEthernetRxRequest) -> Self::EthernetRxResponseFut;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct FrameSenderSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for FrameSenderSynchronousProxy {
type Proxy = FrameSenderProxy;
type Protocol = FrameSenderMarker;
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 FrameSenderSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <FrameSenderMarker 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::Time) -> Result<FrameSenderEvent, fidl::Error> {
FrameSenderEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#wlan_tx(
&self,
mut payload: &FrameSenderWlanTxRequest,
___deadline: zx::Time,
) -> Result<FrameSenderWlanTxResult, fidl::Error> {
let _response = self.client.send_query::<
FrameSenderWlanTxRequest,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
payload,
0x55ea6000aa6d9d31,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#ethernet_rx(
&self,
mut payload: &FrameSenderEthernetRxRequest,
___deadline: zx::Time,
) -> Result<FrameSenderEthernetRxResult, fidl::Error> {
let _response = self.client.send_query::<
FrameSenderEthernetRxRequest,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
payload,
0x4d4f44b050a6a554,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
}
#[derive(Debug, Clone)]
pub struct FrameSenderProxy {
client: fidl::client::Client,
}
impl fidl::endpoints::Proxy for FrameSenderProxy {
type Protocol = FrameSenderMarker;
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 FrameSenderProxy {
pub fn new(channel: fidl::AsyncChannel) -> Self {
let protocol_name = <FrameSenderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> FrameSenderEventStream {
FrameSenderEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#wlan_tx(
&self,
mut payload: &FrameSenderWlanTxRequest,
) -> fidl::client::QueryResponseFut<FrameSenderWlanTxResult> {
FrameSenderProxyInterface::r#wlan_tx(self, payload)
}
pub fn r#ethernet_rx(
&self,
mut payload: &FrameSenderEthernetRxRequest,
) -> fidl::client::QueryResponseFut<FrameSenderEthernetRxResult> {
FrameSenderProxyInterface::r#ethernet_rx(self, payload)
}
}
impl FrameSenderProxyInterface for FrameSenderProxy {
type WlanTxResponseFut = fidl::client::QueryResponseFut<FrameSenderWlanTxResult>;
fn r#wlan_tx(&self, mut payload: &FrameSenderWlanTxRequest) -> Self::WlanTxResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<FrameSenderWlanTxResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
0x55ea6000aa6d9d31,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<FrameSenderWlanTxRequest, FrameSenderWlanTxResult>(
payload,
0x55ea6000aa6d9d31,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type EthernetRxResponseFut = fidl::client::QueryResponseFut<FrameSenderEthernetRxResult>;
fn r#ethernet_rx(
&self,
mut payload: &FrameSenderEthernetRxRequest,
) -> Self::EthernetRxResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<FrameSenderEthernetRxResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
0x4d4f44b050a6a554,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client
.send_query_and_decode::<FrameSenderEthernetRxRequest, FrameSenderEthernetRxResult>(
payload,
0x4d4f44b050a6a554,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
}
pub struct FrameSenderEventStream {
event_receiver: fidl::client::EventReceiver,
}
impl std::marker::Unpin for FrameSenderEventStream {}
impl futures::stream::FusedStream for FrameSenderEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for FrameSenderEventStream {
type Item = Result<FrameSenderEvent, 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(FrameSenderEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum FrameSenderEvent {}
impl FrameSenderEvent {
fn decode(mut buf: fidl::MessageBufEtc) -> Result<FrameSenderEvent, 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: <FrameSenderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct FrameSenderRequestStream {
inner: std::sync::Arc<fidl::ServeInner>,
is_terminated: bool,
}
impl std::marker::Unpin for FrameSenderRequestStream {}
impl futures::stream::FusedStream for FrameSenderRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for FrameSenderRequestStream {
type Protocol = FrameSenderMarker;
type ControlHandle = FrameSenderControlHandle;
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 {
FrameSenderControlHandle { inner: self.inner.clone() }
}
fn into_inner(self) -> (::std::sync::Arc<fidl::ServeInner>, bool) {
(self.inner, self.is_terminated)
}
fn from_inner(inner: std::sync::Arc<fidl::ServeInner>, is_terminated: bool) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for FrameSenderRequestStream {
type Item = Result<FrameSenderRequest, 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 FrameSenderRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf(|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))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x55ea6000aa6d9d31 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(FrameSenderWlanTxRequest);
fidl::encoding::Decoder::decode_into::<FrameSenderWlanTxRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = FrameSenderControlHandle { inner: this.inner.clone() };
Ok(FrameSenderRequest::WlanTx {
payload: req,
responder: FrameSenderWlanTxResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x4d4f44b050a6a554 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(FrameSenderEthernetRxRequest);
fidl::encoding::Decoder::decode_into::<FrameSenderEthernetRxRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = FrameSenderControlHandle { inner: this.inner.clone() };
Ok(FrameSenderRequest::EthernetRx {
payload: req,
responder: FrameSenderEthernetRxResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name:
<FrameSenderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
})
}
}
#[derive(Debug)]
pub enum FrameSenderRequest {
WlanTx { payload: FrameSenderWlanTxRequest, responder: FrameSenderWlanTxResponder },
EthernetRx { payload: FrameSenderEthernetRxRequest, responder: FrameSenderEthernetRxResponder },
}
impl FrameSenderRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_wlan_tx(self) -> Option<(FrameSenderWlanTxRequest, FrameSenderWlanTxResponder)> {
if let FrameSenderRequest::WlanTx { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_ethernet_rx(
self,
) -> Option<(FrameSenderEthernetRxRequest, FrameSenderEthernetRxResponder)> {
if let FrameSenderRequest::EthernetRx { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
FrameSenderRequest::WlanTx { .. } => "wlan_tx",
FrameSenderRequest::EthernetRx { .. } => "ethernet_rx",
}
}
}
#[derive(Debug, Clone)]
pub struct FrameSenderControlHandle {
inner: std::sync::Arc<fidl::ServeInner>,
}
impl fidl::endpoints::ControlHandle for FrameSenderControlHandle {
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()
}
}
impl FrameSenderControlHandle {}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct FrameSenderWlanTxResponder {
control_handle: std::mem::ManuallyDrop<FrameSenderControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for FrameSenderWlanTxResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for FrameSenderWlanTxResponder {
type ControlHandle = FrameSenderControlHandle;
fn control_handle(&self) -> &FrameSenderControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl FrameSenderWlanTxResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0x55ea6000aa6d9d31,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct FrameSenderEthernetRxResponder {
control_handle: std::mem::ManuallyDrop<FrameSenderControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for FrameSenderEthernetRxResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for FrameSenderEthernetRxResponder {
type ControlHandle = FrameSenderControlHandle;
fn control_handle(&self) -> &FrameSenderControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl FrameSenderEthernetRxResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0x4d4f44b050a6a554,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct WlanSoftmacBaseMarker;
impl fidl::endpoints::ProtocolMarker for WlanSoftmacBaseMarker {
type Proxy = WlanSoftmacBaseProxy;
type RequestStream = WlanSoftmacBaseRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = WlanSoftmacBaseSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) WlanSoftmacBase";
}
pub type WlanSoftmacBaseQueryResult = Result<WlanSoftmacQueryResponse, i32>;
pub type WlanSoftmacBaseQueryDiscoverySupportResult =
Result<fidl_fuchsia_wlan_common::DiscoverySupport, i32>;
pub type WlanSoftmacBaseQueryMacSublayerSupportResult =
Result<fidl_fuchsia_wlan_common::MacSublayerSupport, i32>;
pub type WlanSoftmacBaseQuerySecuritySupportResult =
Result<fidl_fuchsia_wlan_common::SecuritySupport, i32>;
pub type WlanSoftmacBaseQuerySpectrumManagementSupportResult =
Result<fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>;
pub type WlanSoftmacBaseSetChannelResult = Result<(), i32>;
pub type WlanSoftmacBaseJoinBssResult = Result<(), i32>;
pub type WlanSoftmacBaseEnableBeaconingResult = Result<(), i32>;
pub type WlanSoftmacBaseDisableBeaconingResult = Result<(), i32>;
pub type WlanSoftmacBaseInstallKeyResult = Result<(), i32>;
pub type WlanSoftmacBaseNotifyAssociationCompleteResult = Result<(), i32>;
pub type WlanSoftmacBaseClearAssociationResult = Result<(), i32>;
pub type WlanSoftmacBaseStartPassiveScanResult =
Result<WlanSoftmacBaseStartPassiveScanResponse, i32>;
pub type WlanSoftmacBaseStartActiveScanResult = Result<WlanSoftmacBaseStartActiveScanResponse, i32>;
pub type WlanSoftmacBaseCancelScanResult = Result<(), i32>;
pub type WlanSoftmacBaseUpdateWmmParametersResult = Result<(), i32>;
pub trait WlanSoftmacBaseProxyInterface: Send + Sync {
type QueryResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseQueryResult, fidl::Error>>
+ Send;
fn r#query(&self) -> Self::QueryResponseFut;
type QueryDiscoverySupportResponseFut: std::future::Future<
Output = Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error>,
> + Send;
fn r#query_discovery_support(&self) -> Self::QueryDiscoverySupportResponseFut;
type QueryMacSublayerSupportResponseFut: std::future::Future<
Output = Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error>,
> + Send;
fn r#query_mac_sublayer_support(&self) -> Self::QueryMacSublayerSupportResponseFut;
type QuerySecuritySupportResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error>>
+ Send;
fn r#query_security_support(&self) -> Self::QuerySecuritySupportResponseFut;
type QuerySpectrumManagementSupportResponseFut: std::future::Future<
Output = Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error>,
> + Send;
fn r#query_spectrum_management_support(
&self,
) -> Self::QuerySpectrumManagementSupportResponseFut;
type SetChannelResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseSetChannelResult, fidl::Error>>
+ Send;
fn r#set_channel(
&self,
payload: &WlanSoftmacBaseSetChannelRequest,
) -> Self::SetChannelResponseFut;
type JoinBssResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseJoinBssResult, fidl::Error>>
+ Send;
fn r#join_bss(
&self,
join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
) -> Self::JoinBssResponseFut;
type EnableBeaconingResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error>>
+ Send;
fn r#enable_beaconing(
&self,
payload: &WlanSoftmacBaseEnableBeaconingRequest,
) -> Self::EnableBeaconingResponseFut;
type DisableBeaconingResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error>>
+ Send;
fn r#disable_beaconing(&self) -> Self::DisableBeaconingResponseFut;
type InstallKeyResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseInstallKeyResult, fidl::Error>>
+ Send;
fn r#install_key(&self, payload: &WlanKeyConfiguration) -> Self::InstallKeyResponseFut;
type NotifyAssociationCompleteResponseFut: std::future::Future<
Output = Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error>,
> + Send;
fn r#notify_association_complete(
&self,
assoc_cfg: &WlanAssociationConfig,
) -> Self::NotifyAssociationCompleteResponseFut;
type ClearAssociationResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseClearAssociationResult, fidl::Error>>
+ Send;
fn r#clear_association(
&self,
payload: &WlanSoftmacBaseClearAssociationRequest,
) -> Self::ClearAssociationResponseFut;
type StartPassiveScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error>>
+ Send;
fn r#start_passive_scan(
&self,
payload: &WlanSoftmacBaseStartPassiveScanRequest,
) -> Self::StartPassiveScanResponseFut;
type StartActiveScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error>>
+ Send;
fn r#start_active_scan(
&self,
payload: &WlanSoftmacStartActiveScanRequest,
) -> Self::StartActiveScanResponseFut;
type CancelScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseCancelScanResult, fidl::Error>>
+ Send;
fn r#cancel_scan(
&self,
payload: &WlanSoftmacBaseCancelScanRequest,
) -> Self::CancelScanResponseFut;
type UpdateWmmParametersResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error>>
+ Send;
fn r#update_wmm_parameters(
&self,
payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
) -> Self::UpdateWmmParametersResponseFut;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct WlanSoftmacBaseSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for WlanSoftmacBaseSynchronousProxy {
type Proxy = WlanSoftmacBaseProxy;
type Protocol = WlanSoftmacBaseMarker;
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 WlanSoftmacBaseSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <WlanSoftmacBaseMarker 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::Time) -> Result<WlanSoftmacBaseEvent, fidl::Error> {
WlanSoftmacBaseEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#query(
&self,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseQueryResult, fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>,
>(
(),
0x18231a638e508f9d,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#query_discovery_support(
&self,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
WlanSoftmacBaseQueryDiscoverySupportResponse,
i32,
>>(
(),
0x16797affc0cb58ae,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.resp))
}
pub fn r#query_mac_sublayer_support(
&self,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
WlanSoftmacBaseQueryMacSublayerSupportResponse,
i32,
>>(
(),
0x7302c3f8c131f075,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.resp))
}
pub fn r#query_security_support(
&self,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
WlanSoftmacBaseQuerySecuritySupportResponse,
i32,
>>(
(),
0x3691bb75abf6354,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.resp))
}
pub fn r#query_spectrum_management_support(
&self,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error> {
let _response = self
.client
.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
i32,
>>(
(), 0x347d78dc1d4d27bf, fidl::encoding::DynamicFlags::empty(), ___deadline
)?;
Ok(_response.map(|x| x.resp))
}
pub fn r#set_channel(
&self,
mut payload: &WlanSoftmacBaseSetChannelRequest,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseSetChannelResult, fidl::Error> {
let _response = self.client.send_query::<
WlanSoftmacBaseSetChannelRequest,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
payload,
0x12836b533cd63ece,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#join_bss(
&self,
mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseJoinBssResult, fidl::Error> {
let _response = self.client.send_query::<
WlanSoftmacBaseJoinBssRequest,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
(join_request,),
0x1336fb5455b77a6e,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#enable_beaconing(
&self,
mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error> {
let _response = self.client.send_query::<
WlanSoftmacBaseEnableBeaconingRequest,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
payload,
0x6c35807632c64576,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#disable_beaconing(
&self,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
(),
0x3303b30f99dbb406,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#install_key(
&self,
mut payload: &WlanKeyConfiguration,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseInstallKeyResult, fidl::Error> {
let _response = self.client.send_query::<
WlanKeyConfiguration,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
payload,
0x7decf9b4200b9131,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#notify_association_complete(
&self,
mut assoc_cfg: &WlanAssociationConfig,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error> {
let _response = self.client.send_query::<
WlanSoftmacBaseNotifyAssociationCompleteRequest,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
(assoc_cfg,),
0x436ffe3ba461d6cd,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#clear_association(
&self,
mut payload: &WlanSoftmacBaseClearAssociationRequest,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseClearAssociationResult, fidl::Error> {
let _response = self.client.send_query::<
WlanSoftmacBaseClearAssociationRequest,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
payload,
0x581d76c39190a7dd,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#start_passive_scan(
&self,
mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error> {
let _response = self.client.send_query::<
WlanSoftmacBaseStartPassiveScanRequest,
fidl::encoding::ResultType<WlanSoftmacBaseStartPassiveScanResponse, i32>,
>(
payload,
0x5662f989cb4083bb,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#start_active_scan(
&self,
mut payload: &WlanSoftmacStartActiveScanRequest,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error> {
let _response = self.client.send_query::<
WlanSoftmacStartActiveScanRequest,
fidl::encoding::ResultType<WlanSoftmacBaseStartActiveScanResponse, i32>,
>(
payload,
0x4896eafa9937751e,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#cancel_scan(
&self,
mut payload: &WlanSoftmacBaseCancelScanRequest,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseCancelScanResult, fidl::Error> {
let _response = self.client.send_query::<
WlanSoftmacBaseCancelScanRequest,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
payload,
0xf7d859369764556,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#update_wmm_parameters(
&self,
mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error> {
let _response = self.client.send_query::<
WlanSoftmacBaseUpdateWmmParametersRequest,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
payload,
0x68522c7122d5f78c,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
}
#[derive(Debug, Clone)]
pub struct WlanSoftmacBaseProxy {
client: fidl::client::Client,
}
impl fidl::endpoints::Proxy for WlanSoftmacBaseProxy {
type Protocol = WlanSoftmacBaseMarker;
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 WlanSoftmacBaseProxy {
pub fn new(channel: fidl::AsyncChannel) -> Self {
let protocol_name = <WlanSoftmacBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> WlanSoftmacBaseEventStream {
WlanSoftmacBaseEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#query(&self) -> fidl::client::QueryResponseFut<WlanSoftmacBaseQueryResult> {
WlanSoftmacBaseProxyInterface::r#query(self)
}
pub fn r#query_discovery_support(
&self,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseQueryDiscoverySupportResult> {
WlanSoftmacBaseProxyInterface::r#query_discovery_support(self)
}
pub fn r#query_mac_sublayer_support(
&self,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseQueryMacSublayerSupportResult> {
WlanSoftmacBaseProxyInterface::r#query_mac_sublayer_support(self)
}
pub fn r#query_security_support(
&self,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseQuerySecuritySupportResult> {
WlanSoftmacBaseProxyInterface::r#query_security_support(self)
}
pub fn r#query_spectrum_management_support(
&self,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseQuerySpectrumManagementSupportResult> {
WlanSoftmacBaseProxyInterface::r#query_spectrum_management_support(self)
}
pub fn r#set_channel(
&self,
mut payload: &WlanSoftmacBaseSetChannelRequest,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseSetChannelResult> {
WlanSoftmacBaseProxyInterface::r#set_channel(self, payload)
}
pub fn r#join_bss(
&self,
mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseJoinBssResult> {
WlanSoftmacBaseProxyInterface::r#join_bss(self, join_request)
}
pub fn r#enable_beaconing(
&self,
mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseEnableBeaconingResult> {
WlanSoftmacBaseProxyInterface::r#enable_beaconing(self, payload)
}
pub fn r#disable_beaconing(
&self,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseDisableBeaconingResult> {
WlanSoftmacBaseProxyInterface::r#disable_beaconing(self)
}
pub fn r#install_key(
&self,
mut payload: &WlanKeyConfiguration,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseInstallKeyResult> {
WlanSoftmacBaseProxyInterface::r#install_key(self, payload)
}
pub fn r#notify_association_complete(
&self,
mut assoc_cfg: &WlanAssociationConfig,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseNotifyAssociationCompleteResult> {
WlanSoftmacBaseProxyInterface::r#notify_association_complete(self, assoc_cfg)
}
pub fn r#clear_association(
&self,
mut payload: &WlanSoftmacBaseClearAssociationRequest,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseClearAssociationResult> {
WlanSoftmacBaseProxyInterface::r#clear_association(self, payload)
}
pub fn r#start_passive_scan(
&self,
mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseStartPassiveScanResult> {
WlanSoftmacBaseProxyInterface::r#start_passive_scan(self, payload)
}
pub fn r#start_active_scan(
&self,
mut payload: &WlanSoftmacStartActiveScanRequest,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseStartActiveScanResult> {
WlanSoftmacBaseProxyInterface::r#start_active_scan(self, payload)
}
pub fn r#cancel_scan(
&self,
mut payload: &WlanSoftmacBaseCancelScanRequest,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseCancelScanResult> {
WlanSoftmacBaseProxyInterface::r#cancel_scan(self, payload)
}
pub fn r#update_wmm_parameters(
&self,
mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseUpdateWmmParametersResult> {
WlanSoftmacBaseProxyInterface::r#update_wmm_parameters(self, payload)
}
}
impl WlanSoftmacBaseProxyInterface for WlanSoftmacBaseProxy {
type QueryResponseFut = fidl::client::QueryResponseFut<WlanSoftmacBaseQueryResult>;
fn r#query(&self) -> Self::QueryResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseQueryResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>,
0x18231a638e508f9d,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client
.send_query_and_decode::<fidl::encoding::EmptyPayload, WlanSoftmacBaseQueryResult>(
(),
0x18231a638e508f9d,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type QueryDiscoverySupportResponseFut =
fidl::client::QueryResponseFut<WlanSoftmacBaseQueryDiscoverySupportResult>;
fn r#query_discovery_support(&self) -> Self::QueryDiscoverySupportResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<WlanSoftmacBaseQueryDiscoverySupportResponse, i32>,
0x16797affc0cb58ae,
>(_buf?)?;
Ok(_response.map(|x| x.resp))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
WlanSoftmacBaseQueryDiscoverySupportResult,
>(
(),
0x16797affc0cb58ae,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type QueryMacSublayerSupportResponseFut =
fidl::client::QueryResponseFut<WlanSoftmacBaseQueryMacSublayerSupportResult>;
fn r#query_mac_sublayer_support(&self) -> Self::QueryMacSublayerSupportResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<WlanSoftmacBaseQueryMacSublayerSupportResponse, i32>,
0x7302c3f8c131f075,
>(_buf?)?;
Ok(_response.map(|x| x.resp))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
WlanSoftmacBaseQueryMacSublayerSupportResult,
>(
(),
0x7302c3f8c131f075,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type QuerySecuritySupportResponseFut =
fidl::client::QueryResponseFut<WlanSoftmacBaseQuerySecuritySupportResult>;
fn r#query_security_support(&self) -> Self::QuerySecuritySupportResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<WlanSoftmacBaseQuerySecuritySupportResponse, i32>,
0x3691bb75abf6354,
>(_buf?)?;
Ok(_response.map(|x| x.resp))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
WlanSoftmacBaseQuerySecuritySupportResult,
>(
(),
0x3691bb75abf6354,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type QuerySpectrumManagementSupportResponseFut =
fidl::client::QueryResponseFut<WlanSoftmacBaseQuerySpectrumManagementSupportResult>;
fn r#query_spectrum_management_support(
&self,
) -> Self::QuerySpectrumManagementSupportResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<
WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
i32,
>,
0x347d78dc1d4d27bf,
>(_buf?)?;
Ok(_response.map(|x| x.resp))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
WlanSoftmacBaseQuerySpectrumManagementSupportResult,
>(
(),
0x347d78dc1d4d27bf,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type SetChannelResponseFut = fidl::client::QueryResponseFut<WlanSoftmacBaseSetChannelResult>;
fn r#set_channel(
&self,
mut payload: &WlanSoftmacBaseSetChannelRequest,
) -> Self::SetChannelResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseSetChannelResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
0x12836b533cd63ece,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
WlanSoftmacBaseSetChannelRequest,
WlanSoftmacBaseSetChannelResult,
>(
payload,
0x12836b533cd63ece,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type JoinBssResponseFut = fidl::client::QueryResponseFut<WlanSoftmacBaseJoinBssResult>;
fn r#join_bss(
&self,
mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
) -> Self::JoinBssResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseJoinBssResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
0x1336fb5455b77a6e,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client
.send_query_and_decode::<WlanSoftmacBaseJoinBssRequest, WlanSoftmacBaseJoinBssResult>(
(join_request,),
0x1336fb5455b77a6e,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type EnableBeaconingResponseFut =
fidl::client::QueryResponseFut<WlanSoftmacBaseEnableBeaconingResult>;
fn r#enable_beaconing(
&self,
mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
) -> Self::EnableBeaconingResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
0x6c35807632c64576,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
WlanSoftmacBaseEnableBeaconingRequest,
WlanSoftmacBaseEnableBeaconingResult,
>(
payload,
0x6c35807632c64576,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type DisableBeaconingResponseFut =
fidl::client::QueryResponseFut<WlanSoftmacBaseDisableBeaconingResult>;
fn r#disable_beaconing(&self) -> Self::DisableBeaconingResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
0x3303b30f99dbb406,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
WlanSoftmacBaseDisableBeaconingResult,
>(
(),
0x3303b30f99dbb406,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type InstallKeyResponseFut = fidl::client::QueryResponseFut<WlanSoftmacBaseInstallKeyResult>;
fn r#install_key(&self, mut payload: &WlanKeyConfiguration) -> Self::InstallKeyResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseInstallKeyResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
0x7decf9b4200b9131,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<WlanKeyConfiguration, WlanSoftmacBaseInstallKeyResult>(
payload,
0x7decf9b4200b9131,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type NotifyAssociationCompleteResponseFut =
fidl::client::QueryResponseFut<WlanSoftmacBaseNotifyAssociationCompleteResult>;
fn r#notify_association_complete(
&self,
mut assoc_cfg: &WlanAssociationConfig,
) -> Self::NotifyAssociationCompleteResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
0x436ffe3ba461d6cd,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
WlanSoftmacBaseNotifyAssociationCompleteRequest,
WlanSoftmacBaseNotifyAssociationCompleteResult,
>(
(assoc_cfg,),
0x436ffe3ba461d6cd,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type ClearAssociationResponseFut =
fidl::client::QueryResponseFut<WlanSoftmacBaseClearAssociationResult>;
fn r#clear_association(
&self,
mut payload: &WlanSoftmacBaseClearAssociationRequest,
) -> Self::ClearAssociationResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseClearAssociationResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
0x581d76c39190a7dd,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
WlanSoftmacBaseClearAssociationRequest,
WlanSoftmacBaseClearAssociationResult,
>(
payload,
0x581d76c39190a7dd,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type StartPassiveScanResponseFut =
fidl::client::QueryResponseFut<WlanSoftmacBaseStartPassiveScanResult>;
fn r#start_passive_scan(
&self,
mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
) -> Self::StartPassiveScanResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<WlanSoftmacBaseStartPassiveScanResponse, i32>,
0x5662f989cb4083bb,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
WlanSoftmacBaseStartPassiveScanRequest,
WlanSoftmacBaseStartPassiveScanResult,
>(
payload,
0x5662f989cb4083bb,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type StartActiveScanResponseFut =
fidl::client::QueryResponseFut<WlanSoftmacBaseStartActiveScanResult>;
fn r#start_active_scan(
&self,
mut payload: &WlanSoftmacStartActiveScanRequest,
) -> Self::StartActiveScanResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<WlanSoftmacBaseStartActiveScanResponse, i32>,
0x4896eafa9937751e,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
WlanSoftmacStartActiveScanRequest,
WlanSoftmacBaseStartActiveScanResult,
>(
payload,
0x4896eafa9937751e,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type CancelScanResponseFut = fidl::client::QueryResponseFut<WlanSoftmacBaseCancelScanResult>;
fn r#cancel_scan(
&self,
mut payload: &WlanSoftmacBaseCancelScanRequest,
) -> Self::CancelScanResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseCancelScanResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
0xf7d859369764556,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
WlanSoftmacBaseCancelScanRequest,
WlanSoftmacBaseCancelScanResult,
>(
payload,
0xf7d859369764556,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type UpdateWmmParametersResponseFut =
fidl::client::QueryResponseFut<WlanSoftmacBaseUpdateWmmParametersResult>;
fn r#update_wmm_parameters(
&self,
mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
) -> Self::UpdateWmmParametersResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
0x68522c7122d5f78c,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
WlanSoftmacBaseUpdateWmmParametersRequest,
WlanSoftmacBaseUpdateWmmParametersResult,
>(
payload,
0x68522c7122d5f78c,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
}
pub struct WlanSoftmacBaseEventStream {
event_receiver: fidl::client::EventReceiver,
}
impl std::marker::Unpin for WlanSoftmacBaseEventStream {}
impl futures::stream::FusedStream for WlanSoftmacBaseEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for WlanSoftmacBaseEventStream {
type Item = Result<WlanSoftmacBaseEvent, 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(WlanSoftmacBaseEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum WlanSoftmacBaseEvent {}
impl WlanSoftmacBaseEvent {
fn decode(mut buf: fidl::MessageBufEtc) -> Result<WlanSoftmacBaseEvent, 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:
<WlanSoftmacBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct WlanSoftmacBaseRequestStream {
inner: std::sync::Arc<fidl::ServeInner>,
is_terminated: bool,
}
impl std::marker::Unpin for WlanSoftmacBaseRequestStream {}
impl futures::stream::FusedStream for WlanSoftmacBaseRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for WlanSoftmacBaseRequestStream {
type Protocol = WlanSoftmacBaseMarker;
type ControlHandle = WlanSoftmacBaseControlHandle;
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 {
WlanSoftmacBaseControlHandle { inner: self.inner.clone() }
}
fn into_inner(self) -> (::std::sync::Arc<fidl::ServeInner>, bool) {
(self.inner, self.is_terminated)
}
fn from_inner(inner: std::sync::Arc<fidl::ServeInner>, is_terminated: bool) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for WlanSoftmacBaseRequestStream {
type Item = Result<WlanSoftmacBaseRequest, 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 WlanSoftmacBaseRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf(|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))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x18231a638e508f9d => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBaseRequest::Query {
responder: WlanSoftmacBaseQueryResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x16797affc0cb58ae => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBaseRequest::QueryDiscoverySupport {
responder: WlanSoftmacBaseQueryDiscoverySupportResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x7302c3f8c131f075 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBaseRequest::QueryMacSublayerSupport {
responder: WlanSoftmacBaseQueryMacSublayerSupportResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x3691bb75abf6354 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBaseRequest::QuerySecuritySupport {
responder: WlanSoftmacBaseQuerySecuritySupportResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x347d78dc1d4d27bf => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBaseRequest::QuerySpectrumManagementSupport {
responder: WlanSoftmacBaseQuerySpectrumManagementSupportResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x12836b533cd63ece => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacBaseSetChannelRequest);
fidl::encoding::Decoder::decode_into::<WlanSoftmacBaseSetChannelRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBaseRequest::SetChannel {
payload: req,
responder: WlanSoftmacBaseSetChannelResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x1336fb5455b77a6e => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacBaseJoinBssRequest);
fidl::encoding::Decoder::decode_into::<WlanSoftmacBaseJoinBssRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBaseRequest::JoinBss {
join_request: req.join_request,
responder: WlanSoftmacBaseJoinBssResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x6c35807632c64576 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacBaseEnableBeaconingRequest);
fidl::encoding::Decoder::decode_into::<WlanSoftmacBaseEnableBeaconingRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBaseRequest::EnableBeaconing {
payload: req,
responder: WlanSoftmacBaseEnableBeaconingResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x3303b30f99dbb406 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBaseRequest::DisableBeaconing {
responder: WlanSoftmacBaseDisableBeaconingResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x7decf9b4200b9131 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanKeyConfiguration);
fidl::encoding::Decoder::decode_into::<WlanKeyConfiguration>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBaseRequest::InstallKey {
payload: req,
responder: WlanSoftmacBaseInstallKeyResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x436ffe3ba461d6cd => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacBaseNotifyAssociationCompleteRequest);
fidl::encoding::Decoder::decode_into::<
WlanSoftmacBaseNotifyAssociationCompleteRequest,
>(&header, _body_bytes, handles, &mut req)?;
let control_handle = WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBaseRequest::NotifyAssociationComplete {
assoc_cfg: req.assoc_cfg,
responder: WlanSoftmacBaseNotifyAssociationCompleteResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x581d76c39190a7dd => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacBaseClearAssociationRequest);
fidl::encoding::Decoder::decode_into::<WlanSoftmacBaseClearAssociationRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBaseRequest::ClearAssociation {
payload: req,
responder: WlanSoftmacBaseClearAssociationResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x5662f989cb4083bb => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacBaseStartPassiveScanRequest);
fidl::encoding::Decoder::decode_into::<WlanSoftmacBaseStartPassiveScanRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBaseRequest::StartPassiveScan {
payload: req,
responder: WlanSoftmacBaseStartPassiveScanResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x4896eafa9937751e => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacStartActiveScanRequest);
fidl::encoding::Decoder::decode_into::<WlanSoftmacStartActiveScanRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBaseRequest::StartActiveScan {
payload: req,
responder: WlanSoftmacBaseStartActiveScanResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0xf7d859369764556 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacBaseCancelScanRequest);
fidl::encoding::Decoder::decode_into::<WlanSoftmacBaseCancelScanRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle = WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBaseRequest::CancelScan {
payload: req,
responder: WlanSoftmacBaseCancelScanResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x68522c7122d5f78c => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacBaseUpdateWmmParametersRequest);
fidl::encoding::Decoder::decode_into::<
WlanSoftmacBaseUpdateWmmParametersRequest,
>(&header, _body_bytes, handles, &mut req)?;
let control_handle = WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBaseRequest::UpdateWmmParameters {
payload: req,
responder: WlanSoftmacBaseUpdateWmmParametersResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name:
<WlanSoftmacBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
})
}
}
#[derive(Debug)]
pub enum WlanSoftmacBaseRequest {
Query { responder: WlanSoftmacBaseQueryResponder },
QueryDiscoverySupport { responder: WlanSoftmacBaseQueryDiscoverySupportResponder },
QueryMacSublayerSupport { responder: WlanSoftmacBaseQueryMacSublayerSupportResponder },
QuerySecuritySupport { responder: WlanSoftmacBaseQuerySecuritySupportResponder },
QuerySpectrumManagementSupport {
responder: WlanSoftmacBaseQuerySpectrumManagementSupportResponder,
},
SetChannel {
payload: WlanSoftmacBaseSetChannelRequest,
responder: WlanSoftmacBaseSetChannelResponder,
},
JoinBss {
join_request: fidl_fuchsia_wlan_common::JoinBssRequest,
responder: WlanSoftmacBaseJoinBssResponder,
},
EnableBeaconing {
payload: WlanSoftmacBaseEnableBeaconingRequest,
responder: WlanSoftmacBaseEnableBeaconingResponder,
},
DisableBeaconing { responder: WlanSoftmacBaseDisableBeaconingResponder },
InstallKey { payload: WlanKeyConfiguration, responder: WlanSoftmacBaseInstallKeyResponder },
NotifyAssociationComplete {
assoc_cfg: WlanAssociationConfig,
responder: WlanSoftmacBaseNotifyAssociationCompleteResponder,
},
ClearAssociation {
payload: WlanSoftmacBaseClearAssociationRequest,
responder: WlanSoftmacBaseClearAssociationResponder,
},
StartPassiveScan {
payload: WlanSoftmacBaseStartPassiveScanRequest,
responder: WlanSoftmacBaseStartPassiveScanResponder,
},
StartActiveScan {
payload: WlanSoftmacStartActiveScanRequest,
responder: WlanSoftmacBaseStartActiveScanResponder,
},
CancelScan {
payload: WlanSoftmacBaseCancelScanRequest,
responder: WlanSoftmacBaseCancelScanResponder,
},
UpdateWmmParameters {
payload: WlanSoftmacBaseUpdateWmmParametersRequest,
responder: WlanSoftmacBaseUpdateWmmParametersResponder,
},
}
impl WlanSoftmacBaseRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_query(self) -> Option<(WlanSoftmacBaseQueryResponder)> {
if let WlanSoftmacBaseRequest::Query { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_query_discovery_support(
self,
) -> Option<(WlanSoftmacBaseQueryDiscoverySupportResponder)> {
if let WlanSoftmacBaseRequest::QueryDiscoverySupport { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_query_mac_sublayer_support(
self,
) -> Option<(WlanSoftmacBaseQueryMacSublayerSupportResponder)> {
if let WlanSoftmacBaseRequest::QueryMacSublayerSupport { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_query_security_support(
self,
) -> Option<(WlanSoftmacBaseQuerySecuritySupportResponder)> {
if let WlanSoftmacBaseRequest::QuerySecuritySupport { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_query_spectrum_management_support(
self,
) -> Option<(WlanSoftmacBaseQuerySpectrumManagementSupportResponder)> {
if let WlanSoftmacBaseRequest::QuerySpectrumManagementSupport { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_set_channel(
self,
) -> Option<(WlanSoftmacBaseSetChannelRequest, WlanSoftmacBaseSetChannelResponder)> {
if let WlanSoftmacBaseRequest::SetChannel { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_join_bss(
self,
) -> Option<(fidl_fuchsia_wlan_common::JoinBssRequest, WlanSoftmacBaseJoinBssResponder)> {
if let WlanSoftmacBaseRequest::JoinBss { join_request, responder } = self {
Some((join_request, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_enable_beaconing(
self,
) -> Option<(WlanSoftmacBaseEnableBeaconingRequest, WlanSoftmacBaseEnableBeaconingResponder)>
{
if let WlanSoftmacBaseRequest::EnableBeaconing { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_disable_beaconing(self) -> Option<(WlanSoftmacBaseDisableBeaconingResponder)> {
if let WlanSoftmacBaseRequest::DisableBeaconing { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_install_key(
self,
) -> Option<(WlanKeyConfiguration, WlanSoftmacBaseInstallKeyResponder)> {
if let WlanSoftmacBaseRequest::InstallKey { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_notify_association_complete(
self,
) -> Option<(WlanAssociationConfig, WlanSoftmacBaseNotifyAssociationCompleteResponder)> {
if let WlanSoftmacBaseRequest::NotifyAssociationComplete { assoc_cfg, responder } = self {
Some((assoc_cfg, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_clear_association(
self,
) -> Option<(WlanSoftmacBaseClearAssociationRequest, WlanSoftmacBaseClearAssociationResponder)>
{
if let WlanSoftmacBaseRequest::ClearAssociation { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_start_passive_scan(
self,
) -> Option<(WlanSoftmacBaseStartPassiveScanRequest, WlanSoftmacBaseStartPassiveScanResponder)>
{
if let WlanSoftmacBaseRequest::StartPassiveScan { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_start_active_scan(
self,
) -> Option<(WlanSoftmacStartActiveScanRequest, WlanSoftmacBaseStartActiveScanResponder)> {
if let WlanSoftmacBaseRequest::StartActiveScan { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_cancel_scan(
self,
) -> Option<(WlanSoftmacBaseCancelScanRequest, WlanSoftmacBaseCancelScanResponder)> {
if let WlanSoftmacBaseRequest::CancelScan { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_update_wmm_parameters(
self,
) -> Option<(
WlanSoftmacBaseUpdateWmmParametersRequest,
WlanSoftmacBaseUpdateWmmParametersResponder,
)> {
if let WlanSoftmacBaseRequest::UpdateWmmParameters { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
WlanSoftmacBaseRequest::Query { .. } => "query",
WlanSoftmacBaseRequest::QueryDiscoverySupport { .. } => "query_discovery_support",
WlanSoftmacBaseRequest::QueryMacSublayerSupport { .. } => "query_mac_sublayer_support",
WlanSoftmacBaseRequest::QuerySecuritySupport { .. } => "query_security_support",
WlanSoftmacBaseRequest::QuerySpectrumManagementSupport { .. } => {
"query_spectrum_management_support"
}
WlanSoftmacBaseRequest::SetChannel { .. } => "set_channel",
WlanSoftmacBaseRequest::JoinBss { .. } => "join_bss",
WlanSoftmacBaseRequest::EnableBeaconing { .. } => "enable_beaconing",
WlanSoftmacBaseRequest::DisableBeaconing { .. } => "disable_beaconing",
WlanSoftmacBaseRequest::InstallKey { .. } => "install_key",
WlanSoftmacBaseRequest::NotifyAssociationComplete { .. } => {
"notify_association_complete"
}
WlanSoftmacBaseRequest::ClearAssociation { .. } => "clear_association",
WlanSoftmacBaseRequest::StartPassiveScan { .. } => "start_passive_scan",
WlanSoftmacBaseRequest::StartActiveScan { .. } => "start_active_scan",
WlanSoftmacBaseRequest::CancelScan { .. } => "cancel_scan",
WlanSoftmacBaseRequest::UpdateWmmParameters { .. } => "update_wmm_parameters",
}
}
}
#[derive(Debug, Clone)]
pub struct WlanSoftmacBaseControlHandle {
inner: std::sync::Arc<fidl::ServeInner>,
}
impl fidl::endpoints::ControlHandle for WlanSoftmacBaseControlHandle {
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()
}
}
impl WlanSoftmacBaseControlHandle {}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBaseQueryResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBaseQueryResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBaseQueryResponder {
type ControlHandle = WlanSoftmacBaseControlHandle;
fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBaseQueryResponder {
pub fn send(
self,
mut result: Result<&WlanSoftmacQueryResponse, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<&WlanSoftmacQueryResponse, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut result: Result<&WlanSoftmacQueryResponse, i32>,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>>(
result,
self.tx_id,
0x18231a638e508f9d,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBaseQueryDiscoverySupportResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBaseQueryDiscoverySupportResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBaseQueryDiscoverySupportResponder {
type ControlHandle = WlanSoftmacBaseControlHandle;
fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBaseQueryDiscoverySupportResponder {
pub fn send(
self,
mut result: Result<&fidl_fuchsia_wlan_common::DiscoverySupport, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<&fidl_fuchsia_wlan_common::DiscoverySupport, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut result: Result<&fidl_fuchsia_wlan_common::DiscoverySupport, i32>,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<
WlanSoftmacBaseQueryDiscoverySupportResponse,
i32,
>>(
result.map(|resp| (resp,)),
self.tx_id,
0x16797affc0cb58ae,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBaseQueryMacSublayerSupportResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBaseQueryMacSublayerSupportResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBaseQueryMacSublayerSupportResponder {
type ControlHandle = WlanSoftmacBaseControlHandle;
fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBaseQueryMacSublayerSupportResponder {
pub fn send(
self,
mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<
WlanSoftmacBaseQueryMacSublayerSupportResponse,
i32,
>>(
result.map(|resp| (resp,)),
self.tx_id,
0x7302c3f8c131f075,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBaseQuerySecuritySupportResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBaseQuerySecuritySupportResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBaseQuerySecuritySupportResponder {
type ControlHandle = WlanSoftmacBaseControlHandle;
fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBaseQuerySecuritySupportResponder {
pub fn send(
self,
mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<
WlanSoftmacBaseQuerySecuritySupportResponse,
i32,
>>(
result.map(|resp| (resp,)),
self.tx_id,
0x3691bb75abf6354,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBaseQuerySpectrumManagementSupportResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBaseQuerySpectrumManagementSupportResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBaseQuerySpectrumManagementSupportResponder {
type ControlHandle = WlanSoftmacBaseControlHandle;
fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBaseQuerySpectrumManagementSupportResponder {
pub fn send(
self,
mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<
WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
i32,
>>(
result.map(|resp| (resp,)),
self.tx_id,
0x347d78dc1d4d27bf,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBaseSetChannelResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBaseSetChannelResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBaseSetChannelResponder {
type ControlHandle = WlanSoftmacBaseControlHandle;
fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBaseSetChannelResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0x12836b533cd63ece,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBaseJoinBssResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBaseJoinBssResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBaseJoinBssResponder {
type ControlHandle = WlanSoftmacBaseControlHandle;
fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBaseJoinBssResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0x1336fb5455b77a6e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBaseEnableBeaconingResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBaseEnableBeaconingResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBaseEnableBeaconingResponder {
type ControlHandle = WlanSoftmacBaseControlHandle;
fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBaseEnableBeaconingResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0x6c35807632c64576,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBaseDisableBeaconingResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBaseDisableBeaconingResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBaseDisableBeaconingResponder {
type ControlHandle = WlanSoftmacBaseControlHandle;
fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBaseDisableBeaconingResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0x3303b30f99dbb406,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBaseInstallKeyResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBaseInstallKeyResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBaseInstallKeyResponder {
type ControlHandle = WlanSoftmacBaseControlHandle;
fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBaseInstallKeyResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0x7decf9b4200b9131,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBaseNotifyAssociationCompleteResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBaseNotifyAssociationCompleteResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBaseNotifyAssociationCompleteResponder {
type ControlHandle = WlanSoftmacBaseControlHandle;
fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBaseNotifyAssociationCompleteResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0x436ffe3ba461d6cd,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBaseClearAssociationResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBaseClearAssociationResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBaseClearAssociationResponder {
type ControlHandle = WlanSoftmacBaseControlHandle;
fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBaseClearAssociationResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0x581d76c39190a7dd,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBaseStartPassiveScanResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBaseStartPassiveScanResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBaseStartPassiveScanResponder {
type ControlHandle = WlanSoftmacBaseControlHandle;
fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBaseStartPassiveScanResponder {
pub fn send(
self,
mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<
WlanSoftmacBaseStartPassiveScanResponse,
i32,
>>(
result,
self.tx_id,
0x5662f989cb4083bb,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBaseStartActiveScanResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBaseStartActiveScanResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBaseStartActiveScanResponder {
type ControlHandle = WlanSoftmacBaseControlHandle;
fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBaseStartActiveScanResponder {
pub fn send(
self,
mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<
WlanSoftmacBaseStartActiveScanResponse,
i32,
>>(
result,
self.tx_id,
0x4896eafa9937751e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBaseCancelScanResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBaseCancelScanResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBaseCancelScanResponder {
type ControlHandle = WlanSoftmacBaseControlHandle;
fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBaseCancelScanResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0xf7d859369764556,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBaseUpdateWmmParametersResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBaseUpdateWmmParametersResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBaseUpdateWmmParametersResponder {
type ControlHandle = WlanSoftmacBaseControlHandle;
fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBaseUpdateWmmParametersResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0x68522c7122d5f78c,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct WlanSoftmacBridgeMarker;
impl fidl::endpoints::ProtocolMarker for WlanSoftmacBridgeMarker {
type Proxy = WlanSoftmacBridgeProxy;
type RequestStream = WlanSoftmacBridgeRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = WlanSoftmacBridgeSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) WlanSoftmacBridge";
}
pub type WlanSoftmacBridgeStartResult = Result<fidl::Channel, i32>;
pub trait WlanSoftmacBridgeProxyInterface: Send + Sync {
type QueryResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseQueryResult, fidl::Error>>
+ Send;
fn r#query(&self) -> Self::QueryResponseFut;
type QueryDiscoverySupportResponseFut: std::future::Future<
Output = Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error>,
> + Send;
fn r#query_discovery_support(&self) -> Self::QueryDiscoverySupportResponseFut;
type QueryMacSublayerSupportResponseFut: std::future::Future<
Output = Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error>,
> + Send;
fn r#query_mac_sublayer_support(&self) -> Self::QueryMacSublayerSupportResponseFut;
type QuerySecuritySupportResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error>>
+ Send;
fn r#query_security_support(&self) -> Self::QuerySecuritySupportResponseFut;
type QuerySpectrumManagementSupportResponseFut: std::future::Future<
Output = Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error>,
> + Send;
fn r#query_spectrum_management_support(
&self,
) -> Self::QuerySpectrumManagementSupportResponseFut;
type SetChannelResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseSetChannelResult, fidl::Error>>
+ Send;
fn r#set_channel(
&self,
payload: &WlanSoftmacBaseSetChannelRequest,
) -> Self::SetChannelResponseFut;
type JoinBssResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseJoinBssResult, fidl::Error>>
+ Send;
fn r#join_bss(
&self,
join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
) -> Self::JoinBssResponseFut;
type EnableBeaconingResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error>>
+ Send;
fn r#enable_beaconing(
&self,
payload: &WlanSoftmacBaseEnableBeaconingRequest,
) -> Self::EnableBeaconingResponseFut;
type DisableBeaconingResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error>>
+ Send;
fn r#disable_beaconing(&self) -> Self::DisableBeaconingResponseFut;
type InstallKeyResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseInstallKeyResult, fidl::Error>>
+ Send;
fn r#install_key(&self, payload: &WlanKeyConfiguration) -> Self::InstallKeyResponseFut;
type NotifyAssociationCompleteResponseFut: std::future::Future<
Output = Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error>,
> + Send;
fn r#notify_association_complete(
&self,
assoc_cfg: &WlanAssociationConfig,
) -> Self::NotifyAssociationCompleteResponseFut;
type ClearAssociationResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseClearAssociationResult, fidl::Error>>
+ Send;
fn r#clear_association(
&self,
payload: &WlanSoftmacBaseClearAssociationRequest,
) -> Self::ClearAssociationResponseFut;
type StartPassiveScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error>>
+ Send;
fn r#start_passive_scan(
&self,
payload: &WlanSoftmacBaseStartPassiveScanRequest,
) -> Self::StartPassiveScanResponseFut;
type StartActiveScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error>>
+ Send;
fn r#start_active_scan(
&self,
payload: &WlanSoftmacStartActiveScanRequest,
) -> Self::StartActiveScanResponseFut;
type CancelScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseCancelScanResult, fidl::Error>>
+ Send;
fn r#cancel_scan(
&self,
payload: &WlanSoftmacBaseCancelScanRequest,
) -> Self::CancelScanResponseFut;
type UpdateWmmParametersResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error>>
+ Send;
fn r#update_wmm_parameters(
&self,
payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
) -> Self::UpdateWmmParametersResponseFut;
type StartResponseFut: std::future::Future<Output = Result<WlanSoftmacBridgeStartResult, fidl::Error>>
+ Send;
fn r#start(
&self,
ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
frame_processor: u64,
) -> Self::StartResponseFut;
type SetEthernetStatusResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#set_ethernet_status(&self, status: u32) -> Self::SetEthernetStatusResponseFut;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct WlanSoftmacBridgeSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for WlanSoftmacBridgeSynchronousProxy {
type Proxy = WlanSoftmacBridgeProxy;
type Protocol = WlanSoftmacBridgeMarker;
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 WlanSoftmacBridgeSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name =
<WlanSoftmacBridgeMarker 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::Time,
) -> Result<WlanSoftmacBridgeEvent, fidl::Error> {
WlanSoftmacBridgeEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#query(
&self,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseQueryResult, fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>,
>(
(),
0x18231a638e508f9d,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#query_discovery_support(
&self,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
WlanSoftmacBaseQueryDiscoverySupportResponse,
i32,
>>(
(),
0x16797affc0cb58ae,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.resp))
}
pub fn r#query_mac_sublayer_support(
&self,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
WlanSoftmacBaseQueryMacSublayerSupportResponse,
i32,
>>(
(),
0x7302c3f8c131f075,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.resp))
}
pub fn r#query_security_support(
&self,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
WlanSoftmacBaseQuerySecuritySupportResponse,
i32,
>>(
(),
0x3691bb75abf6354,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.resp))
}
pub fn r#query_spectrum_management_support(
&self,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error> {
let _response = self
.client
.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
i32,
>>(
(), 0x347d78dc1d4d27bf, fidl::encoding::DynamicFlags::empty(), ___deadline
)?;
Ok(_response.map(|x| x.resp))
}
pub fn r#set_channel(
&self,
mut payload: &WlanSoftmacBaseSetChannelRequest,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseSetChannelResult, fidl::Error> {
let _response = self.client.send_query::<
WlanSoftmacBaseSetChannelRequest,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
payload,
0x12836b533cd63ece,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#join_bss(
&self,
mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseJoinBssResult, fidl::Error> {
let _response = self.client.send_query::<
WlanSoftmacBaseJoinBssRequest,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
(join_request,),
0x1336fb5455b77a6e,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#enable_beaconing(
&self,
mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error> {
let _response = self.client.send_query::<
WlanSoftmacBaseEnableBeaconingRequest,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
payload,
0x6c35807632c64576,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#disable_beaconing(
&self,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
(),
0x3303b30f99dbb406,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#install_key(
&self,
mut payload: &WlanKeyConfiguration,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseInstallKeyResult, fidl::Error> {
let _response = self.client.send_query::<
WlanKeyConfiguration,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
payload,
0x7decf9b4200b9131,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#notify_association_complete(
&self,
mut assoc_cfg: &WlanAssociationConfig,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error> {
let _response = self.client.send_query::<
WlanSoftmacBaseNotifyAssociationCompleteRequest,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
(assoc_cfg,),
0x436ffe3ba461d6cd,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#clear_association(
&self,
mut payload: &WlanSoftmacBaseClearAssociationRequest,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseClearAssociationResult, fidl::Error> {
let _response = self.client.send_query::<
WlanSoftmacBaseClearAssociationRequest,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
payload,
0x581d76c39190a7dd,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#start_passive_scan(
&self,
mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error> {
let _response = self.client.send_query::<
WlanSoftmacBaseStartPassiveScanRequest,
fidl::encoding::ResultType<WlanSoftmacBaseStartPassiveScanResponse, i32>,
>(
payload,
0x5662f989cb4083bb,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#start_active_scan(
&self,
mut payload: &WlanSoftmacStartActiveScanRequest,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error> {
let _response = self.client.send_query::<
WlanSoftmacStartActiveScanRequest,
fidl::encoding::ResultType<WlanSoftmacBaseStartActiveScanResponse, i32>,
>(
payload,
0x4896eafa9937751e,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#cancel_scan(
&self,
mut payload: &WlanSoftmacBaseCancelScanRequest,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseCancelScanResult, fidl::Error> {
let _response = self.client.send_query::<
WlanSoftmacBaseCancelScanRequest,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
payload,
0xf7d859369764556,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#update_wmm_parameters(
&self,
mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
___deadline: zx::Time,
) -> Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error> {
let _response = self.client.send_query::<
WlanSoftmacBaseUpdateWmmParametersRequest,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
payload,
0x68522c7122d5f78c,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#start(
&self,
mut ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
mut frame_processor: u64,
___deadline: zx::Time,
) -> Result<WlanSoftmacBridgeStartResult, fidl::Error> {
let _response = self.client.send_query::<
WlanSoftmacBridgeStartRequest,
fidl::encoding::ResultType<WlanSoftmacBridgeStartResponse, i32>,
>(
(ifc_bridge, frame_processor,),
0x7b2c15a507020d4d,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.sme_channel))
}
pub fn r#set_ethernet_status(
&self,
mut status: u32,
___deadline: zx::Time,
) -> Result<(), fidl::Error> {
let _response = self
.client
.send_query::<WlanSoftmacBridgeSetEthernetStatusRequest, fidl::encoding::EmptyPayload>(
(status,),
0x412503cb3aaa350b,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
}
#[derive(Debug, Clone)]
pub struct WlanSoftmacBridgeProxy {
client: fidl::client::Client,
}
impl fidl::endpoints::Proxy for WlanSoftmacBridgeProxy {
type Protocol = WlanSoftmacBridgeMarker;
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 WlanSoftmacBridgeProxy {
pub fn new(channel: fidl::AsyncChannel) -> Self {
let protocol_name =
<WlanSoftmacBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> WlanSoftmacBridgeEventStream {
WlanSoftmacBridgeEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#query(&self) -> fidl::client::QueryResponseFut<WlanSoftmacBaseQueryResult> {
WlanSoftmacBridgeProxyInterface::r#query(self)
}
pub fn r#query_discovery_support(
&self,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseQueryDiscoverySupportResult> {
WlanSoftmacBridgeProxyInterface::r#query_discovery_support(self)
}
pub fn r#query_mac_sublayer_support(
&self,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseQueryMacSublayerSupportResult> {
WlanSoftmacBridgeProxyInterface::r#query_mac_sublayer_support(self)
}
pub fn r#query_security_support(
&self,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseQuerySecuritySupportResult> {
WlanSoftmacBridgeProxyInterface::r#query_security_support(self)
}
pub fn r#query_spectrum_management_support(
&self,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseQuerySpectrumManagementSupportResult> {
WlanSoftmacBridgeProxyInterface::r#query_spectrum_management_support(self)
}
pub fn r#set_channel(
&self,
mut payload: &WlanSoftmacBaseSetChannelRequest,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseSetChannelResult> {
WlanSoftmacBridgeProxyInterface::r#set_channel(self, payload)
}
pub fn r#join_bss(
&self,
mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseJoinBssResult> {
WlanSoftmacBridgeProxyInterface::r#join_bss(self, join_request)
}
pub fn r#enable_beaconing(
&self,
mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseEnableBeaconingResult> {
WlanSoftmacBridgeProxyInterface::r#enable_beaconing(self, payload)
}
pub fn r#disable_beaconing(
&self,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseDisableBeaconingResult> {
WlanSoftmacBridgeProxyInterface::r#disable_beaconing(self)
}
pub fn r#install_key(
&self,
mut payload: &WlanKeyConfiguration,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseInstallKeyResult> {
WlanSoftmacBridgeProxyInterface::r#install_key(self, payload)
}
pub fn r#notify_association_complete(
&self,
mut assoc_cfg: &WlanAssociationConfig,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseNotifyAssociationCompleteResult> {
WlanSoftmacBridgeProxyInterface::r#notify_association_complete(self, assoc_cfg)
}
pub fn r#clear_association(
&self,
mut payload: &WlanSoftmacBaseClearAssociationRequest,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseClearAssociationResult> {
WlanSoftmacBridgeProxyInterface::r#clear_association(self, payload)
}
pub fn r#start_passive_scan(
&self,
mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseStartPassiveScanResult> {
WlanSoftmacBridgeProxyInterface::r#start_passive_scan(self, payload)
}
pub fn r#start_active_scan(
&self,
mut payload: &WlanSoftmacStartActiveScanRequest,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseStartActiveScanResult> {
WlanSoftmacBridgeProxyInterface::r#start_active_scan(self, payload)
}
pub fn r#cancel_scan(
&self,
mut payload: &WlanSoftmacBaseCancelScanRequest,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseCancelScanResult> {
WlanSoftmacBridgeProxyInterface::r#cancel_scan(self, payload)
}
pub fn r#update_wmm_parameters(
&self,
mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
) -> fidl::client::QueryResponseFut<WlanSoftmacBaseUpdateWmmParametersResult> {
WlanSoftmacBridgeProxyInterface::r#update_wmm_parameters(self, payload)
}
pub fn r#start(
&self,
mut ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
mut frame_processor: u64,
) -> fidl::client::QueryResponseFut<WlanSoftmacBridgeStartResult> {
WlanSoftmacBridgeProxyInterface::r#start(self, ifc_bridge, frame_processor)
}
pub fn r#set_ethernet_status(&self, mut status: u32) -> fidl::client::QueryResponseFut<()> {
WlanSoftmacBridgeProxyInterface::r#set_ethernet_status(self, status)
}
}
impl WlanSoftmacBridgeProxyInterface for WlanSoftmacBridgeProxy {
type QueryResponseFut = fidl::client::QueryResponseFut<WlanSoftmacBaseQueryResult>;
fn r#query(&self) -> Self::QueryResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseQueryResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>,
0x18231a638e508f9d,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client
.send_query_and_decode::<fidl::encoding::EmptyPayload, WlanSoftmacBaseQueryResult>(
(),
0x18231a638e508f9d,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type QueryDiscoverySupportResponseFut =
fidl::client::QueryResponseFut<WlanSoftmacBaseQueryDiscoverySupportResult>;
fn r#query_discovery_support(&self) -> Self::QueryDiscoverySupportResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<WlanSoftmacBaseQueryDiscoverySupportResponse, i32>,
0x16797affc0cb58ae,
>(_buf?)?;
Ok(_response.map(|x| x.resp))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
WlanSoftmacBaseQueryDiscoverySupportResult,
>(
(),
0x16797affc0cb58ae,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type QueryMacSublayerSupportResponseFut =
fidl::client::QueryResponseFut<WlanSoftmacBaseQueryMacSublayerSupportResult>;
fn r#query_mac_sublayer_support(&self) -> Self::QueryMacSublayerSupportResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<WlanSoftmacBaseQueryMacSublayerSupportResponse, i32>,
0x7302c3f8c131f075,
>(_buf?)?;
Ok(_response.map(|x| x.resp))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
WlanSoftmacBaseQueryMacSublayerSupportResult,
>(
(),
0x7302c3f8c131f075,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type QuerySecuritySupportResponseFut =
fidl::client::QueryResponseFut<WlanSoftmacBaseQuerySecuritySupportResult>;
fn r#query_security_support(&self) -> Self::QuerySecuritySupportResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<WlanSoftmacBaseQuerySecuritySupportResponse, i32>,
0x3691bb75abf6354,
>(_buf?)?;
Ok(_response.map(|x| x.resp))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
WlanSoftmacBaseQuerySecuritySupportResult,
>(
(),
0x3691bb75abf6354,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type QuerySpectrumManagementSupportResponseFut =
fidl::client::QueryResponseFut<WlanSoftmacBaseQuerySpectrumManagementSupportResult>;
fn r#query_spectrum_management_support(
&self,
) -> Self::QuerySpectrumManagementSupportResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<
WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
i32,
>,
0x347d78dc1d4d27bf,
>(_buf?)?;
Ok(_response.map(|x| x.resp))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
WlanSoftmacBaseQuerySpectrumManagementSupportResult,
>(
(),
0x347d78dc1d4d27bf,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type SetChannelResponseFut = fidl::client::QueryResponseFut<WlanSoftmacBaseSetChannelResult>;
fn r#set_channel(
&self,
mut payload: &WlanSoftmacBaseSetChannelRequest,
) -> Self::SetChannelResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseSetChannelResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
0x12836b533cd63ece,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
WlanSoftmacBaseSetChannelRequest,
WlanSoftmacBaseSetChannelResult,
>(
payload,
0x12836b533cd63ece,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type JoinBssResponseFut = fidl::client::QueryResponseFut<WlanSoftmacBaseJoinBssResult>;
fn r#join_bss(
&self,
mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
) -> Self::JoinBssResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseJoinBssResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
0x1336fb5455b77a6e,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client
.send_query_and_decode::<WlanSoftmacBaseJoinBssRequest, WlanSoftmacBaseJoinBssResult>(
(join_request,),
0x1336fb5455b77a6e,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type EnableBeaconingResponseFut =
fidl::client::QueryResponseFut<WlanSoftmacBaseEnableBeaconingResult>;
fn r#enable_beaconing(
&self,
mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
) -> Self::EnableBeaconingResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
0x6c35807632c64576,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
WlanSoftmacBaseEnableBeaconingRequest,
WlanSoftmacBaseEnableBeaconingResult,
>(
payload,
0x6c35807632c64576,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type DisableBeaconingResponseFut =
fidl::client::QueryResponseFut<WlanSoftmacBaseDisableBeaconingResult>;
fn r#disable_beaconing(&self) -> Self::DisableBeaconingResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
0x3303b30f99dbb406,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
WlanSoftmacBaseDisableBeaconingResult,
>(
(),
0x3303b30f99dbb406,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type InstallKeyResponseFut = fidl::client::QueryResponseFut<WlanSoftmacBaseInstallKeyResult>;
fn r#install_key(&self, mut payload: &WlanKeyConfiguration) -> Self::InstallKeyResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseInstallKeyResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
0x7decf9b4200b9131,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<WlanKeyConfiguration, WlanSoftmacBaseInstallKeyResult>(
payload,
0x7decf9b4200b9131,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type NotifyAssociationCompleteResponseFut =
fidl::client::QueryResponseFut<WlanSoftmacBaseNotifyAssociationCompleteResult>;
fn r#notify_association_complete(
&self,
mut assoc_cfg: &WlanAssociationConfig,
) -> Self::NotifyAssociationCompleteResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
0x436ffe3ba461d6cd,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
WlanSoftmacBaseNotifyAssociationCompleteRequest,
WlanSoftmacBaseNotifyAssociationCompleteResult,
>(
(assoc_cfg,),
0x436ffe3ba461d6cd,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type ClearAssociationResponseFut =
fidl::client::QueryResponseFut<WlanSoftmacBaseClearAssociationResult>;
fn r#clear_association(
&self,
mut payload: &WlanSoftmacBaseClearAssociationRequest,
) -> Self::ClearAssociationResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseClearAssociationResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
0x581d76c39190a7dd,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
WlanSoftmacBaseClearAssociationRequest,
WlanSoftmacBaseClearAssociationResult,
>(
payload,
0x581d76c39190a7dd,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type StartPassiveScanResponseFut =
fidl::client::QueryResponseFut<WlanSoftmacBaseStartPassiveScanResult>;
fn r#start_passive_scan(
&self,
mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
) -> Self::StartPassiveScanResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<WlanSoftmacBaseStartPassiveScanResponse, i32>,
0x5662f989cb4083bb,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
WlanSoftmacBaseStartPassiveScanRequest,
WlanSoftmacBaseStartPassiveScanResult,
>(
payload,
0x5662f989cb4083bb,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type StartActiveScanResponseFut =
fidl::client::QueryResponseFut<WlanSoftmacBaseStartActiveScanResult>;
fn r#start_active_scan(
&self,
mut payload: &WlanSoftmacStartActiveScanRequest,
) -> Self::StartActiveScanResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<WlanSoftmacBaseStartActiveScanResponse, i32>,
0x4896eafa9937751e,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
WlanSoftmacStartActiveScanRequest,
WlanSoftmacBaseStartActiveScanResult,
>(
payload,
0x4896eafa9937751e,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type CancelScanResponseFut = fidl::client::QueryResponseFut<WlanSoftmacBaseCancelScanResult>;
fn r#cancel_scan(
&self,
mut payload: &WlanSoftmacBaseCancelScanRequest,
) -> Self::CancelScanResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseCancelScanResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
0xf7d859369764556,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
WlanSoftmacBaseCancelScanRequest,
WlanSoftmacBaseCancelScanResult,
>(
payload,
0xf7d859369764556,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type UpdateWmmParametersResponseFut =
fidl::client::QueryResponseFut<WlanSoftmacBaseUpdateWmmParametersResult>;
fn r#update_wmm_parameters(
&self,
mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
) -> Self::UpdateWmmParametersResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
0x68522c7122d5f78c,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
WlanSoftmacBaseUpdateWmmParametersRequest,
WlanSoftmacBaseUpdateWmmParametersResult,
>(
payload,
0x68522c7122d5f78c,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type StartResponseFut = fidl::client::QueryResponseFut<WlanSoftmacBridgeStartResult>;
fn r#start(
&self,
mut ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
mut frame_processor: u64,
) -> Self::StartResponseFut {
fn _decode(
mut _buf: Result<fidl::MessageBufEtc, fidl::Error>,
) -> Result<WlanSoftmacBridgeStartResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<WlanSoftmacBridgeStartResponse, i32>,
0x7b2c15a507020d4d,
>(_buf?)?;
Ok(_response.map(|x| x.sme_channel))
}
self.client
.send_query_and_decode::<WlanSoftmacBridgeStartRequest, WlanSoftmacBridgeStartResult>(
(ifc_bridge, frame_processor),
0x7b2c15a507020d4d,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type SetEthernetStatusResponseFut = fidl::client::QueryResponseFut<()>;
fn r#set_ethernet_status(&self, mut status: u32) -> Self::SetEthernetStatusResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::EmptyPayload,
0x412503cb3aaa350b,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<WlanSoftmacBridgeSetEthernetStatusRequest, ()>(
(status,),
0x412503cb3aaa350b,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
}
pub struct WlanSoftmacBridgeEventStream {
event_receiver: fidl::client::EventReceiver,
}
impl std::marker::Unpin for WlanSoftmacBridgeEventStream {}
impl futures::stream::FusedStream for WlanSoftmacBridgeEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for WlanSoftmacBridgeEventStream {
type Item = Result<WlanSoftmacBridgeEvent, 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(WlanSoftmacBridgeEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum WlanSoftmacBridgeEvent {}
impl WlanSoftmacBridgeEvent {
fn decode(mut buf: fidl::MessageBufEtc) -> Result<WlanSoftmacBridgeEvent, 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:
<WlanSoftmacBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct WlanSoftmacBridgeRequestStream {
inner: std::sync::Arc<fidl::ServeInner>,
is_terminated: bool,
}
impl std::marker::Unpin for WlanSoftmacBridgeRequestStream {}
impl futures::stream::FusedStream for WlanSoftmacBridgeRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for WlanSoftmacBridgeRequestStream {
type Protocol = WlanSoftmacBridgeMarker;
type ControlHandle = WlanSoftmacBridgeControlHandle;
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 {
WlanSoftmacBridgeControlHandle { inner: self.inner.clone() }
}
fn into_inner(self) -> (::std::sync::Arc<fidl::ServeInner>, bool) {
(self.inner, self.is_terminated)
}
fn from_inner(inner: std::sync::Arc<fidl::ServeInner>, is_terminated: bool) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for WlanSoftmacBridgeRequestStream {
type Item = Result<WlanSoftmacBridgeRequest, 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 WlanSoftmacBridgeRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf(|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))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x18231a638e508f9d => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBridgeRequest::Query {
responder: WlanSoftmacBridgeQueryResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x16797affc0cb58ae => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBridgeRequest::QueryDiscoverySupport {
responder: WlanSoftmacBridgeQueryDiscoverySupportResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x7302c3f8c131f075 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBridgeRequest::QueryMacSublayerSupport {
responder: WlanSoftmacBridgeQueryMacSublayerSupportResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x3691bb75abf6354 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBridgeRequest::QuerySecuritySupport {
responder: WlanSoftmacBridgeQuerySecuritySupportResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x347d78dc1d4d27bf => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBridgeRequest::QuerySpectrumManagementSupport {
responder: WlanSoftmacBridgeQuerySpectrumManagementSupportResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x12836b533cd63ece => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacBaseSetChannelRequest);
fidl::encoding::Decoder::decode_into::<WlanSoftmacBaseSetChannelRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBridgeRequest::SetChannel {
payload: req,
responder: WlanSoftmacBridgeSetChannelResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x1336fb5455b77a6e => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacBaseJoinBssRequest);
fidl::encoding::Decoder::decode_into::<WlanSoftmacBaseJoinBssRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBridgeRequest::JoinBss {
join_request: req.join_request,
responder: WlanSoftmacBridgeJoinBssResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x6c35807632c64576 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacBaseEnableBeaconingRequest);
fidl::encoding::Decoder::decode_into::<WlanSoftmacBaseEnableBeaconingRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBridgeRequest::EnableBeaconing {
payload: req,
responder: WlanSoftmacBridgeEnableBeaconingResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x3303b30f99dbb406 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBridgeRequest::DisableBeaconing {
responder: WlanSoftmacBridgeDisableBeaconingResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x7decf9b4200b9131 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanKeyConfiguration);
fidl::encoding::Decoder::decode_into::<WlanKeyConfiguration>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBridgeRequest::InstallKey {
payload: req,
responder: WlanSoftmacBridgeInstallKeyResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x436ffe3ba461d6cd => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacBaseNotifyAssociationCompleteRequest);
fidl::encoding::Decoder::decode_into::<
WlanSoftmacBaseNotifyAssociationCompleteRequest,
>(&header, _body_bytes, handles, &mut req)?;
let control_handle =
WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBridgeRequest::NotifyAssociationComplete {
assoc_cfg: req.assoc_cfg,
responder: WlanSoftmacBridgeNotifyAssociationCompleteResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x581d76c39190a7dd => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacBaseClearAssociationRequest);
fidl::encoding::Decoder::decode_into::<WlanSoftmacBaseClearAssociationRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBridgeRequest::ClearAssociation {
payload: req,
responder: WlanSoftmacBridgeClearAssociationResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x5662f989cb4083bb => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacBaseStartPassiveScanRequest);
fidl::encoding::Decoder::decode_into::<WlanSoftmacBaseStartPassiveScanRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBridgeRequest::StartPassiveScan {
payload: req,
responder: WlanSoftmacBridgeStartPassiveScanResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x4896eafa9937751e => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacStartActiveScanRequest);
fidl::encoding::Decoder::decode_into::<WlanSoftmacStartActiveScanRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBridgeRequest::StartActiveScan {
payload: req,
responder: WlanSoftmacBridgeStartActiveScanResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0xf7d859369764556 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacBaseCancelScanRequest);
fidl::encoding::Decoder::decode_into::<WlanSoftmacBaseCancelScanRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBridgeRequest::CancelScan {
payload: req,
responder: WlanSoftmacBridgeCancelScanResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x68522c7122d5f78c => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacBaseUpdateWmmParametersRequest);
fidl::encoding::Decoder::decode_into::<
WlanSoftmacBaseUpdateWmmParametersRequest,
>(&header, _body_bytes, handles, &mut req)?;
let control_handle =
WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBridgeRequest::UpdateWmmParameters {
payload: req,
responder: WlanSoftmacBridgeUpdateWmmParametersResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x7b2c15a507020d4d => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacBridgeStartRequest);
fidl::encoding::Decoder::decode_into::<WlanSoftmacBridgeStartRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBridgeRequest::Start {
ifc_bridge: req.ifc_bridge,
frame_processor: req.frame_processor,
responder: WlanSoftmacBridgeStartResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x412503cb3aaa350b => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacBridgeSetEthernetStatusRequest);
fidl::encoding::Decoder::decode_into::<
WlanSoftmacBridgeSetEthernetStatusRequest,
>(&header, _body_bytes, handles, &mut req)?;
let control_handle =
WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacBridgeRequest::SetEthernetStatus {
status: req.status,
responder: WlanSoftmacBridgeSetEthernetStatusResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name:
<WlanSoftmacBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
})
}
}
#[derive(Debug)]
pub enum WlanSoftmacBridgeRequest {
Query { responder: WlanSoftmacBridgeQueryResponder },
QueryDiscoverySupport { responder: WlanSoftmacBridgeQueryDiscoverySupportResponder },
QueryMacSublayerSupport { responder: WlanSoftmacBridgeQueryMacSublayerSupportResponder },
QuerySecuritySupport { responder: WlanSoftmacBridgeQuerySecuritySupportResponder },
QuerySpectrumManagementSupport {
responder: WlanSoftmacBridgeQuerySpectrumManagementSupportResponder,
},
SetChannel {
payload: WlanSoftmacBaseSetChannelRequest,
responder: WlanSoftmacBridgeSetChannelResponder,
},
JoinBss {
join_request: fidl_fuchsia_wlan_common::JoinBssRequest,
responder: WlanSoftmacBridgeJoinBssResponder,
},
EnableBeaconing {
payload: WlanSoftmacBaseEnableBeaconingRequest,
responder: WlanSoftmacBridgeEnableBeaconingResponder,
},
DisableBeaconing { responder: WlanSoftmacBridgeDisableBeaconingResponder },
InstallKey { payload: WlanKeyConfiguration, responder: WlanSoftmacBridgeInstallKeyResponder },
NotifyAssociationComplete {
assoc_cfg: WlanAssociationConfig,
responder: WlanSoftmacBridgeNotifyAssociationCompleteResponder,
},
ClearAssociation {
payload: WlanSoftmacBaseClearAssociationRequest,
responder: WlanSoftmacBridgeClearAssociationResponder,
},
StartPassiveScan {
payload: WlanSoftmacBaseStartPassiveScanRequest,
responder: WlanSoftmacBridgeStartPassiveScanResponder,
},
StartActiveScan {
payload: WlanSoftmacStartActiveScanRequest,
responder: WlanSoftmacBridgeStartActiveScanResponder,
},
CancelScan {
payload: WlanSoftmacBaseCancelScanRequest,
responder: WlanSoftmacBridgeCancelScanResponder,
},
UpdateWmmParameters {
payload: WlanSoftmacBaseUpdateWmmParametersRequest,
responder: WlanSoftmacBridgeUpdateWmmParametersResponder,
},
Start {
ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
frame_processor: u64,
responder: WlanSoftmacBridgeStartResponder,
},
SetEthernetStatus { status: u32, responder: WlanSoftmacBridgeSetEthernetStatusResponder },
}
impl WlanSoftmacBridgeRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_query(self) -> Option<(WlanSoftmacBridgeQueryResponder)> {
if let WlanSoftmacBridgeRequest::Query { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_query_discovery_support(
self,
) -> Option<(WlanSoftmacBridgeQueryDiscoverySupportResponder)> {
if let WlanSoftmacBridgeRequest::QueryDiscoverySupport { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_query_mac_sublayer_support(
self,
) -> Option<(WlanSoftmacBridgeQueryMacSublayerSupportResponder)> {
if let WlanSoftmacBridgeRequest::QueryMacSublayerSupport { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_query_security_support(
self,
) -> Option<(WlanSoftmacBridgeQuerySecuritySupportResponder)> {
if let WlanSoftmacBridgeRequest::QuerySecuritySupport { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_query_spectrum_management_support(
self,
) -> Option<(WlanSoftmacBridgeQuerySpectrumManagementSupportResponder)> {
if let WlanSoftmacBridgeRequest::QuerySpectrumManagementSupport { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_set_channel(
self,
) -> Option<(WlanSoftmacBaseSetChannelRequest, WlanSoftmacBridgeSetChannelResponder)> {
if let WlanSoftmacBridgeRequest::SetChannel { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_join_bss(
self,
) -> Option<(fidl_fuchsia_wlan_common::JoinBssRequest, WlanSoftmacBridgeJoinBssResponder)> {
if let WlanSoftmacBridgeRequest::JoinBss { join_request, responder } = self {
Some((join_request, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_enable_beaconing(
self,
) -> Option<(WlanSoftmacBaseEnableBeaconingRequest, WlanSoftmacBridgeEnableBeaconingResponder)>
{
if let WlanSoftmacBridgeRequest::EnableBeaconing { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_disable_beaconing(self) -> Option<(WlanSoftmacBridgeDisableBeaconingResponder)> {
if let WlanSoftmacBridgeRequest::DisableBeaconing { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_install_key(
self,
) -> Option<(WlanKeyConfiguration, WlanSoftmacBridgeInstallKeyResponder)> {
if let WlanSoftmacBridgeRequest::InstallKey { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_notify_association_complete(
self,
) -> Option<(WlanAssociationConfig, WlanSoftmacBridgeNotifyAssociationCompleteResponder)> {
if let WlanSoftmacBridgeRequest::NotifyAssociationComplete { assoc_cfg, responder } = self {
Some((assoc_cfg, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_clear_association(
self,
) -> Option<(WlanSoftmacBaseClearAssociationRequest, WlanSoftmacBridgeClearAssociationResponder)>
{
if let WlanSoftmacBridgeRequest::ClearAssociation { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_start_passive_scan(
self,
) -> Option<(WlanSoftmacBaseStartPassiveScanRequest, WlanSoftmacBridgeStartPassiveScanResponder)>
{
if let WlanSoftmacBridgeRequest::StartPassiveScan { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_start_active_scan(
self,
) -> Option<(WlanSoftmacStartActiveScanRequest, WlanSoftmacBridgeStartActiveScanResponder)>
{
if let WlanSoftmacBridgeRequest::StartActiveScan { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_cancel_scan(
self,
) -> Option<(WlanSoftmacBaseCancelScanRequest, WlanSoftmacBridgeCancelScanResponder)> {
if let WlanSoftmacBridgeRequest::CancelScan { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_update_wmm_parameters(
self,
) -> Option<(
WlanSoftmacBaseUpdateWmmParametersRequest,
WlanSoftmacBridgeUpdateWmmParametersResponder,
)> {
if let WlanSoftmacBridgeRequest::UpdateWmmParameters { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_start(
self,
) -> Option<(
fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
u64,
WlanSoftmacBridgeStartResponder,
)> {
if let WlanSoftmacBridgeRequest::Start { ifc_bridge, frame_processor, responder } = self {
Some((ifc_bridge, frame_processor, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_set_ethernet_status(
self,
) -> Option<(u32, WlanSoftmacBridgeSetEthernetStatusResponder)> {
if let WlanSoftmacBridgeRequest::SetEthernetStatus { status, responder } = self {
Some((status, responder))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
WlanSoftmacBridgeRequest::Query { .. } => "query",
WlanSoftmacBridgeRequest::QueryDiscoverySupport { .. } => "query_discovery_support",
WlanSoftmacBridgeRequest::QueryMacSublayerSupport { .. } => {
"query_mac_sublayer_support"
}
WlanSoftmacBridgeRequest::QuerySecuritySupport { .. } => "query_security_support",
WlanSoftmacBridgeRequest::QuerySpectrumManagementSupport { .. } => {
"query_spectrum_management_support"
}
WlanSoftmacBridgeRequest::SetChannel { .. } => "set_channel",
WlanSoftmacBridgeRequest::JoinBss { .. } => "join_bss",
WlanSoftmacBridgeRequest::EnableBeaconing { .. } => "enable_beaconing",
WlanSoftmacBridgeRequest::DisableBeaconing { .. } => "disable_beaconing",
WlanSoftmacBridgeRequest::InstallKey { .. } => "install_key",
WlanSoftmacBridgeRequest::NotifyAssociationComplete { .. } => {
"notify_association_complete"
}
WlanSoftmacBridgeRequest::ClearAssociation { .. } => "clear_association",
WlanSoftmacBridgeRequest::StartPassiveScan { .. } => "start_passive_scan",
WlanSoftmacBridgeRequest::StartActiveScan { .. } => "start_active_scan",
WlanSoftmacBridgeRequest::CancelScan { .. } => "cancel_scan",
WlanSoftmacBridgeRequest::UpdateWmmParameters { .. } => "update_wmm_parameters",
WlanSoftmacBridgeRequest::Start { .. } => "start",
WlanSoftmacBridgeRequest::SetEthernetStatus { .. } => "set_ethernet_status",
}
}
}
#[derive(Debug, Clone)]
pub struct WlanSoftmacBridgeControlHandle {
inner: std::sync::Arc<fidl::ServeInner>,
}
impl fidl::endpoints::ControlHandle for WlanSoftmacBridgeControlHandle {
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()
}
}
impl WlanSoftmacBridgeControlHandle {}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBridgeQueryResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBridgeQueryResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBridgeQueryResponder {
type ControlHandle = WlanSoftmacBridgeControlHandle;
fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBridgeQueryResponder {
pub fn send(
self,
mut result: Result<&WlanSoftmacQueryResponse, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<&WlanSoftmacQueryResponse, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut result: Result<&WlanSoftmacQueryResponse, i32>,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>>(
result,
self.tx_id,
0x18231a638e508f9d,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBridgeQueryDiscoverySupportResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBridgeQueryDiscoverySupportResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBridgeQueryDiscoverySupportResponder {
type ControlHandle = WlanSoftmacBridgeControlHandle;
fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBridgeQueryDiscoverySupportResponder {
pub fn send(
self,
mut result: Result<&fidl_fuchsia_wlan_common::DiscoverySupport, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<&fidl_fuchsia_wlan_common::DiscoverySupport, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut result: Result<&fidl_fuchsia_wlan_common::DiscoverySupport, i32>,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<
WlanSoftmacBaseQueryDiscoverySupportResponse,
i32,
>>(
result.map(|resp| (resp,)),
self.tx_id,
0x16797affc0cb58ae,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBridgeQueryMacSublayerSupportResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBridgeQueryMacSublayerSupportResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBridgeQueryMacSublayerSupportResponder {
type ControlHandle = WlanSoftmacBridgeControlHandle;
fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBridgeQueryMacSublayerSupportResponder {
pub fn send(
self,
mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<
WlanSoftmacBaseQueryMacSublayerSupportResponse,
i32,
>>(
result.map(|resp| (resp,)),
self.tx_id,
0x7302c3f8c131f075,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBridgeQuerySecuritySupportResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBridgeQuerySecuritySupportResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBridgeQuerySecuritySupportResponder {
type ControlHandle = WlanSoftmacBridgeControlHandle;
fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBridgeQuerySecuritySupportResponder {
pub fn send(
self,
mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<
WlanSoftmacBaseQuerySecuritySupportResponse,
i32,
>>(
result.map(|resp| (resp,)),
self.tx_id,
0x3691bb75abf6354,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBridgeQuerySpectrumManagementSupportResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBridgeQuerySpectrumManagementSupportResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBridgeQuerySpectrumManagementSupportResponder {
type ControlHandle = WlanSoftmacBridgeControlHandle;
fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBridgeQuerySpectrumManagementSupportResponder {
pub fn send(
self,
mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<
WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
i32,
>>(
result.map(|resp| (resp,)),
self.tx_id,
0x347d78dc1d4d27bf,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBridgeSetChannelResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBridgeSetChannelResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBridgeSetChannelResponder {
type ControlHandle = WlanSoftmacBridgeControlHandle;
fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBridgeSetChannelResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0x12836b533cd63ece,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBridgeJoinBssResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBridgeJoinBssResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBridgeJoinBssResponder {
type ControlHandle = WlanSoftmacBridgeControlHandle;
fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBridgeJoinBssResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0x1336fb5455b77a6e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBridgeEnableBeaconingResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBridgeEnableBeaconingResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBridgeEnableBeaconingResponder {
type ControlHandle = WlanSoftmacBridgeControlHandle;
fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBridgeEnableBeaconingResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0x6c35807632c64576,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBridgeDisableBeaconingResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBridgeDisableBeaconingResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBridgeDisableBeaconingResponder {
type ControlHandle = WlanSoftmacBridgeControlHandle;
fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBridgeDisableBeaconingResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0x3303b30f99dbb406,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBridgeInstallKeyResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBridgeInstallKeyResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBridgeInstallKeyResponder {
type ControlHandle = WlanSoftmacBridgeControlHandle;
fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBridgeInstallKeyResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0x7decf9b4200b9131,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBridgeNotifyAssociationCompleteResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBridgeNotifyAssociationCompleteResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBridgeNotifyAssociationCompleteResponder {
type ControlHandle = WlanSoftmacBridgeControlHandle;
fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBridgeNotifyAssociationCompleteResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0x436ffe3ba461d6cd,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBridgeClearAssociationResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBridgeClearAssociationResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBridgeClearAssociationResponder {
type ControlHandle = WlanSoftmacBridgeControlHandle;
fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBridgeClearAssociationResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0x581d76c39190a7dd,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBridgeStartPassiveScanResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBridgeStartPassiveScanResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBridgeStartPassiveScanResponder {
type ControlHandle = WlanSoftmacBridgeControlHandle;
fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBridgeStartPassiveScanResponder {
pub fn send(
self,
mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<
WlanSoftmacBaseStartPassiveScanResponse,
i32,
>>(
result,
self.tx_id,
0x5662f989cb4083bb,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBridgeStartActiveScanResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBridgeStartActiveScanResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBridgeStartActiveScanResponder {
type ControlHandle = WlanSoftmacBridgeControlHandle;
fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBridgeStartActiveScanResponder {
pub fn send(
self,
mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<
WlanSoftmacBaseStartActiveScanResponse,
i32,
>>(
result,
self.tx_id,
0x4896eafa9937751e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBridgeCancelScanResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBridgeCancelScanResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBridgeCancelScanResponder {
type ControlHandle = WlanSoftmacBridgeControlHandle;
fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBridgeCancelScanResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0xf7d859369764556,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBridgeUpdateWmmParametersResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBridgeUpdateWmmParametersResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBridgeUpdateWmmParametersResponder {
type ControlHandle = WlanSoftmacBridgeControlHandle;
fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBridgeUpdateWmmParametersResponder {
pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
result,
self.tx_id,
0x68522c7122d5f78c,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBridgeStartResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBridgeStartResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBridgeStartResponder {
type ControlHandle = WlanSoftmacBridgeControlHandle;
fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBridgeStartResponder {
pub fn send(self, mut result: Result<fidl::Channel, i32>) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut result: Result<fidl::Channel, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<fidl::Channel, i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<WlanSoftmacBridgeStartResponse, i32>>(
result.map(|sme_channel| (sme_channel,)),
self.tx_id,
0x7b2c15a507020d4d,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacBridgeSetEthernetStatusResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacBridgeSetEthernetStatusResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacBridgeSetEthernetStatusResponder {
type ControlHandle = WlanSoftmacBridgeControlHandle;
fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacBridgeSetEthernetStatusResponder {
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,
0x412503cb3aaa350b,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct WlanSoftmacIfcBaseMarker;
impl fidl::endpoints::ProtocolMarker for WlanSoftmacIfcBaseMarker {
type Proxy = WlanSoftmacIfcBaseProxy;
type RequestStream = WlanSoftmacIfcBaseRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = WlanSoftmacIfcBaseSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) WlanSoftmacIfcBase";
}
pub trait WlanSoftmacIfcBaseProxyInterface: Send + Sync {
type ReportTxResultResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#report_tx_result(
&self,
tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
) -> Self::ReportTxResultResponseFut;
type NotifyScanCompleteResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#notify_scan_complete(
&self,
payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
) -> Self::NotifyScanCompleteResponseFut;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct WlanSoftmacIfcBaseSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for WlanSoftmacIfcBaseSynchronousProxy {
type Proxy = WlanSoftmacIfcBaseProxy;
type Protocol = WlanSoftmacIfcBaseMarker;
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 WlanSoftmacIfcBaseSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name =
<WlanSoftmacIfcBaseMarker 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::Time,
) -> Result<WlanSoftmacIfcBaseEvent, fidl::Error> {
WlanSoftmacIfcBaseEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#report_tx_result(
&self,
mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
___deadline: zx::Time,
) -> Result<(), fidl::Error> {
let _response = self
.client
.send_query::<WlanSoftmacIfcBaseReportTxResultRequest, fidl::encoding::EmptyPayload>(
(tx_result,),
0x5835c2f13d94e09a,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#notify_scan_complete(
&self,
mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
___deadline: zx::Time,
) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
WlanSoftmacIfcBaseNotifyScanCompleteRequest,
fidl::encoding::EmptyPayload,
>(
payload,
0x7045e3cd460dc42c,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
}
#[derive(Debug, Clone)]
pub struct WlanSoftmacIfcBaseProxy {
client: fidl::client::Client,
}
impl fidl::endpoints::Proxy for WlanSoftmacIfcBaseProxy {
type Protocol = WlanSoftmacIfcBaseMarker;
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 WlanSoftmacIfcBaseProxy {
pub fn new(channel: fidl::AsyncChannel) -> Self {
let protocol_name =
<WlanSoftmacIfcBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> WlanSoftmacIfcBaseEventStream {
WlanSoftmacIfcBaseEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#report_tx_result(
&self,
mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
) -> fidl::client::QueryResponseFut<()> {
WlanSoftmacIfcBaseProxyInterface::r#report_tx_result(self, tx_result)
}
pub fn r#notify_scan_complete(
&self,
mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
) -> fidl::client::QueryResponseFut<()> {
WlanSoftmacIfcBaseProxyInterface::r#notify_scan_complete(self, payload)
}
}
impl WlanSoftmacIfcBaseProxyInterface for WlanSoftmacIfcBaseProxy {
type ReportTxResultResponseFut = fidl::client::QueryResponseFut<()>;
fn r#report_tx_result(
&self,
mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
) -> Self::ReportTxResultResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::EmptyPayload,
0x5835c2f13d94e09a,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<WlanSoftmacIfcBaseReportTxResultRequest, ()>(
(tx_result,),
0x5835c2f13d94e09a,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type NotifyScanCompleteResponseFut = fidl::client::QueryResponseFut<()>;
fn r#notify_scan_complete(
&self,
mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
) -> Self::NotifyScanCompleteResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::EmptyPayload,
0x7045e3cd460dc42c,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<WlanSoftmacIfcBaseNotifyScanCompleteRequest, ()>(
payload,
0x7045e3cd460dc42c,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
}
pub struct WlanSoftmacIfcBaseEventStream {
event_receiver: fidl::client::EventReceiver,
}
impl std::marker::Unpin for WlanSoftmacIfcBaseEventStream {}
impl futures::stream::FusedStream for WlanSoftmacIfcBaseEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for WlanSoftmacIfcBaseEventStream {
type Item = Result<WlanSoftmacIfcBaseEvent, 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(WlanSoftmacIfcBaseEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum WlanSoftmacIfcBaseEvent {}
impl WlanSoftmacIfcBaseEvent {
fn decode(mut buf: fidl::MessageBufEtc) -> Result<WlanSoftmacIfcBaseEvent, 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:
<WlanSoftmacIfcBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct WlanSoftmacIfcBaseRequestStream {
inner: std::sync::Arc<fidl::ServeInner>,
is_terminated: bool,
}
impl std::marker::Unpin for WlanSoftmacIfcBaseRequestStream {}
impl futures::stream::FusedStream for WlanSoftmacIfcBaseRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for WlanSoftmacIfcBaseRequestStream {
type Protocol = WlanSoftmacIfcBaseMarker;
type ControlHandle = WlanSoftmacIfcBaseControlHandle;
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 {
WlanSoftmacIfcBaseControlHandle { inner: self.inner.clone() }
}
fn into_inner(self) -> (::std::sync::Arc<fidl::ServeInner>, bool) {
(self.inner, self.is_terminated)
}
fn from_inner(inner: std::sync::Arc<fidl::ServeInner>, is_terminated: bool) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for WlanSoftmacIfcBaseRequestStream {
type Item = Result<WlanSoftmacIfcBaseRequest, 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 WlanSoftmacIfcBaseRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf(|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))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x5835c2f13d94e09a => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacIfcBaseReportTxResultRequest);
fidl::encoding::Decoder::decode_into::<WlanSoftmacIfcBaseReportTxResultRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
WlanSoftmacIfcBaseControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacIfcBaseRequest::ReportTxResult {
tx_result: req.tx_result,
responder: WlanSoftmacIfcBaseReportTxResultResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x7045e3cd460dc42c => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacIfcBaseNotifyScanCompleteRequest);
fidl::encoding::Decoder::decode_into::<
WlanSoftmacIfcBaseNotifyScanCompleteRequest,
>(&header, _body_bytes, handles, &mut req)?;
let control_handle =
WlanSoftmacIfcBaseControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacIfcBaseRequest::NotifyScanComplete {
payload: req,
responder: WlanSoftmacIfcBaseNotifyScanCompleteResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name:
<WlanSoftmacIfcBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
})
}
}
#[derive(Debug)]
pub enum WlanSoftmacIfcBaseRequest {
ReportTxResult {
tx_result: fidl_fuchsia_wlan_common::WlanTxResult,
responder: WlanSoftmacIfcBaseReportTxResultResponder,
},
NotifyScanComplete {
payload: WlanSoftmacIfcBaseNotifyScanCompleteRequest,
responder: WlanSoftmacIfcBaseNotifyScanCompleteResponder,
},
}
impl WlanSoftmacIfcBaseRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_report_tx_result(
self,
) -> Option<(fidl_fuchsia_wlan_common::WlanTxResult, WlanSoftmacIfcBaseReportTxResultResponder)>
{
if let WlanSoftmacIfcBaseRequest::ReportTxResult { tx_result, responder } = self {
Some((tx_result, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_notify_scan_complete(
self,
) -> Option<(
WlanSoftmacIfcBaseNotifyScanCompleteRequest,
WlanSoftmacIfcBaseNotifyScanCompleteResponder,
)> {
if let WlanSoftmacIfcBaseRequest::NotifyScanComplete { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
WlanSoftmacIfcBaseRequest::ReportTxResult { .. } => "report_tx_result",
WlanSoftmacIfcBaseRequest::NotifyScanComplete { .. } => "notify_scan_complete",
}
}
}
#[derive(Debug, Clone)]
pub struct WlanSoftmacIfcBaseControlHandle {
inner: std::sync::Arc<fidl::ServeInner>,
}
impl fidl::endpoints::ControlHandle for WlanSoftmacIfcBaseControlHandle {
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()
}
}
impl WlanSoftmacIfcBaseControlHandle {}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacIfcBaseReportTxResultResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacIfcBaseControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacIfcBaseReportTxResultResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacIfcBaseReportTxResultResponder {
type ControlHandle = WlanSoftmacIfcBaseControlHandle;
fn control_handle(&self) -> &WlanSoftmacIfcBaseControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacIfcBaseReportTxResultResponder {
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,
0x5835c2f13d94e09a,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacIfcBaseNotifyScanCompleteResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacIfcBaseControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacIfcBaseNotifyScanCompleteResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacIfcBaseNotifyScanCompleteResponder {
type ControlHandle = WlanSoftmacIfcBaseControlHandle;
fn control_handle(&self) -> &WlanSoftmacIfcBaseControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacIfcBaseNotifyScanCompleteResponder {
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,
0x7045e3cd460dc42c,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct WlanSoftmacIfcBridgeMarker;
impl fidl::endpoints::ProtocolMarker for WlanSoftmacIfcBridgeMarker {
type Proxy = WlanSoftmacIfcBridgeProxy;
type RequestStream = WlanSoftmacIfcBridgeRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = WlanSoftmacIfcBridgeSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) WlanSoftmacIfcBridge";
}
pub trait WlanSoftmacIfcBridgeProxyInterface: Send + Sync {
type ReportTxResultResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#report_tx_result(
&self,
tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
) -> Self::ReportTxResultResponseFut;
type NotifyScanCompleteResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#notify_scan_complete(
&self,
payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
) -> Self::NotifyScanCompleteResponseFut;
type StopBridgedDriverResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#stop_bridged_driver(&self) -> Self::StopBridgedDriverResponseFut;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct WlanSoftmacIfcBridgeSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for WlanSoftmacIfcBridgeSynchronousProxy {
type Proxy = WlanSoftmacIfcBridgeProxy;
type Protocol = WlanSoftmacIfcBridgeMarker;
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 WlanSoftmacIfcBridgeSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name =
<WlanSoftmacIfcBridgeMarker 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::Time,
) -> Result<WlanSoftmacIfcBridgeEvent, fidl::Error> {
WlanSoftmacIfcBridgeEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#report_tx_result(
&self,
mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
___deadline: zx::Time,
) -> Result<(), fidl::Error> {
let _response = self
.client
.send_query::<WlanSoftmacIfcBaseReportTxResultRequest, fidl::encoding::EmptyPayload>(
(tx_result,),
0x5835c2f13d94e09a,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#notify_scan_complete(
&self,
mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
___deadline: zx::Time,
) -> Result<(), fidl::Error> {
let _response = self.client.send_query::<
WlanSoftmacIfcBaseNotifyScanCompleteRequest,
fidl::encoding::EmptyPayload,
>(
payload,
0x7045e3cd460dc42c,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#stop_bridged_driver(&self, ___deadline: zx::Time) -> Result<(), fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
(),
0x112dbd0cc2251151,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
}
#[derive(Debug, Clone)]
pub struct WlanSoftmacIfcBridgeProxy {
client: fidl::client::Client,
}
impl fidl::endpoints::Proxy for WlanSoftmacIfcBridgeProxy {
type Protocol = WlanSoftmacIfcBridgeMarker;
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 WlanSoftmacIfcBridgeProxy {
pub fn new(channel: fidl::AsyncChannel) -> Self {
let protocol_name =
<WlanSoftmacIfcBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> WlanSoftmacIfcBridgeEventStream {
WlanSoftmacIfcBridgeEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#report_tx_result(
&self,
mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
) -> fidl::client::QueryResponseFut<()> {
WlanSoftmacIfcBridgeProxyInterface::r#report_tx_result(self, tx_result)
}
pub fn r#notify_scan_complete(
&self,
mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
) -> fidl::client::QueryResponseFut<()> {
WlanSoftmacIfcBridgeProxyInterface::r#notify_scan_complete(self, payload)
}
pub fn r#stop_bridged_driver(&self) -> fidl::client::QueryResponseFut<()> {
WlanSoftmacIfcBridgeProxyInterface::r#stop_bridged_driver(self)
}
}
impl WlanSoftmacIfcBridgeProxyInterface for WlanSoftmacIfcBridgeProxy {
type ReportTxResultResponseFut = fidl::client::QueryResponseFut<()>;
fn r#report_tx_result(
&self,
mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
) -> Self::ReportTxResultResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::EmptyPayload,
0x5835c2f13d94e09a,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<WlanSoftmacIfcBaseReportTxResultRequest, ()>(
(tx_result,),
0x5835c2f13d94e09a,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type NotifyScanCompleteResponseFut = fidl::client::QueryResponseFut<()>;
fn r#notify_scan_complete(
&self,
mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
) -> Self::NotifyScanCompleteResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::EmptyPayload,
0x7045e3cd460dc42c,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<WlanSoftmacIfcBaseNotifyScanCompleteRequest, ()>(
payload,
0x7045e3cd460dc42c,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type StopBridgedDriverResponseFut = fidl::client::QueryResponseFut<()>;
fn r#stop_bridged_driver(&self) -> Self::StopBridgedDriverResponseFut {
fn _decode(mut _buf: Result<fidl::MessageBufEtc, fidl::Error>) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::EmptyPayload,
0x112dbd0cc2251151,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
(),
0x112dbd0cc2251151,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
}
pub struct WlanSoftmacIfcBridgeEventStream {
event_receiver: fidl::client::EventReceiver,
}
impl std::marker::Unpin for WlanSoftmacIfcBridgeEventStream {}
impl futures::stream::FusedStream for WlanSoftmacIfcBridgeEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for WlanSoftmacIfcBridgeEventStream {
type Item = Result<WlanSoftmacIfcBridgeEvent, 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(WlanSoftmacIfcBridgeEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum WlanSoftmacIfcBridgeEvent {}
impl WlanSoftmacIfcBridgeEvent {
fn decode(mut buf: fidl::MessageBufEtc) -> Result<WlanSoftmacIfcBridgeEvent, 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:
<WlanSoftmacIfcBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct WlanSoftmacIfcBridgeRequestStream {
inner: std::sync::Arc<fidl::ServeInner>,
is_terminated: bool,
}
impl std::marker::Unpin for WlanSoftmacIfcBridgeRequestStream {}
impl futures::stream::FusedStream for WlanSoftmacIfcBridgeRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for WlanSoftmacIfcBridgeRequestStream {
type Protocol = WlanSoftmacIfcBridgeMarker;
type ControlHandle = WlanSoftmacIfcBridgeControlHandle;
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 {
WlanSoftmacIfcBridgeControlHandle { inner: self.inner.clone() }
}
fn into_inner(self) -> (::std::sync::Arc<fidl::ServeInner>, bool) {
(self.inner, self.is_terminated)
}
fn from_inner(inner: std::sync::Arc<fidl::ServeInner>, is_terminated: bool) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for WlanSoftmacIfcBridgeRequestStream {
type Item = Result<WlanSoftmacIfcBridgeRequest, 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 WlanSoftmacIfcBridgeRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf(|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))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x5835c2f13d94e09a => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacIfcBaseReportTxResultRequest);
fidl::encoding::Decoder::decode_into::<WlanSoftmacIfcBaseReportTxResultRequest>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
WlanSoftmacIfcBridgeControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacIfcBridgeRequest::ReportTxResult {
tx_result: req.tx_result,
responder: WlanSoftmacIfcBridgeReportTxResultResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x7045e3cd460dc42c => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(WlanSoftmacIfcBaseNotifyScanCompleteRequest);
fidl::encoding::Decoder::decode_into::<
WlanSoftmacIfcBaseNotifyScanCompleteRequest,
>(&header, _body_bytes, handles, &mut req)?;
let control_handle =
WlanSoftmacIfcBridgeControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacIfcBridgeRequest::NotifyScanComplete {
payload: req,
responder: WlanSoftmacIfcBridgeNotifyScanCompleteResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x112dbd0cc2251151 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload);
fidl::encoding::Decoder::decode_into::<fidl::encoding::EmptyPayload>(
&header,
_body_bytes,
handles,
&mut req,
)?;
let control_handle =
WlanSoftmacIfcBridgeControlHandle { inner: this.inner.clone() };
Ok(WlanSoftmacIfcBridgeRequest::StopBridgedDriver {
responder: WlanSoftmacIfcBridgeStopBridgedDriverResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name:
<WlanSoftmacIfcBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
})
}
}
#[derive(Debug)]
pub enum WlanSoftmacIfcBridgeRequest {
ReportTxResult {
tx_result: fidl_fuchsia_wlan_common::WlanTxResult,
responder: WlanSoftmacIfcBridgeReportTxResultResponder,
},
NotifyScanComplete {
payload: WlanSoftmacIfcBaseNotifyScanCompleteRequest,
responder: WlanSoftmacIfcBridgeNotifyScanCompleteResponder,
},
StopBridgedDriver { responder: WlanSoftmacIfcBridgeStopBridgedDriverResponder },
}
impl WlanSoftmacIfcBridgeRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_report_tx_result(
self,
) -> Option<(fidl_fuchsia_wlan_common::WlanTxResult, WlanSoftmacIfcBridgeReportTxResultResponder)>
{
if let WlanSoftmacIfcBridgeRequest::ReportTxResult { tx_result, responder } = self {
Some((tx_result, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_notify_scan_complete(
self,
) -> Option<(
WlanSoftmacIfcBaseNotifyScanCompleteRequest,
WlanSoftmacIfcBridgeNotifyScanCompleteResponder,
)> {
if let WlanSoftmacIfcBridgeRequest::NotifyScanComplete { payload, responder } = self {
Some((payload, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_stop_bridged_driver(
self,
) -> Option<(WlanSoftmacIfcBridgeStopBridgedDriverResponder)> {
if let WlanSoftmacIfcBridgeRequest::StopBridgedDriver { responder } = self {
Some((responder))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
WlanSoftmacIfcBridgeRequest::ReportTxResult { .. } => "report_tx_result",
WlanSoftmacIfcBridgeRequest::NotifyScanComplete { .. } => "notify_scan_complete",
WlanSoftmacIfcBridgeRequest::StopBridgedDriver { .. } => "stop_bridged_driver",
}
}
}
#[derive(Debug, Clone)]
pub struct WlanSoftmacIfcBridgeControlHandle {
inner: std::sync::Arc<fidl::ServeInner>,
}
impl fidl::endpoints::ControlHandle for WlanSoftmacIfcBridgeControlHandle {
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()
}
}
impl WlanSoftmacIfcBridgeControlHandle {}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacIfcBridgeReportTxResultResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacIfcBridgeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacIfcBridgeReportTxResultResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacIfcBridgeReportTxResultResponder {
type ControlHandle = WlanSoftmacIfcBridgeControlHandle;
fn control_handle(&self) -> &WlanSoftmacIfcBridgeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacIfcBridgeReportTxResultResponder {
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,
0x5835c2f13d94e09a,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacIfcBridgeNotifyScanCompleteResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacIfcBridgeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacIfcBridgeNotifyScanCompleteResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacIfcBridgeNotifyScanCompleteResponder {
type ControlHandle = WlanSoftmacIfcBridgeControlHandle;
fn control_handle(&self) -> &WlanSoftmacIfcBridgeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacIfcBridgeNotifyScanCompleteResponder {
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,
0x7045e3cd460dc42c,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct WlanSoftmacIfcBridgeStopBridgedDriverResponder {
control_handle: std::mem::ManuallyDrop<WlanSoftmacIfcBridgeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for WlanSoftmacIfcBridgeStopBridgedDriverResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for WlanSoftmacIfcBridgeStopBridgedDriverResponder {
type ControlHandle = WlanSoftmacIfcBridgeControlHandle;
fn control_handle(&self) -> &WlanSoftmacIfcBridgeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl WlanSoftmacIfcBridgeStopBridgedDriverResponder {
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,
0x112dbd0cc2251151,
fidl::encoding::DynamicFlags::empty(),
)
}
}
mod internal {
use super::*;
unsafe impl fidl::encoding::TypeMarker for WlanRxInfoFlags {
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
}
}
impl fidl::encoding::ValueTypeMarker for WlanRxInfoFlags {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
*value
}
}
unsafe impl fidl::encoding::Encode<Self> for WlanRxInfoFlags {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.bits(), offset);
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanRxInfoFlags {
#[inline(always)]
fn new_empty() -> Self {
Self::empty()
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u32>(offset);
*self = Self::from_bits_allow_unknown(prim);
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for WlanRxInfoValid {
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
}
}
impl fidl::encoding::ValueTypeMarker for WlanRxInfoValid {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
*value
}
}
unsafe impl fidl::encoding::Encode<Self> for WlanRxInfoValid {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.bits(), offset);
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanRxInfoValid {
#[inline(always)]
fn new_empty() -> Self {
Self::empty()
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u32>(offset);
*self = Self::from_bits_allow_unknown(prim);
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for WlanTxInfoFlags {
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
}
}
impl fidl::encoding::ValueTypeMarker for WlanTxInfoFlags {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
*value
}
}
unsafe impl fidl::encoding::Encode<Self> for WlanTxInfoFlags {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.bits(), offset);
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanTxInfoFlags {
#[inline(always)]
fn new_empty() -> Self {
Self::empty()
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u32>(offset);
*self = Self::from_bits_allow_unknown(prim);
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for WlanTxInfoValid {
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
}
}
impl fidl::encoding::ValueTypeMarker for WlanTxInfoValid {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
*value
}
}
unsafe impl fidl::encoding::Encode<Self> for WlanTxInfoValid {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.bits(), offset);
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanTxInfoValid {
#[inline(always)]
fn new_empty() -> Self {
Self::empty()
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u32>(offset);
*self = Self::from_bits_allow_unknown(prim);
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for WlanProtection {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
std::mem::align_of::<u8>()
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
std::mem::size_of::<u8>()
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
false
}
}
impl fidl::encoding::ValueTypeMarker for WlanProtection {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
*value
}
}
unsafe impl fidl::encoding::Encode<Self> for WlanProtection {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanProtection {
#[inline(always)]
fn new_empty() -> Self {
Self::None
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u8>(offset);
*self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for WlanRxInfo {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
32
}
}
impl fidl::encoding::ValueTypeMarker for WlanRxInfo {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanRxInfo> for &WlanRxInfo {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanRxInfo>(offset);
fidl::encoding::Encode::<WlanRxInfo>::encode(
(
<WlanRxInfoFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.rx_flags),
<WlanRxInfoValid as fidl::encoding::ValueTypeMarker>::borrow(&self.valid_fields),
<fidl_fuchsia_wlan_common::WlanPhyType as fidl::encoding::ValueTypeMarker>::borrow(&self.phy),
<u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.data_rate),
<fidl_fuchsia_wlan_common::WlanChannel as fidl::encoding::ValueTypeMarker>::borrow(&self.channel),
<u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.mcs),
<i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.rssi_dbm),
<i16 as fidl::encoding::ValueTypeMarker>::borrow(&self.snr_dbh),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<WlanRxInfoFlags>,
T1: fidl::encoding::Encode<WlanRxInfoValid>,
T2: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanPhyType>,
T3: fidl::encoding::Encode<u32>,
T4: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanChannel>,
T5: fidl::encoding::Encode<u8>,
T6: fidl::encoding::Encode<i8>,
T7: fidl::encoding::Encode<i16>,
> fidl::encoding::Encode<WlanRxInfo> for (T0, T1, T2, T3, T4, T5, T6, T7)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanRxInfo>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
self.2.encode(encoder, offset + 8, depth)?;
self.3.encode(encoder, offset + 12, depth)?;
self.4.encode(encoder, offset + 16, depth)?;
self.5.encode(encoder, offset + 28, depth)?;
self.6.encode(encoder, offset + 29, depth)?;
self.7.encode(encoder, offset + 30, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanRxInfo {
#[inline(always)]
fn new_empty() -> Self {
Self {
rx_flags: fidl::new_empty!(WlanRxInfoFlags),
valid_fields: fidl::new_empty!(WlanRxInfoValid),
phy: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanPhyType),
data_rate: fidl::new_empty!(u32),
channel: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanChannel),
mcs: fidl::new_empty!(u8),
rssi_dbm: fidl::new_empty!(i8),
snr_dbh: fidl::new_empty!(i16),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(WlanRxInfoFlags, &mut self.rx_flags, decoder, offset + 0, _depth)?;
fidl::decode!(WlanRxInfoValid, &mut self.valid_fields, decoder, offset + 4, _depth)?;
fidl::decode!(
fidl_fuchsia_wlan_common::WlanPhyType,
&mut self.phy,
decoder,
offset + 8,
_depth
)?;
fidl::decode!(u32, &mut self.data_rate, decoder, offset + 12, _depth)?;
fidl::decode!(
fidl_fuchsia_wlan_common::WlanChannel,
&mut self.channel,
decoder,
offset + 16,
_depth
)?;
fidl::decode!(u8, &mut self.mcs, decoder, offset + 28, _depth)?;
fidl::decode!(i8, &mut self.rssi_dbm, decoder, offset + 29, _depth)?;
fidl::decode!(i16, &mut self.snr_dbh, decoder, offset + 30, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for WlanRxPacket {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
48
}
}
impl fidl::encoding::ValueTypeMarker for WlanRxPacket {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanRxPacket> for &WlanRxPacket {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanRxPacket>(offset);
fidl::encoding::Encode::<WlanRxPacket>::encode(
(
<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.mac_frame),
<WlanRxInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>>,
T1: fidl::encoding::Encode<WlanRxInfo>,
> fidl::encoding::Encode<WlanRxPacket> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanRxPacket>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 16, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanRxPacket {
#[inline(always)]
fn new_empty() -> Self {
Self {
mac_frame: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>),
info: fidl::new_empty!(WlanRxInfo),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedVector<u8>,
&mut self.mac_frame,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(WlanRxInfo, &mut self.info, decoder, offset + 16, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseJoinBssRequest {
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
}
}
impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseJoinBssRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanSoftmacBaseJoinBssRequest>
for &WlanSoftmacBaseJoinBssRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBaseJoinBssRequest>(offset);
fidl::encoding::Encode::<WlanSoftmacBaseJoinBssRequest>::encode(
(
<fidl_fuchsia_wlan_common::JoinBssRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.join_request),
),
encoder, offset, _depth
)
}
}
unsafe impl<T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::JoinBssRequest>>
fidl::encoding::Encode<WlanSoftmacBaseJoinBssRequest> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBaseJoinBssRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanSoftmacBaseJoinBssRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { join_request: fidl::new_empty!(fidl_fuchsia_wlan_common::JoinBssRequest) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl_fuchsia_wlan_common::JoinBssRequest,
&mut self.join_request,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseNotifyAssociationCompleteRequest {
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
}
}
impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseNotifyAssociationCompleteRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanSoftmacBaseNotifyAssociationCompleteRequest>
for &WlanSoftmacBaseNotifyAssociationCompleteRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBaseNotifyAssociationCompleteRequest>(offset);
fidl::encoding::Encode::<WlanSoftmacBaseNotifyAssociationCompleteRequest>::encode(
(<WlanAssociationConfig as fidl::encoding::ValueTypeMarker>::borrow(
&self.assoc_cfg,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<T0: fidl::encoding::Encode<WlanAssociationConfig>>
fidl::encoding::Encode<WlanSoftmacBaseNotifyAssociationCompleteRequest> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBaseNotifyAssociationCompleteRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanSoftmacBaseNotifyAssociationCompleteRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { assoc_cfg: fidl::new_empty!(WlanAssociationConfig) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(WlanAssociationConfig, &mut self.assoc_cfg, decoder, offset + 0, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseQueryDiscoverySupportResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
3
}
}
impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseQueryDiscoverySupportResponse {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanSoftmacBaseQueryDiscoverySupportResponse>
for &WlanSoftmacBaseQueryDiscoverySupportResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBaseQueryDiscoverySupportResponse>(offset);
fidl::encoding::Encode::<WlanSoftmacBaseQueryDiscoverySupportResponse>::encode(
(
<fidl_fuchsia_wlan_common::DiscoverySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
),
encoder, offset, _depth
)
}
}
unsafe impl<T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::DiscoverySupport>>
fidl::encoding::Encode<WlanSoftmacBaseQueryDiscoverySupportResponse> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBaseQueryDiscoverySupportResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanSoftmacBaseQueryDiscoverySupportResponse {
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_common::DiscoverySupport) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl_fuchsia_wlan_common::DiscoverySupport,
&mut self.resp,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseQueryMacSublayerSupportResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
5
}
}
impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseQueryMacSublayerSupportResponse {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanSoftmacBaseQueryMacSublayerSupportResponse>
for &WlanSoftmacBaseQueryMacSublayerSupportResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBaseQueryMacSublayerSupportResponse>(offset);
fidl::encoding::Encode::<WlanSoftmacBaseQueryMacSublayerSupportResponse>::encode(
(
<fidl_fuchsia_wlan_common::MacSublayerSupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
),
encoder, offset, _depth
)
}
}
unsafe impl<T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::MacSublayerSupport>>
fidl::encoding::Encode<WlanSoftmacBaseQueryMacSublayerSupportResponse> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBaseQueryMacSublayerSupportResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanSoftmacBaseQueryMacSublayerSupportResponse {
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_common::MacSublayerSupport) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl_fuchsia_wlan_common::MacSublayerSupport,
&mut self.resp,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseQuerySecuritySupportResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
3
}
}
impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseQuerySecuritySupportResponse {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanSoftmacBaseQuerySecuritySupportResponse>
for &WlanSoftmacBaseQuerySecuritySupportResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBaseQuerySecuritySupportResponse>(offset);
fidl::encoding::Encode::<WlanSoftmacBaseQuerySecuritySupportResponse>::encode(
(
<fidl_fuchsia_wlan_common::SecuritySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
),
encoder, offset, _depth
)
}
}
unsafe impl<T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::SecuritySupport>>
fidl::encoding::Encode<WlanSoftmacBaseQuerySecuritySupportResponse> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBaseQuerySecuritySupportResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanSoftmacBaseQuerySecuritySupportResponse {
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_common::SecuritySupport) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl_fuchsia_wlan_common::SecuritySupport,
&mut self.resp,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseQuerySpectrumManagementSupportResponse {
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
}
}
impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseQuerySpectrumManagementSupportResponse {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanSoftmacBaseQuerySpectrumManagementSupportResponse>
for &WlanSoftmacBaseQuerySpectrumManagementSupportResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBaseQuerySpectrumManagementSupportResponse>(
offset,
);
fidl::encoding::Encode::<WlanSoftmacBaseQuerySpectrumManagementSupportResponse>::encode(
(
<fidl_fuchsia_wlan_common::SpectrumManagementSupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
),
encoder, offset, _depth
)
}
}
unsafe impl<T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::SpectrumManagementSupport>>
fidl::encoding::Encode<WlanSoftmacBaseQuerySpectrumManagementSupportResponse> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBaseQuerySpectrumManagementSupportResponse>(
offset,
);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanSoftmacBaseQuerySpectrumManagementSupportResponse {
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_common::SpectrumManagementSupport) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl_fuchsia_wlan_common::SpectrumManagementSupport,
&mut self.resp,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBridgeSetEthernetStatusRequest {
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
}
}
impl fidl::encoding::ValueTypeMarker for WlanSoftmacBridgeSetEthernetStatusRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanSoftmacBridgeSetEthernetStatusRequest>
for &WlanSoftmacBridgeSetEthernetStatusRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBridgeSetEthernetStatusRequest>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut WlanSoftmacBridgeSetEthernetStatusRequest).write_unaligned(
(self as *const WlanSoftmacBridgeSetEthernetStatusRequest).read(),
);
}
Ok(())
}
}
unsafe impl<T0: fidl::encoding::Encode<u32>>
fidl::encoding::Encode<WlanSoftmacBridgeSetEthernetStatusRequest> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBridgeSetEthernetStatusRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanSoftmacBridgeSetEthernetStatusRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { status: fidl::new_empty!(u32) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
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(())
}
}
unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBridgeStartRequest {
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
}
}
impl fidl::encoding::ResourceTypeMarker for WlanSoftmacBridgeStartRequest {
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::Encode<WlanSoftmacBridgeStartRequest>
for &mut WlanSoftmacBridgeStartRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBridgeStartRequest>(offset);
fidl::encoding::Encode::<WlanSoftmacBridgeStartRequest>::encode(
(
<fidl::encoding::Endpoint<
fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.ifc_bridge
),
<u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.frame_processor),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<
fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>>,
>,
T1: fidl::encoding::Encode<u64>,
> fidl::encoding::Encode<WlanSoftmacBridgeStartRequest> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBridgeStartRequest>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 8, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanSoftmacBridgeStartRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
ifc_bridge: fidl::new_empty!(
fidl::encoding::Endpoint<
fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
>
),
frame_processor: fidl::new_empty!(u64),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
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 + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(
fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>>,
&mut self.ifc_bridge,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(u64, &mut self.frame_processor, decoder, offset + 8, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBridgeStartResponse {
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
}
}
impl fidl::encoding::ResourceTypeMarker for WlanSoftmacBridgeStartResponse {
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::Encode<WlanSoftmacBridgeStartResponse>
for &mut WlanSoftmacBridgeStartResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBridgeStartResponse>(offset);
fidl::encoding::Encode::<WlanSoftmacBridgeStartResponse>::encode(
(<fidl::encoding::HandleType<
fidl::Channel,
{ fidl::ObjectType::CHANNEL.into_raw() },
2147483648,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.sme_channel
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Channel,
{ fidl::ObjectType::CHANNEL.into_raw() },
2147483648,
>,
>,
> fidl::encoding::Encode<WlanSoftmacBridgeStartResponse> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBridgeStartResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanSoftmacBridgeStartResponse {
#[inline(always)]
fn new_empty() -> Self {
Self {
sme_channel: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, &mut self.sme_channel, decoder, offset + 0, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for WlanSoftmacIfcBaseReportTxResultRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
2
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
40
}
}
impl fidl::encoding::ValueTypeMarker for WlanSoftmacIfcBaseReportTxResultRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanSoftmacIfcBaseReportTxResultRequest>
for &WlanSoftmacIfcBaseReportTxResultRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacIfcBaseReportTxResultRequest>(offset);
fidl::encoding::Encode::<WlanSoftmacIfcBaseReportTxResultRequest>::encode(
(
<fidl_fuchsia_wlan_common::WlanTxResult as fidl::encoding::ValueTypeMarker>::borrow(&self.tx_result),
),
encoder, offset, _depth
)
}
}
unsafe impl<T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanTxResult>>
fidl::encoding::Encode<WlanSoftmacIfcBaseReportTxResultRequest> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacIfcBaseReportTxResultRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanSoftmacIfcBaseReportTxResultRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { tx_result: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanTxResult) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl_fuchsia_wlan_common::WlanTxResult,
&mut self.tx_result,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for WlanTxInfo {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
24
}
}
impl fidl::encoding::ValueTypeMarker for WlanTxInfo {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanTxInfo> for &WlanTxInfo {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanTxInfo>(offset);
fidl::encoding::Encode::<WlanTxInfo>::encode(
(
<u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.tx_flags),
<u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.valid_fields),
<u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.tx_vector_idx),
<fidl_fuchsia_wlan_common::WlanPhyType as fidl::encoding::ValueTypeMarker>::borrow(&self.phy),
<fidl_fuchsia_wlan_common::ChannelBandwidth as fidl::encoding::ValueTypeMarker>::borrow(&self.channel_bandwidth),
<u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.mcs),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<u32>,
T1: fidl::encoding::Encode<u32>,
T2: fidl::encoding::Encode<u16>,
T3: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanPhyType>,
T4: fidl::encoding::Encode<fidl_fuchsia_wlan_common::ChannelBandwidth>,
T5: fidl::encoding::Encode<u8>,
> fidl::encoding::Encode<WlanTxInfo> for (T0, T1, T2, T3, T4, T5)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanTxInfo>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
(ptr as *mut u32).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(20);
(ptr as *mut u32).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
self.2.encode(encoder, offset + 8, depth)?;
self.3.encode(encoder, offset + 12, depth)?;
self.4.encode(encoder, offset + 16, depth)?;
self.5.encode(encoder, offset + 20, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanTxInfo {
#[inline(always)]
fn new_empty() -> Self {
Self {
tx_flags: fidl::new_empty!(u32),
valid_fields: fidl::new_empty!(u32),
tx_vector_idx: fidl::new_empty!(u16),
phy: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanPhyType),
channel_bandwidth: fidl::new_empty!(fidl_fuchsia_wlan_common::ChannelBandwidth),
mcs: fidl::new_empty!(u8),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
let padval = unsafe { (ptr as *const u32).read_unaligned() };
let mask = 0xffff0000u32;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(20) };
let padval = unsafe { (ptr as *const u32).read_unaligned() };
let mask = 0xffffff00u32;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 20 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(u32, &mut self.tx_flags, decoder, offset + 0, _depth)?;
fidl::decode!(u32, &mut self.valid_fields, decoder, offset + 4, _depth)?;
fidl::decode!(u16, &mut self.tx_vector_idx, decoder, offset + 8, _depth)?;
fidl::decode!(
fidl_fuchsia_wlan_common::WlanPhyType,
&mut self.phy,
decoder,
offset + 12,
_depth
)?;
fidl::decode!(
fidl_fuchsia_wlan_common::ChannelBandwidth,
&mut self.channel_bandwidth,
decoder,
offset + 16,
_depth
)?;
fidl::decode!(u8, &mut self.mcs, decoder, offset + 20, _depth)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for WlanTxPacket {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
40
}
}
impl fidl::encoding::ValueTypeMarker for WlanTxPacket {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanTxPacket> for &WlanTxPacket {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanTxPacket>(offset);
fidl::encoding::Encode::<WlanTxPacket>::encode(
(
<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.mac_frame),
<WlanTxInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>>,
T1: fidl::encoding::Encode<WlanTxInfo>,
> fidl::encoding::Encode<WlanTxPacket> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanTxPacket>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 16, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanTxPacket {
#[inline(always)]
fn new_empty() -> Self {
Self {
mac_frame: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>),
info: fidl::new_empty!(WlanTxInfo),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedVector<u8>,
&mut self.mac_frame,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(WlanTxInfo, &mut self.info, decoder, offset + 16, _depth)?;
Ok(())
}
}
impl FrameProcessorEthernetTxRequest {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.async_id {
return 3;
}
if let Some(_) = self.packet_size {
return 2;
}
if let Some(_) = self.packet_address {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for FrameProcessorEthernetTxRequest {
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
}
}
impl fidl::encoding::ValueTypeMarker for FrameProcessorEthernetTxRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<FrameProcessorEthernetTxRequest>
for &FrameProcessorEthernetTxRequest
{
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<FrameProcessorEthernetTxRequest>(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::<u64>(
self.packet_address.as_ref().map(<u64 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::<u64>(
self.packet_size.as_ref().map(<u64 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::<u64>(
self.async_id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for FrameProcessorEthernetTxRequest {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
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 =
<u64 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.packet_address.get_or_insert_with(|| fidl::new_empty!(u64));
fidl::decode!(u64, 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 =
<u64 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.packet_size.get_or_insert_with(|| fidl::new_empty!(u64));
fidl::decode!(u64, 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 =
<u64 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.async_id.get_or_insert_with(|| fidl::new_empty!(u64));
fidl::decode!(u64, 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 FrameProcessorWlanRxRequest {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.async_id {
return 4;
}
if let Some(_) = self.packet_info {
return 3;
}
if let Some(_) = self.packet_size {
return 2;
}
if let Some(_) = self.packet_address {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for FrameProcessorWlanRxRequest {
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
}
}
impl fidl::encoding::ValueTypeMarker for FrameProcessorWlanRxRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<FrameProcessorWlanRxRequest> for &FrameProcessorWlanRxRequest {
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<FrameProcessorWlanRxRequest>(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::<u64>(
self.packet_address.as_ref().map(<u64 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::<u64>(
self.packet_size.as_ref().map(<u64 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::<WlanRxInfo>(
self.packet_info
.as_ref()
.map(<WlanRxInfo 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::<u64>(
self.async_id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for FrameProcessorWlanRxRequest {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
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 =
<u64 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.packet_address.get_or_insert_with(|| fidl::new_empty!(u64));
fidl::decode!(u64, 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 =
<u64 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.packet_size.get_or_insert_with(|| fidl::new_empty!(u64));
fidl::decode!(u64, 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 =
<WlanRxInfo 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.packet_info.get_or_insert_with(|| fidl::new_empty!(WlanRxInfo));
fidl::decode!(WlanRxInfo, 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 =
<u64 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.async_id.get_or_insert_with(|| fidl::new_empty!(u64));
fidl::decode!(u64, 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 FrameSenderEthernetRxRequest {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.packet_size {
return 2;
}
if let Some(_) = self.packet_address {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for FrameSenderEthernetRxRequest {
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
}
}
impl fidl::encoding::ValueTypeMarker for FrameSenderEthernetRxRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<FrameSenderEthernetRxRequest> for &FrameSenderEthernetRxRequest {
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<FrameSenderEthernetRxRequest>(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::<u64>(
self.packet_address.as_ref().map(<u64 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::<u64>(
self.packet_size.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for FrameSenderEthernetRxRequest {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
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 =
<u64 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.packet_address.get_or_insert_with(|| fidl::new_empty!(u64));
fidl::decode!(u64, 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 =
<u64 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.packet_size.get_or_insert_with(|| fidl::new_empty!(u64));
fidl::decode!(u64, 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 FrameSenderWlanTxRequest {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.async_id {
return 4;
}
if let Some(_) = self.packet_info {
return 3;
}
if let Some(_) = self.packet_size {
return 2;
}
if let Some(_) = self.packet_address {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for FrameSenderWlanTxRequest {
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
}
}
impl fidl::encoding::ValueTypeMarker for FrameSenderWlanTxRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<FrameSenderWlanTxRequest> for &FrameSenderWlanTxRequest {
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<FrameSenderWlanTxRequest>(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::<u64>(
self.packet_address.as_ref().map(<u64 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::<u64>(
self.packet_size.as_ref().map(<u64 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::<WlanTxInfo>(
self.packet_info
.as_ref()
.map(<WlanTxInfo 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::<u64>(
self.async_id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for FrameSenderWlanTxRequest {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
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 =
<u64 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.packet_address.get_or_insert_with(|| fidl::new_empty!(u64));
fidl::decode!(u64, 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 =
<u64 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.packet_size.get_or_insert_with(|| fidl::new_empty!(u64));
fidl::decode!(u64, 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 =
<WlanTxInfo 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.packet_info.get_or_insert_with(|| fidl::new_empty!(WlanTxInfo));
fidl::decode!(WlanTxInfo, 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 =
<u64 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.async_id.get_or_insert_with(|| fidl::new_empty!(u64));
fidl::decode!(u64, 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 WlanAssociationConfig {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.vht_op {
return 12;
}
if let Some(_) = self.vht_cap {
return 11;
}
if let Some(_) = self.ht_op {
return 10;
}
if let Some(_) = self.ht_cap {
return 9;
}
if let Some(_) = self.capability_info {
return 8;
}
if let Some(_) = self.rates {
return 7;
}
if let Some(_) = self.wmm_params {
return 6;
}
if let Some(_) = self.qos {
return 5;
}
if let Some(_) = self.channel {
return 4;
}
if let Some(_) = self.listen_interval {
return 3;
}
if let Some(_) = self.aid {
return 2;
}
if let Some(_) = self.bssid {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for WlanAssociationConfig {
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
}
}
impl fidl::encoding::ValueTypeMarker for WlanAssociationConfig {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanAssociationConfig> for &WlanAssociationConfig {
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanAssociationConfig>(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::encoding::Array<u8, 6>>(
self.bssid
.as_ref()
.map(<fidl::encoding::Array<u8, 6> 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>(
self.aid.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::<u16>(
self.listen_interval.as_ref().map(<u16 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::<fidl_fuchsia_wlan_common::WlanChannel>(
self.channel.as_ref().map(<fidl_fuchsia_wlan_common::WlanChannel 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::<bool>(
self.qos.as_ref().map(<bool 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::<fidl_fuchsia_wlan_common::WlanWmmParameters>(
self.wmm_params.as_ref().map(<fidl_fuchsia_wlan_common::WlanWmmParameters 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::<fidl::encoding::Vector<u8, 263>>(
self.rates.as_ref().map(
<fidl::encoding::Vector<u8, 263> 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::<u16>(
self.capability_info.as_ref().map(<u16 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::<fidl_fuchsia_wlan_ieee80211::HtCapabilities>(
self.ht_cap.as_ref().map(<fidl_fuchsia_wlan_ieee80211::HtCapabilities 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::<fidl_fuchsia_wlan_ieee80211::HtOperation>(
self.ht_op.as_ref().map(<fidl_fuchsia_wlan_ieee80211::HtOperation 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::<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>(
self.vht_cap.as_ref().map(<fidl_fuchsia_wlan_ieee80211::VhtCapabilities 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::<fidl_fuchsia_wlan_ieee80211::VhtOperation>(
self.vht_op.as_ref().map(<fidl_fuchsia_wlan_ieee80211::VhtOperation as fidl::encoding::ValueTypeMarker>::borrow),
encoder, offset + cur_offset, depth
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanAssociationConfig {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
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::encoding::Array<u8, 6> 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
.bssid
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>));
fidl::decode!(fidl::encoding::Array<u8, 6>, 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.aid.get_or_insert_with(|| fidl::new_empty!(u16));
fidl::decode!(u16, 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 =
<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.listen_interval.get_or_insert_with(|| fidl::new_empty!(u16));
fidl::decode!(u16, 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 = <fidl_fuchsia_wlan_common::WlanChannel 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
.channel
.get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_wlan_common::WlanChannel));
fidl::decode!(
fidl_fuchsia_wlan_common::WlanChannel,
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 =
<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.qos.get_or_insert_with(|| fidl::new_empty!(bool));
fidl::decode!(bool, 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 = <fidl_fuchsia_wlan_common::WlanWmmParameters 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.wmm_params.get_or_insert_with(|| {
fidl::new_empty!(fidl_fuchsia_wlan_common::WlanWmmParameters)
});
fidl::decode!(
fidl_fuchsia_wlan_common::WlanWmmParameters,
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 =
<fidl::encoding::Vector<u8, 263> 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
.rates
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 263>));
fidl::decode!(fidl::encoding::Vector<u8, 263>, 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 =
<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.capability_info.get_or_insert_with(|| fidl::new_empty!(u16));
fidl::decode!(u16, 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 = <fidl_fuchsia_wlan_ieee80211::HtCapabilities 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.ht_cap.get_or_insert_with(|| {
fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::HtCapabilities)
});
fidl::decode!(
fidl_fuchsia_wlan_ieee80211::HtCapabilities,
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 = <fidl_fuchsia_wlan_ieee80211::HtOperation 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.ht_op.get_or_insert_with(|| {
fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::HtOperation)
});
fidl::decode!(
fidl_fuchsia_wlan_ieee80211::HtOperation,
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 = <fidl_fuchsia_wlan_ieee80211::VhtCapabilities 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.vht_cap.get_or_insert_with(|| {
fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::VhtCapabilities)
});
fidl::decode!(
fidl_fuchsia_wlan_ieee80211::VhtCapabilities,
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 = <fidl_fuchsia_wlan_ieee80211::VhtOperation 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.vht_op.get_or_insert_with(|| {
fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::VhtOperation)
});
fidl::decode!(
fidl_fuchsia_wlan_ieee80211::VhtOperation,
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 WlanKeyConfiguration {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.rsc {
return 8;
}
if let Some(_) = self.key {
return 7;
}
if let Some(_) = self.key_idx {
return 6;
}
if let Some(_) = self.peer_addr {
return 5;
}
if let Some(_) = self.key_type {
return 4;
}
if let Some(_) = self.cipher_type {
return 3;
}
if let Some(_) = self.cipher_oui {
return 2;
}
if let Some(_) = self.protection {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for WlanKeyConfiguration {
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
}
}
impl fidl::encoding::ValueTypeMarker for WlanKeyConfiguration {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanKeyConfiguration> for &WlanKeyConfiguration {
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanKeyConfiguration>(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::<WlanProtection>(
self.protection
.as_ref()
.map(<WlanProtection 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::Array<u8, 3>>(
self.cipher_oui
.as_ref()
.map(<fidl::encoding::Array<u8, 3> 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::<u8>(
self.cipher_type.as_ref().map(<u8 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::<fidl_fuchsia_wlan_common::WlanKeyType>(
self.key_type.as_ref().map(<fidl_fuchsia_wlan_common::WlanKeyType 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::<fidl::encoding::Array<u8, 6>>(
self.peer_addr
.as_ref()
.map(<fidl::encoding::Array<u8, 6> 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::<u8>(
self.key_idx.as_ref().map(<u8 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::<fidl::encoding::Vector<u8, 32>>(
self.key.as_ref().map(
<fidl::encoding::Vector<u8, 32> 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::<u64>(
self.rsc.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanKeyConfiguration {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
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 =
<WlanProtection 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.protection.get_or_insert_with(|| fidl::new_empty!(WlanProtection));
fidl::decode!(WlanProtection, 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::Array<u8, 3> 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
.cipher_oui
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 3>));
fidl::decode!(fidl::encoding::Array<u8, 3>, 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 =
<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.cipher_type.get_or_insert_with(|| fidl::new_empty!(u8));
fidl::decode!(u8, 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 = <fidl_fuchsia_wlan_common::WlanKeyType 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
.key_type
.get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_wlan_common::WlanKeyType));
fidl::decode!(
fidl_fuchsia_wlan_common::WlanKeyType,
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 =
<fidl::encoding::Array<u8, 6> 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
.peer_addr
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>));
fidl::decode!(fidl::encoding::Array<u8, 6>, 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 =
<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.key_idx.get_or_insert_with(|| fidl::new_empty!(u8));
fidl::decode!(u8, 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 =
<fidl::encoding::Vector<u8, 32> 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
.key
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 32>));
fidl::decode!(fidl::encoding::Vector<u8, 32>, 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 =
<u64 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.rsc.get_or_insert_with(|| fidl::new_empty!(u64));
fidl::decode!(u64, 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 WlanSoftmacBandCapability {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.operating_channels {
return 11;
}
if let Some(_) = self.basic_rates {
return 10;
}
if let Some(_) = self.operating_channel_list {
return 9;
}
if let Some(_) = self.operating_channel_count {
return 8;
}
if let Some(_) = self.vht_caps {
return 7;
}
if let Some(_) = self.vht_supported {
return 6;
}
if let Some(_) = self.ht_caps {
return 5;
}
if let Some(_) = self.ht_supported {
return 4;
}
if let Some(_) = self.basic_rate_list {
return 3;
}
if let Some(_) = self.basic_rate_count {
return 2;
}
if let Some(_) = self.band {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBandCapability {
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
}
}
impl fidl::encoding::ValueTypeMarker for WlanSoftmacBandCapability {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanSoftmacBandCapability> for &WlanSoftmacBandCapability {
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBandCapability>(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_wlan_common::WlanBand>(
self.band.as_ref().map(
<fidl_fuchsia_wlan_common::WlanBand 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::<u8>(
self.basic_rate_count.as_ref().map(<u8 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::<fidl::encoding::Array<u8, 12>>(
self.basic_rate_list.as_ref().map(
<fidl::encoding::Array<u8, 12> 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>(
self.ht_supported.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::<fidl_fuchsia_wlan_ieee80211::HtCapabilities>(
self.ht_caps.as_ref().map(<fidl_fuchsia_wlan_ieee80211::HtCapabilities 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::<bool>(
self.vht_supported.as_ref().map(<bool 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::<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>(
self.vht_caps.as_ref().map(<fidl_fuchsia_wlan_ieee80211::VhtCapabilities 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::<u16>(
self.operating_channel_count
.as_ref()
.map(<u16 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::<fidl::encoding::Array<u8, 256>>(
self.operating_channel_list.as_ref().map(
<fidl::encoding::Array<u8, 256> 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::<fidl::encoding::Vector<u8, 12>>(
self.basic_rates.as_ref().map(
<fidl::encoding::Vector<u8, 12> 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::<fidl::encoding::Vector<u8, 256>>(
self.operating_channels.as_ref().map(
<fidl::encoding::Vector<u8, 256> as fidl::encoding::ValueTypeMarker>::borrow,
),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanSoftmacBandCapability {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
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_wlan_common::WlanBand 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
.band
.get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_wlan_common::WlanBand));
fidl::decode!(
fidl_fuchsia_wlan_common::WlanBand,
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 =
<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.basic_rate_count.get_or_insert_with(|| fidl::new_empty!(u8));
fidl::decode!(u8, 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 =
<fidl::encoding::Array<u8, 12> 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
.basic_rate_list
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 12>));
fidl::decode!(fidl::encoding::Array<u8, 12>, 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.ht_supported.get_or_insert_with(|| fidl::new_empty!(bool));
fidl::decode!(bool, 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 = <fidl_fuchsia_wlan_ieee80211::HtCapabilities 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.ht_caps.get_or_insert_with(|| {
fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::HtCapabilities)
});
fidl::decode!(
fidl_fuchsia_wlan_ieee80211::HtCapabilities,
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 =
<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.vht_supported.get_or_insert_with(|| fidl::new_empty!(bool));
fidl::decode!(bool, 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 = <fidl_fuchsia_wlan_ieee80211::VhtCapabilities 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.vht_caps.get_or_insert_with(|| {
fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::VhtCapabilities)
});
fidl::decode!(
fidl_fuchsia_wlan_ieee80211::VhtCapabilities,
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 =
<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.operating_channel_count.get_or_insert_with(|| fidl::new_empty!(u16));
fidl::decode!(u16, 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 =
<fidl::encoding::Array<u8, 256> 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
.operating_channel_list
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 256>));
fidl::decode!(fidl::encoding::Array<u8, 256>, 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 =
<fidl::encoding::Vector<u8, 12> 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
.basic_rates
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 12>));
fidl::decode!(fidl::encoding::Vector<u8, 12>, 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 =
<fidl::encoding::Vector<u8, 256> 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
.operating_channels
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 256>));
fidl::decode!(fidl::encoding::Vector<u8, 256>, 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 WlanSoftmacBaseCancelScanRequest {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.scan_id {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseCancelScanRequest {
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
}
}
impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseCancelScanRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanSoftmacBaseCancelScanRequest>
for &WlanSoftmacBaseCancelScanRequest
{
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBaseCancelScanRequest>(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::<u64>(
self.scan_id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanSoftmacBaseCancelScanRequest {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
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 =
<u64 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.scan_id.get_or_insert_with(|| fidl::new_empty!(u64));
fidl::decode!(u64, 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 WlanSoftmacBaseClearAssociationRequest {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.peer_addr {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseClearAssociationRequest {
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
}
}
impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseClearAssociationRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanSoftmacBaseClearAssociationRequest>
for &WlanSoftmacBaseClearAssociationRequest
{
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBaseClearAssociationRequest>(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::encoding::Array<u8, 6>>(
self.peer_addr
.as_ref()
.map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanSoftmacBaseClearAssociationRequest {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
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::encoding::Array<u8, 6> 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
.peer_addr
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>));
fidl::decode!(fidl::encoding::Array<u8, 6>, 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 WlanSoftmacBaseEnableBeaconingRequest {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.beacon_interval {
return 3;
}
if let Some(_) = self.tim_ele_offset {
return 2;
}
if let Some(_) = self.packet_template {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseEnableBeaconingRequest {
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
}
}
impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseEnableBeaconingRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanSoftmacBaseEnableBeaconingRequest>
for &WlanSoftmacBaseEnableBeaconingRequest
{
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBaseEnableBeaconingRequest>(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::<WlanTxPacket>(
self.packet_template
.as_ref()
.map(<WlanTxPacket 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::<u64>(
self.tim_ele_offset.as_ref().map(<u64 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::<u16>(
self.beacon_interval.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanSoftmacBaseEnableBeaconingRequest {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
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 =
<WlanTxPacket 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.packet_template.get_or_insert_with(|| fidl::new_empty!(WlanTxPacket));
fidl::decode!(WlanTxPacket, 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 =
<u64 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.tim_ele_offset.get_or_insert_with(|| fidl::new_empty!(u64));
fidl::decode!(u64, 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 =
<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.beacon_interval.get_or_insert_with(|| fidl::new_empty!(u16));
fidl::decode!(u16, 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 WlanSoftmacBaseSetChannelRequest {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.channel {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseSetChannelRequest {
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
}
}
impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseSetChannelRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanSoftmacBaseSetChannelRequest>
for &WlanSoftmacBaseSetChannelRequest
{
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBaseSetChannelRequest>(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_wlan_common::WlanChannel>(
self.channel.as_ref().map(<fidl_fuchsia_wlan_common::WlanChannel as fidl::encoding::ValueTypeMarker>::borrow),
encoder, offset + cur_offset, depth
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanSoftmacBaseSetChannelRequest {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
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_wlan_common::WlanChannel 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
.channel
.get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_wlan_common::WlanChannel));
fidl::decode!(
fidl_fuchsia_wlan_common::WlanChannel,
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 WlanSoftmacBaseStartPassiveScanRequest {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.min_home_time {
return 4;
}
if let Some(_) = self.max_channel_time {
return 3;
}
if let Some(_) = self.min_channel_time {
return 2;
}
if let Some(_) = self.channels {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseStartPassiveScanRequest {
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
}
}
impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseStartPassiveScanRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanSoftmacBaseStartPassiveScanRequest>
for &WlanSoftmacBaseStartPassiveScanRequest
{
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBaseStartPassiveScanRequest>(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::encoding::Vector<u8, 256>>(
self.channels.as_ref().map(
<fidl::encoding::Vector<u8, 256> 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::<i64>(
self.min_channel_time
.as_ref()
.map(<i64 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>(
self.max_channel_time
.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::<i64>(
self.min_home_time.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanSoftmacBaseStartPassiveScanRequest {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
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::encoding::Vector<u8, 256> 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
.channels
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 256>));
fidl::decode!(fidl::encoding::Vector<u8, 256>, 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 =
<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.min_channel_time.get_or_insert_with(|| fidl::new_empty!(i64));
fidl::decode!(i64, 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.max_channel_time.get_or_insert_with(|| fidl::new_empty!(i64));
fidl::decode!(i64, 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 =
<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.min_home_time.get_or_insert_with(|| fidl::new_empty!(i64));
fidl::decode!(i64, 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 WlanSoftmacBaseUpdateWmmParametersRequest {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.params {
return 2;
}
if let Some(_) = self.ac {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseUpdateWmmParametersRequest {
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
}
}
impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseUpdateWmmParametersRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanSoftmacBaseUpdateWmmParametersRequest>
for &WlanSoftmacBaseUpdateWmmParametersRequest
{
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBaseUpdateWmmParametersRequest>(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_wlan_ieee80211::WlanAccessCategory>(
self.ac.as_ref().map(<fidl_fuchsia_wlan_ieee80211::WlanAccessCategory 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_fuchsia_wlan_common::WlanWmmParameters>(
self.params.as_ref().map(<fidl_fuchsia_wlan_common::WlanWmmParameters as fidl::encoding::ValueTypeMarker>::borrow),
encoder, offset + cur_offset, depth
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanSoftmacBaseUpdateWmmParametersRequest {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
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_wlan_ieee80211::WlanAccessCategory 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.ac.get_or_insert_with(|| {
fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::WlanAccessCategory)
});
fidl::decode!(
fidl_fuchsia_wlan_ieee80211::WlanAccessCategory,
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_fuchsia_wlan_common::WlanWmmParameters 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.params.get_or_insert_with(|| {
fidl::new_empty!(fidl_fuchsia_wlan_common::WlanWmmParameters)
});
fidl::decode!(
fidl_fuchsia_wlan_common::WlanWmmParameters,
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 WlanSoftmacBaseStartActiveScanResponse {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.scan_id {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseStartActiveScanResponse {
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
}
}
impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseStartActiveScanResponse {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanSoftmacBaseStartActiveScanResponse>
for &WlanSoftmacBaseStartActiveScanResponse
{
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBaseStartActiveScanResponse>(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::<u64>(
self.scan_id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanSoftmacBaseStartActiveScanResponse {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
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 =
<u64 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.scan_id.get_or_insert_with(|| fidl::new_empty!(u64));
fidl::decode!(u64, 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 WlanSoftmacBaseStartPassiveScanResponse {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.scan_id {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseStartPassiveScanResponse {
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
}
}
impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseStartPassiveScanResponse {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanSoftmacBaseStartPassiveScanResponse>
for &WlanSoftmacBaseStartPassiveScanResponse
{
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacBaseStartPassiveScanResponse>(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::<u64>(
self.scan_id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanSoftmacBaseStartPassiveScanResponse {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
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 =
<u64 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.scan_id.get_or_insert_with(|| fidl::new_empty!(u64));
fidl::decode!(u64, 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 WlanSoftmacIfcBaseNotifyScanCompleteRequest {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.scan_id {
return 2;
}
if let Some(_) = self.status {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for WlanSoftmacIfcBaseNotifyScanCompleteRequest {
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
}
}
impl fidl::encoding::ValueTypeMarker for WlanSoftmacIfcBaseNotifyScanCompleteRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanSoftmacIfcBaseNotifyScanCompleteRequest>
for &WlanSoftmacIfcBaseNotifyScanCompleteRequest
{
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacIfcBaseNotifyScanCompleteRequest>(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::<i32>(
self.status.as_ref().map(<i32 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::<u64>(
self.scan_id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanSoftmacIfcBaseNotifyScanCompleteRequest {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
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 =
<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.status.get_or_insert_with(|| fidl::new_empty!(i32));
fidl::decode!(i32, 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 =
<u64 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.scan_id.get_or_insert_with(|| fidl::new_empty!(u64));
fidl::decode!(u64, 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 WlanSoftmacQueryResponse {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.band_caps {
return 5;
}
if let Some(_) = self.hardware_capability {
return 4;
}
if let Some(_) = self.supported_phys {
return 3;
}
if let Some(_) = self.mac_role {
return 2;
}
if let Some(_) = self.sta_addr {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for WlanSoftmacQueryResponse {
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
}
}
impl fidl::encoding::ValueTypeMarker for WlanSoftmacQueryResponse {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanSoftmacQueryResponse> for &WlanSoftmacQueryResponse {
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacQueryResponse>(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::encoding::Array<u8, 6>>(
self.sta_addr
.as_ref()
.map(<fidl::encoding::Array<u8, 6> 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_fuchsia_wlan_common::WlanMacRole>(
self.mac_role.as_ref().map(<fidl_fuchsia_wlan_common::WlanMacRole 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::<fidl::encoding::Vector<fidl_fuchsia_wlan_common::WlanPhyType, 64>>(
self.supported_phys.as_ref().map(<fidl::encoding::Vector<fidl_fuchsia_wlan_common::WlanPhyType, 64> 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::<u32>(
self.hardware_capability
.as_ref()
.map(<u32 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::<fidl::encoding::Vector<WlanSoftmacBandCapability, 16>>(
self.band_caps.as_ref().map(<fidl::encoding::Vector<WlanSoftmacBandCapability, 16> as fidl::encoding::ValueTypeMarker>::borrow),
encoder, offset + cur_offset, depth
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanSoftmacQueryResponse {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
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::encoding::Array<u8, 6> 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
.sta_addr
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>));
fidl::decode!(fidl::encoding::Array<u8, 6>, 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_fuchsia_wlan_common::WlanMacRole 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_role
.get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_wlan_common::WlanMacRole));
fidl::decode!(
fidl_fuchsia_wlan_common::WlanMacRole,
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 = <fidl::encoding::Vector<
fidl_fuchsia_wlan_common::WlanPhyType,
64,
> 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.supported_phys.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_wlan_common::WlanPhyType, 64>));
fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_wlan_common::WlanPhyType, 64>, 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 =
<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.hardware_capability.get_or_insert_with(|| fidl::new_empty!(u32));
fidl::decode!(u32, 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 = <fidl::encoding::Vector<WlanSoftmacBandCapability, 16> 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.band_caps.get_or_insert_with(
|| fidl::new_empty!(fidl::encoding::Vector<WlanSoftmacBandCapability, 16>),
);
fidl::decode!(fidl::encoding::Vector<WlanSoftmacBandCapability, 16>, 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 WlanSoftmacStartActiveScanRequest {
#[inline(always)]
fn max_ordinal_present(&self) -> u64 {
if let Some(_) = self.max_probes_per_channel {
return 9;
}
if let Some(_) = self.min_probes_per_channel {
return 8;
}
if let Some(_) = self.min_home_time {
return 7;
}
if let Some(_) = self.max_channel_time {
return 6;
}
if let Some(_) = self.min_channel_time {
return 5;
}
if let Some(_) = self.ies {
return 4;
}
if let Some(_) = self.mac_header {
return 3;
}
if let Some(_) = self.ssids {
return 2;
}
if let Some(_) = self.channels {
return 1;
}
0
}
}
unsafe impl fidl::encoding::TypeMarker for WlanSoftmacStartActiveScanRequest {
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
}
}
impl fidl::encoding::ValueTypeMarker for WlanSoftmacStartActiveScanRequest {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<WlanSoftmacStartActiveScanRequest>
for &WlanSoftmacStartActiveScanRequest
{
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WlanSoftmacStartActiveScanRequest>(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::encoding::Vector<u8, 256>>(
self.channels.as_ref().map(
<fidl::encoding::Vector<u8, 256> 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<fidl_fuchsia_wlan_ieee80211::CSsid, 84>>(
self.ssids.as_ref().map(<fidl::encoding::Vector<fidl_fuchsia_wlan_ieee80211::CSsid, 84> 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::<fidl::encoding::Vector<u8, 28>>(
self.mac_header.as_ref().map(
<fidl::encoding::Vector<u8, 28> 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::<fidl::encoding::Vector<u8, 11454>>(
self.ies.as_ref().map(
<fidl::encoding::Vector<u8, 11454> 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::<i64>(
self.min_channel_time
.as_ref()
.map(<i64 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::<i64>(
self.max_channel_time
.as_ref()
.map(<i64 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::<i64>(
self.min_home_time.as_ref().map(<i64 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::<u8>(
self.min_probes_per_channel
.as_ref()
.map(<u8 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>(
self.max_probes_per_channel
.as_ref()
.map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
encoder,
offset + cur_offset,
depth,
)?;
_prev_end_offset = cur_offset + envelope_size;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for WlanSoftmacStartActiveScanRequest {
#[inline(always)]
fn new_empty() -> Self {
Self::default()
}
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
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::encoding::Vector<u8, 256> 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
.channels
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 256>));
fidl::decode!(fidl::encoding::Vector<u8, 256>, 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<
fidl_fuchsia_wlan_ieee80211::CSsid,
84,
> 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.ssids.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_wlan_ieee80211::CSsid, 84>));
fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_wlan_ieee80211::CSsid, 84>, 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 =
<fidl::encoding::Vector<u8, 28> 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_header
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 28>));
fidl::decode!(fidl::encoding::Vector<u8, 28>, 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 =
<fidl::encoding::Vector<u8, 11454> 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
.ies
.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 11454>));
fidl::decode!(fidl::encoding::Vector<u8, 11454>, 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 =
<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.min_channel_time.get_or_insert_with(|| fidl::new_empty!(i64));
fidl::decode!(i64, 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 =
<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.max_channel_time.get_or_insert_with(|| fidl::new_empty!(i64));
fidl::decode!(i64, 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 =
<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.min_home_time.get_or_insert_with(|| fidl::new_empty!(i64));
fidl::decode!(i64, 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 =
<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.min_probes_per_channel.get_or_insert_with(|| fidl::new_empty!(u8));
fidl::decode!(u8, 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.max_probes_per_channel.get_or_insert_with(|| fidl::new_empty!(u8));
fidl::decode!(u8, 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(())
}
}
}