#![warn(clippy::all)]
#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
use bitflags::bitflags;
use fidl::client::QueryResponseFut;
use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
use fidl::endpoints::{ControlHandle as _, Responder as _};
use futures::future::{self, MaybeDone, TryFutureExt};
use zx_status;
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(u32)]
pub enum DisconnectMlmeEventName {
DeauthenticateIndication = 1,
DisassociateIndication = 2,
RoamStartIndication = 3,
RoamResultIndication = 4,
SaeHandshakeResponse = 5,
RoamRequest = 6,
RoamConfirmation = 7,
}
impl DisconnectMlmeEventName {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
1 => Some(Self::DeauthenticateIndication),
2 => Some(Self::DisassociateIndication),
3 => Some(Self::RoamStartIndication),
4 => Some(Self::RoamResultIndication),
5 => Some(Self::SaeHandshakeResponse),
6 => Some(Self::RoamRequest),
7 => Some(Self::RoamConfirmation),
_ => None,
}
}
#[inline]
pub const fn into_primitive(self) -> u32 {
self as u32
}
#[deprecated = "Strict enums should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(u32)]
pub enum Protection {
Unknown = 0,
Open = 1,
Wep = 2,
Wpa1 = 3,
Wpa1Wpa2PersonalTkipOnly = 4,
Wpa2PersonalTkipOnly = 5,
Wpa1Wpa2Personal = 6,
Wpa2Personal = 7,
Wpa2Wpa3Personal = 8,
Wpa3Personal = 9,
Wpa2Enterprise = 10,
Wpa3Enterprise = 11,
}
impl Protection {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
0 => Some(Self::Unknown),
1 => Some(Self::Open),
2 => Some(Self::Wep),
3 => Some(Self::Wpa1),
4 => Some(Self::Wpa1Wpa2PersonalTkipOnly),
5 => Some(Self::Wpa2PersonalTkipOnly),
6 => Some(Self::Wpa1Wpa2Personal),
7 => Some(Self::Wpa2Personal),
8 => Some(Self::Wpa2Wpa3Personal),
9 => Some(Self::Wpa3Personal),
10 => Some(Self::Wpa2Enterprise),
11 => Some(Self::Wpa3Enterprise),
_ => None,
}
}
#[inline]
pub const fn into_primitive(self) -> u32 {
self as u32
}
#[deprecated = "Strict enums should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(u32)]
pub enum ScanErrorCode {
NotSupported = 1,
InternalError = 2,
InternalMlmeError = 3,
ShouldWait = 4,
CanceledByDriverOrFirmware = 5,
}
impl ScanErrorCode {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
1 => Some(Self::NotSupported),
2 => Some(Self::InternalError),
3 => Some(Self::InternalMlmeError),
4 => Some(Self::ShouldWait),
5 => Some(Self::CanceledByDriverOrFirmware),
_ => None,
}
}
#[inline]
pub const fn into_primitive(self) -> u32 {
self as u32
}
#[deprecated = "Strict enums should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(u32)]
pub enum StartApResultCode {
Success = 0,
AlreadyStarted = 1,
InternalError = 2,
Canceled = 3,
TimedOut = 4,
PreviousStartInProgress = 5,
InvalidArguments = 6,
}
impl StartApResultCode {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
0 => Some(Self::Success),
1 => Some(Self::AlreadyStarted),
2 => Some(Self::InternalError),
3 => Some(Self::Canceled),
4 => Some(Self::TimedOut),
5 => Some(Self::PreviousStartInProgress),
6 => Some(Self::InvalidArguments),
_ => None,
}
}
#[inline]
pub const fn into_primitive(self) -> u32 {
self as u32
}
#[deprecated = "Strict enums should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(u32)]
pub enum StopApResultCode {
Success = 0,
InternalError = 1,
TimedOut = 2,
}
impl StopApResultCode {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
0 => Some(Self::Success),
1 => Some(Self::InternalError),
2 => Some(Self::TimedOut),
_ => None,
}
}
#[inline]
pub const fn into_primitive(self) -> u32 {
self as u32
}
#[deprecated = "Strict enums should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(u32)]
pub enum UserDisconnectReason {
Unknown = 0,
FailedToConnect = 1,
FidlConnectRequest = 2,
FidlStopClientConnectionsRequest = 3,
ProactiveNetworkSwitch = 4,
DisconnectDetectedFromSme = 5,
RegulatoryRegionChange = 6,
Startup = 7,
NetworkUnsaved = 8,
NetworkConfigUpdated = 9,
Recovery = 10,
WlanstackUnitTesting = 124,
WlanSmeUnitTesting = 125,
WlanServiceUtilTesting = 126,
WlanDevTool = 127,
}
impl UserDisconnectReason {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
0 => Some(Self::Unknown),
1 => Some(Self::FailedToConnect),
2 => Some(Self::FidlConnectRequest),
3 => Some(Self::FidlStopClientConnectionsRequest),
4 => Some(Self::ProactiveNetworkSwitch),
5 => Some(Self::DisconnectDetectedFromSme),
6 => Some(Self::RegulatoryRegionChange),
7 => Some(Self::Startup),
8 => Some(Self::NetworkUnsaved),
9 => Some(Self::NetworkConfigUpdated),
10 => Some(Self::Recovery),
124 => Some(Self::WlanstackUnitTesting),
125 => Some(Self::WlanSmeUnitTesting),
126 => Some(Self::WlanServiceUtilTesting),
127 => Some(Self::WlanDevTool),
_ => None,
}
}
#[inline]
pub const fn into_primitive(self) -> u32 {
self as u32
}
#[deprecated = "Strict enums should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ActiveScanRequest {
pub ssids: Vec<Vec<u8>>,
pub channels: Vec<u8>,
}
impl fidl::Persistable for ActiveScanRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct Ap {
pub ssid: Vec<u8>,
pub channel: u8,
pub num_clients: u16,
}
impl fidl::Persistable for Ap {}
#[derive(Clone, Debug, PartialEq)]
pub struct ApConfig {
pub ssid: Vec<u8>,
pub password: Vec<u8>,
pub radio_cfg: RadioConfig,
}
impl fidl::Persistable for ApConfig {}
#[derive(Clone, Debug, PartialEq)]
pub struct ApSmeStartRequest {
pub config: ApConfig,
}
impl fidl::Persistable for ApSmeStartRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ApSmeStartResponse {
pub code: StartApResultCode,
}
impl fidl::Persistable for ApSmeStartResponse {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ApSmeStatusResponse {
pub resp: ApStatusResponse,
}
impl fidl::Persistable for ApSmeStatusResponse {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ApSmeStopResponse {
pub code: StopApResultCode,
}
impl fidl::Persistable for ApSmeStopResponse {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ApStatusResponse {
pub running_ap: Option<Box<Ap>>,
}
impl fidl::Persistable for ApStatusResponse {}
#[derive(Debug, PartialEq)]
pub struct ClientSmeConnectRequest {
pub req: ConnectRequest,
pub txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ClientSmeConnectRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ClientSmeDisconnectRequest {
pub reason: UserDisconnectReason,
}
impl fidl::Persistable for ClientSmeDisconnectRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct ClientSmeRoamRequest {
pub req: RoamRequest,
}
impl fidl::Persistable for ClientSmeRoamRequest {}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ClientSmeScanForControllerRequest {
pub req: ScanRequest,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for ClientSmeScanForControllerRequest
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ClientSmeScanRequest {
pub req: ScanRequest,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ClientSmeScanRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct ClientSmeStatusResponse {
pub resp: ClientStatusResponse,
}
impl fidl::Persistable for ClientSmeStatusResponse {}
#[derive(Debug, PartialEq)]
pub struct ClientSmeScanForControllerResponse {
pub scan_results: Vec<ScanResult>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for ClientSmeScanForControllerResponse
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ClientSmeScanResponse {
pub scan_results: fidl::Vmo,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ClientSmeScanResponse {}
#[derive(Clone, Debug, PartialEq)]
pub struct ClientSmeWmmStatusResponse {
pub resp: fidl_fuchsia_wlan_internal::WmmStatusResponse,
}
impl fidl::Persistable for ClientSmeWmmStatusResponse {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct Compatibility {
pub mutual_security_protocols: Vec<fidl_fuchsia_wlan_common_security::Protocol>,
}
impl fidl::Persistable for Compatibility {}
#[derive(Clone, Debug, PartialEq)]
pub struct ConnectRequest {
pub ssid: Vec<u8>,
pub bss_description: fidl_fuchsia_wlan_common::BssDescription,
pub multiple_bss_candidates: bool,
pub authentication: fidl_fuchsia_wlan_common_security::Authentication,
pub deprecated_scan_type: fidl_fuchsia_wlan_common::ScanType,
}
impl fidl::Persistable for ConnectRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ConnectResult {
pub code: fidl_fuchsia_wlan_ieee80211::StatusCode,
pub is_credential_rejected: bool,
pub is_reconnect: bool,
}
impl fidl::Persistable for ConnectResult {}
#[derive(Clone, Debug, PartialEq)]
pub struct ConnectTransactionOnChannelSwitchedRequest {
pub info: fidl_fuchsia_wlan_internal::ChannelSwitchInfo,
}
impl fidl::Persistable for ConnectTransactionOnChannelSwitchedRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ConnectTransactionOnConnectResultRequest {
pub result: ConnectResult,
}
impl fidl::Persistable for ConnectTransactionOnConnectResultRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ConnectTransactionOnDisconnectRequest {
pub info: DisconnectInfo,
}
impl fidl::Persistable for ConnectTransactionOnDisconnectRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct ConnectTransactionOnRoamResultRequest {
pub result: RoamResult,
}
impl fidl::Persistable for ConnectTransactionOnRoamResultRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct ConnectTransactionOnSignalReportRequest {
pub ind: fidl_fuchsia_wlan_internal::SignalReportIndication,
}
impl fidl::Persistable for ConnectTransactionOnSignalReportRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct DisconnectCause {
pub mlme_event_name: DisconnectMlmeEventName,
pub reason_code: fidl_fuchsia_wlan_ieee80211::ReasonCode,
}
impl fidl::Persistable for DisconnectCause {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct DisconnectInfo {
pub is_sme_reconnecting: bool,
pub disconnect_source: DisconnectSource,
}
impl fidl::Persistable for DisconnectInfo {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct Empty;
impl fidl::Persistable for Empty {}
#[derive(Clone, Debug, PartialEq)]
pub struct FeatureSupportQueryDiscoverySupportResponse {
pub resp: fidl_fuchsia_wlan_common::DiscoverySupport,
}
impl fidl::Persistable for FeatureSupportQueryDiscoverySupportResponse {}
#[derive(Clone, Debug, PartialEq)]
pub struct FeatureSupportQueryMacSublayerSupportResponse {
pub resp: fidl_fuchsia_wlan_common::MacSublayerSupport,
}
impl fidl::Persistable for FeatureSupportQueryMacSublayerSupportResponse {}
#[derive(Clone, Debug, PartialEq)]
pub struct FeatureSupportQuerySecuritySupportResponse {
pub resp: fidl_fuchsia_wlan_common::SecuritySupport,
}
impl fidl::Persistable for FeatureSupportQuerySecuritySupportResponse {}
#[derive(Clone, Debug, PartialEq)]
pub struct FeatureSupportQuerySpectrumManagementSupportResponse {
pub resp: fidl_fuchsia_wlan_common::SpectrumManagementSupport,
}
impl fidl::Persistable for FeatureSupportQuerySpectrumManagementSupportResponse {}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct GenericSmeGetApSmeRequest {
pub sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for GenericSmeGetApSmeRequest {}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct GenericSmeGetClientSmeRequest {
pub sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for GenericSmeGetClientSmeRequest
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct GenericSmeGetFeatureSupportRequest {
pub feature_support_server: fidl::endpoints::ServerEnd<FeatureSupportMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for GenericSmeGetFeatureSupportRequest
{
}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct GenericSmeGetSmeTelemetryRequest {
pub telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for GenericSmeGetSmeTelemetryRequest
{
}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct GenericSmeQuery {
pub role: fidl_fuchsia_wlan_common::WlanMacRole,
pub sta_addr: [u8; 6],
}
impl fidl::Persistable for GenericSmeQuery {}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct GenericSmeQueryResponse {
pub resp: GenericSmeQuery,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for GenericSmeQueryResponse {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct LegacyPrivacySupport {
pub wep_supported: bool,
pub wpa1_supported: bool,
}
impl fidl::Persistable for LegacyPrivacySupport {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct PassiveScanRequest;
impl fidl::Persistable for PassiveScanRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct RadioConfig {
pub phy: fidl_fuchsia_wlan_common::WlanPhyType,
pub channel: fidl_fuchsia_wlan_common::WlanChannel,
}
impl fidl::Persistable for RadioConfig {}
#[derive(Clone, Debug, PartialEq)]
pub struct RoamRequest {
pub bss_description: fidl_fuchsia_wlan_common::BssDescription,
}
impl fidl::Persistable for RoamRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct RoamResult {
pub bssid: [u8; 6],
pub status_code: fidl_fuchsia_wlan_ieee80211::StatusCode,
pub original_association_maintained: bool,
pub bss_description: Option<Box<fidl_fuchsia_wlan_common::BssDescription>>,
pub disconnect_info: Option<Box<DisconnectInfo>>,
pub is_credential_rejected: bool,
}
impl fidl::Persistable for RoamResult {}
#[derive(Clone, Debug, PartialEq)]
pub struct ScanResult {
pub compatibility: Option<Box<Compatibility>>,
pub timestamp_nanos: i64,
pub bss_description: fidl_fuchsia_wlan_common::BssDescription,
}
impl fidl::Persistable for ScanResult {}
#[derive(Clone, Debug, PartialEq)]
pub struct ScanResultVector {
pub results: Vec<ScanResult>,
}
impl fidl::Persistable for ScanResultVector {}
#[derive(Clone, Debug, PartialEq)]
pub struct ServingApInfo {
pub bssid: [u8; 6],
pub ssid: Vec<u8>,
pub rssi_dbm: i8,
pub snr_db: i8,
pub channel: fidl_fuchsia_wlan_common::WlanChannel,
pub protection: Protection,
}
impl fidl::Persistable for ServingApInfo {}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct TelemetryCloneInspectVmoResponse {
pub inspect_vmo: fidl::Vmo,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for TelemetryCloneInspectVmoResponse
{
}
#[derive(Clone, Debug, PartialEq)]
pub struct TelemetryGetCounterStatsResponse {
pub stats: fidl_fuchsia_wlan_stats::IfaceCounterStats,
}
impl fidl::Persistable for TelemetryGetCounterStatsResponse {}
#[derive(Clone, Debug, PartialEq)]
pub struct TelemetryGetHistogramStatsResponse {
pub stats: fidl_fuchsia_wlan_stats::IfaceHistogramStats,
}
impl fidl::Persistable for TelemetryGetHistogramStatsResponse {}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct UsmeBootstrapStartRequest {
pub generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
pub legacy_privacy_support: LegacyPrivacySupport,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UsmeBootstrapStartRequest {}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct UsmeBootstrapStartResponse {
pub inspect_vmo: fidl::Vmo,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
for UsmeBootstrapStartResponse
{
}
#[derive(Clone, Debug, PartialEq)]
pub enum ClientStatusResponse {
Connected(ServingApInfo),
Connecting(Vec<u8>),
Idle(Empty),
Roaming([u8; 6]),
}
impl ClientStatusResponse {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::Connected(_) => 1,
Self::Connecting(_) => 2,
Self::Idle(_) => 3,
Self::Roaming(_) => 4,
}
}
#[deprecated = "Strict unions should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
impl fidl::Persistable for ClientStatusResponse {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub enum DisconnectSource {
Ap(DisconnectCause),
User(UserDisconnectReason),
Mlme(DisconnectCause),
}
impl DisconnectSource {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::Ap(_) => 1,
Self::User(_) => 2,
Self::Mlme(_) => 3,
}
}
#[deprecated = "Strict unions should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
impl fidl::Persistable for DisconnectSource {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub enum ScanRequest {
Active(ActiveScanRequest),
Passive(PassiveScanRequest),
}
impl ScanRequest {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::Active(_) => 1,
Self::Passive(_) => 2,
}
}
#[deprecated = "Strict unions should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
impl fidl::Persistable for ScanRequest {}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct ApSmeMarker;
impl fidl::endpoints::ProtocolMarker for ApSmeMarker {
type Proxy = ApSmeProxy;
type RequestStream = ApSmeRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = ApSmeSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) ApSme";
}
pub trait ApSmeProxyInterface: Send + Sync {
type StartResponseFut: std::future::Future<Output = Result<StartApResultCode, fidl::Error>>
+ Send;
fn r#start(&self, config: &ApConfig) -> Self::StartResponseFut;
type StopResponseFut: std::future::Future<Output = Result<StopApResultCode, fidl::Error>> + Send;
fn r#stop(&self) -> Self::StopResponseFut;
type StatusResponseFut: std::future::Future<Output = Result<ApStatusResponse, fidl::Error>>
+ Send;
fn r#status(&self) -> Self::StatusResponseFut;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct ApSmeSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for ApSmeSynchronousProxy {
type Proxy = ApSmeProxy;
type Protocol = ApSmeMarker;
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 ApSmeSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <ApSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
}
pub fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
pub fn wait_for_event(
&self,
deadline: zx::MonotonicInstant,
) -> Result<ApSmeEvent, fidl::Error> {
ApSmeEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#start(
&self,
mut config: &ApConfig,
___deadline: zx::MonotonicInstant,
) -> Result<StartApResultCode, fidl::Error> {
let _response = self.client.send_query::<ApSmeStartRequest, ApSmeStartResponse>(
(config,),
0x33fa134ceda8624d,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.code)
}
pub fn r#stop(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<StopApResultCode, fidl::Error> {
let _response = self.client.send_query::<fidl::encoding::EmptyPayload, ApSmeStopResponse>(
(),
0x56423f5b49a2e851,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.code)
}
pub fn r#status(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<ApStatusResponse, fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, ApSmeStatusResponse>(
(),
0x51c688ac7a101606,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.resp)
}
}
#[derive(Debug, Clone)]
pub struct ApSmeProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for ApSmeProxy {
type Protocol = ApSmeMarker;
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 ApSmeProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name = <ApSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> ApSmeEventStream {
ApSmeEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#start(
&self,
mut config: &ApConfig,
) -> fidl::client::QueryResponseFut<
StartApResultCode,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
ApSmeProxyInterface::r#start(self, config)
}
pub fn r#stop(
&self,
) -> fidl::client::QueryResponseFut<
StopApResultCode,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
ApSmeProxyInterface::r#stop(self)
}
pub fn r#status(
&self,
) -> fidl::client::QueryResponseFut<
ApStatusResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
ApSmeProxyInterface::r#status(self)
}
}
impl ApSmeProxyInterface for ApSmeProxy {
type StartResponseFut = fidl::client::QueryResponseFut<
StartApResultCode,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#start(&self, mut config: &ApConfig) -> Self::StartResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<StartApResultCode, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
ApSmeStartResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x33fa134ceda8624d,
>(_buf?)?;
Ok(_response.code)
}
self.client.send_query_and_decode::<ApSmeStartRequest, StartApResultCode>(
(config,),
0x33fa134ceda8624d,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type StopResponseFut = fidl::client::QueryResponseFut<
StopApResultCode,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#stop(&self) -> Self::StopResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<StopApResultCode, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
ApSmeStopResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x56423f5b49a2e851,
>(_buf?)?;
Ok(_response.code)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, StopApResultCode>(
(),
0x56423f5b49a2e851,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type StatusResponseFut = fidl::client::QueryResponseFut<
ApStatusResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#status(&self) -> Self::StatusResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<ApStatusResponse, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
ApSmeStatusResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x51c688ac7a101606,
>(_buf?)?;
Ok(_response.resp)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ApStatusResponse>(
(),
0x51c688ac7a101606,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
}
pub struct ApSmeEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for ApSmeEventStream {}
impl futures::stream::FusedStream for ApSmeEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for ApSmeEventStream {
type Item = Result<ApSmeEvent, 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(ApSmeEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum ApSmeEvent {}
impl ApSmeEvent {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<ApSmeEvent, 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: <ApSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct ApSmeRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for ApSmeRequestStream {}
impl futures::stream::FusedStream for ApSmeRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for ApSmeRequestStream {
type Protocol = ApSmeMarker;
type ControlHandle = ApSmeControlHandle;
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 {
ApSmeControlHandle { inner: self.inner.clone() }
}
fn into_inner(
self,
) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
{
(self.inner, self.is_terminated)
}
fn from_inner(
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for ApSmeRequestStream {
type Item = Result<ApSmeRequest, 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 ApSmeRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
|bytes, handles| {
match this.inner.channel().read_etc(cx, bytes, handles) {
std::task::Poll::Ready(Ok(())) => {}
std::task::Poll::Pending => return std::task::Poll::Pending,
std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
std::task::Poll::Ready(Err(e)) => {
return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
e.into(),
))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x33fa134ceda8624d => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
ApSmeStartRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ApSmeStartRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = ApSmeControlHandle { inner: this.inner.clone() };
Ok(ApSmeRequest::Start {
config: req.config,
responder: ApSmeStartResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x56423f5b49a2e851 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = ApSmeControlHandle { inner: this.inner.clone() };
Ok(ApSmeRequest::Stop {
responder: ApSmeStopResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x51c688ac7a101606 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = ApSmeControlHandle { inner: this.inner.clone() };
Ok(ApSmeRequest::Status {
responder: ApSmeStatusResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name: <ApSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum ApSmeRequest {
Start { config: ApConfig, responder: ApSmeStartResponder },
Stop { responder: ApSmeStopResponder },
Status { responder: ApSmeStatusResponder },
}
impl ApSmeRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_start(self) -> Option<(ApConfig, ApSmeStartResponder)> {
if let ApSmeRequest::Start { config, responder } = self {
Some((config, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_stop(self) -> Option<(ApSmeStopResponder)> {
if let ApSmeRequest::Stop { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_status(self) -> Option<(ApSmeStatusResponder)> {
if let ApSmeRequest::Status { responder } = self {
Some((responder))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
ApSmeRequest::Start { .. } => "start",
ApSmeRequest::Stop { .. } => "stop",
ApSmeRequest::Status { .. } => "status",
}
}
}
#[derive(Debug, Clone)]
pub struct ApSmeControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for ApSmeControlHandle {
fn shutdown(&self) {
self.inner.shutdown()
}
fn shutdown_with_epitaph(&self, status: zx_status::Status) {
self.inner.shutdown_with_epitaph(status)
}
fn is_closed(&self) -> bool {
self.inner.channel().is_closed()
}
fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
self.inner.channel().on_closed()
}
#[cfg(target_os = "fuchsia")]
fn signal_peer(
&self,
clear_mask: zx::Signals,
set_mask: zx::Signals,
) -> Result<(), zx_status::Status> {
use fidl::Peered;
self.inner.channel().signal_peer(clear_mask, set_mask)
}
}
impl ApSmeControlHandle {}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct ApSmeStartResponder {
control_handle: std::mem::ManuallyDrop<ApSmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for ApSmeStartResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for ApSmeStartResponder {
type ControlHandle = ApSmeControlHandle;
fn control_handle(&self) -> &ApSmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl ApSmeStartResponder {
pub fn send(self, mut code: StartApResultCode) -> Result<(), fidl::Error> {
let _result = self.send_raw(code);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut code: StartApResultCode) -> Result<(), fidl::Error> {
let _result = self.send_raw(code);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut code: StartApResultCode) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<ApSmeStartResponse>(
(code,),
self.tx_id,
0x33fa134ceda8624d,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct ApSmeStopResponder {
control_handle: std::mem::ManuallyDrop<ApSmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for ApSmeStopResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for ApSmeStopResponder {
type ControlHandle = ApSmeControlHandle;
fn control_handle(&self) -> &ApSmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl ApSmeStopResponder {
pub fn send(self, mut code: StopApResultCode) -> Result<(), fidl::Error> {
let _result = self.send_raw(code);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut code: StopApResultCode) -> Result<(), fidl::Error> {
let _result = self.send_raw(code);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut code: StopApResultCode) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<ApSmeStopResponse>(
(code,),
self.tx_id,
0x56423f5b49a2e851,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct ApSmeStatusResponder {
control_handle: std::mem::ManuallyDrop<ApSmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for ApSmeStatusResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for ApSmeStatusResponder {
type ControlHandle = ApSmeControlHandle;
fn control_handle(&self) -> &ApSmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl ApSmeStatusResponder {
pub fn send(self, mut resp: &ApStatusResponse) -> Result<(), fidl::Error> {
let _result = self.send_raw(resp);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut resp: &ApStatusResponse) -> Result<(), fidl::Error> {
let _result = self.send_raw(resp);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut resp: &ApStatusResponse) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<ApSmeStatusResponse>(
(resp,),
self.tx_id,
0x51c688ac7a101606,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct ClientSmeMarker;
impl fidl::endpoints::ProtocolMarker for ClientSmeMarker {
type Proxy = ClientSmeProxy;
type RequestStream = ClientSmeRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = ClientSmeSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) ClientSme";
}
pub type ClientSmeScanResult = Result<fidl::Vmo, ScanErrorCode>;
pub type ClientSmeWmmStatusResult = Result<fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>;
pub type ClientSmeScanForControllerResult = Result<Vec<ScanResult>, ScanErrorCode>;
pub trait ClientSmeProxyInterface: Send + Sync {
type ScanResponseFut: std::future::Future<Output = Result<ClientSmeScanResult, fidl::Error>>
+ Send;
fn r#scan(&self, req: &ScanRequest) -> Self::ScanResponseFut;
fn r#connect(
&self,
req: &ConnectRequest,
txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
) -> Result<(), fidl::Error>;
fn r#roam(&self, req: &RoamRequest) -> Result<(), fidl::Error>;
type DisconnectResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
fn r#disconnect(&self, reason: UserDisconnectReason) -> Self::DisconnectResponseFut;
type StatusResponseFut: std::future::Future<Output = Result<ClientStatusResponse, fidl::Error>>
+ Send;
fn r#status(&self) -> Self::StatusResponseFut;
type WmmStatusResponseFut: std::future::Future<Output = Result<ClientSmeWmmStatusResult, fidl::Error>>
+ Send;
fn r#wmm_status(&self) -> Self::WmmStatusResponseFut;
type ScanForControllerResponseFut: std::future::Future<Output = Result<ClientSmeScanForControllerResult, fidl::Error>>
+ Send;
fn r#scan_for_controller(&self, req: &ScanRequest) -> Self::ScanForControllerResponseFut;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct ClientSmeSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for ClientSmeSynchronousProxy {
type Proxy = ClientSmeProxy;
type Protocol = ClientSmeMarker;
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 ClientSmeSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
}
pub fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
pub fn wait_for_event(
&self,
deadline: zx::MonotonicInstant,
) -> Result<ClientSmeEvent, fidl::Error> {
ClientSmeEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#scan(
&self,
mut req: &ScanRequest,
___deadline: zx::MonotonicInstant,
) -> Result<ClientSmeScanResult, fidl::Error> {
let _response = self.client.send_query::<ClientSmeScanRequest, fidl::encoding::ResultType<
ClientSmeScanResponse,
ScanErrorCode,
>>(
(req,),
0xded0ce3b1685822,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.scan_results))
}
pub fn r#connect(
&self,
mut req: &ConnectRequest,
mut txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
) -> Result<(), fidl::Error> {
self.client.send::<ClientSmeConnectRequest>(
(req, txn),
0x250a0f6fe9f85351,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#roam(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
self.client.send::<ClientSmeRoamRequest>(
(req,),
0x107ead7d84723921,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#disconnect(
&self,
mut reason: UserDisconnectReason,
___deadline: zx::MonotonicInstant,
) -> Result<(), fidl::Error> {
let _response =
self.client.send_query::<ClientSmeDisconnectRequest, fidl::encoding::EmptyPayload>(
(reason,),
0x39a578de9a107304,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response)
}
pub fn r#status(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<ClientStatusResponse, fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, ClientSmeStatusResponse>(
(),
0xda00b607470faf2,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.resp)
}
pub fn r#wmm_status(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<ClientSmeWmmStatusResult, fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::ResultType<ClientSmeWmmStatusResponse, i32>,
>(
(),
0x3d0ccc75f6baa9e3,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.resp))
}
pub fn r#scan_for_controller(
&self,
mut req: &ScanRequest,
___deadline: zx::MonotonicInstant,
) -> Result<ClientSmeScanForControllerResult, fidl::Error> {
let _response = self.client.send_query::<
ClientSmeScanForControllerRequest,
fidl::encoding::ResultType<ClientSmeScanForControllerResponse, ScanErrorCode>,
>(
(req,),
0x21f00ab22ff79a12,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.scan_results))
}
}
#[derive(Debug, Clone)]
pub struct ClientSmeProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for ClientSmeProxy {
type Protocol = ClientSmeMarker;
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 ClientSmeProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name = <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> ClientSmeEventStream {
ClientSmeEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#scan(
&self,
mut req: &ScanRequest,
) -> fidl::client::QueryResponseFut<
ClientSmeScanResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
ClientSmeProxyInterface::r#scan(self, req)
}
pub fn r#connect(
&self,
mut req: &ConnectRequest,
mut txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
) -> Result<(), fidl::Error> {
ClientSmeProxyInterface::r#connect(self, req, txn)
}
pub fn r#roam(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
ClientSmeProxyInterface::r#roam(self, req)
}
pub fn r#disconnect(
&self,
mut reason: UserDisconnectReason,
) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
ClientSmeProxyInterface::r#disconnect(self, reason)
}
pub fn r#status(
&self,
) -> fidl::client::QueryResponseFut<
ClientStatusResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
ClientSmeProxyInterface::r#status(self)
}
pub fn r#wmm_status(
&self,
) -> fidl::client::QueryResponseFut<
ClientSmeWmmStatusResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
ClientSmeProxyInterface::r#wmm_status(self)
}
pub fn r#scan_for_controller(
&self,
mut req: &ScanRequest,
) -> fidl::client::QueryResponseFut<
ClientSmeScanForControllerResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
ClientSmeProxyInterface::r#scan_for_controller(self, req)
}
}
impl ClientSmeProxyInterface for ClientSmeProxy {
type ScanResponseFut = fidl::client::QueryResponseFut<
ClientSmeScanResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#scan(&self, mut req: &ScanRequest) -> Self::ScanResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<ClientSmeScanResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<ClientSmeScanResponse, ScanErrorCode>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0xded0ce3b1685822,
>(_buf?)?;
Ok(_response.map(|x| x.scan_results))
}
self.client.send_query_and_decode::<ClientSmeScanRequest, ClientSmeScanResult>(
(req,),
0xded0ce3b1685822,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
fn r#connect(
&self,
mut req: &ConnectRequest,
mut txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
) -> Result<(), fidl::Error> {
self.client.send::<ClientSmeConnectRequest>(
(req, txn),
0x250a0f6fe9f85351,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#roam(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
self.client.send::<ClientSmeRoamRequest>(
(req,),
0x107ead7d84723921,
fidl::encoding::DynamicFlags::empty(),
)
}
type DisconnectResponseFut =
fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#disconnect(&self, mut reason: UserDisconnectReason) -> Self::DisconnectResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<(), fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x39a578de9a107304,
>(_buf?)?;
Ok(_response)
}
self.client.send_query_and_decode::<ClientSmeDisconnectRequest, ()>(
(reason,),
0x39a578de9a107304,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type StatusResponseFut = fidl::client::QueryResponseFut<
ClientStatusResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#status(&self) -> Self::StatusResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<ClientStatusResponse, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
ClientSmeStatusResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0xda00b607470faf2,
>(_buf?)?;
Ok(_response.resp)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ClientStatusResponse>(
(),
0xda00b607470faf2,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type WmmStatusResponseFut = fidl::client::QueryResponseFut<
ClientSmeWmmStatusResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#wmm_status(&self) -> Self::WmmStatusResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<ClientSmeWmmStatusResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<ClientSmeWmmStatusResponse, i32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x3d0ccc75f6baa9e3,
>(_buf?)?;
Ok(_response.map(|x| x.resp))
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ClientSmeWmmStatusResult>(
(),
0x3d0ccc75f6baa9e3,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type ScanForControllerResponseFut = fidl::client::QueryResponseFut<
ClientSmeScanForControllerResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#scan_for_controller(&self, mut req: &ScanRequest) -> Self::ScanForControllerResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<ClientSmeScanForControllerResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<ClientSmeScanForControllerResponse, ScanErrorCode>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x21f00ab22ff79a12,
>(_buf?)?;
Ok(_response.map(|x| x.scan_results))
}
self.client.send_query_and_decode::<
ClientSmeScanForControllerRequest,
ClientSmeScanForControllerResult,
>(
(req,),
0x21f00ab22ff79a12,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
}
pub struct ClientSmeEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for ClientSmeEventStream {}
impl futures::stream::FusedStream for ClientSmeEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for ClientSmeEventStream {
type Item = Result<ClientSmeEvent, 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(ClientSmeEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum ClientSmeEvent {}
impl ClientSmeEvent {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<ClientSmeEvent, 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: <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct ClientSmeRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for ClientSmeRequestStream {}
impl futures::stream::FusedStream for ClientSmeRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for ClientSmeRequestStream {
type Protocol = ClientSmeMarker;
type ControlHandle = ClientSmeControlHandle;
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 {
ClientSmeControlHandle { inner: self.inner.clone() }
}
fn into_inner(
self,
) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
{
(self.inner, self.is_terminated)
}
fn from_inner(
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for ClientSmeRequestStream {
type Item = Result<ClientSmeRequest, 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 ClientSmeRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
|bytes, handles| {
match this.inner.channel().read_etc(cx, bytes, handles) {
std::task::Poll::Ready(Ok(())) => {}
std::task::Poll::Pending => return std::task::Poll::Pending,
std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
std::task::Poll::Ready(Err(e)) => {
return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
e.into(),
))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0xded0ce3b1685822 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
ClientSmeScanRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeScanRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
Ok(ClientSmeRequest::Scan {
req: req.req,
responder: ClientSmeScanResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x250a0f6fe9f85351 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
ClientSmeConnectRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeConnectRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
Ok(ClientSmeRequest::Connect { req: req.req, txn: req.txn, control_handle })
}
0x107ead7d84723921 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
ClientSmeRoamRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeRoamRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
Ok(ClientSmeRequest::Roam { req: req.req, control_handle })
}
0x39a578de9a107304 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
ClientSmeDisconnectRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeDisconnectRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
Ok(ClientSmeRequest::Disconnect {
reason: req.reason,
responder: ClientSmeDisconnectResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0xda00b607470faf2 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
Ok(ClientSmeRequest::Status {
responder: ClientSmeStatusResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x3d0ccc75f6baa9e3 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
Ok(ClientSmeRequest::WmmStatus {
responder: ClientSmeWmmStatusResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x21f00ab22ff79a12 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
ClientSmeScanForControllerRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeScanForControllerRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
Ok(ClientSmeRequest::ScanForController {
req: req.req,
responder: ClientSmeScanForControllerResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name:
<ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum ClientSmeRequest {
Scan {
req: ScanRequest,
responder: ClientSmeScanResponder,
},
Connect {
req: ConnectRequest,
txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
control_handle: ClientSmeControlHandle,
},
Roam {
req: RoamRequest,
control_handle: ClientSmeControlHandle,
},
Disconnect {
reason: UserDisconnectReason,
responder: ClientSmeDisconnectResponder,
},
Status {
responder: ClientSmeStatusResponder,
},
WmmStatus {
responder: ClientSmeWmmStatusResponder,
},
ScanForController {
req: ScanRequest,
responder: ClientSmeScanForControllerResponder,
},
}
impl ClientSmeRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_scan(self) -> Option<(ScanRequest, ClientSmeScanResponder)> {
if let ClientSmeRequest::Scan { req, responder } = self {
Some((req, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_connect(
self,
) -> Option<(
ConnectRequest,
Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
ClientSmeControlHandle,
)> {
if let ClientSmeRequest::Connect { req, txn, control_handle } = self {
Some((req, txn, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_roam(self) -> Option<(RoamRequest, ClientSmeControlHandle)> {
if let ClientSmeRequest::Roam { req, control_handle } = self {
Some((req, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_disconnect(self) -> Option<(UserDisconnectReason, ClientSmeDisconnectResponder)> {
if let ClientSmeRequest::Disconnect { reason, responder } = self {
Some((reason, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_status(self) -> Option<(ClientSmeStatusResponder)> {
if let ClientSmeRequest::Status { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_wmm_status(self) -> Option<(ClientSmeWmmStatusResponder)> {
if let ClientSmeRequest::WmmStatus { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_scan_for_controller(
self,
) -> Option<(ScanRequest, ClientSmeScanForControllerResponder)> {
if let ClientSmeRequest::ScanForController { req, responder } = self {
Some((req, responder))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
ClientSmeRequest::Scan { .. } => "scan",
ClientSmeRequest::Connect { .. } => "connect",
ClientSmeRequest::Roam { .. } => "roam",
ClientSmeRequest::Disconnect { .. } => "disconnect",
ClientSmeRequest::Status { .. } => "status",
ClientSmeRequest::WmmStatus { .. } => "wmm_status",
ClientSmeRequest::ScanForController { .. } => "scan_for_controller",
}
}
}
#[derive(Debug, Clone)]
pub struct ClientSmeControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for ClientSmeControlHandle {
fn shutdown(&self) {
self.inner.shutdown()
}
fn shutdown_with_epitaph(&self, status: zx_status::Status) {
self.inner.shutdown_with_epitaph(status)
}
fn is_closed(&self) -> bool {
self.inner.channel().is_closed()
}
fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
self.inner.channel().on_closed()
}
#[cfg(target_os = "fuchsia")]
fn signal_peer(
&self,
clear_mask: zx::Signals,
set_mask: zx::Signals,
) -> Result<(), zx_status::Status> {
use fidl::Peered;
self.inner.channel().signal_peer(clear_mask, set_mask)
}
}
impl ClientSmeControlHandle {}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct ClientSmeScanResponder {
control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for ClientSmeScanResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for ClientSmeScanResponder {
type ControlHandle = ClientSmeControlHandle;
fn control_handle(&self) -> &ClientSmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl ClientSmeScanResponder {
pub fn send(self, mut result: Result<fidl::Vmo, ScanErrorCode>) -> 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::Vmo, ScanErrorCode>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<fidl::Vmo, ScanErrorCode>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<ClientSmeScanResponse, ScanErrorCode>>(
result.map(|scan_results| (scan_results,)),
self.tx_id,
0xded0ce3b1685822,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct ClientSmeDisconnectResponder {
control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for ClientSmeDisconnectResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for ClientSmeDisconnectResponder {
type ControlHandle = ClientSmeControlHandle;
fn control_handle(&self) -> &ClientSmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl ClientSmeDisconnectResponder {
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,
0x39a578de9a107304,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct ClientSmeStatusResponder {
control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for ClientSmeStatusResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for ClientSmeStatusResponder {
type ControlHandle = ClientSmeControlHandle;
fn control_handle(&self) -> &ClientSmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl ClientSmeStatusResponder {
pub fn send(self, mut resp: &ClientStatusResponse) -> Result<(), fidl::Error> {
let _result = self.send_raw(resp);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(
self,
mut resp: &ClientStatusResponse,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(resp);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut resp: &ClientStatusResponse) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<ClientSmeStatusResponse>(
(resp,),
self.tx_id,
0xda00b607470faf2,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct ClientSmeWmmStatusResponder {
control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for ClientSmeWmmStatusResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for ClientSmeWmmStatusResponder {
type ControlHandle = ClientSmeControlHandle;
fn control_handle(&self) -> &ClientSmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl ClientSmeWmmStatusResponder {
pub fn send(
self,
mut result: Result<&fidl_fuchsia_wlan_internal::WmmStatusResponse, 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_internal::WmmStatusResponse, 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_internal::WmmStatusResponse, i32>,
) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<ClientSmeWmmStatusResponse, i32>>(
result.map(|resp| (resp,)),
self.tx_id,
0x3d0ccc75f6baa9e3,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct ClientSmeScanForControllerResponder {
control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for ClientSmeScanForControllerResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for ClientSmeScanForControllerResponder {
type ControlHandle = ClientSmeControlHandle;
fn control_handle(&self) -> &ClientSmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl ClientSmeScanForControllerResponder {
pub fn send(self, mut result: Result<&[ScanResult], ScanErrorCode>) -> 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<&[ScanResult], ScanErrorCode>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut result: Result<&[ScanResult], ScanErrorCode>,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<fidl::encoding::ResultType<
ClientSmeScanForControllerResponse,
ScanErrorCode,
>>(
result.map(|scan_results| (scan_results,)),
self.tx_id,
0x21f00ab22ff79a12,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct ConnectTransactionMarker;
impl fidl::endpoints::ProtocolMarker for ConnectTransactionMarker {
type Proxy = ConnectTransactionProxy;
type RequestStream = ConnectTransactionRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = ConnectTransactionSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) ConnectTransaction";
}
pub trait ConnectTransactionProxyInterface: Send + Sync {}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct ConnectTransactionSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for ConnectTransactionSynchronousProxy {
type Proxy = ConnectTransactionProxy;
type Protocol = ConnectTransactionMarker;
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 ConnectTransactionSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name =
<ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
}
pub fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
pub fn wait_for_event(
&self,
deadline: zx::MonotonicInstant,
) -> Result<ConnectTransactionEvent, fidl::Error> {
ConnectTransactionEvent::decode(self.client.wait_for_event(deadline)?)
}
}
#[derive(Debug, Clone)]
pub struct ConnectTransactionProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for ConnectTransactionProxy {
type Protocol = ConnectTransactionMarker;
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 ConnectTransactionProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name =
<ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> ConnectTransactionEventStream {
ConnectTransactionEventStream { event_receiver: self.client.take_event_receiver() }
}
}
impl ConnectTransactionProxyInterface for ConnectTransactionProxy {}
pub struct ConnectTransactionEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for ConnectTransactionEventStream {}
impl futures::stream::FusedStream for ConnectTransactionEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for ConnectTransactionEventStream {
type Item = Result<ConnectTransactionEvent, 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(ConnectTransactionEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum ConnectTransactionEvent {
OnConnectResult { result: ConnectResult },
OnDisconnect { info: DisconnectInfo },
OnRoamResult { result: RoamResult },
OnSignalReport { ind: fidl_fuchsia_wlan_internal::SignalReportIndication },
OnChannelSwitched { info: fidl_fuchsia_wlan_internal::ChannelSwitchInfo },
}
impl ConnectTransactionEvent {
#[allow(irrefutable_let_patterns)]
pub fn into_on_connect_result(self) -> Option<ConnectResult> {
if let ConnectTransactionEvent::OnConnectResult { result } = self {
Some((result))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_on_disconnect(self) -> Option<DisconnectInfo> {
if let ConnectTransactionEvent::OnDisconnect { info } = self {
Some((info))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_on_roam_result(self) -> Option<RoamResult> {
if let ConnectTransactionEvent::OnRoamResult { result } = self {
Some((result))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_on_signal_report(
self,
) -> Option<fidl_fuchsia_wlan_internal::SignalReportIndication> {
if let ConnectTransactionEvent::OnSignalReport { ind } = self {
Some((ind))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_on_channel_switched(self) -> Option<fidl_fuchsia_wlan_internal::ChannelSwitchInfo> {
if let ConnectTransactionEvent::OnChannelSwitched { info } = self {
Some((info))
} else {
None
}
}
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<ConnectTransactionEvent, 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 {
0x48d2cf407da489a7 => {
let mut out = fidl::new_empty!(
ConnectTransactionOnConnectResultRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnConnectResultRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((ConnectTransactionEvent::OnConnectResult { result: out.result }))
}
0x40dea7b1449cc733 => {
let mut out = fidl::new_empty!(
ConnectTransactionOnDisconnectRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnDisconnectRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((ConnectTransactionEvent::OnDisconnect { info: out.info }))
}
0x656267da4ccf2a41 => {
let mut out = fidl::new_empty!(
ConnectTransactionOnRoamResultRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnRoamResultRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((ConnectTransactionEvent::OnRoamResult { result: out.result }))
}
0x5e968bd5e267e262 => {
let mut out = fidl::new_empty!(
ConnectTransactionOnSignalReportRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnSignalReportRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((ConnectTransactionEvent::OnSignalReport { ind: out.ind }))
}
0x5f5153778cd70512 => {
let mut out = fidl::new_empty!(
ConnectTransactionOnChannelSwitchedRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnChannelSwitchedRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((ConnectTransactionEvent::OnChannelSwitched { info: out.info }))
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: tx_header.ordinal,
protocol_name:
<ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct ConnectTransactionRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for ConnectTransactionRequestStream {}
impl futures::stream::FusedStream for ConnectTransactionRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for ConnectTransactionRequestStream {
type Protocol = ConnectTransactionMarker;
type ControlHandle = ConnectTransactionControlHandle;
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 {
ConnectTransactionControlHandle { inner: self.inner.clone() }
}
fn into_inner(
self,
) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
{
(self.inner, self.is_terminated)
}
fn from_inner(
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for ConnectTransactionRequestStream {
type Item = Result<ConnectTransactionRequest, 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 ConnectTransactionRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
|bytes, handles| {
match this.inner.channel().read_etc(cx, bytes, handles) {
std::task::Poll::Ready(Ok(())) => {}
std::task::Poll::Pending => return std::task::Poll::Pending,
std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
std::task::Poll::Ready(Err(e)) => {
return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
e.into(),
))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name: <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum ConnectTransactionRequest {}
impl ConnectTransactionRequest {
pub fn method_name(&self) -> &'static str {
match *self {}
}
}
#[derive(Debug, Clone)]
pub struct ConnectTransactionControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for ConnectTransactionControlHandle {
fn shutdown(&self) {
self.inner.shutdown()
}
fn shutdown_with_epitaph(&self, status: zx_status::Status) {
self.inner.shutdown_with_epitaph(status)
}
fn is_closed(&self) -> bool {
self.inner.channel().is_closed()
}
fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
self.inner.channel().on_closed()
}
#[cfg(target_os = "fuchsia")]
fn signal_peer(
&self,
clear_mask: zx::Signals,
set_mask: zx::Signals,
) -> Result<(), zx_status::Status> {
use fidl::Peered;
self.inner.channel().signal_peer(clear_mask, set_mask)
}
}
impl ConnectTransactionControlHandle {
pub fn send_on_connect_result(&self, mut result: &ConnectResult) -> Result<(), fidl::Error> {
self.inner.send::<ConnectTransactionOnConnectResultRequest>(
(result,),
0,
0x48d2cf407da489a7,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_on_disconnect(&self, mut info: &DisconnectInfo) -> Result<(), fidl::Error> {
self.inner.send::<ConnectTransactionOnDisconnectRequest>(
(info,),
0,
0x40dea7b1449cc733,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_on_roam_result(&self, mut result: &RoamResult) -> Result<(), fidl::Error> {
self.inner.send::<ConnectTransactionOnRoamResultRequest>(
(result,),
0,
0x656267da4ccf2a41,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_on_signal_report(
&self,
mut ind: &fidl_fuchsia_wlan_internal::SignalReportIndication,
) -> Result<(), fidl::Error> {
self.inner.send::<ConnectTransactionOnSignalReportRequest>(
(ind,),
0,
0x5e968bd5e267e262,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_on_channel_switched(
&self,
mut info: &fidl_fuchsia_wlan_internal::ChannelSwitchInfo,
) -> Result<(), fidl::Error> {
self.inner.send::<ConnectTransactionOnChannelSwitchedRequest>(
(info,),
0,
0x5f5153778cd70512,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct FeatureSupportMarker;
impl fidl::endpoints::ProtocolMarker for FeatureSupportMarker {
type Proxy = FeatureSupportProxy;
type RequestStream = FeatureSupportRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = FeatureSupportSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) FeatureSupport";
}
pub type FeatureSupportQueryDiscoverySupportResult =
Result<fidl_fuchsia_wlan_common::DiscoverySupport, i32>;
pub type FeatureSupportQueryMacSublayerSupportResult =
Result<fidl_fuchsia_wlan_common::MacSublayerSupport, i32>;
pub type FeatureSupportQuerySecuritySupportResult =
Result<fidl_fuchsia_wlan_common::SecuritySupport, i32>;
pub type FeatureSupportQuerySpectrumManagementSupportResult =
Result<fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>;
pub trait FeatureSupportProxyInterface: Send + Sync {
type QueryDiscoverySupportResponseFut: std::future::Future<Output = Result<FeatureSupportQueryDiscoverySupportResult, fidl::Error>>
+ Send;
fn r#query_discovery_support(&self) -> Self::QueryDiscoverySupportResponseFut;
type QueryMacSublayerSupportResponseFut: std::future::Future<
Output = Result<FeatureSupportQueryMacSublayerSupportResult, fidl::Error>,
> + Send;
fn r#query_mac_sublayer_support(&self) -> Self::QueryMacSublayerSupportResponseFut;
type QuerySecuritySupportResponseFut: std::future::Future<Output = Result<FeatureSupportQuerySecuritySupportResult, fidl::Error>>
+ Send;
fn r#query_security_support(&self) -> Self::QuerySecuritySupportResponseFut;
type QuerySpectrumManagementSupportResponseFut: std::future::Future<
Output = Result<FeatureSupportQuerySpectrumManagementSupportResult, fidl::Error>,
> + Send;
fn r#query_spectrum_management_support(
&self,
) -> Self::QuerySpectrumManagementSupportResponseFut;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct FeatureSupportSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for FeatureSupportSynchronousProxy {
type Proxy = FeatureSupportProxy;
type Protocol = FeatureSupportMarker;
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 FeatureSupportSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <FeatureSupportMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
}
pub fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
pub fn wait_for_event(
&self,
deadline: zx::MonotonicInstant,
) -> Result<FeatureSupportEvent, fidl::Error> {
FeatureSupportEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#query_discovery_support(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<FeatureSupportQueryDiscoverySupportResult, fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
FeatureSupportQueryDiscoverySupportResponse,
i32,
>>(
(),
0x8317f5bfb5191e7,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.resp))
}
pub fn r#query_mac_sublayer_support(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<FeatureSupportQueryMacSublayerSupportResult, fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
FeatureSupportQueryMacSublayerSupportResponse,
i32,
>>(
(),
0x729802eded7088c1,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.resp))
}
pub fn r#query_security_support(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<FeatureSupportQuerySecuritySupportResult, fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
FeatureSupportQuerySecuritySupportResponse,
i32,
>>(
(),
0x678db06e0a1e7247,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.resp))
}
pub fn r#query_spectrum_management_support(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<FeatureSupportQuerySpectrumManagementSupportResult, fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
FeatureSupportQuerySpectrumManagementSupportResponse,
i32,
>>(
(),
0x746ca39af18429f5,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.resp))
}
}
#[derive(Debug, Clone)]
pub struct FeatureSupportProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for FeatureSupportProxy {
type Protocol = FeatureSupportMarker;
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 FeatureSupportProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name = <FeatureSupportMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> FeatureSupportEventStream {
FeatureSupportEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#query_discovery_support(
&self,
) -> fidl::client::QueryResponseFut<
FeatureSupportQueryDiscoverySupportResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
FeatureSupportProxyInterface::r#query_discovery_support(self)
}
pub fn r#query_mac_sublayer_support(
&self,
) -> fidl::client::QueryResponseFut<
FeatureSupportQueryMacSublayerSupportResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
FeatureSupportProxyInterface::r#query_mac_sublayer_support(self)
}
pub fn r#query_security_support(
&self,
) -> fidl::client::QueryResponseFut<
FeatureSupportQuerySecuritySupportResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
FeatureSupportProxyInterface::r#query_security_support(self)
}
pub fn r#query_spectrum_management_support(
&self,
) -> fidl::client::QueryResponseFut<
FeatureSupportQuerySpectrumManagementSupportResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
FeatureSupportProxyInterface::r#query_spectrum_management_support(self)
}
}
impl FeatureSupportProxyInterface for FeatureSupportProxy {
type QueryDiscoverySupportResponseFut = fidl::client::QueryResponseFut<
FeatureSupportQueryDiscoverySupportResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#query_discovery_support(&self) -> Self::QueryDiscoverySupportResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<FeatureSupportQueryDiscoverySupportResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<FeatureSupportQueryDiscoverySupportResponse, i32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x8317f5bfb5191e7,
>(_buf?)?;
Ok(_response.map(|x| x.resp))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
FeatureSupportQueryDiscoverySupportResult,
>(
(),
0x8317f5bfb5191e7,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type QueryMacSublayerSupportResponseFut = fidl::client::QueryResponseFut<
FeatureSupportQueryMacSublayerSupportResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#query_mac_sublayer_support(&self) -> Self::QueryMacSublayerSupportResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<FeatureSupportQueryMacSublayerSupportResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<FeatureSupportQueryMacSublayerSupportResponse, i32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x729802eded7088c1,
>(_buf?)?;
Ok(_response.map(|x| x.resp))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
FeatureSupportQueryMacSublayerSupportResult,
>(
(),
0x729802eded7088c1,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type QuerySecuritySupportResponseFut = fidl::client::QueryResponseFut<
FeatureSupportQuerySecuritySupportResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#query_security_support(&self) -> Self::QuerySecuritySupportResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<FeatureSupportQuerySecuritySupportResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<FeatureSupportQuerySecuritySupportResponse, i32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x678db06e0a1e7247,
>(_buf?)?;
Ok(_response.map(|x| x.resp))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
FeatureSupportQuerySecuritySupportResult,
>(
(),
0x678db06e0a1e7247,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type QuerySpectrumManagementSupportResponseFut = fidl::client::QueryResponseFut<
FeatureSupportQuerySpectrumManagementSupportResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#query_spectrum_management_support(
&self,
) -> Self::QuerySpectrumManagementSupportResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<FeatureSupportQuerySpectrumManagementSupportResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<
FeatureSupportQuerySpectrumManagementSupportResponse,
i32,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x746ca39af18429f5,
>(_buf?)?;
Ok(_response.map(|x| x.resp))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
FeatureSupportQuerySpectrumManagementSupportResult,
>(
(),
0x746ca39af18429f5,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
}
pub struct FeatureSupportEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for FeatureSupportEventStream {}
impl futures::stream::FusedStream for FeatureSupportEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for FeatureSupportEventStream {
type Item = Result<FeatureSupportEvent, 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(FeatureSupportEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum FeatureSupportEvent {}
impl FeatureSupportEvent {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<FeatureSupportEvent, 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:
<FeatureSupportMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct FeatureSupportRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for FeatureSupportRequestStream {}
impl futures::stream::FusedStream for FeatureSupportRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for FeatureSupportRequestStream {
type Protocol = FeatureSupportMarker;
type ControlHandle = FeatureSupportControlHandle;
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 {
FeatureSupportControlHandle { inner: self.inner.clone() }
}
fn into_inner(
self,
) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
{
(self.inner, self.is_terminated)
}
fn from_inner(
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for FeatureSupportRequestStream {
type Item = Result<FeatureSupportRequest, 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 FeatureSupportRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
|bytes, handles| {
match this.inner.channel().read_etc(cx, bytes, handles) {
std::task::Poll::Ready(Ok(())) => {}
std::task::Poll::Pending => return std::task::Poll::Pending,
std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
std::task::Poll::Ready(Err(e)) => {
return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
e.into(),
))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x8317f5bfb5191e7 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle =
FeatureSupportControlHandle { inner: this.inner.clone() };
Ok(FeatureSupportRequest::QueryDiscoverySupport {
responder: FeatureSupportQueryDiscoverySupportResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x729802eded7088c1 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle =
FeatureSupportControlHandle { inner: this.inner.clone() };
Ok(FeatureSupportRequest::QueryMacSublayerSupport {
responder: FeatureSupportQueryMacSublayerSupportResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x678db06e0a1e7247 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle =
FeatureSupportControlHandle { inner: this.inner.clone() };
Ok(FeatureSupportRequest::QuerySecuritySupport {
responder: FeatureSupportQuerySecuritySupportResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x746ca39af18429f5 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle =
FeatureSupportControlHandle { inner: this.inner.clone() };
Ok(FeatureSupportRequest::QuerySpectrumManagementSupport {
responder: FeatureSupportQuerySpectrumManagementSupportResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name:
<FeatureSupportMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum FeatureSupportRequest {
QueryDiscoverySupport { responder: FeatureSupportQueryDiscoverySupportResponder },
QueryMacSublayerSupport { responder: FeatureSupportQueryMacSublayerSupportResponder },
QuerySecuritySupport { responder: FeatureSupportQuerySecuritySupportResponder },
QuerySpectrumManagementSupport {
responder: FeatureSupportQuerySpectrumManagementSupportResponder,
},
}
impl FeatureSupportRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_query_discovery_support(
self,
) -> Option<(FeatureSupportQueryDiscoverySupportResponder)> {
if let FeatureSupportRequest::QueryDiscoverySupport { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_query_mac_sublayer_support(
self,
) -> Option<(FeatureSupportQueryMacSublayerSupportResponder)> {
if let FeatureSupportRequest::QueryMacSublayerSupport { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_query_security_support(
self,
) -> Option<(FeatureSupportQuerySecuritySupportResponder)> {
if let FeatureSupportRequest::QuerySecuritySupport { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_query_spectrum_management_support(
self,
) -> Option<(FeatureSupportQuerySpectrumManagementSupportResponder)> {
if let FeatureSupportRequest::QuerySpectrumManagementSupport { responder } = self {
Some((responder))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
FeatureSupportRequest::QueryDiscoverySupport { .. } => "query_discovery_support",
FeatureSupportRequest::QueryMacSublayerSupport { .. } => "query_mac_sublayer_support",
FeatureSupportRequest::QuerySecuritySupport { .. } => "query_security_support",
FeatureSupportRequest::QuerySpectrumManagementSupport { .. } => {
"query_spectrum_management_support"
}
}
}
}
#[derive(Debug, Clone)]
pub struct FeatureSupportControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for FeatureSupportControlHandle {
fn shutdown(&self) {
self.inner.shutdown()
}
fn shutdown_with_epitaph(&self, status: zx_status::Status) {
self.inner.shutdown_with_epitaph(status)
}
fn is_closed(&self) -> bool {
self.inner.channel().is_closed()
}
fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
self.inner.channel().on_closed()
}
#[cfg(target_os = "fuchsia")]
fn signal_peer(
&self,
clear_mask: zx::Signals,
set_mask: zx::Signals,
) -> Result<(), zx_status::Status> {
use fidl::Peered;
self.inner.channel().signal_peer(clear_mask, set_mask)
}
}
impl FeatureSupportControlHandle {}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct FeatureSupportQueryDiscoverySupportResponder {
control_handle: std::mem::ManuallyDrop<FeatureSupportControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for FeatureSupportQueryDiscoverySupportResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for FeatureSupportQueryDiscoverySupportResponder {
type ControlHandle = FeatureSupportControlHandle;
fn control_handle(&self) -> &FeatureSupportControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl FeatureSupportQueryDiscoverySupportResponder {
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<
FeatureSupportQueryDiscoverySupportResponse,
i32,
>>(
result.map(|resp| (resp,)),
self.tx_id,
0x8317f5bfb5191e7,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct FeatureSupportQueryMacSublayerSupportResponder {
control_handle: std::mem::ManuallyDrop<FeatureSupportControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for FeatureSupportQueryMacSublayerSupportResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for FeatureSupportQueryMacSublayerSupportResponder {
type ControlHandle = FeatureSupportControlHandle;
fn control_handle(&self) -> &FeatureSupportControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl FeatureSupportQueryMacSublayerSupportResponder {
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<
FeatureSupportQueryMacSublayerSupportResponse,
i32,
>>(
result.map(|resp| (resp,)),
self.tx_id,
0x729802eded7088c1,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct FeatureSupportQuerySecuritySupportResponder {
control_handle: std::mem::ManuallyDrop<FeatureSupportControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for FeatureSupportQuerySecuritySupportResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for FeatureSupportQuerySecuritySupportResponder {
type ControlHandle = FeatureSupportControlHandle;
fn control_handle(&self) -> &FeatureSupportControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl FeatureSupportQuerySecuritySupportResponder {
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<
FeatureSupportQuerySecuritySupportResponse,
i32,
>>(
result.map(|resp| (resp,)),
self.tx_id,
0x678db06e0a1e7247,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct FeatureSupportQuerySpectrumManagementSupportResponder {
control_handle: std::mem::ManuallyDrop<FeatureSupportControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for FeatureSupportQuerySpectrumManagementSupportResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for FeatureSupportQuerySpectrumManagementSupportResponder {
type ControlHandle = FeatureSupportControlHandle;
fn control_handle(&self) -> &FeatureSupportControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl FeatureSupportQuerySpectrumManagementSupportResponder {
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<
FeatureSupportQuerySpectrumManagementSupportResponse,
i32,
>>(
result.map(|resp| (resp,)),
self.tx_id,
0x746ca39af18429f5,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct GenericSmeMarker;
impl fidl::endpoints::ProtocolMarker for GenericSmeMarker {
type Proxy = GenericSmeProxy;
type RequestStream = GenericSmeRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = GenericSmeSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) GenericSme";
}
pub type GenericSmeGetClientSmeResult = Result<(), i32>;
pub type GenericSmeGetApSmeResult = Result<(), i32>;
pub type GenericSmeGetSmeTelemetryResult = Result<(), i32>;
pub type GenericSmeGetFeatureSupportResult = Result<(), i32>;
pub trait GenericSmeProxyInterface: Send + Sync {
type QueryResponseFut: std::future::Future<Output = Result<GenericSmeQuery, fidl::Error>> + Send;
fn r#query(&self) -> Self::QueryResponseFut;
type GetClientSmeResponseFut: std::future::Future<Output = Result<GenericSmeGetClientSmeResult, fidl::Error>>
+ Send;
fn r#get_client_sme(
&self,
sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
) -> Self::GetClientSmeResponseFut;
type GetApSmeResponseFut: std::future::Future<Output = Result<GenericSmeGetApSmeResult, fidl::Error>>
+ Send;
fn r#get_ap_sme(
&self,
sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
) -> Self::GetApSmeResponseFut;
type GetSmeTelemetryResponseFut: std::future::Future<Output = Result<GenericSmeGetSmeTelemetryResult, fidl::Error>>
+ Send;
fn r#get_sme_telemetry(
&self,
telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
) -> Self::GetSmeTelemetryResponseFut;
type GetFeatureSupportResponseFut: std::future::Future<Output = Result<GenericSmeGetFeatureSupportResult, fidl::Error>>
+ Send;
fn r#get_feature_support(
&self,
feature_support_server: fidl::endpoints::ServerEnd<FeatureSupportMarker>,
) -> Self::GetFeatureSupportResponseFut;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct GenericSmeSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for GenericSmeSynchronousProxy {
type Proxy = GenericSmeProxy;
type Protocol = GenericSmeMarker;
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 GenericSmeSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
}
pub fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
pub fn wait_for_event(
&self,
deadline: zx::MonotonicInstant,
) -> Result<GenericSmeEvent, fidl::Error> {
GenericSmeEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#query(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<GenericSmeQuery, fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, GenericSmeQueryResponse>(
(),
0x6ef4a820c153e249,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.resp)
}
pub fn r#get_client_sme(
&self,
mut sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<GenericSmeGetClientSmeResult, fidl::Error> {
let _response = self.client.send_query::<
GenericSmeGetClientSmeRequest,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
(sme_server,),
0x2439ad714c642f15,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#get_ap_sme(
&self,
mut sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<GenericSmeGetApSmeResult, fidl::Error> {
let _response = self.client.send_query::<
GenericSmeGetApSmeRequest,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
(sme_server,),
0x4d2a40be2b44ad6c,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#get_sme_telemetry(
&self,
mut telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<GenericSmeGetSmeTelemetryResult, fidl::Error> {
let _response = self.client.send_query::<
GenericSmeGetSmeTelemetryRequest,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
(telemetry_server,),
0x7ea015b3060fa,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
pub fn r#get_feature_support(
&self,
mut feature_support_server: fidl::endpoints::ServerEnd<FeatureSupportMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<GenericSmeGetFeatureSupportResult, fidl::Error> {
let _response = self.client.send_query::<
GenericSmeGetFeatureSupportRequest,
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
>(
(feature_support_server,),
0x4692c6e50be1bbdd,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x))
}
}
#[derive(Debug, Clone)]
pub struct GenericSmeProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for GenericSmeProxy {
type Protocol = GenericSmeMarker;
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 GenericSmeProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name = <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> GenericSmeEventStream {
GenericSmeEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#query(
&self,
) -> fidl::client::QueryResponseFut<
GenericSmeQuery,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
GenericSmeProxyInterface::r#query(self)
}
pub fn r#get_client_sme(
&self,
mut sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
) -> fidl::client::QueryResponseFut<
GenericSmeGetClientSmeResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
GenericSmeProxyInterface::r#get_client_sme(self, sme_server)
}
pub fn r#get_ap_sme(
&self,
mut sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
) -> fidl::client::QueryResponseFut<
GenericSmeGetApSmeResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
GenericSmeProxyInterface::r#get_ap_sme(self, sme_server)
}
pub fn r#get_sme_telemetry(
&self,
mut telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
) -> fidl::client::QueryResponseFut<
GenericSmeGetSmeTelemetryResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
GenericSmeProxyInterface::r#get_sme_telemetry(self, telemetry_server)
}
pub fn r#get_feature_support(
&self,
mut feature_support_server: fidl::endpoints::ServerEnd<FeatureSupportMarker>,
) -> fidl::client::QueryResponseFut<
GenericSmeGetFeatureSupportResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
GenericSmeProxyInterface::r#get_feature_support(self, feature_support_server)
}
}
impl GenericSmeProxyInterface for GenericSmeProxy {
type QueryResponseFut = fidl::client::QueryResponseFut<
GenericSmeQuery,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#query(&self) -> Self::QueryResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<GenericSmeQuery, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
GenericSmeQueryResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x6ef4a820c153e249,
>(_buf?)?;
Ok(_response.resp)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, GenericSmeQuery>(
(),
0x6ef4a820c153e249,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type GetClientSmeResponseFut = fidl::client::QueryResponseFut<
GenericSmeGetClientSmeResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#get_client_sme(
&self,
mut sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
) -> Self::GetClientSmeResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<GenericSmeGetClientSmeResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x2439ad714c642f15,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client
.send_query_and_decode::<GenericSmeGetClientSmeRequest, GenericSmeGetClientSmeResult>(
(sme_server,),
0x2439ad714c642f15,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type GetApSmeResponseFut = fidl::client::QueryResponseFut<
GenericSmeGetApSmeResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#get_ap_sme(
&self,
mut sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
) -> Self::GetApSmeResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<GenericSmeGetApSmeResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x4d2a40be2b44ad6c,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<GenericSmeGetApSmeRequest, GenericSmeGetApSmeResult>(
(sme_server,),
0x4d2a40be2b44ad6c,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type GetSmeTelemetryResponseFut = fidl::client::QueryResponseFut<
GenericSmeGetSmeTelemetryResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#get_sme_telemetry(
&self,
mut telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
) -> Self::GetSmeTelemetryResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<GenericSmeGetSmeTelemetryResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x7ea015b3060fa,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
GenericSmeGetSmeTelemetryRequest,
GenericSmeGetSmeTelemetryResult,
>(
(telemetry_server,),
0x7ea015b3060fa,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type GetFeatureSupportResponseFut = fidl::client::QueryResponseFut<
GenericSmeGetFeatureSupportResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#get_feature_support(
&self,
mut feature_support_server: fidl::endpoints::ServerEnd<FeatureSupportMarker>,
) -> Self::GetFeatureSupportResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<GenericSmeGetFeatureSupportResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x4692c6e50be1bbdd,
>(_buf?)?;
Ok(_response.map(|x| x))
}
self.client.send_query_and_decode::<
GenericSmeGetFeatureSupportRequest,
GenericSmeGetFeatureSupportResult,
>(
(feature_support_server,),
0x4692c6e50be1bbdd,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
}
pub struct GenericSmeEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for GenericSmeEventStream {}
impl futures::stream::FusedStream for GenericSmeEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for GenericSmeEventStream {
type Item = Result<GenericSmeEvent, 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(GenericSmeEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum GenericSmeEvent {}
impl GenericSmeEvent {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<GenericSmeEvent, 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: <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct GenericSmeRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for GenericSmeRequestStream {}
impl futures::stream::FusedStream for GenericSmeRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for GenericSmeRequestStream {
type Protocol = GenericSmeMarker;
type ControlHandle = GenericSmeControlHandle;
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 {
GenericSmeControlHandle { inner: self.inner.clone() }
}
fn into_inner(
self,
) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
{
(self.inner, self.is_terminated)
}
fn from_inner(
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for GenericSmeRequestStream {
type Item = Result<GenericSmeRequest, 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 GenericSmeRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
|bytes, handles| {
match this.inner.channel().read_etc(cx, bytes, handles) {
std::task::Poll::Ready(Ok(())) => {}
std::task::Poll::Pending => return std::task::Poll::Pending,
std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
std::task::Poll::Ready(Err(e)) => {
return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
e.into(),
))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x6ef4a820c153e249 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
Ok(GenericSmeRequest::Query {
responder: GenericSmeQueryResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x2439ad714c642f15 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
GenericSmeGetClientSmeRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetClientSmeRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
Ok(GenericSmeRequest::GetClientSme {
sme_server: req.sme_server,
responder: GenericSmeGetClientSmeResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x4d2a40be2b44ad6c => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
GenericSmeGetApSmeRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetApSmeRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
Ok(GenericSmeRequest::GetApSme {
sme_server: req.sme_server,
responder: GenericSmeGetApSmeResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x7ea015b3060fa => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
GenericSmeGetSmeTelemetryRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetSmeTelemetryRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
Ok(GenericSmeRequest::GetSmeTelemetry {
telemetry_server: req.telemetry_server,
responder: GenericSmeGetSmeTelemetryResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x4692c6e50be1bbdd => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
GenericSmeGetFeatureSupportRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetFeatureSupportRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
Ok(GenericSmeRequest::GetFeatureSupport {
feature_support_server: req.feature_support_server,
responder: GenericSmeGetFeatureSupportResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name:
<GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum GenericSmeRequest {
Query { responder: GenericSmeQueryResponder },
GetClientSme {
sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
responder: GenericSmeGetClientSmeResponder,
},
GetApSme {
sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
responder: GenericSmeGetApSmeResponder,
},
GetSmeTelemetry {
telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
responder: GenericSmeGetSmeTelemetryResponder,
},
GetFeatureSupport {
feature_support_server: fidl::endpoints::ServerEnd<FeatureSupportMarker>,
responder: GenericSmeGetFeatureSupportResponder,
},
}
impl GenericSmeRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_query(self) -> Option<(GenericSmeQueryResponder)> {
if let GenericSmeRequest::Query { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_get_client_sme(
self,
) -> Option<(fidl::endpoints::ServerEnd<ClientSmeMarker>, GenericSmeGetClientSmeResponder)>
{
if let GenericSmeRequest::GetClientSme { sme_server, responder } = self {
Some((sme_server, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_get_ap_sme(
self,
) -> Option<(fidl::endpoints::ServerEnd<ApSmeMarker>, GenericSmeGetApSmeResponder)> {
if let GenericSmeRequest::GetApSme { sme_server, responder } = self {
Some((sme_server, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_get_sme_telemetry(
self,
) -> Option<(fidl::endpoints::ServerEnd<TelemetryMarker>, GenericSmeGetSmeTelemetryResponder)>
{
if let GenericSmeRequest::GetSmeTelemetry { telemetry_server, responder } = self {
Some((telemetry_server, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_get_feature_support(
self,
) -> Option<(
fidl::endpoints::ServerEnd<FeatureSupportMarker>,
GenericSmeGetFeatureSupportResponder,
)> {
if let GenericSmeRequest::GetFeatureSupport { feature_support_server, responder } = self {
Some((feature_support_server, responder))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
GenericSmeRequest::Query { .. } => "query",
GenericSmeRequest::GetClientSme { .. } => "get_client_sme",
GenericSmeRequest::GetApSme { .. } => "get_ap_sme",
GenericSmeRequest::GetSmeTelemetry { .. } => "get_sme_telemetry",
GenericSmeRequest::GetFeatureSupport { .. } => "get_feature_support",
}
}
}
#[derive(Debug, Clone)]
pub struct GenericSmeControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for GenericSmeControlHandle {
fn shutdown(&self) {
self.inner.shutdown()
}
fn shutdown_with_epitaph(&self, status: zx_status::Status) {
self.inner.shutdown_with_epitaph(status)
}
fn is_closed(&self) -> bool {
self.inner.channel().is_closed()
}
fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
self.inner.channel().on_closed()
}
#[cfg(target_os = "fuchsia")]
fn signal_peer(
&self,
clear_mask: zx::Signals,
set_mask: zx::Signals,
) -> Result<(), zx_status::Status> {
use fidl::Peered;
self.inner.channel().signal_peer(clear_mask, set_mask)
}
}
impl GenericSmeControlHandle {}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct GenericSmeQueryResponder {
control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for GenericSmeQueryResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for GenericSmeQueryResponder {
type ControlHandle = GenericSmeControlHandle;
fn control_handle(&self) -> &GenericSmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl GenericSmeQueryResponder {
pub fn send(self, mut resp: &GenericSmeQuery) -> Result<(), fidl::Error> {
let _result = self.send_raw(resp);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut resp: &GenericSmeQuery) -> Result<(), fidl::Error> {
let _result = self.send_raw(resp);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut resp: &GenericSmeQuery) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<GenericSmeQueryResponse>(
(resp,),
self.tx_id,
0x6ef4a820c153e249,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct GenericSmeGetClientSmeResponder {
control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for GenericSmeGetClientSmeResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for GenericSmeGetClientSmeResponder {
type ControlHandle = GenericSmeControlHandle;
fn control_handle(&self) -> &GenericSmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl GenericSmeGetClientSmeResponder {
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,
0x2439ad714c642f15,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct GenericSmeGetApSmeResponder {
control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for GenericSmeGetApSmeResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for GenericSmeGetApSmeResponder {
type ControlHandle = GenericSmeControlHandle;
fn control_handle(&self) -> &GenericSmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl GenericSmeGetApSmeResponder {
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,
0x4d2a40be2b44ad6c,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct GenericSmeGetSmeTelemetryResponder {
control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for GenericSmeGetSmeTelemetryResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for GenericSmeGetSmeTelemetryResponder {
type ControlHandle = GenericSmeControlHandle;
fn control_handle(&self) -> &GenericSmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl GenericSmeGetSmeTelemetryResponder {
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,
0x7ea015b3060fa,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct GenericSmeGetFeatureSupportResponder {
control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for GenericSmeGetFeatureSupportResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for GenericSmeGetFeatureSupportResponder {
type ControlHandle = GenericSmeControlHandle;
fn control_handle(&self) -> &GenericSmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl GenericSmeGetFeatureSupportResponder {
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,
0x4692c6e50be1bbdd,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct TelemetryMarker;
impl fidl::endpoints::ProtocolMarker for TelemetryMarker {
type Proxy = TelemetryProxy;
type RequestStream = TelemetryRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = TelemetrySynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) Telemetry";
}
pub type TelemetryGetCounterStatsResult = Result<fidl_fuchsia_wlan_stats::IfaceCounterStats, i32>;
pub type TelemetryGetHistogramStatsResult =
Result<fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>;
pub type TelemetryCloneInspectVmoResult = Result<fidl::Vmo, i32>;
pub trait TelemetryProxyInterface: Send + Sync {
type GetCounterStatsResponseFut: std::future::Future<Output = Result<TelemetryGetCounterStatsResult, fidl::Error>>
+ Send;
fn r#get_counter_stats(&self) -> Self::GetCounterStatsResponseFut;
type GetHistogramStatsResponseFut: std::future::Future<Output = Result<TelemetryGetHistogramStatsResult, fidl::Error>>
+ Send;
fn r#get_histogram_stats(&self) -> Self::GetHistogramStatsResponseFut;
type CloneInspectVmoResponseFut: std::future::Future<Output = Result<TelemetryCloneInspectVmoResult, fidl::Error>>
+ Send;
fn r#clone_inspect_vmo(&self) -> Self::CloneInspectVmoResponseFut;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct TelemetrySynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for TelemetrySynchronousProxy {
type Proxy = TelemetryProxy;
type Protocol = TelemetryMarker;
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 TelemetrySynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
}
pub fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
pub fn wait_for_event(
&self,
deadline: zx::MonotonicInstant,
) -> Result<TelemetryEvent, fidl::Error> {
TelemetryEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#get_counter_stats(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<TelemetryGetCounterStatsResult, fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::ResultType<TelemetryGetCounterStatsResponse, i32>,
>(
(),
0x5bd8302dcf429d48,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.stats))
}
pub fn r#get_histogram_stats(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<TelemetryGetHistogramStatsResult, fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::ResultType<TelemetryGetHistogramStatsResponse, i32>,
>(
(),
0x46d2b6a23f764564,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.stats))
}
pub fn r#clone_inspect_vmo(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<TelemetryCloneInspectVmoResult, fidl::Error> {
let _response = self.client.send_query::<
fidl::encoding::EmptyPayload,
fidl::encoding::ResultType<TelemetryCloneInspectVmoResponse, i32>,
>(
(),
0x47153917e84c5a21,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.map(|x| x.inspect_vmo))
}
}
#[derive(Debug, Clone)]
pub struct TelemetryProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for TelemetryProxy {
type Protocol = TelemetryMarker;
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 TelemetryProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name = <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> TelemetryEventStream {
TelemetryEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#get_counter_stats(
&self,
) -> fidl::client::QueryResponseFut<
TelemetryGetCounterStatsResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
TelemetryProxyInterface::r#get_counter_stats(self)
}
pub fn r#get_histogram_stats(
&self,
) -> fidl::client::QueryResponseFut<
TelemetryGetHistogramStatsResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
TelemetryProxyInterface::r#get_histogram_stats(self)
}
pub fn r#clone_inspect_vmo(
&self,
) -> fidl::client::QueryResponseFut<
TelemetryCloneInspectVmoResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
TelemetryProxyInterface::r#clone_inspect_vmo(self)
}
}
impl TelemetryProxyInterface for TelemetryProxy {
type GetCounterStatsResponseFut = fidl::client::QueryResponseFut<
TelemetryGetCounterStatsResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#get_counter_stats(&self) -> Self::GetCounterStatsResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<TelemetryGetCounterStatsResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<TelemetryGetCounterStatsResponse, i32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x5bd8302dcf429d48,
>(_buf?)?;
Ok(_response.map(|x| x.stats))
}
self.client
.send_query_and_decode::<fidl::encoding::EmptyPayload, TelemetryGetCounterStatsResult>(
(),
0x5bd8302dcf429d48,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type GetHistogramStatsResponseFut = fidl::client::QueryResponseFut<
TelemetryGetHistogramStatsResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#get_histogram_stats(&self) -> Self::GetHistogramStatsResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<TelemetryGetHistogramStatsResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<TelemetryGetHistogramStatsResponse, i32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x46d2b6a23f764564,
>(_buf?)?;
Ok(_response.map(|x| x.stats))
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
TelemetryGetHistogramStatsResult,
>(
(),
0x46d2b6a23f764564,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type CloneInspectVmoResponseFut = fidl::client::QueryResponseFut<
TelemetryCloneInspectVmoResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#clone_inspect_vmo(&self) -> Self::CloneInspectVmoResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<TelemetryCloneInspectVmoResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
fidl::encoding::ResultType<TelemetryCloneInspectVmoResponse, i32>,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x47153917e84c5a21,
>(_buf?)?;
Ok(_response.map(|x| x.inspect_vmo))
}
self.client
.send_query_and_decode::<fidl::encoding::EmptyPayload, TelemetryCloneInspectVmoResult>(
(),
0x47153917e84c5a21,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
}
pub struct TelemetryEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for TelemetryEventStream {}
impl futures::stream::FusedStream for TelemetryEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for TelemetryEventStream {
type Item = Result<TelemetryEvent, 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(TelemetryEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum TelemetryEvent {}
impl TelemetryEvent {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<TelemetryEvent, 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: <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct TelemetryRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for TelemetryRequestStream {}
impl futures::stream::FusedStream for TelemetryRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for TelemetryRequestStream {
type Protocol = TelemetryMarker;
type ControlHandle = TelemetryControlHandle;
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 {
TelemetryControlHandle { inner: self.inner.clone() }
}
fn into_inner(
self,
) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
{
(self.inner, self.is_terminated)
}
fn from_inner(
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for TelemetryRequestStream {
type Item = Result<TelemetryRequest, 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 TelemetryRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
|bytes, handles| {
match this.inner.channel().read_etc(cx, bytes, handles) {
std::task::Poll::Ready(Ok(())) => {}
std::task::Poll::Pending => return std::task::Poll::Pending,
std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
std::task::Poll::Ready(Err(e)) => {
return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
e.into(),
))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x5bd8302dcf429d48 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
Ok(TelemetryRequest::GetCounterStats {
responder: TelemetryGetCounterStatsResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x46d2b6a23f764564 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
Ok(TelemetryRequest::GetHistogramStats {
responder: TelemetryGetHistogramStatsResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x47153917e84c5a21 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
fidl::encoding::EmptyPayload,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
Ok(TelemetryRequest::CloneInspectVmo {
responder: TelemetryCloneInspectVmoResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name:
<TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum TelemetryRequest {
GetCounterStats { responder: TelemetryGetCounterStatsResponder },
GetHistogramStats { responder: TelemetryGetHistogramStatsResponder },
CloneInspectVmo { responder: TelemetryCloneInspectVmoResponder },
}
impl TelemetryRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_get_counter_stats(self) -> Option<(TelemetryGetCounterStatsResponder)> {
if let TelemetryRequest::GetCounterStats { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_get_histogram_stats(self) -> Option<(TelemetryGetHistogramStatsResponder)> {
if let TelemetryRequest::GetHistogramStats { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_clone_inspect_vmo(self) -> Option<(TelemetryCloneInspectVmoResponder)> {
if let TelemetryRequest::CloneInspectVmo { responder } = self {
Some((responder))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
TelemetryRequest::GetCounterStats { .. } => "get_counter_stats",
TelemetryRequest::GetHistogramStats { .. } => "get_histogram_stats",
TelemetryRequest::CloneInspectVmo { .. } => "clone_inspect_vmo",
}
}
}
#[derive(Debug, Clone)]
pub struct TelemetryControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for TelemetryControlHandle {
fn shutdown(&self) {
self.inner.shutdown()
}
fn shutdown_with_epitaph(&self, status: zx_status::Status) {
self.inner.shutdown_with_epitaph(status)
}
fn is_closed(&self) -> bool {
self.inner.channel().is_closed()
}
fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
self.inner.channel().on_closed()
}
#[cfg(target_os = "fuchsia")]
fn signal_peer(
&self,
clear_mask: zx::Signals,
set_mask: zx::Signals,
) -> Result<(), zx_status::Status> {
use fidl::Peered;
self.inner.channel().signal_peer(clear_mask, set_mask)
}
}
impl TelemetryControlHandle {}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct TelemetryGetCounterStatsResponder {
control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for TelemetryGetCounterStatsResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for TelemetryGetCounterStatsResponder {
type ControlHandle = TelemetryControlHandle;
fn control_handle(&self) -> &TelemetryControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl TelemetryGetCounterStatsResponder {
pub fn send(
self,
mut result: Result<&fidl_fuchsia_wlan_stats::IfaceCounterStats, 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_stats::IfaceCounterStats, 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_stats::IfaceCounterStats, i32>,
) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<TelemetryGetCounterStatsResponse, i32>>(
result.map(|stats| (stats,)),
self.tx_id,
0x5bd8302dcf429d48,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct TelemetryGetHistogramStatsResponder {
control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for TelemetryGetHistogramStatsResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for TelemetryGetHistogramStatsResponder {
type ControlHandle = TelemetryControlHandle;
fn control_handle(&self) -> &TelemetryControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl TelemetryGetHistogramStatsResponder {
pub fn send(
self,
mut result: Result<&fidl_fuchsia_wlan_stats::IfaceHistogramStats, 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_stats::IfaceHistogramStats, 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_stats::IfaceHistogramStats, i32>,
) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<TelemetryGetHistogramStatsResponse, i32>>(
result.map(|stats| (stats,)),
self.tx_id,
0x46d2b6a23f764564,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct TelemetryCloneInspectVmoResponder {
control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for TelemetryCloneInspectVmoResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for TelemetryCloneInspectVmoResponder {
type ControlHandle = TelemetryControlHandle;
fn control_handle(&self) -> &TelemetryControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl TelemetryCloneInspectVmoResponder {
pub fn send(self, mut result: Result<fidl::Vmo, 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::Vmo, i32>,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
self.control_handle
.inner
.send::<fidl::encoding::ResultType<TelemetryCloneInspectVmoResponse, i32>>(
result.map(|inspect_vmo| (inspect_vmo,)),
self.tx_id,
0x47153917e84c5a21,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct UsmeBootstrapMarker;
impl fidl::endpoints::ProtocolMarker for UsmeBootstrapMarker {
type Proxy = UsmeBootstrapProxy;
type RequestStream = UsmeBootstrapRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = UsmeBootstrapSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) UsmeBootstrap";
}
pub trait UsmeBootstrapProxyInterface: Send + Sync {
type StartResponseFut: std::future::Future<Output = Result<fidl::Vmo, fidl::Error>> + Send;
fn r#start(
&self,
generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
legacy_privacy_support: &LegacyPrivacySupport,
) -> Self::StartResponseFut;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct UsmeBootstrapSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for UsmeBootstrapSynchronousProxy {
type Proxy = UsmeBootstrapProxy;
type Protocol = UsmeBootstrapMarker;
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 UsmeBootstrapSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
}
pub fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
pub fn wait_for_event(
&self,
deadline: zx::MonotonicInstant,
) -> Result<UsmeBootstrapEvent, fidl::Error> {
UsmeBootstrapEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#start(
&self,
mut generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
mut legacy_privacy_support: &LegacyPrivacySupport,
___deadline: zx::MonotonicInstant,
) -> Result<fidl::Vmo, fidl::Error> {
let _response =
self.client.send_query::<UsmeBootstrapStartRequest, UsmeBootstrapStartResponse>(
(generic_sme_server, legacy_privacy_support),
0x58850dfb76c29a0e,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.inspect_vmo)
}
}
#[derive(Debug, Clone)]
pub struct UsmeBootstrapProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for UsmeBootstrapProxy {
type Protocol = UsmeBootstrapMarker;
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 UsmeBootstrapProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name = <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> UsmeBootstrapEventStream {
UsmeBootstrapEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#start(
&self,
mut generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
mut legacy_privacy_support: &LegacyPrivacySupport,
) -> fidl::client::QueryResponseFut<fidl::Vmo, fidl::encoding::DefaultFuchsiaResourceDialect>
{
UsmeBootstrapProxyInterface::r#start(self, generic_sme_server, legacy_privacy_support)
}
}
impl UsmeBootstrapProxyInterface for UsmeBootstrapProxy {
type StartResponseFut =
fidl::client::QueryResponseFut<fidl::Vmo, fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#start(
&self,
mut generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
mut legacy_privacy_support: &LegacyPrivacySupport,
) -> Self::StartResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<fidl::Vmo, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
UsmeBootstrapStartResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x58850dfb76c29a0e,
>(_buf?)?;
Ok(_response.inspect_vmo)
}
self.client.send_query_and_decode::<UsmeBootstrapStartRequest, fidl::Vmo>(
(generic_sme_server, legacy_privacy_support),
0x58850dfb76c29a0e,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
}
pub struct UsmeBootstrapEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for UsmeBootstrapEventStream {}
impl futures::stream::FusedStream for UsmeBootstrapEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for UsmeBootstrapEventStream {
type Item = Result<UsmeBootstrapEvent, 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(UsmeBootstrapEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum UsmeBootstrapEvent {}
impl UsmeBootstrapEvent {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<UsmeBootstrapEvent, 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: <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct UsmeBootstrapRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for UsmeBootstrapRequestStream {}
impl futures::stream::FusedStream for UsmeBootstrapRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for UsmeBootstrapRequestStream {
type Protocol = UsmeBootstrapMarker;
type ControlHandle = UsmeBootstrapControlHandle;
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 {
UsmeBootstrapControlHandle { inner: self.inner.clone() }
}
fn into_inner(
self,
) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
{
(self.inner, self.is_terminated)
}
fn from_inner(
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for UsmeBootstrapRequestStream {
type Item = Result<UsmeBootstrapRequest, 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 UsmeBootstrapRequestStream after completion");
}
fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
|bytes, handles| {
match this.inner.channel().read_etc(cx, bytes, handles) {
std::task::Poll::Ready(Ok(())) => {}
std::task::Poll::Pending => return std::task::Poll::Pending,
std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
std::task::Poll::Ready(Err(e)) => {
return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
e.into(),
))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x58850dfb76c29a0e => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
UsmeBootstrapStartRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<UsmeBootstrapStartRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle =
UsmeBootstrapControlHandle { inner: this.inner.clone() };
Ok(UsmeBootstrapRequest::Start {
generic_sme_server: req.generic_sme_server,
legacy_privacy_support: req.legacy_privacy_support,
responder: UsmeBootstrapStartResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name:
<UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum UsmeBootstrapRequest {
Start {
generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
legacy_privacy_support: LegacyPrivacySupport,
responder: UsmeBootstrapStartResponder,
},
}
impl UsmeBootstrapRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_start(
self,
) -> Option<(
fidl::endpoints::ServerEnd<GenericSmeMarker>,
LegacyPrivacySupport,
UsmeBootstrapStartResponder,
)> {
if let UsmeBootstrapRequest::Start {
generic_sme_server,
legacy_privacy_support,
responder,
} = self
{
Some((generic_sme_server, legacy_privacy_support, responder))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
UsmeBootstrapRequest::Start { .. } => "start",
}
}
}
#[derive(Debug, Clone)]
pub struct UsmeBootstrapControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for UsmeBootstrapControlHandle {
fn shutdown(&self) {
self.inner.shutdown()
}
fn shutdown_with_epitaph(&self, status: zx_status::Status) {
self.inner.shutdown_with_epitaph(status)
}
fn is_closed(&self) -> bool {
self.inner.channel().is_closed()
}
fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
self.inner.channel().on_closed()
}
#[cfg(target_os = "fuchsia")]
fn signal_peer(
&self,
clear_mask: zx::Signals,
set_mask: zx::Signals,
) -> Result<(), zx_status::Status> {
use fidl::Peered;
self.inner.channel().signal_peer(clear_mask, set_mask)
}
}
impl UsmeBootstrapControlHandle {}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct UsmeBootstrapStartResponder {
control_handle: std::mem::ManuallyDrop<UsmeBootstrapControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for UsmeBootstrapStartResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for UsmeBootstrapStartResponder {
type ControlHandle = UsmeBootstrapControlHandle;
fn control_handle(&self) -> &UsmeBootstrapControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl UsmeBootstrapStartResponder {
pub fn send(self, mut inspect_vmo: fidl::Vmo) -> Result<(), fidl::Error> {
let _result = self.send_raw(inspect_vmo);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut inspect_vmo: fidl::Vmo) -> Result<(), fidl::Error> {
let _result = self.send_raw(inspect_vmo);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut inspect_vmo: fidl::Vmo) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<UsmeBootstrapStartResponse>(
(inspect_vmo,),
self.tx_id,
0x58850dfb76c29a0e,
fidl::encoding::DynamicFlags::empty(),
)
}
}
mod internal {
use super::*;
unsafe impl fidl::encoding::TypeMarker for DisconnectMlmeEventName {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
std::mem::align_of::<u32>()
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
std::mem::size_of::<u32>()
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
false
}
}
impl fidl::encoding::ValueTypeMarker for DisconnectMlmeEventName {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
for DisconnectMlmeEventName
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for DisconnectMlmeEventName
{
#[inline(always)]
fn new_empty() -> Self {
Self::DeauthenticateIndication
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u32>(offset);
*self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for Protection {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
std::mem::align_of::<u32>()
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
std::mem::size_of::<u32>()
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
false
}
}
impl fidl::encoding::ValueTypeMarker for Protection {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for Protection {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Protection {
#[inline(always)]
fn new_empty() -> Self {
Self::Unknown
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u32>(offset);
*self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for ScanErrorCode {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
std::mem::align_of::<u32>()
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
std::mem::size_of::<u32>()
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
false
}
}
impl fidl::encoding::ValueTypeMarker for ScanErrorCode {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ScanErrorCode {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanErrorCode {
#[inline(always)]
fn new_empty() -> Self {
Self::NotSupported
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u32>(offset);
*self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for StartApResultCode {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
std::mem::align_of::<u32>()
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
std::mem::size_of::<u32>()
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
false
}
}
impl fidl::encoding::ValueTypeMarker for StartApResultCode {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
for StartApResultCode
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StartApResultCode {
#[inline(always)]
fn new_empty() -> Self {
Self::Success
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u32>(offset);
*self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for StopApResultCode {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
std::mem::align_of::<u32>()
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
std::mem::size_of::<u32>()
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
false
}
}
impl fidl::encoding::ValueTypeMarker for StopApResultCode {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
for StopApResultCode
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StopApResultCode {
#[inline(always)]
fn new_empty() -> Self {
Self::Success
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u32>(offset);
*self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for UserDisconnectReason {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
std::mem::align_of::<u32>()
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
std::mem::size_of::<u32>()
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
false
}
}
impl fidl::encoding::ValueTypeMarker for UserDisconnectReason {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
for UserDisconnectReason
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UserDisconnectReason {
#[inline(always)]
fn new_empty() -> Self {
Self::Unknown
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u32>(offset);
*self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ActiveScanRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ActiveScanRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
32
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ActiveScanRequest, D>
for &ActiveScanRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ActiveScanRequest>(offset);
fidl::encoding::Encode::<ActiveScanRequest, D>::encode(
(
<fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssids),
<fidl::encoding::Vector<u8, 500> as fidl::encoding::ValueTypeMarker>::borrow(&self.channels),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
D,
>,
T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 500>, D>,
> fidl::encoding::Encode<ActiveScanRequest, D> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ActiveScanRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 16, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ActiveScanRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
ssids: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
D
),
channels: fidl::new_empty!(fidl::encoding::Vector<u8, 500>, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
D,
&mut self.ssids,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(fidl::encoding::Vector<u8, 500>, D, &mut self.channels, decoder, offset + 16, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for Ap {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for Ap {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
24
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Ap, D> for &Ap {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Ap>(offset);
fidl::encoding::Encode::<Ap, D>::encode(
(
<fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
&self.ssid,
),
<u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.channel),
<u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.num_clients),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
T1: fidl::encoding::Encode<u8, D>,
T2: fidl::encoding::Encode<u16, D>,
> fidl::encoding::Encode<Ap, D> for (T0, T1, T2)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Ap>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 16, depth)?;
self.2.encode(encoder, offset + 18, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Ap {
#[inline(always)]
fn new_empty() -> Self {
Self {
ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
channel: fidl::new_empty!(u8, D),
num_clients: fidl::new_empty!(u16, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff0000ff00u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 0, _depth)?;
fidl::decode!(u8, D, &mut self.channel, decoder, offset + 16, _depth)?;
fidl::decode!(u16, D, &mut self.num_clients, decoder, offset + 18, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ApConfig {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ApConfig {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApConfig, D> for &ApConfig {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ApConfig>(offset);
fidl::encoding::Encode::<ApConfig, D>::encode(
(
<fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
&self.ssid,
),
<fidl::encoding::Vector<u8, 64> as fidl::encoding::ValueTypeMarker>::borrow(
&self.password,
),
<RadioConfig as fidl::encoding::ValueTypeMarker>::borrow(&self.radio_cfg),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 64>, D>,
T2: fidl::encoding::Encode<RadioConfig, D>,
> fidl::encoding::Encode<ApConfig, D> for (T0, T1, T2)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ApConfig>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 16, depth)?;
self.2.encode(encoder, offset + 32, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApConfig {
#[inline(always)]
fn new_empty() -> Self {
Self {
ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
password: fidl::new_empty!(fidl::encoding::Vector<u8, 64>, D),
radio_cfg: fidl::new_empty!(RadioConfig, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 0, _depth)?;
fidl::decode!(fidl::encoding::Vector<u8, 64>, D, &mut self.password, decoder, offset + 16, _depth)?;
fidl::decode!(RadioConfig, D, &mut self.radio_cfg, decoder, offset + 32, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ApSmeStartRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ApSmeStartRequest {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApSmeStartRequest, D>
for &ApSmeStartRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ApSmeStartRequest>(offset);
fidl::encoding::Encode::<ApSmeStartRequest, D>::encode(
(<ApConfig as fidl::encoding::ValueTypeMarker>::borrow(&self.config),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ApConfig, D>>
fidl::encoding::Encode<ApSmeStartRequest, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ApSmeStartRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApSmeStartRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { config: fidl::new_empty!(ApConfig, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(ApConfig, D, &mut self.config, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ApSmeStartResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ApSmeStartResponse {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApSmeStartResponse, D>
for &ApSmeStartResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ApSmeStartResponse>(offset);
fidl::encoding::Encode::<ApSmeStartResponse, D>::encode(
(<StartApResultCode as fidl::encoding::ValueTypeMarker>::borrow(&self.code),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StartApResultCode, D>>
fidl::encoding::Encode<ApSmeStartResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ApSmeStartResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApSmeStartResponse {
#[inline(always)]
fn new_empty() -> Self {
Self { code: fidl::new_empty!(StartApResultCode, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(StartApResultCode, D, &mut self.code, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ApSmeStatusResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ApSmeStatusResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
8
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApSmeStatusResponse, D>
for &ApSmeStatusResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ApSmeStatusResponse>(offset);
fidl::encoding::Encode::<ApSmeStatusResponse, D>::encode(
(<ApStatusResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ApStatusResponse, D>>
fidl::encoding::Encode<ApSmeStatusResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ApSmeStatusResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApSmeStatusResponse {
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(ApStatusResponse, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(ApStatusResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ApSmeStopResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ApSmeStopResponse {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApSmeStopResponse, D>
for &ApSmeStopResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ApSmeStopResponse>(offset);
fidl::encoding::Encode::<ApSmeStopResponse, D>::encode(
(<StopApResultCode as fidl::encoding::ValueTypeMarker>::borrow(&self.code),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StopApResultCode, D>>
fidl::encoding::Encode<ApSmeStopResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ApSmeStopResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApSmeStopResponse {
#[inline(always)]
fn new_empty() -> Self {
Self { code: fidl::new_empty!(StopApResultCode, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(StopApResultCode, D, &mut self.code, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ApStatusResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ApStatusResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
8
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApStatusResponse, D>
for &ApStatusResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ApStatusResponse>(offset);
fidl::encoding::Encode::<ApStatusResponse, D>::encode(
(<fidl::encoding::Boxed<Ap> as fidl::encoding::ValueTypeMarker>::borrow(
&self.running_ap,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Boxed<Ap>, D>,
> fidl::encoding::Encode<ApStatusResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ApStatusResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApStatusResponse {
#[inline(always)]
fn new_empty() -> Self {
Self { running_ap: fidl::new_empty!(fidl::encoding::Boxed<Ap>, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::Boxed<Ap>,
D,
&mut self.running_ap,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ResourceTypeMarker for ClientSmeConnectRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ClientSmeConnectRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
112
}
}
unsafe impl
fidl::encoding::Encode<
ClientSmeConnectRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut ClientSmeConnectRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ClientSmeConnectRequest>(offset);
fidl::encoding::Encode::<
ClientSmeConnectRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::encode(
(
<ConnectRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),
<fidl::encoding::Optional<
fidl::encoding::Endpoint<
fidl::endpoints::ServerEnd<ConnectTransactionMarker>,
>,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.txn
),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<ConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>,
T1: fidl::encoding::Encode<
fidl::encoding::Optional<
fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
>
fidl::encoding::Encode<
ClientSmeConnectRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ClientSmeConnectRequest>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(104);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 104, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
for ClientSmeConnectRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
req: fidl::new_empty!(
ConnectRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
),
txn: fidl::new_empty!(
fidl::encoding::Optional<
fidl::encoding::Endpoint<
fidl::endpoints::ServerEnd<ConnectTransactionMarker>,
>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(104) };
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 + 104 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(
ConnectRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.req,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
fidl::encoding::Optional<
fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.txn,
decoder,
offset + 104,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ClientSmeDisconnectRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ClientSmeDisconnectRequest {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<ClientSmeDisconnectRequest, D> for &ClientSmeDisconnectRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ClientSmeDisconnectRequest>(offset);
fidl::encoding::Encode::<ClientSmeDisconnectRequest, D>::encode(
(<UserDisconnectReason as fidl::encoding::ValueTypeMarker>::borrow(&self.reason),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<UserDisconnectReason, D>,
> fidl::encoding::Encode<ClientSmeDisconnectRequest, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ClientSmeDisconnectRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for ClientSmeDisconnectRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { reason: fidl::new_empty!(UserDisconnectReason, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(UserDisconnectReason, D, &mut self.reason, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ClientSmeRoamRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ClientSmeRoamRequest {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ClientSmeRoamRequest, D>
for &ClientSmeRoamRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ClientSmeRoamRequest>(offset);
fidl::encoding::Encode::<ClientSmeRoamRequest, D>::encode(
(<RoamRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<RoamRequest, D>>
fidl::encoding::Encode<ClientSmeRoamRequest, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ClientSmeRoamRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ClientSmeRoamRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { req: fidl::new_empty!(RoamRequest, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(RoamRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ResourceTypeMarker for ClientSmeScanForControllerRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ClientSmeScanForControllerRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
unsafe impl
fidl::encoding::Encode<
ClientSmeScanForControllerRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut ClientSmeScanForControllerRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ClientSmeScanForControllerRequest>(offset);
fidl::encoding::Encode::<
ClientSmeScanForControllerRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::encode(
(<ScanRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>,
>
fidl::encoding::Encode<
ClientSmeScanForControllerRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ClientSmeScanForControllerRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
for ClientSmeScanForControllerRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
req: fidl::new_empty!(ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
ScanRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.req,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ResourceTypeMarker for ClientSmeScanRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ClientSmeScanRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
unsafe impl
fidl::encoding::Encode<ClientSmeScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
for &mut ClientSmeScanRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ClientSmeScanRequest>(offset);
fidl::encoding::Encode::<
ClientSmeScanRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::encode(
(<ScanRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>,
>
fidl::encoding::Encode<ClientSmeScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ClientSmeScanRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
for ClientSmeScanRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
req: fidl::new_empty!(ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
ScanRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.req,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ClientSmeStatusResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ClientSmeStatusResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<ClientSmeStatusResponse, D> for &ClientSmeStatusResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ClientSmeStatusResponse>(offset);
fidl::encoding::Encode::<ClientSmeStatusResponse, D>::encode(
(<ClientStatusResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<ClientStatusResponse, D>,
> fidl::encoding::Encode<ClientSmeStatusResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ClientSmeStatusResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for ClientSmeStatusResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(ClientStatusResponse, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(ClientStatusResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ResourceTypeMarker for ClientSmeScanForControllerResponse {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ClientSmeScanForControllerResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
unsafe impl
fidl::encoding::Encode<
ClientSmeScanForControllerResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut ClientSmeScanForControllerResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ClientSmeScanForControllerResponse>(offset);
fidl::encoding::Encode::<ClientSmeScanForControllerResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
(
<fidl::encoding::UnboundedVector<ScanResult> as fidl::encoding::ValueTypeMarker>::borrow(&self.scan_results),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<ScanResult>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
>
fidl::encoding::Encode<
ClientSmeScanForControllerResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ClientSmeScanForControllerResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
for ClientSmeScanForControllerResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self {
scan_results: fidl::new_empty!(
fidl::encoding::UnboundedVector<ScanResult>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedVector<ScanResult>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.scan_results,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ResourceTypeMarker for ClientSmeScanResponse {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ClientSmeScanResponse {
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
}
}
unsafe impl
fidl::encoding::Encode<ClientSmeScanResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
for &mut ClientSmeScanResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ClientSmeScanResponse>(offset);
fidl::encoding::Encode::<
ClientSmeScanResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::encode(
(<fidl::encoding::HandleType<
fidl::Vmo,
{ fidl::ObjectType::VMO.into_raw() },
2147483648,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.scan_results
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Vmo,
{ fidl::ObjectType::VMO.into_raw() },
2147483648,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
>
fidl::encoding::Encode<ClientSmeScanResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ClientSmeScanResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
for ClientSmeScanResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self {
scan_results: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.scan_results, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ClientSmeWmmStatusResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ClientSmeWmmStatusResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
2
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
34
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<ClientSmeWmmStatusResponse, D> for &ClientSmeWmmStatusResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ClientSmeWmmStatusResponse>(offset);
fidl::encoding::Encode::<ClientSmeWmmStatusResponse, D>::encode(
(
<fidl_fuchsia_wlan_internal::WmmStatusResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal::WmmStatusResponse, D>,
> fidl::encoding::Encode<ClientSmeWmmStatusResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ClientSmeWmmStatusResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for ClientSmeWmmStatusResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_internal::WmmStatusResponse, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl_fuchsia_wlan_internal::WmmStatusResponse,
D,
&mut self.resp,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for Compatibility {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for Compatibility {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Compatibility, D>
for &Compatibility
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Compatibility>(offset);
fidl::encoding::Encode::<Compatibility, D>::encode(
(
<fidl::encoding::Vector<fidl_fuchsia_wlan_common_security::Protocol, 16> as fidl::encoding::ValueTypeMarker>::borrow(&self.mutual_security_protocols),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<
fidl::encoding::Vector<fidl_fuchsia_wlan_common_security::Protocol, 16>,
D,
>,
> fidl::encoding::Encode<Compatibility, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Compatibility>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Compatibility {
#[inline(always)]
fn new_empty() -> Self {
Self {
mutual_security_protocols: fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_wlan_common_security::Protocol, 16>, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_wlan_common_security::Protocol, 16>, D, &mut self.mutual_security_protocols, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ConnectRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ConnectRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
104
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ConnectRequest, D>
for &ConnectRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ConnectRequest>(offset);
fidl::encoding::Encode::<ConnectRequest, D>::encode(
(
<fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssid),
<fidl_fuchsia_wlan_common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_description),
<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.multiple_bss_candidates),
<fidl_fuchsia_wlan_common_security::Authentication as fidl::encoding::ValueTypeMarker>::borrow(&self.authentication),
<fidl_fuchsia_wlan_common::ScanType as fidl::encoding::ValueTypeMarker>::borrow(&self.deprecated_scan_type),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
T1: fidl::encoding::Encode<fidl_fuchsia_wlan_common::BssDescription, D>,
T2: fidl::encoding::Encode<bool, D>,
T3: fidl::encoding::Encode<fidl_fuchsia_wlan_common_security::Authentication, D>,
T4: fidl::encoding::Encode<fidl_fuchsia_wlan_common::ScanType, D>,
> fidl::encoding::Encode<ConnectRequest, D> for (T0, T1, T2, T3, T4)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ConnectRequest>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(64);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(96);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 16, depth)?;
self.2.encode(encoder, offset + 64, depth)?;
self.3.encode(encoder, offset + 72, depth)?;
self.4.encode(encoder, offset + 96, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ConnectRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
bss_description: fidl::new_empty!(fidl_fuchsia_wlan_common::BssDescription, D),
multiple_bss_candidates: fidl::new_empty!(bool, D),
authentication: fidl::new_empty!(
fidl_fuchsia_wlan_common_security::Authentication,
D
),
deprecated_scan_type: fidl::new_empty!(fidl_fuchsia_wlan_common::ScanType, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(64) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffffffffff00u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 64 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(96) };
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 + 96 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl_fuchsia_wlan_common::BssDescription,
D,
&mut self.bss_description,
decoder,
offset + 16,
_depth
)?;
fidl::decode!(
bool,
D,
&mut self.multiple_bss_candidates,
decoder,
offset + 64,
_depth
)?;
fidl::decode!(
fidl_fuchsia_wlan_common_security::Authentication,
D,
&mut self.authentication,
decoder,
offset + 72,
_depth
)?;
fidl::decode!(
fidl_fuchsia_wlan_common::ScanType,
D,
&mut self.deprecated_scan_type,
decoder,
offset + 96,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ConnectResult {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ConnectResult {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
2
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
4
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ConnectResult, D>
for &ConnectResult
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ConnectResult>(offset);
fidl::encoding::Encode::<ConnectResult, D>::encode(
(
<fidl_fuchsia_wlan_ieee80211::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.code),
<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_credential_rejected),
<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_reconnect),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::StatusCode, D>,
T1: fidl::encoding::Encode<bool, D>,
T2: fidl::encoding::Encode<bool, D>,
> fidl::encoding::Encode<ConnectResult, D> for (T0, T1, T2)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ConnectResult>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 2, depth)?;
self.2.encode(encoder, offset + 3, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ConnectResult {
#[inline(always)]
fn new_empty() -> Self {
Self {
code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::StatusCode, D),
is_credential_rejected: fidl::new_empty!(bool, D),
is_reconnect: fidl::new_empty!(bool, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl_fuchsia_wlan_ieee80211::StatusCode,
D,
&mut self.code,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(bool, D, &mut self.is_credential_rejected, decoder, offset + 2, _depth)?;
fidl::decode!(bool, D, &mut self.is_reconnect, decoder, offset + 3, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnChannelSwitchedRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnChannelSwitchedRequest {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<ConnectTransactionOnChannelSwitchedRequest, D>
for &ConnectTransactionOnChannelSwitchedRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ConnectTransactionOnChannelSwitchedRequest>(offset);
fidl::encoding::Encode::<ConnectTransactionOnChannelSwitchedRequest, D>::encode(
(
<fidl_fuchsia_wlan_internal::ChannelSwitchInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal::ChannelSwitchInfo, D>,
> fidl::encoding::Encode<ConnectTransactionOnChannelSwitchedRequest, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ConnectTransactionOnChannelSwitchedRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for ConnectTransactionOnChannelSwitchedRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { info: fidl::new_empty!(fidl_fuchsia_wlan_internal::ChannelSwitchInfo, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl_fuchsia_wlan_internal::ChannelSwitchInfo,
D,
&mut self.info,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnConnectResultRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnConnectResultRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
2
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
4
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<ConnectTransactionOnConnectResultRequest, D>
for &ConnectTransactionOnConnectResultRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ConnectTransactionOnConnectResultRequest>(offset);
fidl::encoding::Encode::<ConnectTransactionOnConnectResultRequest, D>::encode(
(<ConnectResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ConnectResult, D>>
fidl::encoding::Encode<ConnectTransactionOnConnectResultRequest, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ConnectTransactionOnConnectResultRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for ConnectTransactionOnConnectResultRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { result: fidl::new_empty!(ConnectResult, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(ConnectResult, D, &mut self.result, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnDisconnectRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnDisconnectRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
24
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<ConnectTransactionOnDisconnectRequest, D>
for &ConnectTransactionOnDisconnectRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ConnectTransactionOnDisconnectRequest>(offset);
fidl::encoding::Encode::<ConnectTransactionOnDisconnectRequest, D>::encode(
(<DisconnectInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<DisconnectInfo, D>>
fidl::encoding::Encode<ConnectTransactionOnDisconnectRequest, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ConnectTransactionOnDisconnectRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for ConnectTransactionOnDisconnectRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { info: fidl::new_empty!(DisconnectInfo, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(DisconnectInfo, D, &mut self.info, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnRoamResultRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnRoamResultRequest {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<ConnectTransactionOnRoamResultRequest, D>
for &ConnectTransactionOnRoamResultRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ConnectTransactionOnRoamResultRequest>(offset);
fidl::encoding::Encode::<ConnectTransactionOnRoamResultRequest, D>::encode(
(<RoamResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<RoamResult, D>>
fidl::encoding::Encode<ConnectTransactionOnRoamResultRequest, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ConnectTransactionOnRoamResultRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for ConnectTransactionOnRoamResultRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { result: fidl::new_empty!(RoamResult, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(RoamResult, D, &mut self.result, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnSignalReportRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnSignalReportRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
2
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<ConnectTransactionOnSignalReportRequest, D>
for &ConnectTransactionOnSignalReportRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ConnectTransactionOnSignalReportRequest>(offset);
fidl::encoding::Encode::<ConnectTransactionOnSignalReportRequest, D>::encode(
(
<fidl_fuchsia_wlan_internal::SignalReportIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal::SignalReportIndication, D>,
> fidl::encoding::Encode<ConnectTransactionOnSignalReportRequest, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ConnectTransactionOnSignalReportRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for ConnectTransactionOnSignalReportRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { ind: fidl::new_empty!(fidl_fuchsia_wlan_internal::SignalReportIndication, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl_fuchsia_wlan_internal::SignalReportIndication,
D,
&mut self.ind,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DisconnectCause {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DisconnectCause {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
8
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisconnectCause, D>
for &DisconnectCause
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DisconnectCause>(offset);
fidl::encoding::Encode::<DisconnectCause, D>::encode(
(
<DisconnectMlmeEventName as fidl::encoding::ValueTypeMarker>::borrow(&self.mlme_event_name),
<fidl_fuchsia_wlan_ieee80211::ReasonCode as fidl::encoding::ValueTypeMarker>::borrow(&self.reason_code),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<DisconnectMlmeEventName, D>,
T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::ReasonCode, D>,
> fidl::encoding::Encode<DisconnectCause, D> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DisconnectCause>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
(ptr as *mut u32).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisconnectCause {
#[inline(always)]
fn new_empty() -> Self {
Self {
mlme_event_name: fidl::new_empty!(DisconnectMlmeEventName, D),
reason_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::ReasonCode, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
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 + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(
DisconnectMlmeEventName,
D,
&mut self.mlme_event_name,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
fidl_fuchsia_wlan_ieee80211::ReasonCode,
D,
&mut self.reason_code,
decoder,
offset + 4,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DisconnectInfo {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DisconnectInfo {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
24
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisconnectInfo, D>
for &DisconnectInfo
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DisconnectInfo>(offset);
fidl::encoding::Encode::<DisconnectInfo, D>::encode(
(
<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_sme_reconnecting),
<DisconnectSource as fidl::encoding::ValueTypeMarker>::borrow(
&self.disconnect_source,
),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<bool, D>,
T1: fidl::encoding::Encode<DisconnectSource, D>,
> fidl::encoding::Encode<DisconnectInfo, D> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DisconnectInfo>(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<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisconnectInfo {
#[inline(always)]
fn new_empty() -> Self {
Self {
is_sme_reconnecting: fidl::new_empty!(bool, D),
disconnect_source: fidl::new_empty!(DisconnectSource, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffffffffff00u64;
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!(bool, D, &mut self.is_sme_reconnecting, decoder, offset + 0, _depth)?;
fidl::decode!(
DisconnectSource,
D,
&mut self.disconnect_source,
decoder,
offset + 8,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for Empty {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for Empty {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Empty, D> for &Empty {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Empty>(offset);
encoder.write_num(0u8, offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Empty {
#[inline(always)]
fn new_empty() -> Self {
Self
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
match decoder.read_num::<u8>(offset) {
0 => Ok(()),
_ => Err(fidl::Error::Invalid),
}
}
}
impl fidl::encoding::ValueTypeMarker for FeatureSupportQueryDiscoverySupportResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for FeatureSupportQueryDiscoverySupportResponse {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<FeatureSupportQueryDiscoverySupportResponse, D>
for &FeatureSupportQueryDiscoverySupportResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<FeatureSupportQueryDiscoverySupportResponse>(offset);
fidl::encoding::Encode::<FeatureSupportQueryDiscoverySupportResponse, D>::encode(
(
<fidl_fuchsia_wlan_common::DiscoverySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::DiscoverySupport, D>,
> fidl::encoding::Encode<FeatureSupportQueryDiscoverySupportResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<FeatureSupportQueryDiscoverySupportResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for FeatureSupportQueryDiscoverySupportResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_common::DiscoverySupport, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl_fuchsia_wlan_common::DiscoverySupport,
D,
&mut self.resp,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for FeatureSupportQueryMacSublayerSupportResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for FeatureSupportQueryMacSublayerSupportResponse {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<FeatureSupportQueryMacSublayerSupportResponse, D>
for &FeatureSupportQueryMacSublayerSupportResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<FeatureSupportQueryMacSublayerSupportResponse>(offset);
fidl::encoding::Encode::<FeatureSupportQueryMacSublayerSupportResponse, D>::encode(
(
<fidl_fuchsia_wlan_common::MacSublayerSupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::MacSublayerSupport, D>,
> fidl::encoding::Encode<FeatureSupportQueryMacSublayerSupportResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<FeatureSupportQueryMacSublayerSupportResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for FeatureSupportQueryMacSublayerSupportResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_common::MacSublayerSupport, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl_fuchsia_wlan_common::MacSublayerSupport,
D,
&mut self.resp,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for FeatureSupportQuerySecuritySupportResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for FeatureSupportQuerySecuritySupportResponse {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<FeatureSupportQuerySecuritySupportResponse, D>
for &FeatureSupportQuerySecuritySupportResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<FeatureSupportQuerySecuritySupportResponse>(offset);
fidl::encoding::Encode::<FeatureSupportQuerySecuritySupportResponse, D>::encode(
(
<fidl_fuchsia_wlan_common::SecuritySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::SecuritySupport, D>,
> fidl::encoding::Encode<FeatureSupportQuerySecuritySupportResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<FeatureSupportQuerySecuritySupportResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for FeatureSupportQuerySecuritySupportResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_common::SecuritySupport, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl_fuchsia_wlan_common::SecuritySupport,
D,
&mut self.resp,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for FeatureSupportQuerySpectrumManagementSupportResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for FeatureSupportQuerySpectrumManagementSupportResponse {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<FeatureSupportQuerySpectrumManagementSupportResponse, D>
for &FeatureSupportQuerySpectrumManagementSupportResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder
.debug_check_bounds::<FeatureSupportQuerySpectrumManagementSupportResponse>(offset);
fidl::encoding::Encode::<FeatureSupportQuerySpectrumManagementSupportResponse, D>::encode(
(
<fidl_fuchsia_wlan_common::SpectrumManagementSupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::SpectrumManagementSupport, D>,
> fidl::encoding::Encode<FeatureSupportQuerySpectrumManagementSupportResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder
.debug_check_bounds::<FeatureSupportQuerySpectrumManagementSupportResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for FeatureSupportQuerySpectrumManagementSupportResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_common::SpectrumManagementSupport, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl_fuchsia_wlan_common::SpectrumManagementSupport,
D,
&mut self.resp,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ResourceTypeMarker for GenericSmeGetApSmeRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for GenericSmeGetApSmeRequest {
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
}
}
unsafe impl
fidl::encoding::Encode<
GenericSmeGetApSmeRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut GenericSmeGetApSmeRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<GenericSmeGetApSmeRequest>(offset);
fidl::encoding::Encode::<GenericSmeGetApSmeRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
(
<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.sme_server),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<
fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
>
fidl::encoding::Encode<
GenericSmeGetApSmeRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<GenericSmeGetApSmeRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
for GenericSmeGetApSmeRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
sme_server: fidl::new_empty!(
fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.sme_server,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ResourceTypeMarker for GenericSmeGetClientSmeRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for GenericSmeGetClientSmeRequest {
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
}
}
unsafe impl
fidl::encoding::Encode<
GenericSmeGetClientSmeRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut GenericSmeGetClientSmeRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<GenericSmeGetClientSmeRequest>(offset);
fidl::encoding::Encode::<GenericSmeGetClientSmeRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
(
<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.sme_server),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<
fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
>
fidl::encoding::Encode<
GenericSmeGetClientSmeRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<GenericSmeGetClientSmeRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
for GenericSmeGetClientSmeRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
sme_server: fidl::new_empty!(
fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.sme_server,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ResourceTypeMarker for GenericSmeGetFeatureSupportRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for GenericSmeGetFeatureSupportRequest {
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
}
}
unsafe impl
fidl::encoding::Encode<
GenericSmeGetFeatureSupportRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut GenericSmeGetFeatureSupportRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<GenericSmeGetFeatureSupportRequest>(offset);
fidl::encoding::Encode::<GenericSmeGetFeatureSupportRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
(
<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<FeatureSupportMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.feature_support_server),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<
fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<FeatureSupportMarker>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
>
fidl::encoding::Encode<
GenericSmeGetFeatureSupportRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<GenericSmeGetFeatureSupportRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
for GenericSmeGetFeatureSupportRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
feature_support_server: fidl::new_empty!(
fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<FeatureSupportMarker>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<FeatureSupportMarker>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.feature_support_server,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ResourceTypeMarker for GenericSmeGetSmeTelemetryRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for GenericSmeGetSmeTelemetryRequest {
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
}
}
unsafe impl
fidl::encoding::Encode<
GenericSmeGetSmeTelemetryRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut GenericSmeGetSmeTelemetryRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<GenericSmeGetSmeTelemetryRequest>(offset);
fidl::encoding::Encode::<GenericSmeGetSmeTelemetryRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
(
<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.telemetry_server),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<
fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
>
fidl::encoding::Encode<
GenericSmeGetSmeTelemetryRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<GenericSmeGetSmeTelemetryRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
for GenericSmeGetSmeTelemetryRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
telemetry_server: fidl::new_empty!(
fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.telemetry_server,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for GenericSmeQuery {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for GenericSmeQuery {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
12
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GenericSmeQuery, D>
for &GenericSmeQuery
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<GenericSmeQuery>(offset);
fidl::encoding::Encode::<GenericSmeQuery, D>::encode(
(
<fidl_fuchsia_wlan_common::WlanMacRole as fidl::encoding::ValueTypeMarker>::borrow(&self.role),
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.sta_addr),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanMacRole, D>,
T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
> fidl::encoding::Encode<GenericSmeQuery, D> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<GenericSmeQuery>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
(ptr as *mut u32).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GenericSmeQuery {
#[inline(always)]
fn new_empty() -> Self {
Self {
role: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanMacRole, D),
sta_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let 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,
});
}
fidl::decode!(
fidl_fuchsia_wlan_common::WlanMacRole,
D,
&mut self.role,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.sta_addr, decoder, offset + 4, _depth)?;
Ok(())
}
}
impl fidl::encoding::ResourceTypeMarker for GenericSmeQueryResponse {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for GenericSmeQueryResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
12
}
}
unsafe impl
fidl::encoding::Encode<
GenericSmeQueryResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut GenericSmeQueryResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<GenericSmeQueryResponse>(offset);
fidl::encoding::Encode::<
GenericSmeQueryResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::encode(
(<GenericSmeQuery as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<GenericSmeQuery, fidl::encoding::DefaultFuchsiaResourceDialect>,
>
fidl::encoding::Encode<
GenericSmeQueryResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<GenericSmeQueryResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
for GenericSmeQueryResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self {
resp: fidl::new_empty!(
GenericSmeQuery,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
GenericSmeQuery,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.resp,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for LegacyPrivacySupport {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for LegacyPrivacySupport {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
2
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LegacyPrivacySupport, D>
for &LegacyPrivacySupport
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<LegacyPrivacySupport>(offset);
fidl::encoding::Encode::<LegacyPrivacySupport, D>::encode(
(
<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.wep_supported),
<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.wpa1_supported),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<bool, D>,
T1: fidl::encoding::Encode<bool, D>,
> fidl::encoding::Encode<LegacyPrivacySupport, D> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<LegacyPrivacySupport>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 1, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LegacyPrivacySupport {
#[inline(always)]
fn new_empty() -> Self {
Self {
wep_supported: fidl::new_empty!(bool, D),
wpa1_supported: fidl::new_empty!(bool, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(bool, D, &mut self.wep_supported, decoder, offset + 0, _depth)?;
fidl::decode!(bool, D, &mut self.wpa1_supported, decoder, offset + 1, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for PassiveScanRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for PassiveScanRequest {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PassiveScanRequest, D>
for &PassiveScanRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<PassiveScanRequest>(offset);
encoder.write_num(0u8, offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PassiveScanRequest {
#[inline(always)]
fn new_empty() -> Self {
Self
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
match decoder.read_num::<u8>(offset) {
0 => Ok(()),
_ => Err(fidl::Error::Invalid),
}
}
}
impl fidl::encoding::ValueTypeMarker for RadioConfig {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for RadioConfig {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RadioConfig, D>
for &RadioConfig
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RadioConfig>(offset);
fidl::encoding::Encode::<RadioConfig, D>::encode(
(
<fidl_fuchsia_wlan_common::WlanPhyType as fidl::encoding::ValueTypeMarker>::borrow(&self.phy),
<fidl_fuchsia_wlan_common::WlanChannel as fidl::encoding::ValueTypeMarker>::borrow(&self.channel),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanPhyType, D>,
T1: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanChannel, D>,
> fidl::encoding::Encode<RadioConfig, D> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RadioConfig>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RadioConfig {
#[inline(always)]
fn new_empty() -> Self {
Self {
phy: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanPhyType, D),
channel: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanChannel, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl_fuchsia_wlan_common::WlanPhyType,
D,
&mut self.phy,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
fidl_fuchsia_wlan_common::WlanChannel,
D,
&mut self.channel,
decoder,
offset + 4,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for RoamRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for RoamRequest {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RoamRequest, D>
for &RoamRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RoamRequest>(offset);
fidl::encoding::Encode::<RoamRequest, D>::encode(
(
<fidl_fuchsia_wlan_common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_description),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::BssDescription, D>,
> fidl::encoding::Encode<RoamRequest, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RoamRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoamRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { bss_description: fidl::new_empty!(fidl_fuchsia_wlan_common::BssDescription, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl_fuchsia_wlan_common::BssDescription,
D,
&mut self.bss_description,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for RoamResult {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for RoamResult {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RoamResult, D>
for &RoamResult
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RoamResult>(offset);
fidl::encoding::Encode::<RoamResult, D>::encode(
(
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.bssid),
<fidl_fuchsia_wlan_ieee80211::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.status_code),
<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.original_association_maintained),
<fidl::encoding::Boxed<fidl_fuchsia_wlan_common::BssDescription> as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_description),
<fidl::encoding::Boxed<DisconnectInfo> as fidl::encoding::ValueTypeMarker>::borrow(&self.disconnect_info),
<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_credential_rejected),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::StatusCode, D>,
T2: fidl::encoding::Encode<bool, D>,
T3: fidl::encoding::Encode<
fidl::encoding::Boxed<fidl_fuchsia_wlan_common::BssDescription>,
D,
>,
T4: fidl::encoding::Encode<fidl::encoding::Boxed<DisconnectInfo>, D>,
T5: fidl::encoding::Encode<bool, D>,
> fidl::encoding::Encode<RoamResult, D> for (T0, T1, T2, T3, T4, T5)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RoamResult>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 6, depth)?;
self.2.encode(encoder, offset + 8, depth)?;
self.3.encode(encoder, offset + 16, depth)?;
self.4.encode(encoder, offset + 24, depth)?;
self.5.encode(encoder, offset + 32, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoamResult {
#[inline(always)]
fn new_empty() -> Self {
Self {
bssid: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
status_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::StatusCode, D),
original_association_maintained: fidl::new_empty!(bool, D),
bss_description: fidl::new_empty!(
fidl::encoding::Boxed<fidl_fuchsia_wlan_common::BssDescription>,
D
),
disconnect_info: fidl::new_empty!(fidl::encoding::Boxed<DisconnectInfo>, D),
is_credential_rejected: fidl::new_empty!(bool, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffffffffff00u64;
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(32) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffffffffff00u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.bssid, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl_fuchsia_wlan_ieee80211::StatusCode,
D,
&mut self.status_code,
decoder,
offset + 6,
_depth
)?;
fidl::decode!(
bool,
D,
&mut self.original_association_maintained,
decoder,
offset + 8,
_depth
)?;
fidl::decode!(
fidl::encoding::Boxed<fidl_fuchsia_wlan_common::BssDescription>,
D,
&mut self.bss_description,
decoder,
offset + 16,
_depth
)?;
fidl::decode!(
fidl::encoding::Boxed<DisconnectInfo>,
D,
&mut self.disconnect_info,
decoder,
offset + 24,
_depth
)?;
fidl::decode!(bool, D, &mut self.is_credential_rejected, decoder, offset + 32, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ScanResult {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ScanResult {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
64
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ScanResult, D>
for &ScanResult
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ScanResult>(offset);
fidl::encoding::Encode::<ScanResult, D>::encode(
(
<fidl::encoding::Boxed<Compatibility> as fidl::encoding::ValueTypeMarker>::borrow(&self.compatibility),
<i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.timestamp_nanos),
<fidl_fuchsia_wlan_common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_description),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Boxed<Compatibility>, D>,
T1: fidl::encoding::Encode<i64, D>,
T2: fidl::encoding::Encode<fidl_fuchsia_wlan_common::BssDescription, D>,
> fidl::encoding::Encode<ScanResult, D> for (T0, T1, T2)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ScanResult>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 8, depth)?;
self.2.encode(encoder, offset + 16, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanResult {
#[inline(always)]
fn new_empty() -> Self {
Self {
compatibility: fidl::new_empty!(fidl::encoding::Boxed<Compatibility>, D),
timestamp_nanos: fidl::new_empty!(i64, D),
bss_description: fidl::new_empty!(fidl_fuchsia_wlan_common::BssDescription, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::Boxed<Compatibility>,
D,
&mut self.compatibility,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(i64, D, &mut self.timestamp_nanos, decoder, offset + 8, _depth)?;
fidl::decode!(
fidl_fuchsia_wlan_common::BssDescription,
D,
&mut self.bss_description,
decoder,
offset + 16,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ScanResultVector {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ScanResultVector {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ScanResultVector, D>
for &ScanResultVector
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ScanResultVector>(offset);
fidl::encoding::Encode::<ScanResultVector, D>::encode(
(
<fidl::encoding::UnboundedVector<ScanResult> as fidl::encoding::ValueTypeMarker>::borrow(&self.results),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<ScanResult>, D>,
> fidl::encoding::Encode<ScanResultVector, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ScanResultVector>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanResultVector {
#[inline(always)]
fn new_empty() -> Self {
Self { results: fidl::new_empty!(fidl::encoding::UnboundedVector<ScanResult>, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedVector<ScanResult>,
D,
&mut self.results,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ServingApInfo {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ServingApInfo {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ServingApInfo, D>
for &ServingApInfo
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ServingApInfo>(offset);
fidl::encoding::Encode::<ServingApInfo, D>::encode(
(
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.bssid),
<fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssid),
<i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.rssi_dbm),
<i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.snr_db),
<fidl_fuchsia_wlan_common::WlanChannel as fidl::encoding::ValueTypeMarker>::borrow(&self.channel),
<Protection as fidl::encoding::ValueTypeMarker>::borrow(&self.protection),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
T2: fidl::encoding::Encode<i8, D>,
T3: fidl::encoding::Encode<i8, D>,
T4: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanChannel, D>,
T5: fidl::encoding::Encode<Protection, D>,
> fidl::encoding::Encode<ServingApInfo, D> for (T0, T1, T2, T3, T4, T5)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ServingApInfo>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
(ptr as *mut u64).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 8, depth)?;
self.2.encode(encoder, offset + 24, depth)?;
self.3.encode(encoder, offset + 25, depth)?;
self.4.encode(encoder, offset + 28, depth)?;
self.5.encode(encoder, offset + 40, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ServingApInfo {
#[inline(always)]
fn new_empty() -> Self {
Self {
bssid: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
rssi_dbm: fidl::new_empty!(i8, D),
snr_db: fidl::new_empty!(i8, D),
channel: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanChannel, D),
protection: fidl::new_empty!(Protection, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffff000000000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffff0000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
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 + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.bssid, decoder, offset + 0, _depth)?;
fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 8, _depth)?;
fidl::decode!(i8, D, &mut self.rssi_dbm, decoder, offset + 24, _depth)?;
fidl::decode!(i8, D, &mut self.snr_db, decoder, offset + 25, _depth)?;
fidl::decode!(
fidl_fuchsia_wlan_common::WlanChannel,
D,
&mut self.channel,
decoder,
offset + 28,
_depth
)?;
fidl::decode!(Protection, D, &mut self.protection, decoder, offset + 40, _depth)?;
Ok(())
}
}
impl fidl::encoding::ResourceTypeMarker for TelemetryCloneInspectVmoResponse {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for TelemetryCloneInspectVmoResponse {
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
}
}
unsafe impl
fidl::encoding::Encode<
TelemetryCloneInspectVmoResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut TelemetryCloneInspectVmoResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<TelemetryCloneInspectVmoResponse>(offset);
fidl::encoding::Encode::<
TelemetryCloneInspectVmoResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::encode(
(<fidl::encoding::HandleType<
fidl::Vmo,
{ fidl::ObjectType::VMO.into_raw() },
2147483648,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.inspect_vmo
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Vmo,
{ fidl::ObjectType::VMO.into_raw() },
2147483648,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
>
fidl::encoding::Encode<
TelemetryCloneInspectVmoResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<TelemetryCloneInspectVmoResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
for TelemetryCloneInspectVmoResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self {
inspect_vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.inspect_vmo, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for TelemetryGetCounterStatsResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for TelemetryGetCounterStatsResponse {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<TelemetryGetCounterStatsResponse, D>
for &TelemetryGetCounterStatsResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<TelemetryGetCounterStatsResponse>(offset);
fidl::encoding::Encode::<TelemetryGetCounterStatsResponse, D>::encode(
(
<fidl_fuchsia_wlan_stats::IfaceCounterStats as fidl::encoding::ValueTypeMarker>::borrow(&self.stats),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl_fuchsia_wlan_stats::IfaceCounterStats, D>,
> fidl::encoding::Encode<TelemetryGetCounterStatsResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<TelemetryGetCounterStatsResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for TelemetryGetCounterStatsResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { stats: fidl::new_empty!(fidl_fuchsia_wlan_stats::IfaceCounterStats, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl_fuchsia_wlan_stats::IfaceCounterStats,
D,
&mut self.stats,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for TelemetryGetHistogramStatsResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for TelemetryGetHistogramStatsResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
64
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<TelemetryGetHistogramStatsResponse, D>
for &TelemetryGetHistogramStatsResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<TelemetryGetHistogramStatsResponse>(offset);
fidl::encoding::Encode::<TelemetryGetHistogramStatsResponse, D>::encode(
(
<fidl_fuchsia_wlan_stats::IfaceHistogramStats as fidl::encoding::ValueTypeMarker>::borrow(&self.stats),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl_fuchsia_wlan_stats::IfaceHistogramStats, D>,
> fidl::encoding::Encode<TelemetryGetHistogramStatsResponse, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<TelemetryGetHistogramStatsResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for TelemetryGetHistogramStatsResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { stats: fidl::new_empty!(fidl_fuchsia_wlan_stats::IfaceHistogramStats, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl_fuchsia_wlan_stats::IfaceHistogramStats,
D,
&mut self.stats,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ResourceTypeMarker for UsmeBootstrapStartRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for UsmeBootstrapStartRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
8
}
}
unsafe impl
fidl::encoding::Encode<
UsmeBootstrapStartRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut UsmeBootstrapStartRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<UsmeBootstrapStartRequest>(offset);
fidl::encoding::Encode::<UsmeBootstrapStartRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
(
<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.generic_sme_server),
<LegacyPrivacySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.legacy_privacy_support),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<
fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T1: fidl::encoding::Encode<
LegacyPrivacySupport,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
>
fidl::encoding::Encode<
UsmeBootstrapStartRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<UsmeBootstrapStartRequest>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
(ptr as *mut u32).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
for UsmeBootstrapStartRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
generic_sme_server: fidl::new_empty!(
fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
legacy_privacy_support: fidl::new_empty!(
LegacyPrivacySupport,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
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 + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(
fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.generic_sme_server,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
LegacyPrivacySupport,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.legacy_privacy_support,
decoder,
offset + 4,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ResourceTypeMarker for UsmeBootstrapStartResponse {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for UsmeBootstrapStartResponse {
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
}
}
unsafe impl
fidl::encoding::Encode<
UsmeBootstrapStartResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut UsmeBootstrapStartResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<UsmeBootstrapStartResponse>(offset);
fidl::encoding::Encode::<
UsmeBootstrapStartResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::encode(
(<fidl::encoding::HandleType<
fidl::Vmo,
{ fidl::ObjectType::VMO.into_raw() },
2147483648,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.inspect_vmo
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Vmo,
{ fidl::ObjectType::VMO.into_raw() },
2147483648,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
>
fidl::encoding::Encode<
UsmeBootstrapStartResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<UsmeBootstrapStartResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
for UsmeBootstrapStartResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self {
inspect_vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.inspect_vmo, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ClientStatusResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ClientStatusResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ClientStatusResponse, D>
for &ClientStatusResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ClientStatusResponse>(offset);
encoder.write_num::<u64>(self.ordinal(), offset);
match self {
ClientStatusResponse::Connected(ref val) => {
fidl::encoding::encode_in_envelope::<ServingApInfo, D>(
<ServingApInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ClientStatusResponse::Connecting(ref val) => {
fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<u8, 32>, D>(
<fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
val,
),
encoder,
offset + 8,
_depth,
)
}
ClientStatusResponse::Idle(ref val) => {
fidl::encoding::encode_in_envelope::<Empty, D>(
<Empty as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ClientStatusResponse::Roaming(ref val) => fidl::encoding::encode_in_envelope::<
fidl::encoding::Array<u8, 6>,
D,
>(
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
),
}
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ClientStatusResponse {
#[inline(always)]
fn new_empty() -> Self {
Self::Connected(fidl::new_empty!(ServingApInfo, D))
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
#[allow(unused_variables)]
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
let (ordinal, inlined, num_bytes, num_handles) =
fidl::encoding::decode_union_inline_portion(decoder, offset)?;
let member_inline_size = match ordinal {
1 => <ServingApInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
2 => <fidl::encoding::Vector<u8, 32> as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
),
3 => <Empty as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4 => <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
),
_ => return Err(fidl::Error::UnknownUnionTag),
};
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let _inner_offset;
if inlined {
decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
_inner_offset = offset + 8;
} else {
depth.increment()?;
_inner_offset = decoder.out_of_line_offset(member_inline_size)?;
}
match ordinal {
1 => {
#[allow(irrefutable_let_patterns)]
if let ClientStatusResponse::Connected(_) = self {
} else {
*self = ClientStatusResponse::Connected(fidl::new_empty!(ServingApInfo, D));
}
#[allow(irrefutable_let_patterns)]
if let ClientStatusResponse::Connected(ref mut val) = self {
fidl::decode!(ServingApInfo, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
2 => {
#[allow(irrefutable_let_patterns)]
if let ClientStatusResponse::Connecting(_) = self {
} else {
*self = ClientStatusResponse::Connecting(
fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
);
}
#[allow(irrefutable_let_patterns)]
if let ClientStatusResponse::Connecting(ref mut val) = self {
fidl::decode!(fidl::encoding::Vector<u8, 32>, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
3 => {
#[allow(irrefutable_let_patterns)]
if let ClientStatusResponse::Idle(_) = self {
} else {
*self = ClientStatusResponse::Idle(fidl::new_empty!(Empty, D));
}
#[allow(irrefutable_let_patterns)]
if let ClientStatusResponse::Idle(ref mut val) = self {
fidl::decode!(Empty, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
4 => {
#[allow(irrefutable_let_patterns)]
if let ClientStatusResponse::Roaming(_) = self {
} else {
*self = ClientStatusResponse::Roaming(
fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
);
}
#[allow(irrefutable_let_patterns)]
if let ClientStatusResponse::Roaming(ref mut val) = self {
fidl::decode!(fidl::encoding::Array<u8, 6>, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
ordinal => panic!("unexpected ordinal {:?}", ordinal),
}
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);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DisconnectSource {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DisconnectSource {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisconnectSource, D>
for &DisconnectSource
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DisconnectSource>(offset);
encoder.write_num::<u64>(self.ordinal(), offset);
match self {
DisconnectSource::Ap(ref val) => {
fidl::encoding::encode_in_envelope::<DisconnectCause, D>(
<DisconnectCause as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
DisconnectSource::User(ref val) => {
fidl::encoding::encode_in_envelope::<UserDisconnectReason, D>(
<UserDisconnectReason as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
DisconnectSource::Mlme(ref val) => {
fidl::encoding::encode_in_envelope::<DisconnectCause, D>(
<DisconnectCause as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
}
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisconnectSource {
#[inline(always)]
fn new_empty() -> Self {
Self::Ap(fidl::new_empty!(DisconnectCause, D))
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
#[allow(unused_variables)]
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
let (ordinal, inlined, num_bytes, num_handles) =
fidl::encoding::decode_union_inline_portion(decoder, offset)?;
let member_inline_size = match ordinal {
1 => <DisconnectCause as fidl::encoding::TypeMarker>::inline_size(decoder.context),
2 => <UserDisconnectReason as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
),
3 => <DisconnectCause as fidl::encoding::TypeMarker>::inline_size(decoder.context),
_ => return Err(fidl::Error::UnknownUnionTag),
};
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let _inner_offset;
if inlined {
decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
_inner_offset = offset + 8;
} else {
depth.increment()?;
_inner_offset = decoder.out_of_line_offset(member_inline_size)?;
}
match ordinal {
1 => {
#[allow(irrefutable_let_patterns)]
if let DisconnectSource::Ap(_) = self {
} else {
*self = DisconnectSource::Ap(fidl::new_empty!(DisconnectCause, D));
}
#[allow(irrefutable_let_patterns)]
if let DisconnectSource::Ap(ref mut val) = self {
fidl::decode!(DisconnectCause, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
2 => {
#[allow(irrefutable_let_patterns)]
if let DisconnectSource::User(_) = self {
} else {
*self = DisconnectSource::User(fidl::new_empty!(UserDisconnectReason, D));
}
#[allow(irrefutable_let_patterns)]
if let DisconnectSource::User(ref mut val) = self {
fidl::decode!(UserDisconnectReason, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
3 => {
#[allow(irrefutable_let_patterns)]
if let DisconnectSource::Mlme(_) = self {
} else {
*self = DisconnectSource::Mlme(fidl::new_empty!(DisconnectCause, D));
}
#[allow(irrefutable_let_patterns)]
if let DisconnectSource::Mlme(ref mut val) = self {
fidl::decode!(DisconnectCause, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
ordinal => panic!("unexpected ordinal {:?}", ordinal),
}
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);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ScanRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ScanRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ScanRequest, D>
for &ScanRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ScanRequest>(offset);
encoder.write_num::<u64>(self.ordinal(), offset);
match self {
ScanRequest::Active(ref val) => {
fidl::encoding::encode_in_envelope::<ActiveScanRequest, D>(
<ActiveScanRequest as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ScanRequest::Passive(ref val) => {
fidl::encoding::encode_in_envelope::<PassiveScanRequest, D>(
<PassiveScanRequest as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
}
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanRequest {
#[inline(always)]
fn new_empty() -> Self {
Self::Active(fidl::new_empty!(ActiveScanRequest, D))
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
#[allow(unused_variables)]
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
let (ordinal, inlined, num_bytes, num_handles) =
fidl::encoding::decode_union_inline_portion(decoder, offset)?;
let member_inline_size = match ordinal {
1 => {
<ActiveScanRequest as fidl::encoding::TypeMarker>::inline_size(decoder.context)
}
2 => {
<PassiveScanRequest as fidl::encoding::TypeMarker>::inline_size(decoder.context)
}
_ => return Err(fidl::Error::UnknownUnionTag),
};
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let _inner_offset;
if inlined {
decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
_inner_offset = offset + 8;
} else {
depth.increment()?;
_inner_offset = decoder.out_of_line_offset(member_inline_size)?;
}
match ordinal {
1 => {
#[allow(irrefutable_let_patterns)]
if let ScanRequest::Active(_) = self {
} else {
*self = ScanRequest::Active(fidl::new_empty!(ActiveScanRequest, D));
}
#[allow(irrefutable_let_patterns)]
if let ScanRequest::Active(ref mut val) = self {
fidl::decode!(ActiveScanRequest, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
2 => {
#[allow(irrefutable_let_patterns)]
if let ScanRequest::Passive(_) = self {
} else {
*self = ScanRequest::Passive(fidl::new_empty!(PassiveScanRequest, D));
}
#[allow(irrefutable_let_patterns)]
if let ScanRequest::Passive(ref mut val) = self {
fidl::decode!(PassiveScanRequest, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
ordinal => panic!("unexpected ordinal {:?}", ordinal),
}
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);
}
Ok(())
}
}
}