#![warn(clippy::all)]
#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
use bitflags::bitflags;
use fidl::client::QueryResponseFut;
use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
use fidl::endpoints::{ControlHandle as _, Responder as _};
use futures::future::{self, MaybeDone, TryFutureExt};
use zx_status;
pub type QosInfo = u8;
pub const MAX_SSIDS_PER_SCAN_REQUEST: u32 = 32;
pub const WMM_PARAM_LEN: u8 = 18;
pub const COUNTRY_ENVIRON_ALL: u8 = 32;
pub const COUNTRY_ENVIRON_INDOOR: u8 = 73;
pub const COUNTRY_ENVIRON_NON_COUNTRY: u8 = 88;
pub const COUNTRY_ENVIRON_OUTDOOR: u8 = 79;
bitflags! {
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct MgmtFrameCaptureFlags: u32 {
const ASSOC_REQ = 1;
const ASSOC_RESP = 2;
const REASSOC_REQ = 4;
const REASSOC_RESP = 8;
const PROBE_REQ = 16;
const PROBE_RESP = 32;
const TIMING_AD = 64;
const BEACON = 256;
const ATIM = 512;
const DISASSOC = 1024;
const AUTH = 2048;
const DEAUTH = 4096;
const ACTION = 8192;
const ACTION_NO_ACK = 16384;
}
}
impl MgmtFrameCaptureFlags {
#[deprecated = "Strict bits should not use `has_unknown_bits`"]
#[inline(always)]
pub fn has_unknown_bits(&self) -> bool {
false
}
#[deprecated = "Strict bits should not use `get_unknown_bits`"]
#[inline(always)]
pub fn get_unknown_bits(&self) -> u32 {
0
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(u32)]
pub enum AssociateResultCode {
Success = 0,
RefusedReasonUnspecified = 1,
RefusedNotAuthenticated = 2,
RefusedCapabilitiesMismatch = 3,
RefusedExternalReason = 4,
RefusedApOutOfMemory = 5,
RefusedBasicRatesMismatch = 6,
RejectedEmergencyServicesNotSupported = 7,
RefusedTemporarily = 8,
}
impl AssociateResultCode {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
0 => Some(Self::Success),
1 => Some(Self::RefusedReasonUnspecified),
2 => Some(Self::RefusedNotAuthenticated),
3 => Some(Self::RefusedCapabilitiesMismatch),
4 => Some(Self::RefusedExternalReason),
5 => Some(Self::RefusedApOutOfMemory),
6 => Some(Self::RefusedBasicRatesMismatch),
7 => Some(Self::RejectedEmergencyServicesNotSupported),
8 => Some(Self::RefusedTemporarily),
_ => 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 AuthenticateResultCode {
Success = 0,
Refused = 1,
AntiCloggingTokenRequired = 2,
FiniteCyclicGroupNotSupported = 3,
AuthenticationRejected = 4,
AuthFailureTimeout = 5,
}
impl AuthenticateResultCode {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
0 => Some(Self::Success),
1 => Some(Self::Refused),
2 => Some(Self::AntiCloggingTokenRequired),
3 => Some(Self::FiniteCyclicGroupNotSupported),
4 => Some(Self::AuthenticationRejected),
5 => Some(Self::AuthFailureTimeout),
_ => 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 AuthenticationTypes {
OpenSystem = 1,
SharedKey = 2,
FastBssTransition = 3,
Sae = 4,
}
impl AuthenticationTypes {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
1 => Some(Self::OpenSystem),
2 => Some(Self::SharedKey),
3 => Some(Self::FastBssTransition),
4 => Some(Self::Sae),
_ => 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 ControlledPortState {
Closed = 0,
Open = 1,
}
impl ControlledPortState {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
0 => Some(Self::Closed),
1 => Some(Self::Open),
_ => 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 EapolResultCode {
Success = 0,
TransmissionFailure = 1,
}
impl EapolResultCode {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
0 => Some(Self::Success),
1 => Some(Self::TransmissionFailure),
_ => 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 KeyType {
Group = 1,
Pairwise = 2,
PeerKey = 3,
Igtk = 4,
}
impl KeyType {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
1 => Some(Self::Group),
2 => Some(Self::Pairwise),
3 => Some(Self::PeerKey),
4 => Some(Self::Igtk),
_ => 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 ScanResultCode {
Success = 0,
NotSupported = 1,
InvalidArgs = 2,
InternalError = 3,
ShouldWait = 4,
CanceledByDriverOrFirmware = 5,
}
impl ScanResultCode {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
0 => Some(Self::Success),
1 => Some(Self::NotSupported),
2 => Some(Self::InvalidArgs),
3 => Some(Self::InternalError),
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 ScanTypes {
Active = 1,
Passive = 2,
}
impl ScanTypes {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
1 => Some(Self::Active),
2 => Some(Self::Passive),
_ => 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 StartResultCode {
Success = 0,
BssAlreadyStartedOrJoined = 1,
ResetRequiredBeforeStart = 2,
NotSupported = 3,
InternalError = 4,
}
impl StartResultCode {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
0 => Some(Self::Success),
1 => Some(Self::BssAlreadyStartedOrJoined),
2 => Some(Self::ResetRequiredBeforeStart),
3 => Some(Self::NotSupported),
4 => Some(Self::InternalError),
_ => 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 StopResultCode {
Success = 0,
BssAlreadyStopped = 1,
InternalError = 2,
}
impl StopResultCode {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
0 => Some(Self::Success),
1 => Some(Self::BssAlreadyStopped),
2 => Some(Self::InternalError),
_ => 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 AssociateIndication {
pub peer_sta_address: [u8; 6],
pub capability_info: u16,
pub listen_interval: u16,
pub ssid: Option<Vec<u8>>,
pub rates: Vec<u8>,
pub rsne: Option<Vec<u8>>,
}
impl fidl::Persistable for AssociateIndication {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct AssociateResponse {
pub peer_sta_address: [u8; 6],
pub result_code: AssociateResultCode,
pub association_id: u16,
pub capability_info: u16,
pub rates: Vec<u8>,
}
impl fidl::Persistable for AssociateResponse {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct AuthenticateIndication {
pub peer_sta_address: [u8; 6],
pub auth_type: AuthenticationTypes,
}
impl fidl::Persistable for AuthenticateIndication {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct AuthenticateResponse {
pub peer_sta_address: [u8; 6],
pub result_code: AuthenticateResultCode,
}
impl fidl::Persistable for AuthenticateResponse {}
#[derive(Clone, Debug, PartialEq)]
pub struct BandCapability {
pub band: fidl_fuchsia_wlan_ieee80211::WlanBand,
pub basic_rates: Vec<u8>,
pub ht_cap: Option<Box<fidl_fuchsia_wlan_ieee80211::HtCapabilities>>,
pub vht_cap: Option<Box<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>>,
pub operating_channels: Vec<u8>,
}
impl fidl::Persistable for BandCapability {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct CapturedFrameResult {
pub frame: Vec<u8>,
}
impl fidl::Persistable for CapturedFrameResult {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ConnectConfirm {
pub peer_sta_address: [u8; 6],
pub result_code: fidl_fuchsia_wlan_ieee80211::StatusCode,
pub association_id: u16,
pub association_ies: Vec<u8>,
}
impl fidl::Persistable for ConnectConfirm {}
#[derive(Clone, Debug, PartialEq)]
pub struct ConnectRequest {
pub selected_bss: fidl_fuchsia_wlan_common::BssDescription,
pub connect_failure_timeout: u32,
pub auth_type: AuthenticationTypes,
pub sae_password: Vec<u8>,
pub wep_key: Option<Box<SetKeyDescriptor>>,
pub security_ie: Vec<u8>,
}
impl fidl::Persistable for ConnectRequest {}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ConnectorConnectRequest {
pub request: fidl::endpoints::ServerEnd<MlmeMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ConnectorConnectRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct Country {
pub alpha2: [u8; 2],
pub suffix: u8,
}
impl fidl::Persistable for Country {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct DeauthenticateConfirm {
pub peer_sta_address: [u8; 6],
}
impl fidl::Persistable for DeauthenticateConfirm {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct DeauthenticateIndication {
pub peer_sta_address: [u8; 6],
pub reason_code: fidl_fuchsia_wlan_ieee80211::ReasonCode,
pub locally_initiated: bool,
}
impl fidl::Persistable for DeauthenticateIndication {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct DeauthenticateRequest {
pub peer_sta_address: [u8; 6],
pub reason_code: fidl_fuchsia_wlan_ieee80211::ReasonCode,
}
impl fidl::Persistable for DeauthenticateRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct DeleteKeyDescriptor {
pub key_id: u16,
pub key_type: KeyType,
pub address: [u8; 6],
}
impl fidl::Persistable for DeleteKeyDescriptor {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct DeleteKeysRequest {
pub keylist: Vec<DeleteKeyDescriptor>,
}
impl fidl::Persistable for DeleteKeysRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct DeviceInfo {
pub sta_addr: [u8; 6],
pub role: fidl_fuchsia_wlan_common::WlanMacRole,
pub bands: Vec<BandCapability>,
pub softmac_hardware_capability: u32,
pub qos_capable: bool,
}
impl fidl::Persistable for DeviceInfo {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct DisassociateConfirm {
pub status: i32,
}
impl fidl::Persistable for DisassociateConfirm {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct DisassociateIndication {
pub peer_sta_address: [u8; 6],
pub reason_code: fidl_fuchsia_wlan_ieee80211::ReasonCode,
pub locally_initiated: bool,
}
impl fidl::Persistable for DisassociateIndication {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct DisassociateRequest {
pub peer_sta_address: [u8; 6],
pub reason_code: fidl_fuchsia_wlan_ieee80211::ReasonCode,
}
impl fidl::Persistable for DisassociateRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct EapolConfirm {
pub result_code: EapolResultCode,
pub dst_addr: [u8; 6],
}
impl fidl::Persistable for EapolConfirm {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct EapolIndication {
pub src_addr: [u8; 6],
pub dst_addr: [u8; 6],
pub data: Vec<u8>,
}
impl fidl::Persistable for EapolIndication {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct EapolRequest {
pub src_addr: [u8; 6],
pub dst_addr: [u8; 6],
pub data: Vec<u8>,
}
impl fidl::Persistable for EapolRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct MinstrelListResponse {
pub peers: fidl_fuchsia_wlan_minstrel::Peers,
}
impl fidl::Persistable for MinstrelListResponse {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct MinstrelStatsRequest {
pub peer_addr: [u8; 6],
}
impl fidl::Persistable for MinstrelStatsRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct MinstrelStatsResponse {
pub peer: Option<Box<fidl_fuchsia_wlan_minstrel::Peer>>,
}
impl fidl::Persistable for MinstrelStatsResponse {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeAssociateIndRequest {
pub ind: AssociateIndication,
}
impl fidl::Persistable for MlmeAssociateIndRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeAssociateRespRequest {
pub resp: AssociateResponse,
}
impl fidl::Persistable for MlmeAssociateRespRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeAuthenticateIndRequest {
pub ind: AuthenticateIndication,
}
impl fidl::Persistable for MlmeAuthenticateIndRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeAuthenticateRespRequest {
pub resp: AuthenticateResponse,
}
impl fidl::Persistable for MlmeAuthenticateRespRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeConnectConfRequest {
pub resp: ConnectConfirm,
}
impl fidl::Persistable for MlmeConnectConfRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct MlmeConnectReqRequest {
pub req: ConnectRequest,
}
impl fidl::Persistable for MlmeConnectReqRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct MlmeDeauthenticateConfRequest {
pub resp: DeauthenticateConfirm,
}
impl fidl::Persistable for MlmeDeauthenticateConfRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeDeauthenticateIndRequest {
pub ind: DeauthenticateIndication,
}
impl fidl::Persistable for MlmeDeauthenticateIndRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeDeauthenticateReqRequest {
pub req: DeauthenticateRequest,
}
impl fidl::Persistable for MlmeDeauthenticateReqRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeDeleteKeysReqRequest {
pub req: DeleteKeysRequest,
}
impl fidl::Persistable for MlmeDeleteKeysReqRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct MlmeDisassociateConfRequest {
pub resp: DisassociateConfirm,
}
impl fidl::Persistable for MlmeDisassociateConfRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeDisassociateIndRequest {
pub ind: DisassociateIndication,
}
impl fidl::Persistable for MlmeDisassociateIndRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeDisassociateReqRequest {
pub req: DisassociateRequest,
}
impl fidl::Persistable for MlmeDisassociateReqRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeEapolConfRequest {
pub resp: EapolConfirm,
}
impl fidl::Persistable for MlmeEapolConfRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeEapolIndRequest {
pub ind: EapolIndication,
}
impl fidl::Persistable for MlmeEapolIndRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeEapolReqRequest {
pub req: EapolRequest,
}
impl fidl::Persistable for MlmeEapolReqRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct MlmeFinalizeAssociationReqRequest {
pub negotiated_capabilities: NegotiatedCapabilities,
}
impl fidl::Persistable for MlmeFinalizeAssociationReqRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct MlmeGetIfaceCounterStatsResponse {
pub resp: GetIfaceCounterStatsResponse,
}
impl fidl::Persistable for MlmeGetIfaceCounterStatsResponse {}
#[derive(Clone, Debug, PartialEq)]
pub struct MlmeGetIfaceHistogramStatsResponse {
pub resp: GetIfaceHistogramStatsResponse,
}
impl fidl::Persistable for MlmeGetIfaceHistogramStatsResponse {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct MlmeGetMinstrelStatsRequest {
pub req: MinstrelStatsRequest,
}
impl fidl::Persistable for MlmeGetMinstrelStatsRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct MlmeGetMinstrelStatsResponse {
pub resp: MinstrelStatsResponse,
}
impl fidl::Persistable for MlmeGetMinstrelStatsResponse {}
#[derive(Clone, Debug, PartialEq)]
pub struct MlmeListMinstrelPeersResponse {
pub resp: MinstrelListResponse,
}
impl fidl::Persistable for MlmeListMinstrelPeersResponse {}
#[derive(Clone, Debug, PartialEq)]
pub struct MlmeOnChannelSwitchedRequest {
pub info: fidl_fuchsia_wlan_internal::ChannelSwitchInfo,
}
impl fidl::Persistable for MlmeOnChannelSwitchedRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeOnPmkAvailableRequest {
pub info: PmkInfo,
}
impl fidl::Persistable for MlmeOnPmkAvailableRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeOnSaeFrameRxRequest {
pub frame: SaeFrame,
}
impl fidl::Persistable for MlmeOnSaeFrameRxRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct MlmeOnSaeHandshakeIndRequest {
pub ind: SaeHandshakeIndication,
}
impl fidl::Persistable for MlmeOnSaeHandshakeIndRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeOnScanEndRequest {
pub end: ScanEnd,
}
impl fidl::Persistable for MlmeOnScanEndRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct MlmeOnScanResultRequest {
pub result: ScanResult,
}
impl fidl::Persistable for MlmeOnScanResultRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct MlmeOnWmmStatusRespRequest {
pub status: i32,
pub resp: fidl_fuchsia_wlan_internal::WmmStatusResponse,
}
impl fidl::Persistable for MlmeOnWmmStatusRespRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct MlmeQueryDeviceInfoResponse {
pub info: DeviceInfo,
}
impl fidl::Persistable for MlmeQueryDeviceInfoResponse {}
#[derive(Clone, Debug, PartialEq)]
pub struct MlmeQueryDiscoverySupportResponse {
pub resp: fidl_fuchsia_wlan_common::DiscoverySupport,
}
impl fidl::Persistable for MlmeQueryDiscoverySupportResponse {}
#[derive(Clone, Debug, PartialEq)]
pub struct MlmeQueryMacSublayerSupportResponse {
pub resp: fidl_fuchsia_wlan_common::MacSublayerSupport,
}
impl fidl::Persistable for MlmeQueryMacSublayerSupportResponse {}
#[derive(Clone, Debug, PartialEq)]
pub struct MlmeQuerySecuritySupportResponse {
pub resp: fidl_fuchsia_wlan_common::SecuritySupport,
}
impl fidl::Persistable for MlmeQuerySecuritySupportResponse {}
#[derive(Clone, Debug, PartialEq)]
pub struct MlmeQuerySpectrumManagementSupportResponse {
pub resp: fidl_fuchsia_wlan_common::SpectrumManagementSupport,
}
impl fidl::Persistable for MlmeQuerySpectrumManagementSupportResponse {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct MlmeReconnectReqRequest {
pub req: ReconnectRequest,
}
impl fidl::Persistable for MlmeReconnectReqRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeRelayCapturedFrameRequest {
pub result: CapturedFrameResult,
}
impl fidl::Persistable for MlmeRelayCapturedFrameRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeResetReqRequest {
pub req: ResetRequest,
}
impl fidl::Persistable for MlmeResetReqRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeRoamConfRequest {
pub conf: RoamConfirm,
}
impl fidl::Persistable for MlmeRoamConfRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct MlmeRoamReqRequest {
pub req: RoamRequest,
}
impl fidl::Persistable for MlmeRoamReqRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeRoamResultIndRequest {
pub ind: RoamResultIndication,
}
impl fidl::Persistable for MlmeRoamResultIndRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct MlmeRoamStartIndRequest {
pub ind: RoamStartIndication,
}
impl fidl::Persistable for MlmeRoamStartIndRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeSaeFrameTxRequest {
pub frame: SaeFrame,
}
impl fidl::Persistable for MlmeSaeFrameTxRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeSaeHandshakeRespRequest {
pub resp: SaeHandshakeResponse,
}
impl fidl::Persistable for MlmeSaeHandshakeRespRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeSetControlledPortRequest {
pub req: SetControlledPortRequest,
}
impl fidl::Persistable for MlmeSetControlledPortRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeSetKeysConfRequest {
pub conf: SetKeysConfirm,
}
impl fidl::Persistable for MlmeSetKeysConfRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeSetKeysReqRequest {
pub req: SetKeysRequest,
}
impl fidl::Persistable for MlmeSetKeysReqRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct MlmeSignalReportRequest {
pub ind: fidl_fuchsia_wlan_internal::SignalReportIndication,
}
impl fidl::Persistable for MlmeSignalReportRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeStartCaptureFramesRequest {
pub req: StartCaptureFramesRequest,
}
impl fidl::Persistable for MlmeStartCaptureFramesRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeStartCaptureFramesResponse {
pub resp: StartCaptureFramesResponse,
}
impl fidl::Persistable for MlmeStartCaptureFramesResponse {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeStartConfRequest {
pub resp: StartConfirm,
}
impl fidl::Persistable for MlmeStartConfRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeStartReqRequest {
pub req: StartRequest,
}
impl fidl::Persistable for MlmeStartReqRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeStartScanRequest {
pub req: ScanRequest,
}
impl fidl::Persistable for MlmeStartScanRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeStopConfRequest {
pub resp: StopConfirm,
}
impl fidl::Persistable for MlmeStopConfRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MlmeStopReqRequest {
pub req: StopRequest,
}
impl fidl::Persistable for MlmeStopReqRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct NegotiatedCapabilities {
pub channel: fidl_fuchsia_wlan_common::WlanChannel,
pub capability_info: u16,
pub rates: Vec<u8>,
pub wmm_param: Option<Box<WmmParameter>>,
pub ht_cap: Option<Box<fidl_fuchsia_wlan_ieee80211::HtCapabilities>>,
pub vht_cap: Option<Box<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>>,
}
impl fidl::Persistable for NegotiatedCapabilities {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct PmkInfo {
pub pmk: Vec<u8>,
pub pmkid: Vec<u8>,
}
impl fidl::Persistable for PmkInfo {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct ReconnectRequest {
pub peer_sta_address: [u8; 6],
}
impl fidl::Persistable for ReconnectRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ResetRequest {
pub sta_address: [u8; 6],
pub set_default_mib: bool,
}
impl fidl::Persistable for ResetRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RoamConfirm {
pub selected_bssid: [u8; 6],
pub status_code: fidl_fuchsia_wlan_ieee80211::StatusCode,
pub original_association_maintained: bool,
pub target_bss_authenticated: bool,
pub association_id: u16,
pub association_ies: Vec<u8>,
}
impl fidl::Persistable for RoamConfirm {}
#[derive(Clone, Debug, PartialEq)]
pub struct RoamRequest {
pub selected_bss: fidl_fuchsia_wlan_common::BssDescription,
}
impl fidl::Persistable for RoamRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RoamResultIndication {
pub selected_bssid: [u8; 6],
pub status_code: fidl_fuchsia_wlan_ieee80211::StatusCode,
pub original_association_maintained: bool,
pub target_bss_authenticated: bool,
pub association_id: u16,
pub association_ies: Vec<u8>,
}
impl fidl::Persistable for RoamResultIndication {}
#[derive(Clone, Debug, PartialEq)]
pub struct RoamStartIndication {
pub selected_bssid: [u8; 6],
pub selected_bss: fidl_fuchsia_wlan_common::BssDescription,
pub original_association_maintained: bool,
}
impl fidl::Persistable for RoamStartIndication {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct SaeFrame {
pub peer_sta_address: [u8; 6],
pub status_code: fidl_fuchsia_wlan_ieee80211::StatusCode,
pub seq_num: u16,
pub sae_fields: Vec<u8>,
}
impl fidl::Persistable for SaeFrame {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct SaeHandshakeIndication {
pub peer_sta_address: [u8; 6],
}
impl fidl::Persistable for SaeHandshakeIndication {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct SaeHandshakeResponse {
pub peer_sta_address: [u8; 6],
pub status_code: fidl_fuchsia_wlan_ieee80211::StatusCode,
}
impl fidl::Persistable for SaeHandshakeResponse {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ScanEnd {
pub txn_id: u64,
pub code: ScanResultCode,
}
impl fidl::Persistable for ScanEnd {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ScanRequest {
pub txn_id: u64,
pub scan_type: ScanTypes,
pub channel_list: Vec<u8>,
pub ssid_list: Vec<Vec<u8>>,
pub probe_delay: u32,
pub min_channel_time: u32,
pub max_channel_time: u32,
}
impl fidl::Persistable for ScanRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct ScanResult {
pub txn_id: u64,
pub timestamp_nanos: i64,
pub bss: fidl_fuchsia_wlan_common::BssDescription,
}
impl fidl::Persistable for ScanResult {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct SetControlledPortRequest {
pub peer_sta_address: [u8; 6],
pub state: ControlledPortState,
}
impl fidl::Persistable for SetControlledPortRequest {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct SetKeyDescriptor {
pub key: Vec<u8>,
pub key_id: u16,
pub key_type: KeyType,
pub address: [u8; 6],
pub rsc: u64,
pub cipher_suite_oui: [u8; 3],
pub cipher_suite_type: fidl_fuchsia_wlan_ieee80211::CipherSuiteType,
}
impl fidl::Persistable for SetKeyDescriptor {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct SetKeyResult {
pub key_id: u16,
pub status: i32,
}
impl fidl::Persistable for SetKeyResult {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct SetKeysConfirm {
pub results: Vec<SetKeyResult>,
}
impl fidl::Persistable for SetKeysConfirm {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct SetKeysRequest {
pub keylist: Vec<SetKeyDescriptor>,
}
impl fidl::Persistable for SetKeysRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct StartCaptureFramesRequest {
pub mgmt_frame_flags: MgmtFrameCaptureFlags,
}
impl fidl::Persistable for StartCaptureFramesRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct StartCaptureFramesResponse {
pub status: i32,
pub supported_mgmt_frames: MgmtFrameCaptureFlags,
}
impl fidl::Persistable for StartCaptureFramesResponse {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct StartConfirm {
pub result_code: StartResultCode,
}
impl fidl::Persistable for StartConfirm {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct StartRequest {
pub ssid: Vec<u8>,
pub bss_type: fidl_fuchsia_wlan_common::BssType,
pub beacon_period: u16,
pub dtim_period: u8,
pub channel: u8,
pub capability_info: u16,
pub rates: Vec<u8>,
pub country: Country,
pub mesh_id: Vec<u8>,
pub rsne: Option<Vec<u8>>,
pub phy: fidl_fuchsia_wlan_common::WlanPhyType,
pub channel_bandwidth: fidl_fuchsia_wlan_common::ChannelBandwidth,
}
impl fidl::Persistable for StartRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct StopConfirm {
pub result_code: StopResultCode,
}
impl fidl::Persistable for StopConfirm {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct StopRequest {
pub ssid: Vec<u8>,
}
impl fidl::Persistable for StopRequest {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct WmmParameter {
pub bytes: [u8; 18],
}
impl fidl::Persistable for WmmParameter {}
#[derive(Clone, Debug, PartialEq)]
pub enum GetIfaceCounterStatsResponse {
Stats(fidl_fuchsia_wlan_stats::IfaceCounterStats),
ErrorStatus(i32),
}
impl GetIfaceCounterStatsResponse {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::Stats(_) => 1,
Self::ErrorStatus(_) => 2,
}
}
#[deprecated = "Strict unions should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
impl fidl::Persistable for GetIfaceCounterStatsResponse {}
#[derive(Clone, Debug, PartialEq)]
pub enum GetIfaceHistogramStatsResponse {
Stats(fidl_fuchsia_wlan_stats::IfaceHistogramStats),
ErrorStatus(i32),
}
impl GetIfaceHistogramStatsResponse {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::Stats(_) => 1,
Self::ErrorStatus(_) => 2,
}
}
#[deprecated = "Strict unions should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
impl fidl::Persistable for GetIfaceHistogramStatsResponse {}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct ConnectorMarker;
impl fidl::endpoints::ProtocolMarker for ConnectorMarker {
type Proxy = ConnectorProxy;
type RequestStream = ConnectorRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = ConnectorSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) Connector";
}
pub trait ConnectorProxyInterface: Send + Sync {
fn r#connect(&self, request: fidl::endpoints::ServerEnd<MlmeMarker>)
-> Result<(), fidl::Error>;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct ConnectorSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for ConnectorSynchronousProxy {
type Proxy = ConnectorProxy;
type Protocol = ConnectorMarker;
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 ConnectorSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <ConnectorMarker 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<ConnectorEvent, fidl::Error> {
ConnectorEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#connect(
&self,
mut request: fidl::endpoints::ServerEnd<MlmeMarker>,
) -> Result<(), fidl::Error> {
self.client.send::<ConnectorConnectRequest>(
(request,),
0x42131859717af962,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Clone)]
pub struct ConnectorProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for ConnectorProxy {
type Protocol = ConnectorMarker;
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 ConnectorProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name = <ConnectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> ConnectorEventStream {
ConnectorEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#connect(
&self,
mut request: fidl::endpoints::ServerEnd<MlmeMarker>,
) -> Result<(), fidl::Error> {
ConnectorProxyInterface::r#connect(self, request)
}
}
impl ConnectorProxyInterface for ConnectorProxy {
fn r#connect(
&self,
mut request: fidl::endpoints::ServerEnd<MlmeMarker>,
) -> Result<(), fidl::Error> {
self.client.send::<ConnectorConnectRequest>(
(request,),
0x42131859717af962,
fidl::encoding::DynamicFlags::empty(),
)
}
}
pub struct ConnectorEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for ConnectorEventStream {}
impl futures::stream::FusedStream for ConnectorEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for ConnectorEventStream {
type Item = Result<ConnectorEvent, 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(ConnectorEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum ConnectorEvent {}
impl ConnectorEvent {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<ConnectorEvent, 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: <ConnectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct ConnectorRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for ConnectorRequestStream {}
impl futures::stream::FusedStream for ConnectorRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for ConnectorRequestStream {
type Protocol = ConnectorMarker;
type ControlHandle = ConnectorControlHandle;
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 {
ConnectorControlHandle { 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 ConnectorRequestStream {
type Item = Result<ConnectorRequest, 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 ConnectorRequestStream 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 {
0x42131859717af962 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
ConnectorConnectRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectorConnectRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = ConnectorControlHandle { inner: this.inner.clone() };
Ok(ConnectorRequest::Connect { request: req.request, control_handle })
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name:
<ConnectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum ConnectorRequest {
Connect {
request: fidl::endpoints::ServerEnd<MlmeMarker>,
control_handle: ConnectorControlHandle,
},
}
impl ConnectorRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_connect(
self,
) -> Option<(fidl::endpoints::ServerEnd<MlmeMarker>, ConnectorControlHandle)> {
if let ConnectorRequest::Connect { request, control_handle } = self {
Some((request, control_handle))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
ConnectorRequest::Connect { .. } => "connect",
}
}
}
#[derive(Debug, Clone)]
pub struct ConnectorControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for ConnectorControlHandle {
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 ConnectorControlHandle {}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct MlmeMarker;
impl fidl::endpoints::ProtocolMarker for MlmeMarker {
type Proxy = MlmeProxy;
type RequestStream = MlmeRequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = MlmeSynchronousProxy;
const DEBUG_NAME: &'static str = "(anonymous) Mlme";
}
pub trait MlmeProxyInterface: Send + Sync {
fn r#start_scan(&self, req: &ScanRequest) -> Result<(), fidl::Error>;
fn r#connect_req(&self, req: &ConnectRequest) -> Result<(), fidl::Error>;
fn r#reconnect_req(&self, req: &ReconnectRequest) -> Result<(), fidl::Error>;
fn r#roam_req(&self, req: &RoamRequest) -> Result<(), fidl::Error>;
fn r#authenticate_resp(&self, resp: &AuthenticateResponse) -> Result<(), fidl::Error>;
fn r#deauthenticate_req(&self, req: &DeauthenticateRequest) -> Result<(), fidl::Error>;
fn r#associate_resp(&self, resp: &AssociateResponse) -> Result<(), fidl::Error>;
fn r#disassociate_req(&self, req: &DisassociateRequest) -> Result<(), fidl::Error>;
fn r#reset_req(&self, req: &ResetRequest) -> Result<(), fidl::Error>;
fn r#start_req(&self, req: &StartRequest) -> Result<(), fidl::Error>;
fn r#stop_req(&self, req: &StopRequest) -> Result<(), fidl::Error>;
fn r#set_keys_req(&self, req: &SetKeysRequest) -> Result<(), fidl::Error>;
fn r#delete_keys_req(&self, req: &DeleteKeysRequest) -> Result<(), fidl::Error>;
fn r#eapol_req(&self, req: &EapolRequest) -> Result<(), fidl::Error>;
fn r#set_controlled_port(&self, req: &SetControlledPortRequest) -> Result<(), fidl::Error>;
type QueryDeviceInfoResponseFut: std::future::Future<Output = Result<DeviceInfo, fidl::Error>>
+ Send;
fn r#query_device_info(&self) -> Self::QueryDeviceInfoResponseFut;
type QueryDiscoverySupportResponseFut: std::future::Future<
Output = Result<fidl_fuchsia_wlan_common::DiscoverySupport, fidl::Error>,
> + Send;
fn r#query_discovery_support(&self) -> Self::QueryDiscoverySupportResponseFut;
type QueryMacSublayerSupportResponseFut: std::future::Future<
Output = Result<fidl_fuchsia_wlan_common::MacSublayerSupport, fidl::Error>,
> + Send;
fn r#query_mac_sublayer_support(&self) -> Self::QueryMacSublayerSupportResponseFut;
type QuerySecuritySupportResponseFut: std::future::Future<Output = Result<fidl_fuchsia_wlan_common::SecuritySupport, fidl::Error>>
+ Send;
fn r#query_security_support(&self) -> Self::QuerySecuritySupportResponseFut;
type QuerySpectrumManagementSupportResponseFut: std::future::Future<
Output = Result<fidl_fuchsia_wlan_common::SpectrumManagementSupport, fidl::Error>,
> + Send;
fn r#query_spectrum_management_support(
&self,
) -> Self::QuerySpectrumManagementSupportResponseFut;
type GetIfaceCounterStatsResponseFut: std::future::Future<Output = Result<GetIfaceCounterStatsResponse, fidl::Error>>
+ Send;
fn r#get_iface_counter_stats(&self) -> Self::GetIfaceCounterStatsResponseFut;
type GetIfaceHistogramStatsResponseFut: std::future::Future<Output = Result<GetIfaceHistogramStatsResponse, fidl::Error>>
+ Send;
fn r#get_iface_histogram_stats(&self) -> Self::GetIfaceHistogramStatsResponseFut;
type ListMinstrelPeersResponseFut: std::future::Future<Output = Result<MinstrelListResponse, fidl::Error>>
+ Send;
fn r#list_minstrel_peers(&self) -> Self::ListMinstrelPeersResponseFut;
type GetMinstrelStatsResponseFut: std::future::Future<Output = Result<MinstrelStatsResponse, fidl::Error>>
+ Send;
fn r#get_minstrel_stats(&self, req: &MinstrelStatsRequest)
-> Self::GetMinstrelStatsResponseFut;
type StartCaptureFramesResponseFut: std::future::Future<Output = Result<StartCaptureFramesResponse, fidl::Error>>
+ Send;
fn r#start_capture_frames(
&self,
req: &StartCaptureFramesRequest,
) -> Self::StartCaptureFramesResponseFut;
fn r#stop_capture_frames(&self) -> Result<(), fidl::Error>;
fn r#sae_handshake_resp(&self, resp: &SaeHandshakeResponse) -> Result<(), fidl::Error>;
fn r#sae_frame_tx(&self, frame: &SaeFrame) -> Result<(), fidl::Error>;
fn r#wmm_status_req(&self) -> Result<(), fidl::Error>;
fn r#finalize_association_req(
&self,
negotiated_capabilities: &NegotiatedCapabilities,
) -> Result<(), fidl::Error>;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct MlmeSynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for MlmeSynchronousProxy {
type Proxy = MlmeProxy;
type Protocol = MlmeMarker;
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 MlmeSynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <MlmeMarker 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<MlmeEvent, fidl::Error> {
MlmeEvent::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#start_scan(&self, mut req: &ScanRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeStartScanRequest>(
(req,),
0x342cc5ec6a957479,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#connect_req(&self, mut req: &ConnectRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeConnectReqRequest>(
(req,),
0x31153dc85f8f64c,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#reconnect_req(&self, mut req: &ReconnectRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeReconnectReqRequest>(
(req,),
0x74e0f1bd758b6b78,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#roam_req(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeRoamReqRequest>(
(req,),
0x3ba163eadf7dba45,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#authenticate_resp(&self, mut resp: &AuthenticateResponse) -> Result<(), fidl::Error> {
self.client.send::<MlmeAuthenticateRespRequest>(
(resp,),
0x26108aade2fdd2f4,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#deauthenticate_req(&self, mut req: &DeauthenticateRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeDeauthenticateReqRequest>(
(req,),
0x228983b200de5d12,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#associate_resp(&self, mut resp: &AssociateResponse) -> Result<(), fidl::Error> {
self.client.send::<MlmeAssociateRespRequest>(
(resp,),
0x70244dbd652ed6d9,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#disassociate_req(&self, mut req: &DisassociateRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeDisassociateReqRequest>(
(req,),
0x5765807f1387d764,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#reset_req(&self, mut req: &ResetRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeResetReqRequest>(
(req,),
0x780b98c58a286b9f,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#start_req(&self, mut req: &StartRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeStartReqRequest>(
(req,),
0x5d95885f8053654,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#stop_req(&self, mut req: &StopRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeStopReqRequest>(
(req,),
0x27b9a2ab04a2c79f,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#set_keys_req(&self, mut req: &SetKeysRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeSetKeysReqRequest>(
(req,),
0x6b30a07fd3a11a79,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#delete_keys_req(&self, mut req: &DeleteKeysRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeDeleteKeysReqRequest>(
(req,),
0x1e3524d20d190c8f,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#eapol_req(&self, mut req: &EapolRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeEapolReqRequest>(
(req,),
0xc3c096924704d4,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#set_controlled_port(
&self,
mut req: &SetControlledPortRequest,
) -> Result<(), fidl::Error> {
self.client.send::<MlmeSetControlledPortRequest>(
(req,),
0x4e47065668890c8d,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#query_device_info(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<DeviceInfo, fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, MlmeQueryDeviceInfoResponse>(
(),
0x6ee3e7f63f2b7bc0,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.info)
}
pub fn r#query_discovery_support(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<fidl_fuchsia_wlan_common::DiscoverySupport, fidl::Error> {
let _response = self
.client
.send_query::<fidl::encoding::EmptyPayload, MlmeQueryDiscoverySupportResponse>(
(),
0x4ac57b8eee721a2,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.resp)
}
pub fn r#query_mac_sublayer_support(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<fidl_fuchsia_wlan_common::MacSublayerSupport, fidl::Error> {
let _response = self
.client
.send_query::<fidl::encoding::EmptyPayload, MlmeQueryMacSublayerSupportResponse>(
(),
0x70d23f3b08382854,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.resp)
}
pub fn r#query_security_support(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<fidl_fuchsia_wlan_common::SecuritySupport, fidl::Error> {
let _response = self
.client
.send_query::<fidl::encoding::EmptyPayload, MlmeQuerySecuritySupportResponse>(
(),
0x2512eb3424620151,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.resp)
}
pub fn r#query_spectrum_management_support(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<fidl_fuchsia_wlan_common::SpectrumManagementSupport, fidl::Error> {
let _response = self
.client
.send_query::<fidl::encoding::EmptyPayload, MlmeQuerySpectrumManagementSupportResponse>(
(),
0x28ed024e9d883010,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.resp)
}
pub fn r#get_iface_counter_stats(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<GetIfaceCounterStatsResponse, fidl::Error> {
let _response = self
.client
.send_query::<fidl::encoding::EmptyPayload, MlmeGetIfaceCounterStatsResponse>(
(),
0x4aa57fc1496831a,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.resp)
}
pub fn r#get_iface_histogram_stats(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<GetIfaceHistogramStatsResponse, fidl::Error> {
let _response = self
.client
.send_query::<fidl::encoding::EmptyPayload, MlmeGetIfaceHistogramStatsResponse>(
(),
0x1979c9d3449f8675,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.resp)
}
pub fn r#list_minstrel_peers(
&self,
___deadline: zx::MonotonicInstant,
) -> Result<MinstrelListResponse, fidl::Error> {
let _response =
self.client.send_query::<fidl::encoding::EmptyPayload, MlmeListMinstrelPeersResponse>(
(),
0x4ac5d1e66fe1ffd5,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.resp)
}
pub fn r#get_minstrel_stats(
&self,
mut req: &MinstrelStatsRequest,
___deadline: zx::MonotonicInstant,
) -> Result<MinstrelStatsResponse, fidl::Error> {
let _response =
self.client.send_query::<MlmeGetMinstrelStatsRequest, MlmeGetMinstrelStatsResponse>(
(req,),
0x2f688b1245323f4b,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.resp)
}
pub fn r#start_capture_frames(
&self,
mut req: &StartCaptureFramesRequest,
___deadline: zx::MonotonicInstant,
) -> Result<StartCaptureFramesResponse, fidl::Error> {
let _response = self
.client
.send_query::<MlmeStartCaptureFramesRequest, MlmeStartCaptureFramesResponse>(
(req,),
0x23b369ed5749ee69,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.resp)
}
pub fn r#stop_capture_frames(&self) -> Result<(), fidl::Error> {
self.client.send::<fidl::encoding::EmptyPayload>(
(),
0x2f1aebbc68bf7c54,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#sae_handshake_resp(&self, mut resp: &SaeHandshakeResponse) -> Result<(), fidl::Error> {
self.client.send::<MlmeSaeHandshakeRespRequest>(
(resp,),
0x28477bd2f7a5ab0c,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#sae_frame_tx(&self, mut frame: &SaeFrame) -> Result<(), fidl::Error> {
self.client.send::<MlmeSaeFrameTxRequest>(
(frame,),
0x7700c0d536733d8c,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#wmm_status_req(&self) -> Result<(), fidl::Error> {
self.client.send::<fidl::encoding::EmptyPayload>(
(),
0xef4851f6088fede,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn r#finalize_association_req(
&self,
mut negotiated_capabilities: &NegotiatedCapabilities,
) -> Result<(), fidl::Error> {
self.client.send::<MlmeFinalizeAssociationReqRequest>(
(negotiated_capabilities,),
0x7aea59787cfd385a,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Clone)]
pub struct MlmeProxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for MlmeProxy {
type Protocol = MlmeMarker;
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 MlmeProxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name = <MlmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> MlmeEventStream {
MlmeEventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#start_scan(&self, mut req: &ScanRequest) -> Result<(), fidl::Error> {
MlmeProxyInterface::r#start_scan(self, req)
}
pub fn r#connect_req(&self, mut req: &ConnectRequest) -> Result<(), fidl::Error> {
MlmeProxyInterface::r#connect_req(self, req)
}
pub fn r#reconnect_req(&self, mut req: &ReconnectRequest) -> Result<(), fidl::Error> {
MlmeProxyInterface::r#reconnect_req(self, req)
}
pub fn r#roam_req(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
MlmeProxyInterface::r#roam_req(self, req)
}
pub fn r#authenticate_resp(&self, mut resp: &AuthenticateResponse) -> Result<(), fidl::Error> {
MlmeProxyInterface::r#authenticate_resp(self, resp)
}
pub fn r#deauthenticate_req(&self, mut req: &DeauthenticateRequest) -> Result<(), fidl::Error> {
MlmeProxyInterface::r#deauthenticate_req(self, req)
}
pub fn r#associate_resp(&self, mut resp: &AssociateResponse) -> Result<(), fidl::Error> {
MlmeProxyInterface::r#associate_resp(self, resp)
}
pub fn r#disassociate_req(&self, mut req: &DisassociateRequest) -> Result<(), fidl::Error> {
MlmeProxyInterface::r#disassociate_req(self, req)
}
pub fn r#reset_req(&self, mut req: &ResetRequest) -> Result<(), fidl::Error> {
MlmeProxyInterface::r#reset_req(self, req)
}
pub fn r#start_req(&self, mut req: &StartRequest) -> Result<(), fidl::Error> {
MlmeProxyInterface::r#start_req(self, req)
}
pub fn r#stop_req(&self, mut req: &StopRequest) -> Result<(), fidl::Error> {
MlmeProxyInterface::r#stop_req(self, req)
}
pub fn r#set_keys_req(&self, mut req: &SetKeysRequest) -> Result<(), fidl::Error> {
MlmeProxyInterface::r#set_keys_req(self, req)
}
pub fn r#delete_keys_req(&self, mut req: &DeleteKeysRequest) -> Result<(), fidl::Error> {
MlmeProxyInterface::r#delete_keys_req(self, req)
}
pub fn r#eapol_req(&self, mut req: &EapolRequest) -> Result<(), fidl::Error> {
MlmeProxyInterface::r#eapol_req(self, req)
}
pub fn r#set_controlled_port(
&self,
mut req: &SetControlledPortRequest,
) -> Result<(), fidl::Error> {
MlmeProxyInterface::r#set_controlled_port(self, req)
}
pub fn r#query_device_info(
&self,
) -> fidl::client::QueryResponseFut<DeviceInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
{
MlmeProxyInterface::r#query_device_info(self)
}
pub fn r#query_discovery_support(
&self,
) -> fidl::client::QueryResponseFut<
fidl_fuchsia_wlan_common::DiscoverySupport,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
MlmeProxyInterface::r#query_discovery_support(self)
}
pub fn r#query_mac_sublayer_support(
&self,
) -> fidl::client::QueryResponseFut<
fidl_fuchsia_wlan_common::MacSublayerSupport,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
MlmeProxyInterface::r#query_mac_sublayer_support(self)
}
pub fn r#query_security_support(
&self,
) -> fidl::client::QueryResponseFut<
fidl_fuchsia_wlan_common::SecuritySupport,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
MlmeProxyInterface::r#query_security_support(self)
}
pub fn r#query_spectrum_management_support(
&self,
) -> fidl::client::QueryResponseFut<
fidl_fuchsia_wlan_common::SpectrumManagementSupport,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
MlmeProxyInterface::r#query_spectrum_management_support(self)
}
pub fn r#get_iface_counter_stats(
&self,
) -> fidl::client::QueryResponseFut<
GetIfaceCounterStatsResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
MlmeProxyInterface::r#get_iface_counter_stats(self)
}
pub fn r#get_iface_histogram_stats(
&self,
) -> fidl::client::QueryResponseFut<
GetIfaceHistogramStatsResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
MlmeProxyInterface::r#get_iface_histogram_stats(self)
}
pub fn r#list_minstrel_peers(
&self,
) -> fidl::client::QueryResponseFut<
MinstrelListResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
MlmeProxyInterface::r#list_minstrel_peers(self)
}
pub fn r#get_minstrel_stats(
&self,
mut req: &MinstrelStatsRequest,
) -> fidl::client::QueryResponseFut<
MinstrelStatsResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
MlmeProxyInterface::r#get_minstrel_stats(self, req)
}
pub fn r#start_capture_frames(
&self,
mut req: &StartCaptureFramesRequest,
) -> fidl::client::QueryResponseFut<
StartCaptureFramesResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
> {
MlmeProxyInterface::r#start_capture_frames(self, req)
}
pub fn r#stop_capture_frames(&self) -> Result<(), fidl::Error> {
MlmeProxyInterface::r#stop_capture_frames(self)
}
pub fn r#sae_handshake_resp(&self, mut resp: &SaeHandshakeResponse) -> Result<(), fidl::Error> {
MlmeProxyInterface::r#sae_handshake_resp(self, resp)
}
pub fn r#sae_frame_tx(&self, mut frame: &SaeFrame) -> Result<(), fidl::Error> {
MlmeProxyInterface::r#sae_frame_tx(self, frame)
}
pub fn r#wmm_status_req(&self) -> Result<(), fidl::Error> {
MlmeProxyInterface::r#wmm_status_req(self)
}
pub fn r#finalize_association_req(
&self,
mut negotiated_capabilities: &NegotiatedCapabilities,
) -> Result<(), fidl::Error> {
MlmeProxyInterface::r#finalize_association_req(self, negotiated_capabilities)
}
}
impl MlmeProxyInterface for MlmeProxy {
fn r#start_scan(&self, mut req: &ScanRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeStartScanRequest>(
(req,),
0x342cc5ec6a957479,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#connect_req(&self, mut req: &ConnectRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeConnectReqRequest>(
(req,),
0x31153dc85f8f64c,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#reconnect_req(&self, mut req: &ReconnectRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeReconnectReqRequest>(
(req,),
0x74e0f1bd758b6b78,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#roam_req(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeRoamReqRequest>(
(req,),
0x3ba163eadf7dba45,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#authenticate_resp(&self, mut resp: &AuthenticateResponse) -> Result<(), fidl::Error> {
self.client.send::<MlmeAuthenticateRespRequest>(
(resp,),
0x26108aade2fdd2f4,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#deauthenticate_req(&self, mut req: &DeauthenticateRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeDeauthenticateReqRequest>(
(req,),
0x228983b200de5d12,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#associate_resp(&self, mut resp: &AssociateResponse) -> Result<(), fidl::Error> {
self.client.send::<MlmeAssociateRespRequest>(
(resp,),
0x70244dbd652ed6d9,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#disassociate_req(&self, mut req: &DisassociateRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeDisassociateReqRequest>(
(req,),
0x5765807f1387d764,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#reset_req(&self, mut req: &ResetRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeResetReqRequest>(
(req,),
0x780b98c58a286b9f,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#start_req(&self, mut req: &StartRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeStartReqRequest>(
(req,),
0x5d95885f8053654,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#stop_req(&self, mut req: &StopRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeStopReqRequest>(
(req,),
0x27b9a2ab04a2c79f,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#set_keys_req(&self, mut req: &SetKeysRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeSetKeysReqRequest>(
(req,),
0x6b30a07fd3a11a79,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#delete_keys_req(&self, mut req: &DeleteKeysRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeDeleteKeysReqRequest>(
(req,),
0x1e3524d20d190c8f,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#eapol_req(&self, mut req: &EapolRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeEapolReqRequest>(
(req,),
0xc3c096924704d4,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#set_controlled_port(&self, mut req: &SetControlledPortRequest) -> Result<(), fidl::Error> {
self.client.send::<MlmeSetControlledPortRequest>(
(req,),
0x4e47065668890c8d,
fidl::encoding::DynamicFlags::empty(),
)
}
type QueryDeviceInfoResponseFut =
fidl::client::QueryResponseFut<DeviceInfo, fidl::encoding::DefaultFuchsiaResourceDialect>;
fn r#query_device_info(&self) -> Self::QueryDeviceInfoResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<DeviceInfo, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
MlmeQueryDeviceInfoResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x6ee3e7f63f2b7bc0,
>(_buf?)?;
Ok(_response.info)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, DeviceInfo>(
(),
0x6ee3e7f63f2b7bc0,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type QueryDiscoverySupportResponseFut = fidl::client::QueryResponseFut<
fidl_fuchsia_wlan_common::DiscoverySupport,
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<fidl_fuchsia_wlan_common::DiscoverySupport, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
MlmeQueryDiscoverySupportResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x4ac57b8eee721a2,
>(_buf?)?;
Ok(_response.resp)
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
fidl_fuchsia_wlan_common::DiscoverySupport,
>(
(),
0x4ac57b8eee721a2,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type QueryMacSublayerSupportResponseFut = fidl::client::QueryResponseFut<
fidl_fuchsia_wlan_common::MacSublayerSupport,
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<fidl_fuchsia_wlan_common::MacSublayerSupport, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
MlmeQueryMacSublayerSupportResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x70d23f3b08382854,
>(_buf?)?;
Ok(_response.resp)
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
fidl_fuchsia_wlan_common::MacSublayerSupport,
>(
(),
0x70d23f3b08382854,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type QuerySecuritySupportResponseFut = fidl::client::QueryResponseFut<
fidl_fuchsia_wlan_common::SecuritySupport,
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<fidl_fuchsia_wlan_common::SecuritySupport, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
MlmeQuerySecuritySupportResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x2512eb3424620151,
>(_buf?)?;
Ok(_response.resp)
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
fidl_fuchsia_wlan_common::SecuritySupport,
>(
(),
0x2512eb3424620151,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type QuerySpectrumManagementSupportResponseFut = fidl::client::QueryResponseFut<
fidl_fuchsia_wlan_common::SpectrumManagementSupport,
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<fidl_fuchsia_wlan_common::SpectrumManagementSupport, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
MlmeQuerySpectrumManagementSupportResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x28ed024e9d883010,
>(_buf?)?;
Ok(_response.resp)
}
self.client.send_query_and_decode::<
fidl::encoding::EmptyPayload,
fidl_fuchsia_wlan_common::SpectrumManagementSupport,
>(
(),
0x28ed024e9d883010,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type GetIfaceCounterStatsResponseFut = fidl::client::QueryResponseFut<
GetIfaceCounterStatsResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#get_iface_counter_stats(&self) -> Self::GetIfaceCounterStatsResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<GetIfaceCounterStatsResponse, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
MlmeGetIfaceCounterStatsResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x4aa57fc1496831a,
>(_buf?)?;
Ok(_response.resp)
}
self.client
.send_query_and_decode::<fidl::encoding::EmptyPayload, GetIfaceCounterStatsResponse>(
(),
0x4aa57fc1496831a,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type GetIfaceHistogramStatsResponseFut = fidl::client::QueryResponseFut<
GetIfaceHistogramStatsResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#get_iface_histogram_stats(&self) -> Self::GetIfaceHistogramStatsResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<GetIfaceHistogramStatsResponse, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
MlmeGetIfaceHistogramStatsResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x1979c9d3449f8675,
>(_buf?)?;
Ok(_response.resp)
}
self.client
.send_query_and_decode::<fidl::encoding::EmptyPayload, GetIfaceHistogramStatsResponse>(
(),
0x1979c9d3449f8675,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type ListMinstrelPeersResponseFut = fidl::client::QueryResponseFut<
MinstrelListResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#list_minstrel_peers(&self) -> Self::ListMinstrelPeersResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<MinstrelListResponse, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
MlmeListMinstrelPeersResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x4ac5d1e66fe1ffd5,
>(_buf?)?;
Ok(_response.resp)
}
self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, MinstrelListResponse>(
(),
0x4ac5d1e66fe1ffd5,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type GetMinstrelStatsResponseFut = fidl::client::QueryResponseFut<
MinstrelStatsResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#get_minstrel_stats(
&self,
mut req: &MinstrelStatsRequest,
) -> Self::GetMinstrelStatsResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<MinstrelStatsResponse, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
MlmeGetMinstrelStatsResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x2f688b1245323f4b,
>(_buf?)?;
Ok(_response.resp)
}
self.client.send_query_and_decode::<MlmeGetMinstrelStatsRequest, MinstrelStatsResponse>(
(req,),
0x2f688b1245323f4b,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
type StartCaptureFramesResponseFut = fidl::client::QueryResponseFut<
StartCaptureFramesResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#start_capture_frames(
&self,
mut req: &StartCaptureFramesRequest,
) -> Self::StartCaptureFramesResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<StartCaptureFramesResponse, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
MlmeStartCaptureFramesResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x23b369ed5749ee69,
>(_buf?)?;
Ok(_response.resp)
}
self.client
.send_query_and_decode::<MlmeStartCaptureFramesRequest, StartCaptureFramesResponse>(
(req,),
0x23b369ed5749ee69,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
fn r#stop_capture_frames(&self) -> Result<(), fidl::Error> {
self.client.send::<fidl::encoding::EmptyPayload>(
(),
0x2f1aebbc68bf7c54,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#sae_handshake_resp(&self, mut resp: &SaeHandshakeResponse) -> Result<(), fidl::Error> {
self.client.send::<MlmeSaeHandshakeRespRequest>(
(resp,),
0x28477bd2f7a5ab0c,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#sae_frame_tx(&self, mut frame: &SaeFrame) -> Result<(), fidl::Error> {
self.client.send::<MlmeSaeFrameTxRequest>(
(frame,),
0x7700c0d536733d8c,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#wmm_status_req(&self) -> Result<(), fidl::Error> {
self.client.send::<fidl::encoding::EmptyPayload>(
(),
0xef4851f6088fede,
fidl::encoding::DynamicFlags::empty(),
)
}
fn r#finalize_association_req(
&self,
mut negotiated_capabilities: &NegotiatedCapabilities,
) -> Result<(), fidl::Error> {
self.client.send::<MlmeFinalizeAssociationReqRequest>(
(negotiated_capabilities,),
0x7aea59787cfd385a,
fidl::encoding::DynamicFlags::empty(),
)
}
}
pub struct MlmeEventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for MlmeEventStream {}
impl futures::stream::FusedStream for MlmeEventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for MlmeEventStream {
type Item = Result<MlmeEvent, 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(MlmeEvent::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum MlmeEvent {
OnScanResult { result: ScanResult },
OnScanEnd { end: ScanEnd },
ConnectConf { resp: ConnectConfirm },
RoamConf { conf: RoamConfirm },
RoamStartInd { ind: RoamStartIndication },
RoamResultInd { ind: RoamResultIndication },
AuthenticateInd { ind: AuthenticateIndication },
DeauthenticateConf { resp: DeauthenticateConfirm },
DeauthenticateInd { ind: DeauthenticateIndication },
AssociateInd { ind: AssociateIndication },
DisassociateConf { resp: DisassociateConfirm },
DisassociateInd { ind: DisassociateIndication },
StartConf { resp: StartConfirm },
StopConf { resp: StopConfirm },
SetKeysConf { conf: SetKeysConfirm },
EapolConf { resp: EapolConfirm },
SignalReport { ind: fidl_fuchsia_wlan_internal::SignalReportIndication },
EapolInd { ind: EapolIndication },
RelayCapturedFrame { result: CapturedFrameResult },
OnChannelSwitched { info: fidl_fuchsia_wlan_internal::ChannelSwitchInfo },
OnPmkAvailable { info: PmkInfo },
OnSaeHandshakeInd { ind: SaeHandshakeIndication },
OnSaeFrameRx { frame: SaeFrame },
OnWmmStatusResp { status: i32, resp: fidl_fuchsia_wlan_internal::WmmStatusResponse },
}
impl MlmeEvent {
#[allow(irrefutable_let_patterns)]
pub fn into_on_scan_result(self) -> Option<ScanResult> {
if let MlmeEvent::OnScanResult { result } = self {
Some((result))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_on_scan_end(self) -> Option<ScanEnd> {
if let MlmeEvent::OnScanEnd { end } = self {
Some((end))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_connect_conf(self) -> Option<ConnectConfirm> {
if let MlmeEvent::ConnectConf { resp } = self {
Some((resp))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_roam_conf(self) -> Option<RoamConfirm> {
if let MlmeEvent::RoamConf { conf } = self {
Some((conf))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_roam_start_ind(self) -> Option<RoamStartIndication> {
if let MlmeEvent::RoamStartInd { ind } = self {
Some((ind))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_roam_result_ind(self) -> Option<RoamResultIndication> {
if let MlmeEvent::RoamResultInd { ind } = self {
Some((ind))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_authenticate_ind(self) -> Option<AuthenticateIndication> {
if let MlmeEvent::AuthenticateInd { ind } = self {
Some((ind))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_deauthenticate_conf(self) -> Option<DeauthenticateConfirm> {
if let MlmeEvent::DeauthenticateConf { resp } = self {
Some((resp))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_deauthenticate_ind(self) -> Option<DeauthenticateIndication> {
if let MlmeEvent::DeauthenticateInd { ind } = self {
Some((ind))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_associate_ind(self) -> Option<AssociateIndication> {
if let MlmeEvent::AssociateInd { ind } = self {
Some((ind))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_disassociate_conf(self) -> Option<DisassociateConfirm> {
if let MlmeEvent::DisassociateConf { resp } = self {
Some((resp))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_disassociate_ind(self) -> Option<DisassociateIndication> {
if let MlmeEvent::DisassociateInd { ind } = self {
Some((ind))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_start_conf(self) -> Option<StartConfirm> {
if let MlmeEvent::StartConf { resp } = self {
Some((resp))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_stop_conf(self) -> Option<StopConfirm> {
if let MlmeEvent::StopConf { resp } = self {
Some((resp))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_set_keys_conf(self) -> Option<SetKeysConfirm> {
if let MlmeEvent::SetKeysConf { conf } = self {
Some((conf))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_eapol_conf(self) -> Option<EapolConfirm> {
if let MlmeEvent::EapolConf { resp } = self {
Some((resp))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_signal_report(self) -> Option<fidl_fuchsia_wlan_internal::SignalReportIndication> {
if let MlmeEvent::SignalReport { ind } = self {
Some((ind))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_eapol_ind(self) -> Option<EapolIndication> {
if let MlmeEvent::EapolInd { ind } = self {
Some((ind))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_relay_captured_frame(self) -> Option<CapturedFrameResult> {
if let MlmeEvent::RelayCapturedFrame { result } = self {
Some((result))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_on_channel_switched(self) -> Option<fidl_fuchsia_wlan_internal::ChannelSwitchInfo> {
if let MlmeEvent::OnChannelSwitched { info } = self {
Some((info))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_on_pmk_available(self) -> Option<PmkInfo> {
if let MlmeEvent::OnPmkAvailable { info } = self {
Some((info))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_on_sae_handshake_ind(self) -> Option<SaeHandshakeIndication> {
if let MlmeEvent::OnSaeHandshakeInd { ind } = self {
Some((ind))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_on_sae_frame_rx(self) -> Option<SaeFrame> {
if let MlmeEvent::OnSaeFrameRx { frame } = self {
Some((frame))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_on_wmm_status_resp(
self,
) -> Option<(i32, fidl_fuchsia_wlan_internal::WmmStatusResponse)> {
if let MlmeEvent::OnWmmStatusResp { status, resp } = self {
Some((status, resp))
} else {
None
}
}
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<MlmeEvent, 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 {
0x681af7466a75074d => {
let mut out = fidl::new_empty!(
MlmeOnScanResultRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnScanResultRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::OnScanResult { result: out.result }))
}
0x7f2702d253e7ca59 => {
let mut out = fidl::new_empty!(
MlmeOnScanEndRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnScanEndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::OnScanEnd { end: out.end }))
}
0x77b27623279b981e => {
let mut out = fidl::new_empty!(
MlmeConnectConfRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeConnectConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::ConnectConf { resp: out.resp }))
}
0x3f608034faa054bc => {
let mut out = fidl::new_empty!(
MlmeRoamConfRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeRoamConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::RoamConf { conf: out.conf }))
}
0x270a1ec78672d094 => {
let mut out = fidl::new_empty!(
MlmeRoamStartIndRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeRoamStartIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::RoamStartInd { ind: out.ind }))
}
0x26d074364fc84865 => {
let mut out = fidl::new_empty!(
MlmeRoamResultIndRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeRoamResultIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::RoamResultInd { ind: out.ind }))
}
0x460f49ae891adbe9 => {
let mut out = fidl::new_empty!(
MlmeAuthenticateIndRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeAuthenticateIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::AuthenticateInd { ind: out.ind }))
}
0x3b44debc21b88c8c => {
let mut out = fidl::new_empty!(
MlmeDeauthenticateConfRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDeauthenticateConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::DeauthenticateConf { resp: out.resp }))
}
0x7ee0889b326da1d7 => {
let mut out = fidl::new_empty!(
MlmeDeauthenticateIndRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDeauthenticateIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::DeauthenticateInd { ind: out.ind }))
}
0x6a86f20e3063dd63 => {
let mut out = fidl::new_empty!(
MlmeAssociateIndRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeAssociateIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::AssociateInd { ind: out.ind }))
}
0x61345fbce732a28d => {
let mut out = fidl::new_empty!(
MlmeDisassociateConfRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDisassociateConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::DisassociateConf { resp: out.resp }))
}
0x77ac0ebf387c1f35 => {
let mut out = fidl::new_empty!(
MlmeDisassociateIndRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDisassociateIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::DisassociateInd { ind: out.ind }))
}
0x15ea6cdf3b8382b3 => {
let mut out = fidl::new_empty!(
MlmeStartConfRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStartConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::StartConf { resp: out.resp }))
}
0x50b426ef4a84a2df => {
let mut out = fidl::new_empty!(
MlmeStopConfRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStopConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::StopConf { resp: out.resp }))
}
0x5bafb3a8d4039380 => {
let mut out = fidl::new_empty!(
MlmeSetKeysConfRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSetKeysConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::SetKeysConf { conf: out.conf }))
}
0x6ffa21f4ee73ce64 => {
let mut out = fidl::new_empty!(
MlmeEapolConfRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeEapolConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::EapolConf { resp: out.resp }))
}
0x48f32a876aa53d8f => {
let mut out = fidl::new_empty!(
MlmeSignalReportRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSignalReportRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::SignalReport { ind: out.ind }))
}
0x7038dca46a3142fc => {
let mut out = fidl::new_empty!(
MlmeEapolIndRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeEapolIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::EapolInd { ind: out.ind }))
}
0x6f00a6f3cff9b1f5 => {
let mut out = fidl::new_empty!(
MlmeRelayCapturedFrameRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeRelayCapturedFrameRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::RelayCapturedFrame { result: out.result }))
}
0x581750594e4c0c1 => {
let mut out = fidl::new_empty!(
MlmeOnChannelSwitchedRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnChannelSwitchedRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::OnChannelSwitched { info: out.info }))
}
0x1314fc2c79643f90 => {
let mut out = fidl::new_empty!(
MlmeOnPmkAvailableRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnPmkAvailableRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::OnPmkAvailable { info: out.info }))
}
0x6308b10e18986d7e => {
let mut out = fidl::new_empty!(
MlmeOnSaeHandshakeIndRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnSaeHandshakeIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::OnSaeHandshakeInd { ind: out.ind }))
}
0x4ebf51c86ef5f3cd => {
let mut out = fidl::new_empty!(
MlmeOnSaeFrameRxRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnSaeFrameRxRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::OnSaeFrameRx { frame: out.frame }))
}
0x53f056b432e7b5cb => {
let mut out = fidl::new_empty!(
MlmeOnWmmStatusRespRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnWmmStatusRespRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
Ok((MlmeEvent::OnWmmStatusResp { status: out.status, resp: out.resp }))
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: tx_header.ordinal,
protocol_name: <MlmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct MlmeRequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for MlmeRequestStream {}
impl futures::stream::FusedStream for MlmeRequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for MlmeRequestStream {
type Protocol = MlmeMarker;
type ControlHandle = MlmeControlHandle;
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 {
MlmeControlHandle { 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 MlmeRequestStream {
type Item = Result<MlmeRequest, 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 MlmeRequestStream 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 {
0x342cc5ec6a957479 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
MlmeStartScanRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStartScanRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::StartScan { req: req.req, control_handle })
}
0x31153dc85f8f64c => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
MlmeConnectReqRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeConnectReqRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::ConnectReq { req: req.req, control_handle })
}
0x74e0f1bd758b6b78 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
MlmeReconnectReqRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeReconnectReqRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::ReconnectReq { req: req.req, control_handle })
}
0x3ba163eadf7dba45 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
MlmeRoamReqRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeRoamReqRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::RoamReq { req: req.req, control_handle })
}
0x26108aade2fdd2f4 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
MlmeAuthenticateRespRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeAuthenticateRespRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::AuthenticateResp { resp: req.resp, control_handle })
}
0x228983b200de5d12 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
MlmeDeauthenticateReqRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDeauthenticateReqRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::DeauthenticateReq { req: req.req, control_handle })
}
0x70244dbd652ed6d9 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
MlmeAssociateRespRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeAssociateRespRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::AssociateResp { resp: req.resp, control_handle })
}
0x5765807f1387d764 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
MlmeDisassociateReqRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDisassociateReqRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::DisassociateReq { req: req.req, control_handle })
}
0x780b98c58a286b9f => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
MlmeResetReqRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeResetReqRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::ResetReq { req: req.req, control_handle })
}
0x5d95885f8053654 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
MlmeStartReqRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStartReqRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::StartReq { req: req.req, control_handle })
}
0x27b9a2ab04a2c79f => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
MlmeStopReqRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStopReqRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::StopReq { req: req.req, control_handle })
}
0x6b30a07fd3a11a79 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
MlmeSetKeysReqRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSetKeysReqRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::SetKeysReq { req: req.req, control_handle })
}
0x1e3524d20d190c8f => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
MlmeDeleteKeysReqRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDeleteKeysReqRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::DeleteKeysReq { req: req.req, control_handle })
}
0xc3c096924704d4 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
MlmeEapolReqRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeEapolReqRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::EapolReq { req: req.req, control_handle })
}
0x4e47065668890c8d => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
MlmeSetControlledPortRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSetControlledPortRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::SetControlledPort { req: req.req, control_handle })
}
0x6ee3e7f63f2b7bc0 => {
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 = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::QueryDeviceInfo {
responder: MlmeQueryDeviceInfoResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x4ac57b8eee721a2 => {
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 = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::QueryDiscoverySupport {
responder: MlmeQueryDiscoverySupportResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x70d23f3b08382854 => {
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 = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::QueryMacSublayerSupport {
responder: MlmeQueryMacSublayerSupportResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x2512eb3424620151 => {
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 = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::QuerySecuritySupport {
responder: MlmeQuerySecuritySupportResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x28ed024e9d883010 => {
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 = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::QuerySpectrumManagementSupport {
responder: MlmeQuerySpectrumManagementSupportResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x4aa57fc1496831a => {
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 = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::GetIfaceCounterStats {
responder: MlmeGetIfaceCounterStatsResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x1979c9d3449f8675 => {
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 = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::GetIfaceHistogramStats {
responder: MlmeGetIfaceHistogramStatsResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x4ac5d1e66fe1ffd5 => {
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 = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::ListMinstrelPeers {
responder: MlmeListMinstrelPeersResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x2f688b1245323f4b => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
MlmeGetMinstrelStatsRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeGetMinstrelStatsRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::GetMinstrelStats {
req: req.req,
responder: MlmeGetMinstrelStatsResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x23b369ed5749ee69 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
MlmeStartCaptureFramesRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStartCaptureFramesRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::StartCaptureFrames {
req: req.req,
responder: MlmeStartCaptureFramesResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
0x2f1aebbc68bf7c54 => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
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 = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::StopCaptureFrames { control_handle })
}
0x28477bd2f7a5ab0c => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
MlmeSaeHandshakeRespRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSaeHandshakeRespRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::SaeHandshakeResp { resp: req.resp, control_handle })
}
0x7700c0d536733d8c => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
MlmeSaeFrameTxRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSaeFrameTxRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::SaeFrameTx { frame: req.frame, control_handle })
}
0xef4851f6088fede => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
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 = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::WmmStatusReq { control_handle })
}
0x7aea59787cfd385a => {
header.validate_request_tx_id(fidl::MethodType::OneWay)?;
let mut req = fidl::new_empty!(
MlmeFinalizeAssociationReqRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeFinalizeAssociationReqRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = MlmeControlHandle { inner: this.inner.clone() };
Ok(MlmeRequest::FinalizeAssociationReq {
negotiated_capabilities: req.negotiated_capabilities,
control_handle,
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name: <MlmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum MlmeRequest {
StartScan {
req: ScanRequest,
control_handle: MlmeControlHandle,
},
ConnectReq {
req: ConnectRequest,
control_handle: MlmeControlHandle,
},
ReconnectReq {
req: ReconnectRequest,
control_handle: MlmeControlHandle,
},
RoamReq {
req: RoamRequest,
control_handle: MlmeControlHandle,
},
AuthenticateResp {
resp: AuthenticateResponse,
control_handle: MlmeControlHandle,
},
DeauthenticateReq {
req: DeauthenticateRequest,
control_handle: MlmeControlHandle,
},
AssociateResp {
resp: AssociateResponse,
control_handle: MlmeControlHandle,
},
DisassociateReq {
req: DisassociateRequest,
control_handle: MlmeControlHandle,
},
ResetReq {
req: ResetRequest,
control_handle: MlmeControlHandle,
},
StartReq {
req: StartRequest,
control_handle: MlmeControlHandle,
},
StopReq {
req: StopRequest,
control_handle: MlmeControlHandle,
},
SetKeysReq {
req: SetKeysRequest,
control_handle: MlmeControlHandle,
},
DeleteKeysReq {
req: DeleteKeysRequest,
control_handle: MlmeControlHandle,
},
EapolReq {
req: EapolRequest,
control_handle: MlmeControlHandle,
},
SetControlledPort {
req: SetControlledPortRequest,
control_handle: MlmeControlHandle,
},
QueryDeviceInfo {
responder: MlmeQueryDeviceInfoResponder,
},
QueryDiscoverySupport {
responder: MlmeQueryDiscoverySupportResponder,
},
QueryMacSublayerSupport {
responder: MlmeQueryMacSublayerSupportResponder,
},
QuerySecuritySupport {
responder: MlmeQuerySecuritySupportResponder,
},
QuerySpectrumManagementSupport {
responder: MlmeQuerySpectrumManagementSupportResponder,
},
GetIfaceCounterStats {
responder: MlmeGetIfaceCounterStatsResponder,
},
GetIfaceHistogramStats {
responder: MlmeGetIfaceHistogramStatsResponder,
},
ListMinstrelPeers {
responder: MlmeListMinstrelPeersResponder,
},
GetMinstrelStats {
req: MinstrelStatsRequest,
responder: MlmeGetMinstrelStatsResponder,
},
StartCaptureFrames {
req: StartCaptureFramesRequest,
responder: MlmeStartCaptureFramesResponder,
},
StopCaptureFrames {
control_handle: MlmeControlHandle,
},
SaeHandshakeResp {
resp: SaeHandshakeResponse,
control_handle: MlmeControlHandle,
},
SaeFrameTx {
frame: SaeFrame,
control_handle: MlmeControlHandle,
},
WmmStatusReq {
control_handle: MlmeControlHandle,
},
FinalizeAssociationReq {
negotiated_capabilities: NegotiatedCapabilities,
control_handle: MlmeControlHandle,
},
}
impl MlmeRequest {
#[allow(irrefutable_let_patterns)]
pub fn into_start_scan(self) -> Option<(ScanRequest, MlmeControlHandle)> {
if let MlmeRequest::StartScan { req, control_handle } = self {
Some((req, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_connect_req(self) -> Option<(ConnectRequest, MlmeControlHandle)> {
if let MlmeRequest::ConnectReq { req, control_handle } = self {
Some((req, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_reconnect_req(self) -> Option<(ReconnectRequest, MlmeControlHandle)> {
if let MlmeRequest::ReconnectReq { req, control_handle } = self {
Some((req, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_roam_req(self) -> Option<(RoamRequest, MlmeControlHandle)> {
if let MlmeRequest::RoamReq { req, control_handle } = self {
Some((req, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_authenticate_resp(self) -> Option<(AuthenticateResponse, MlmeControlHandle)> {
if let MlmeRequest::AuthenticateResp { resp, control_handle } = self {
Some((resp, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_deauthenticate_req(self) -> Option<(DeauthenticateRequest, MlmeControlHandle)> {
if let MlmeRequest::DeauthenticateReq { req, control_handle } = self {
Some((req, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_associate_resp(self) -> Option<(AssociateResponse, MlmeControlHandle)> {
if let MlmeRequest::AssociateResp { resp, control_handle } = self {
Some((resp, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_disassociate_req(self) -> Option<(DisassociateRequest, MlmeControlHandle)> {
if let MlmeRequest::DisassociateReq { req, control_handle } = self {
Some((req, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_reset_req(self) -> Option<(ResetRequest, MlmeControlHandle)> {
if let MlmeRequest::ResetReq { req, control_handle } = self {
Some((req, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_start_req(self) -> Option<(StartRequest, MlmeControlHandle)> {
if let MlmeRequest::StartReq { req, control_handle } = self {
Some((req, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_stop_req(self) -> Option<(StopRequest, MlmeControlHandle)> {
if let MlmeRequest::StopReq { req, control_handle } = self {
Some((req, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_set_keys_req(self) -> Option<(SetKeysRequest, MlmeControlHandle)> {
if let MlmeRequest::SetKeysReq { req, control_handle } = self {
Some((req, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_delete_keys_req(self) -> Option<(DeleteKeysRequest, MlmeControlHandle)> {
if let MlmeRequest::DeleteKeysReq { req, control_handle } = self {
Some((req, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_eapol_req(self) -> Option<(EapolRequest, MlmeControlHandle)> {
if let MlmeRequest::EapolReq { req, control_handle } = self {
Some((req, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_set_controlled_port(self) -> Option<(SetControlledPortRequest, MlmeControlHandle)> {
if let MlmeRequest::SetControlledPort { req, control_handle } = self {
Some((req, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_query_device_info(self) -> Option<(MlmeQueryDeviceInfoResponder)> {
if let MlmeRequest::QueryDeviceInfo { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_query_discovery_support(self) -> Option<(MlmeQueryDiscoverySupportResponder)> {
if let MlmeRequest::QueryDiscoverySupport { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_query_mac_sublayer_support(self) -> Option<(MlmeQueryMacSublayerSupportResponder)> {
if let MlmeRequest::QueryMacSublayerSupport { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_query_security_support(self) -> Option<(MlmeQuerySecuritySupportResponder)> {
if let MlmeRequest::QuerySecuritySupport { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_query_spectrum_management_support(
self,
) -> Option<(MlmeQuerySpectrumManagementSupportResponder)> {
if let MlmeRequest::QuerySpectrumManagementSupport { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_get_iface_counter_stats(self) -> Option<(MlmeGetIfaceCounterStatsResponder)> {
if let MlmeRequest::GetIfaceCounterStats { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_get_iface_histogram_stats(self) -> Option<(MlmeGetIfaceHistogramStatsResponder)> {
if let MlmeRequest::GetIfaceHistogramStats { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_list_minstrel_peers(self) -> Option<(MlmeListMinstrelPeersResponder)> {
if let MlmeRequest::ListMinstrelPeers { responder } = self {
Some((responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_get_minstrel_stats(
self,
) -> Option<(MinstrelStatsRequest, MlmeGetMinstrelStatsResponder)> {
if let MlmeRequest::GetMinstrelStats { req, responder } = self {
Some((req, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_start_capture_frames(
self,
) -> Option<(StartCaptureFramesRequest, MlmeStartCaptureFramesResponder)> {
if let MlmeRequest::StartCaptureFrames { req, responder } = self {
Some((req, responder))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_stop_capture_frames(self) -> Option<(MlmeControlHandle)> {
if let MlmeRequest::StopCaptureFrames { control_handle } = self {
Some((control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_sae_handshake_resp(self) -> Option<(SaeHandshakeResponse, MlmeControlHandle)> {
if let MlmeRequest::SaeHandshakeResp { resp, control_handle } = self {
Some((resp, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_sae_frame_tx(self) -> Option<(SaeFrame, MlmeControlHandle)> {
if let MlmeRequest::SaeFrameTx { frame, control_handle } = self {
Some((frame, control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_wmm_status_req(self) -> Option<(MlmeControlHandle)> {
if let MlmeRequest::WmmStatusReq { control_handle } = self {
Some((control_handle))
} else {
None
}
}
#[allow(irrefutable_let_patterns)]
pub fn into_finalize_association_req(
self,
) -> Option<(NegotiatedCapabilities, MlmeControlHandle)> {
if let MlmeRequest::FinalizeAssociationReq { negotiated_capabilities, control_handle } =
self
{
Some((negotiated_capabilities, control_handle))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
MlmeRequest::StartScan { .. } => "start_scan",
MlmeRequest::ConnectReq { .. } => "connect_req",
MlmeRequest::ReconnectReq { .. } => "reconnect_req",
MlmeRequest::RoamReq { .. } => "roam_req",
MlmeRequest::AuthenticateResp { .. } => "authenticate_resp",
MlmeRequest::DeauthenticateReq { .. } => "deauthenticate_req",
MlmeRequest::AssociateResp { .. } => "associate_resp",
MlmeRequest::DisassociateReq { .. } => "disassociate_req",
MlmeRequest::ResetReq { .. } => "reset_req",
MlmeRequest::StartReq { .. } => "start_req",
MlmeRequest::StopReq { .. } => "stop_req",
MlmeRequest::SetKeysReq { .. } => "set_keys_req",
MlmeRequest::DeleteKeysReq { .. } => "delete_keys_req",
MlmeRequest::EapolReq { .. } => "eapol_req",
MlmeRequest::SetControlledPort { .. } => "set_controlled_port",
MlmeRequest::QueryDeviceInfo { .. } => "query_device_info",
MlmeRequest::QueryDiscoverySupport { .. } => "query_discovery_support",
MlmeRequest::QueryMacSublayerSupport { .. } => "query_mac_sublayer_support",
MlmeRequest::QuerySecuritySupport { .. } => "query_security_support",
MlmeRequest::QuerySpectrumManagementSupport { .. } => {
"query_spectrum_management_support"
}
MlmeRequest::GetIfaceCounterStats { .. } => "get_iface_counter_stats",
MlmeRequest::GetIfaceHistogramStats { .. } => "get_iface_histogram_stats",
MlmeRequest::ListMinstrelPeers { .. } => "list_minstrel_peers",
MlmeRequest::GetMinstrelStats { .. } => "get_minstrel_stats",
MlmeRequest::StartCaptureFrames { .. } => "start_capture_frames",
MlmeRequest::StopCaptureFrames { .. } => "stop_capture_frames",
MlmeRequest::SaeHandshakeResp { .. } => "sae_handshake_resp",
MlmeRequest::SaeFrameTx { .. } => "sae_frame_tx",
MlmeRequest::WmmStatusReq { .. } => "wmm_status_req",
MlmeRequest::FinalizeAssociationReq { .. } => "finalize_association_req",
}
}
}
#[derive(Debug, Clone)]
pub struct MlmeControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for MlmeControlHandle {
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 MlmeControlHandle {
pub fn send_on_scan_result(&self, mut result: &ScanResult) -> Result<(), fidl::Error> {
self.inner.send::<MlmeOnScanResultRequest>(
(result,),
0,
0x681af7466a75074d,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_on_scan_end(&self, mut end: &ScanEnd) -> Result<(), fidl::Error> {
self.inner.send::<MlmeOnScanEndRequest>(
(end,),
0,
0x7f2702d253e7ca59,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_connect_conf(&self, mut resp: &ConnectConfirm) -> Result<(), fidl::Error> {
self.inner.send::<MlmeConnectConfRequest>(
(resp,),
0,
0x77b27623279b981e,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_roam_conf(&self, mut conf: &RoamConfirm) -> Result<(), fidl::Error> {
self.inner.send::<MlmeRoamConfRequest>(
(conf,),
0,
0x3f608034faa054bc,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_roam_start_ind(&self, mut ind: &RoamStartIndication) -> Result<(), fidl::Error> {
self.inner.send::<MlmeRoamStartIndRequest>(
(ind,),
0,
0x270a1ec78672d094,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_roam_result_ind(&self, mut ind: &RoamResultIndication) -> Result<(), fidl::Error> {
self.inner.send::<MlmeRoamResultIndRequest>(
(ind,),
0,
0x26d074364fc84865,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_authenticate_ind(
&self,
mut ind: &AuthenticateIndication,
) -> Result<(), fidl::Error> {
self.inner.send::<MlmeAuthenticateIndRequest>(
(ind,),
0,
0x460f49ae891adbe9,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_deauthenticate_conf(
&self,
mut resp: &DeauthenticateConfirm,
) -> Result<(), fidl::Error> {
self.inner.send::<MlmeDeauthenticateConfRequest>(
(resp,),
0,
0x3b44debc21b88c8c,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_deauthenticate_ind(
&self,
mut ind: &DeauthenticateIndication,
) -> Result<(), fidl::Error> {
self.inner.send::<MlmeDeauthenticateIndRequest>(
(ind,),
0,
0x7ee0889b326da1d7,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_associate_ind(&self, mut ind: &AssociateIndication) -> Result<(), fidl::Error> {
self.inner.send::<MlmeAssociateIndRequest>(
(ind,),
0,
0x6a86f20e3063dd63,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_disassociate_conf(
&self,
mut resp: &DisassociateConfirm,
) -> Result<(), fidl::Error> {
self.inner.send::<MlmeDisassociateConfRequest>(
(resp,),
0,
0x61345fbce732a28d,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_disassociate_ind(
&self,
mut ind: &DisassociateIndication,
) -> Result<(), fidl::Error> {
self.inner.send::<MlmeDisassociateIndRequest>(
(ind,),
0,
0x77ac0ebf387c1f35,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_start_conf(&self, mut resp: &StartConfirm) -> Result<(), fidl::Error> {
self.inner.send::<MlmeStartConfRequest>(
(resp,),
0,
0x15ea6cdf3b8382b3,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_stop_conf(&self, mut resp: &StopConfirm) -> Result<(), fidl::Error> {
self.inner.send::<MlmeStopConfRequest>(
(resp,),
0,
0x50b426ef4a84a2df,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_set_keys_conf(&self, mut conf: &SetKeysConfirm) -> Result<(), fidl::Error> {
self.inner.send::<MlmeSetKeysConfRequest>(
(conf,),
0,
0x5bafb3a8d4039380,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_eapol_conf(&self, mut resp: &EapolConfirm) -> Result<(), fidl::Error> {
self.inner.send::<MlmeEapolConfRequest>(
(resp,),
0,
0x6ffa21f4ee73ce64,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_signal_report(
&self,
mut ind: &fidl_fuchsia_wlan_internal::SignalReportIndication,
) -> Result<(), fidl::Error> {
self.inner.send::<MlmeSignalReportRequest>(
(ind,),
0,
0x48f32a876aa53d8f,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_eapol_ind(&self, mut ind: &EapolIndication) -> Result<(), fidl::Error> {
self.inner.send::<MlmeEapolIndRequest>(
(ind,),
0,
0x7038dca46a3142fc,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_relay_captured_frame(
&self,
mut result: &CapturedFrameResult,
) -> Result<(), fidl::Error> {
self.inner.send::<MlmeRelayCapturedFrameRequest>(
(result,),
0,
0x6f00a6f3cff9b1f5,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_on_channel_switched(
&self,
mut info: &fidl_fuchsia_wlan_internal::ChannelSwitchInfo,
) -> Result<(), fidl::Error> {
self.inner.send::<MlmeOnChannelSwitchedRequest>(
(info,),
0,
0x581750594e4c0c1,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_on_pmk_available(&self, mut info: &PmkInfo) -> Result<(), fidl::Error> {
self.inner.send::<MlmeOnPmkAvailableRequest>(
(info,),
0,
0x1314fc2c79643f90,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_on_sae_handshake_ind(
&self,
mut ind: &SaeHandshakeIndication,
) -> Result<(), fidl::Error> {
self.inner.send::<MlmeOnSaeHandshakeIndRequest>(
(ind,),
0,
0x6308b10e18986d7e,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_on_sae_frame_rx(&self, mut frame: &SaeFrame) -> Result<(), fidl::Error> {
self.inner.send::<MlmeOnSaeFrameRxRequest>(
(frame,),
0,
0x4ebf51c86ef5f3cd,
fidl::encoding::DynamicFlags::empty(),
)
}
pub fn send_on_wmm_status_resp(
&self,
mut status: i32,
mut resp: &fidl_fuchsia_wlan_internal::WmmStatusResponse,
) -> Result<(), fidl::Error> {
self.inner.send::<MlmeOnWmmStatusRespRequest>(
(status, resp),
0,
0x53f056b432e7b5cb,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct MlmeQueryDeviceInfoResponder {
control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for MlmeQueryDeviceInfoResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for MlmeQueryDeviceInfoResponder {
type ControlHandle = MlmeControlHandle;
fn control_handle(&self) -> &MlmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl MlmeQueryDeviceInfoResponder {
pub fn send(self, mut info: &DeviceInfo) -> Result<(), fidl::Error> {
let _result = self.send_raw(info);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut info: &DeviceInfo) -> Result<(), fidl::Error> {
let _result = self.send_raw(info);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut info: &DeviceInfo) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<MlmeQueryDeviceInfoResponse>(
(info,),
self.tx_id,
0x6ee3e7f63f2b7bc0,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct MlmeQueryDiscoverySupportResponder {
control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for MlmeQueryDiscoverySupportResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for MlmeQueryDiscoverySupportResponder {
type ControlHandle = MlmeControlHandle;
fn control_handle(&self) -> &MlmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl MlmeQueryDiscoverySupportResponder {
pub fn send(
self,
mut resp: &fidl_fuchsia_wlan_common::DiscoverySupport,
) -> 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: &fidl_fuchsia_wlan_common::DiscoverySupport,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(resp);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut resp: &fidl_fuchsia_wlan_common::DiscoverySupport,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<MlmeQueryDiscoverySupportResponse>(
(resp,),
self.tx_id,
0x4ac57b8eee721a2,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct MlmeQueryMacSublayerSupportResponder {
control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for MlmeQueryMacSublayerSupportResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for MlmeQueryMacSublayerSupportResponder {
type ControlHandle = MlmeControlHandle;
fn control_handle(&self) -> &MlmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl MlmeQueryMacSublayerSupportResponder {
pub fn send(
self,
mut resp: &fidl_fuchsia_wlan_common::MacSublayerSupport,
) -> 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: &fidl_fuchsia_wlan_common::MacSublayerSupport,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(resp);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut resp: &fidl_fuchsia_wlan_common::MacSublayerSupport,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<MlmeQueryMacSublayerSupportResponse>(
(resp,),
self.tx_id,
0x70d23f3b08382854,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct MlmeQuerySecuritySupportResponder {
control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for MlmeQuerySecuritySupportResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for MlmeQuerySecuritySupportResponder {
type ControlHandle = MlmeControlHandle;
fn control_handle(&self) -> &MlmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl MlmeQuerySecuritySupportResponder {
pub fn send(
self,
mut resp: &fidl_fuchsia_wlan_common::SecuritySupport,
) -> 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: &fidl_fuchsia_wlan_common::SecuritySupport,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(resp);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut resp: &fidl_fuchsia_wlan_common::SecuritySupport,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<MlmeQuerySecuritySupportResponse>(
(resp,),
self.tx_id,
0x2512eb3424620151,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct MlmeQuerySpectrumManagementSupportResponder {
control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for MlmeQuerySpectrumManagementSupportResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for MlmeQuerySpectrumManagementSupportResponder {
type ControlHandle = MlmeControlHandle;
fn control_handle(&self) -> &MlmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl MlmeQuerySpectrumManagementSupportResponder {
pub fn send(
self,
mut resp: &fidl_fuchsia_wlan_common::SpectrumManagementSupport,
) -> 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: &fidl_fuchsia_wlan_common::SpectrumManagementSupport,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(resp);
self.drop_without_shutdown();
_result
}
fn send_raw(
&self,
mut resp: &fidl_fuchsia_wlan_common::SpectrumManagementSupport,
) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<MlmeQuerySpectrumManagementSupportResponse>(
(resp,),
self.tx_id,
0x28ed024e9d883010,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct MlmeGetIfaceCounterStatsResponder {
control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for MlmeGetIfaceCounterStatsResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for MlmeGetIfaceCounterStatsResponder {
type ControlHandle = MlmeControlHandle;
fn control_handle(&self) -> &MlmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl MlmeGetIfaceCounterStatsResponder {
pub fn send(self, mut resp: &GetIfaceCounterStatsResponse) -> 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: &GetIfaceCounterStatsResponse,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(resp);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut resp: &GetIfaceCounterStatsResponse) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<MlmeGetIfaceCounterStatsResponse>(
(resp,),
self.tx_id,
0x4aa57fc1496831a,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct MlmeGetIfaceHistogramStatsResponder {
control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for MlmeGetIfaceHistogramStatsResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for MlmeGetIfaceHistogramStatsResponder {
type ControlHandle = MlmeControlHandle;
fn control_handle(&self) -> &MlmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl MlmeGetIfaceHistogramStatsResponder {
pub fn send(self, mut resp: &GetIfaceHistogramStatsResponse) -> 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: &GetIfaceHistogramStatsResponse,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(resp);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut resp: &GetIfaceHistogramStatsResponse) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<MlmeGetIfaceHistogramStatsResponse>(
(resp,),
self.tx_id,
0x1979c9d3449f8675,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct MlmeListMinstrelPeersResponder {
control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for MlmeListMinstrelPeersResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for MlmeListMinstrelPeersResponder {
type ControlHandle = MlmeControlHandle;
fn control_handle(&self) -> &MlmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl MlmeListMinstrelPeersResponder {
pub fn send(self, mut resp: &MinstrelListResponse) -> 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: &MinstrelListResponse,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(resp);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut resp: &MinstrelListResponse) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<MlmeListMinstrelPeersResponse>(
(resp,),
self.tx_id,
0x4ac5d1e66fe1ffd5,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct MlmeGetMinstrelStatsResponder {
control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for MlmeGetMinstrelStatsResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for MlmeGetMinstrelStatsResponder {
type ControlHandle = MlmeControlHandle;
fn control_handle(&self) -> &MlmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl MlmeGetMinstrelStatsResponder {
pub fn send(self, mut resp: &MinstrelStatsResponse) -> 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: &MinstrelStatsResponse,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(resp);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut resp: &MinstrelStatsResponse) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<MlmeGetMinstrelStatsResponse>(
(resp,),
self.tx_id,
0x2f688b1245323f4b,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct MlmeStartCaptureFramesResponder {
control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for MlmeStartCaptureFramesResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for MlmeStartCaptureFramesResponder {
type ControlHandle = MlmeControlHandle;
fn control_handle(&self) -> &MlmeControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl MlmeStartCaptureFramesResponder {
pub fn send(self, mut resp: &StartCaptureFramesResponse) -> 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: &StartCaptureFramesResponse,
) -> Result<(), fidl::Error> {
let _result = self.send_raw(resp);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut resp: &StartCaptureFramesResponse) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<MlmeStartCaptureFramesResponse>(
(resp,),
self.tx_id,
0x23b369ed5749ee69,
fidl::encoding::DynamicFlags::empty(),
)
}
}
mod internal {
use super::*;
unsafe impl fidl::encoding::TypeMarker for MgmtFrameCaptureFlags {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
4
}
}
impl fidl::encoding::ValueTypeMarker for MgmtFrameCaptureFlags {
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 MgmtFrameCaptureFlags
{
#[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);
if self.bits() & Self::all().bits() != self.bits() {
return Err(fidl::Error::InvalidBitsValue);
}
encoder.write_num(self.bits(), offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MgmtFrameCaptureFlags {
#[inline(always)]
fn new_empty() -> Self {
Self::empty()
}
#[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_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for AssociateResultCode {
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 AssociateResultCode {
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 AssociateResultCode
{
#[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 AssociateResultCode {
#[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 AuthenticateResultCode {
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 AuthenticateResultCode {
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 AuthenticateResultCode
{
#[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 AuthenticateResultCode
{
#[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 AuthenticationTypes {
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 AuthenticationTypes {
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 AuthenticationTypes
{
#[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 AuthenticationTypes {
#[inline(always)]
fn new_empty() -> Self {
Self::OpenSystem
}
#[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 ControlledPortState {
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 ControlledPortState {
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 ControlledPortState
{
#[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 ControlledPortState {
#[inline(always)]
fn new_empty() -> Self {
Self::Closed
}
#[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 EapolResultCode {
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 EapolResultCode {
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 EapolResultCode
{
#[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 EapolResultCode {
#[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 KeyType {
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 KeyType {
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 KeyType {
#[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 KeyType {
#[inline(always)]
fn new_empty() -> Self {
Self::Group
}
#[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 ScanResultCode {
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 ScanResultCode {
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 ScanResultCode {
#[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 ScanResultCode {
#[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 ScanTypes {
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 ScanTypes {
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 ScanTypes {
#[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 ScanTypes {
#[inline(always)]
fn new_empty() -> Self {
Self::Active
}
#[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 StartResultCode {
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 StartResultCode {
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 StartResultCode
{
#[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 StartResultCode {
#[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 StopResultCode {
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 StopResultCode {
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 StopResultCode {
#[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 StopResultCode {
#[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(())
}
}
impl fidl::encoding::ValueTypeMarker for AssociateIndication {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for AssociateIndication {
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<AssociateIndication, D>
for &AssociateIndication
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<AssociateIndication>(offset);
fidl::encoding::Encode::<AssociateIndication, D>::encode(
(
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
<u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.capability_info),
<u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.listen_interval),
<fidl::encoding::Optional<fidl::encoding::Vector<u8, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssid),
<fidl::encoding::Vector<u8, 14> as fidl::encoding::ValueTypeMarker>::borrow(&self.rates),
<fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>> as fidl::encoding::ValueTypeMarker>::borrow(&self.rsne),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
T1: fidl::encoding::Encode<u16, D>,
T2: fidl::encoding::Encode<u16, D>,
T3: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u8, 32>>, D>,
T4: fidl::encoding::Encode<fidl::encoding::Vector<u8, 14>, D>,
T5: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>>, D>,
> fidl::encoding::Encode<AssociateIndication, 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::<AssociateIndication>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
(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 + 32, depth)?;
self.5.encode(encoder, offset + 48, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AssociateIndication {
#[inline(always)]
fn new_empty() -> Self {
Self {
peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
capability_info: fidl::new_empty!(u16, D),
listen_interval: fidl::new_empty!(u16, D),
ssid: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::Vector<u8, 32>>, D),
rates: fidl::new_empty!(fidl::encoding::Vector<u8, 14>, D),
rsne: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>>,
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 = 0xffffffffffff0000u64;
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::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
fidl::decode!(u16, D, &mut self.capability_info, decoder, offset + 6, _depth)?;
fidl::decode!(u16, D, &mut self.listen_interval, decoder, offset + 8, _depth)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u8, 32>>,
D,
&mut self.ssid,
decoder,
offset + 16,
_depth
)?;
fidl::decode!(fidl::encoding::Vector<u8, 14>, D, &mut self.rates, decoder, offset + 32, _depth)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>>,
D,
&mut self.rsne,
decoder,
offset + 48,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for AssociateResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for AssociateResponse {
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<AssociateResponse, D>
for &AssociateResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<AssociateResponse>(offset);
fidl::encoding::Encode::<AssociateResponse, D>::encode(
(
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(
&self.peer_sta_address,
),
<AssociateResultCode as fidl::encoding::ValueTypeMarker>::borrow(
&self.result_code,
),
<u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.association_id),
<u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.capability_info),
<fidl::encoding::Vector<u8, 14> as fidl::encoding::ValueTypeMarker>::borrow(
&self.rates,
),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
T1: fidl::encoding::Encode<AssociateResultCode, D>,
T2: fidl::encoding::Encode<u16, D>,
T3: fidl::encoding::Encode<u16, D>,
T4: fidl::encoding::Encode<fidl::encoding::Vector<u8, 14>, D>,
> fidl::encoding::Encode<AssociateResponse, 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::<AssociateResponse>(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)?;
self.2.encode(encoder, offset + 12, depth)?;
self.3.encode(encoder, offset + 14, depth)?;
self.4.encode(encoder, offset + 16, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AssociateResponse {
#[inline(always)]
fn new_empty() -> Self {
Self {
peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
result_code: fidl::new_empty!(AssociateResultCode, D),
association_id: fidl::new_empty!(u16, D),
capability_info: fidl::new_empty!(u16, D),
rates: fidl::new_empty!(fidl::encoding::Vector<u8, 14>, 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,
});
}
fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
fidl::decode!(
AssociateResultCode,
D,
&mut self.result_code,
decoder,
offset + 8,
_depth
)?;
fidl::decode!(u16, D, &mut self.association_id, decoder, offset + 12, _depth)?;
fidl::decode!(u16, D, &mut self.capability_info, decoder, offset + 14, _depth)?;
fidl::decode!(fidl::encoding::Vector<u8, 14>, D, &mut self.rates, decoder, offset + 16, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for AuthenticateIndication {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for AuthenticateIndication {
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<AuthenticateIndication, D> for &AuthenticateIndication
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<AuthenticateIndication>(offset);
fidl::encoding::Encode::<AuthenticateIndication, D>::encode(
(
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(
&self.peer_sta_address,
),
<AuthenticationTypes as fidl::encoding::ValueTypeMarker>::borrow(
&self.auth_type,
),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
T1: fidl::encoding::Encode<AuthenticationTypes, D>,
> fidl::encoding::Encode<AuthenticateIndication, 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::<AuthenticateIndication>(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 + 8, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for AuthenticateIndication
{
#[inline(always)]
fn new_empty() -> Self {
Self {
peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
auth_type: fidl::new_empty!(AuthenticationTypes, 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!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
fidl::decode!(
AuthenticationTypes,
D,
&mut self.auth_type,
decoder,
offset + 8,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for AuthenticateResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for AuthenticateResponse {
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<AuthenticateResponse, D>
for &AuthenticateResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<AuthenticateResponse>(offset);
fidl::encoding::Encode::<AuthenticateResponse, D>::encode(
(
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(
&self.peer_sta_address,
),
<AuthenticateResultCode as fidl::encoding::ValueTypeMarker>::borrow(
&self.result_code,
),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
T1: fidl::encoding::Encode<AuthenticateResultCode, D>,
> fidl::encoding::Encode<AuthenticateResponse, 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::<AuthenticateResponse>(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 + 8, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AuthenticateResponse {
#[inline(always)]
fn new_empty() -> Self {
Self {
peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
result_code: fidl::new_empty!(AuthenticateResultCode, 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!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
fidl::decode!(
AuthenticateResultCode,
D,
&mut self.result_code,
decoder,
offset + 8,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for BandCapability {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for BandCapability {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
56
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BandCapability, D>
for &BandCapability
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<BandCapability>(offset);
fidl::encoding::Encode::<BandCapability, D>::encode(
(
<fidl_fuchsia_wlan_ieee80211::WlanBand as fidl::encoding::ValueTypeMarker>::borrow(&self.band),
<fidl::encoding::Vector<u8, 12> as fidl::encoding::ValueTypeMarker>::borrow(&self.basic_rates),
<fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities> as fidl::encoding::ValueTypeMarker>::borrow(&self.ht_cap),
<fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities> as fidl::encoding::ValueTypeMarker>::borrow(&self.vht_cap),
<fidl::encoding::Vector<u8, 256> as fidl::encoding::ValueTypeMarker>::borrow(&self.operating_channels),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::WlanBand, D>,
T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 12>, D>,
T2: fidl::encoding::Encode<
fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities>,
D,
>,
T3: fidl::encoding::Encode<
fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>,
D,
>,
T4: fidl::encoding::Encode<fidl::encoding::Vector<u8, 256>, D>,
> fidl::encoding::Encode<BandCapability, 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::<BandCapability>(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)?;
self.2.encode(encoder, offset + 24, depth)?;
self.3.encode(encoder, offset + 32, depth)?;
self.4.encode(encoder, offset + 40, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BandCapability {
#[inline(always)]
fn new_empty() -> Self {
Self {
band: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::WlanBand, D),
basic_rates: fidl::new_empty!(fidl::encoding::Vector<u8, 12>, D),
ht_cap: fidl::new_empty!(
fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities>,
D
),
vht_cap: fidl::new_empty!(
fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>,
D
),
operating_channels: fidl::new_empty!(fidl::encoding::Vector<u8, 256>, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
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!(
fidl_fuchsia_wlan_ieee80211::WlanBand,
D,
&mut self.band,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(fidl::encoding::Vector<u8, 12>, D, &mut self.basic_rates, decoder, offset + 8, _depth)?;
fidl::decode!(
fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities>,
D,
&mut self.ht_cap,
decoder,
offset + 24,
_depth
)?;
fidl::decode!(
fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>,
D,
&mut self.vht_cap,
decoder,
offset + 32,
_depth
)?;
fidl::decode!(fidl::encoding::Vector<u8, 256>, D, &mut self.operating_channels, decoder, offset + 40, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for CapturedFrameResult {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for CapturedFrameResult {
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<CapturedFrameResult, D>
for &CapturedFrameResult
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<CapturedFrameResult>(offset);
fidl::encoding::Encode::<CapturedFrameResult, D>::encode(
(<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
&self.frame,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
> fidl::encoding::Encode<CapturedFrameResult, 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::<CapturedFrameResult>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CapturedFrameResult {
#[inline(always)]
fn new_empty() -> Self {
Self { frame: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedVector<u8>,
D,
&mut self.frame,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ConnectConfirm {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ConnectConfirm {
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<ConnectConfirm, D>
for &ConnectConfirm
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ConnectConfirm>(offset);
fidl::encoding::Encode::<ConnectConfirm, D>::encode(
(
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
<fidl_fuchsia_wlan_ieee80211::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.result_code),
<u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.association_id),
<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.association_ies),
),
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<u16, D>,
T3: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
> fidl::encoding::Encode<ConnectConfirm, D> for (T0, T1, T2, T3)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ConnectConfirm>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
(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)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ConnectConfirm {
#[inline(always)]
fn new_empty() -> Self {
Self {
peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
result_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::StatusCode, D),
association_id: fidl::new_empty!(u16, D),
association_ies: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffffffff0000u64;
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::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl_fuchsia_wlan_ieee80211::StatusCode,
D,
&mut self.result_code,
decoder,
offset + 6,
_depth
)?;
fidl::decode!(u16, D, &mut self.association_id, decoder, offset + 8, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedVector<u8>,
D,
&mut self.association_ies,
decoder,
offset + 16,
_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 {
96
}
}
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_fuchsia_wlan_common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.selected_bss),
<u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.connect_failure_timeout),
<AuthenticationTypes as fidl::encoding::ValueTypeMarker>::borrow(&self.auth_type),
<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.sae_password),
<fidl::encoding::Boxed<SetKeyDescriptor> as fidl::encoding::ValueTypeMarker>::borrow(&self.wep_key),
<fidl::encoding::Vector<u8, 257> as fidl::encoding::ValueTypeMarker>::borrow(&self.security_ie),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::BssDescription, D>,
T1: fidl::encoding::Encode<u32, D>,
T2: fidl::encoding::Encode<AuthenticationTypes, D>,
T3: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
T4: fidl::encoding::Encode<fidl::encoding::Boxed<SetKeyDescriptor>, D>,
T5: fidl::encoding::Encode<fidl::encoding::Vector<u8, 257>, D>,
> fidl::encoding::Encode<ConnectRequest, 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::<ConnectRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 48, depth)?;
self.2.encode(encoder, offset + 52, depth)?;
self.3.encode(encoder, offset + 56, depth)?;
self.4.encode(encoder, offset + 72, depth)?;
self.5.encode(encoder, offset + 80, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ConnectRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
selected_bss: fidl::new_empty!(fidl_fuchsia_wlan_common::BssDescription, D),
connect_failure_timeout: fidl::new_empty!(u32, D),
auth_type: fidl::new_empty!(AuthenticationTypes, D),
sae_password: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
wep_key: fidl::new_empty!(fidl::encoding::Boxed<SetKeyDescriptor>, D),
security_ie: fidl::new_empty!(fidl::encoding::Vector<u8, 257>, 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.selected_bss,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(u32, D, &mut self.connect_failure_timeout, decoder, offset + 48, _depth)?;
fidl::decode!(
AuthenticationTypes,
D,
&mut self.auth_type,
decoder,
offset + 52,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<u8>,
D,
&mut self.sae_password,
decoder,
offset + 56,
_depth
)?;
fidl::decode!(
fidl::encoding::Boxed<SetKeyDescriptor>,
D,
&mut self.wep_key,
decoder,
offset + 72,
_depth
)?;
fidl::decode!(fidl::encoding::Vector<u8, 257>, D, &mut self.security_ie, decoder, offset + 80, _depth)?;
Ok(())
}
}
impl fidl::encoding::ResourceTypeMarker for ConnectorConnectRequest {
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 ConnectorConnectRequest {
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<
ConnectorConnectRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
> for &mut ConnectorConnectRequest
{
#[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::<ConnectorConnectRequest>(offset);
fidl::encoding::Encode::<ConnectorConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
(
<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<MlmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.request),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<
fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<MlmeMarker>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
>
fidl::encoding::Encode<
ConnectorConnectRequest,
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::<ConnectorConnectRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
for ConnectorConnectRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
request: fidl::new_empty!(
fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<MlmeMarker>>,
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<MlmeMarker>>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.request,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for Country {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for Country {
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
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Country, D> for &Country {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Country>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut Country).write_unaligned((self as *const Country).read());
}
Ok(())
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 2>, D>,
T1: fidl::encoding::Encode<u8, D>,
> fidl::encoding::Encode<Country, 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::<Country>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 2, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Country {
#[inline(always)]
fn new_empty() -> Self {
Self {
alpha2: fidl::new_empty!(fidl::encoding::Array<u8, 2>, D),
suffix: fidl::new_empty!(u8, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 3);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DeauthenticateConfirm {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DeauthenticateConfirm {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
6
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DeauthenticateConfirm, D>
for &DeauthenticateConfirm
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeauthenticateConfirm>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut DeauthenticateConfirm)
.write_unaligned((self as *const DeauthenticateConfirm).read());
}
Ok(())
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
> fidl::encoding::Encode<DeauthenticateConfirm, 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::<DeauthenticateConfirm>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeauthenticateConfirm {
#[inline(always)]
fn new_empty() -> Self {
Self { peer_sta_address: 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 buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DeauthenticateIndication {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DeauthenticateIndication {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
2
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
10
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<DeauthenticateIndication, D> for &DeauthenticateIndication
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeauthenticateIndication>(offset);
fidl::encoding::Encode::<DeauthenticateIndication, D>::encode(
(
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
<fidl_fuchsia_wlan_ieee80211::ReasonCode as fidl::encoding::ValueTypeMarker>::borrow(&self.reason_code),
<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.locally_initiated),
),
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::ReasonCode, D>,
T2: fidl::encoding::Encode<bool, D>,
> fidl::encoding::Encode<DeauthenticateIndication, 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::<DeauthenticateIndication>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
(ptr as *mut u16).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 6, depth)?;
self.2.encode(encoder, offset + 8, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for DeauthenticateIndication
{
#[inline(always)]
fn new_empty() -> Self {
Self {
peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
reason_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::ReasonCode, D),
locally_initiated: 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 u16).read_unaligned() };
let mask = 0xff00u16;
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::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl_fuchsia_wlan_ieee80211::ReasonCode,
D,
&mut self.reason_code,
decoder,
offset + 6,
_depth
)?;
fidl::decode!(bool, D, &mut self.locally_initiated, decoder, offset + 8, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DeauthenticateRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DeauthenticateRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
2
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
8
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DeauthenticateRequest, D>
for &DeauthenticateRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeauthenticateRequest>(offset);
fidl::encoding::Encode::<DeauthenticateRequest, D>::encode(
(
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
<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<fidl::encoding::Array<u8, 6>, D>,
T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::ReasonCode, D>,
> fidl::encoding::Encode<DeauthenticateRequest, 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::<DeauthenticateRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 6, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeauthenticateRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, 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);
fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl_fuchsia_wlan_ieee80211::ReasonCode,
D,
&mut self.reason_code,
decoder,
offset + 6,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DeleteKeyDescriptor {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DeleteKeyDescriptor {
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<DeleteKeyDescriptor, D>
for &DeleteKeyDescriptor
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeleteKeyDescriptor>(offset);
fidl::encoding::Encode::<DeleteKeyDescriptor, D>::encode(
(
<u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.key_id),
<KeyType as fidl::encoding::ValueTypeMarker>::borrow(&self.key_type),
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(
&self.address,
),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<u16, D>,
T1: fidl::encoding::Encode<KeyType, D>,
T2: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
> fidl::encoding::Encode<DeleteKeyDescriptor, 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::<DeleteKeyDescriptor>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
(ptr as *mut u32).write_unaligned(0);
}
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(12);
(ptr as *mut u32).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
self.2.encode(encoder, offset + 8, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeleteKeyDescriptor {
#[inline(always)]
fn new_empty() -> Self {
Self {
key_id: fidl::new_empty!(u16, D),
key_type: fidl::new_empty!(KeyType, D),
address: 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(0) };
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 + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(12) };
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 + 12 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(u16, D, &mut self.key_id, decoder, offset + 0, _depth)?;
fidl::decode!(KeyType, D, &mut self.key_type, decoder, offset + 4, _depth)?;
fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.address, decoder, offset + 8, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DeleteKeysRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DeleteKeysRequest {
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<DeleteKeysRequest, D>
for &DeleteKeysRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeleteKeysRequest>(offset);
fidl::encoding::Encode::<DeleteKeysRequest, D>::encode(
(
<fidl::encoding::UnboundedVector<DeleteKeyDescriptor> as fidl::encoding::ValueTypeMarker>::borrow(&self.keylist),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<DeleteKeyDescriptor>, D>,
> fidl::encoding::Encode<DeleteKeysRequest, 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::<DeleteKeysRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeleteKeysRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
keylist: fidl::new_empty!(fidl::encoding::UnboundedVector<DeleteKeyDescriptor>, 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<DeleteKeyDescriptor>,
D,
&mut self.keylist,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DeviceInfo {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DeviceInfo {
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<DeviceInfo, D>
for &DeviceInfo
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DeviceInfo>(offset);
fidl::encoding::Encode::<DeviceInfo, D>::encode(
(
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.sta_addr),
<fidl_fuchsia_wlan_common::WlanMacRole as fidl::encoding::ValueTypeMarker>::borrow(&self.role),
<fidl::encoding::Vector<BandCapability, 16> as fidl::encoding::ValueTypeMarker>::borrow(&self.bands),
<u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.softmac_hardware_capability),
<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.qos_capable),
),
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_common::WlanMacRole, D>,
T2: fidl::encoding::Encode<fidl::encoding::Vector<BandCapability, 16>, D>,
T3: fidl::encoding::Encode<u32, D>,
T4: fidl::encoding::Encode<bool, D>,
> fidl::encoding::Encode<DeviceInfo, 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::<DeviceInfo>(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(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 + 8, depth)?;
self.2.encode(encoder, offset + 16, depth)?;
self.3.encode(encoder, offset + 32, depth)?;
self.4.encode(encoder, offset + 36, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeviceInfo {
#[inline(always)]
fn new_empty() -> Self {
Self {
sta_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
role: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanMacRole, D),
bands: fidl::new_empty!(fidl::encoding::Vector<BandCapability, 16>, D),
softmac_hardware_capability: fidl::new_empty!(u32, D),
qos_capable: 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(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(8) };
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 + 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 = 0xffffff0000000000u64;
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.sta_addr, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl_fuchsia_wlan_common::WlanMacRole,
D,
&mut self.role,
decoder,
offset + 8,
_depth
)?;
fidl::decode!(fidl::encoding::Vector<BandCapability, 16>, D, &mut self.bands, decoder, offset + 16, _depth)?;
fidl::decode!(
u32,
D,
&mut self.softmac_hardware_capability,
decoder,
offset + 32,
_depth
)?;
fidl::decode!(bool, D, &mut self.qos_capable, decoder, offset + 36, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DisassociateConfirm {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DisassociateConfirm {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisassociateConfirm, D>
for &DisassociateConfirm
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DisassociateConfirm>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut DisassociateConfirm)
.write_unaligned((self as *const DisassociateConfirm).read());
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
fidl::encoding::Encode<DisassociateConfirm, 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::<DisassociateConfirm>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisassociateConfirm {
#[inline(always)]
fn new_empty() -> Self {
Self { status: fidl::new_empty!(i32, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DisassociateIndication {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DisassociateIndication {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
2
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
10
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<DisassociateIndication, D> for &DisassociateIndication
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DisassociateIndication>(offset);
fidl::encoding::Encode::<DisassociateIndication, D>::encode(
(
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
<fidl_fuchsia_wlan_ieee80211::ReasonCode as fidl::encoding::ValueTypeMarker>::borrow(&self.reason_code),
<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.locally_initiated),
),
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::ReasonCode, D>,
T2: fidl::encoding::Encode<bool, D>,
> fidl::encoding::Encode<DisassociateIndication, 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::<DisassociateIndication>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
(ptr as *mut u16).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 6, depth)?;
self.2.encode(encoder, offset + 8, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for DisassociateIndication
{
#[inline(always)]
fn new_empty() -> Self {
Self {
peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
reason_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::ReasonCode, D),
locally_initiated: 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 u16).read_unaligned() };
let mask = 0xff00u16;
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::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl_fuchsia_wlan_ieee80211::ReasonCode,
D,
&mut self.reason_code,
decoder,
offset + 6,
_depth
)?;
fidl::decode!(bool, D, &mut self.locally_initiated, decoder, offset + 8, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DisassociateRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DisassociateRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
2
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
8
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisassociateRequest, D>
for &DisassociateRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DisassociateRequest>(offset);
fidl::encoding::Encode::<DisassociateRequest, D>::encode(
(
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
<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<fidl::encoding::Array<u8, 6>, D>,
T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::ReasonCode, D>,
> fidl::encoding::Encode<DisassociateRequest, 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::<DisassociateRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 6, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisassociateRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, 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);
fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl_fuchsia_wlan_ieee80211::ReasonCode,
D,
&mut self.reason_code,
decoder,
offset + 6,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for EapolConfirm {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for EapolConfirm {
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<EapolConfirm, D>
for &EapolConfirm
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EapolConfirm>(offset);
fidl::encoding::Encode::<EapolConfirm, D>::encode(
(
<EapolResultCode as fidl::encoding::ValueTypeMarker>::borrow(&self.result_code),
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(
&self.dst_addr,
),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<EapolResultCode, D>,
T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
> fidl::encoding::Encode<EapolConfirm, 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::<EapolConfirm>(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 EapolConfirm {
#[inline(always)]
fn new_empty() -> Self {
Self {
result_code: fidl::new_empty!(EapolResultCode, D),
dst_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!(EapolResultCode, D, &mut self.result_code, decoder, offset + 0, _depth)?;
fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.dst_addr, decoder, offset + 4, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for EapolIndication {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for EapolIndication {
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<EapolIndication, D>
for &EapolIndication
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EapolIndication>(offset);
fidl::encoding::Encode::<EapolIndication, D>::encode(
(
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.src_addr),
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.dst_addr),
<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.data),
),
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::Array<u8, 6>, D>,
T2: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
> fidl::encoding::Encode<EapolIndication, 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::<EapolIndication>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
(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 + 16, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EapolIndication {
#[inline(always)]
fn new_empty() -> Self {
Self {
src_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
dst_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
data: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
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 + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.src_addr, decoder, offset + 0, _depth)?;
fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.dst_addr, decoder, offset + 6, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedVector<u8>,
D,
&mut self.data,
decoder,
offset + 16,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for EapolRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for EapolRequest {
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<EapolRequest, D>
for &EapolRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<EapolRequest>(offset);
fidl::encoding::Encode::<EapolRequest, D>::encode(
(
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.src_addr),
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.dst_addr),
<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.data),
),
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::Array<u8, 6>, D>,
T2: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
> fidl::encoding::Encode<EapolRequest, 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::<EapolRequest>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
(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 + 16, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EapolRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
src_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
dst_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
data: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
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 + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.src_addr, decoder, offset + 0, _depth)?;
fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.dst_addr, decoder, offset + 6, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedVector<u8>,
D,
&mut self.data,
decoder,
offset + 16,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MinstrelListResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MinstrelListResponse {
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<MinstrelListResponse, D>
for &MinstrelListResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MinstrelListResponse>(offset);
fidl::encoding::Encode::<MinstrelListResponse, D>::encode(
(<fidl_fuchsia_wlan_minstrel::Peers as fidl::encoding::ValueTypeMarker>::borrow(
&self.peers,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl_fuchsia_wlan_minstrel::Peers, D>,
> fidl::encoding::Encode<MinstrelListResponse, 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::<MinstrelListResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MinstrelListResponse {
#[inline(always)]
fn new_empty() -> Self {
Self { peers: fidl::new_empty!(fidl_fuchsia_wlan_minstrel::Peers, 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_minstrel::Peers,
D,
&mut self.peers,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MinstrelStatsRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MinstrelStatsRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
6
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MinstrelStatsRequest, D>
for &MinstrelStatsRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MinstrelStatsRequest>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut MinstrelStatsRequest)
.write_unaligned((self as *const MinstrelStatsRequest).read());
}
Ok(())
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
> fidl::encoding::Encode<MinstrelStatsRequest, 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::<MinstrelStatsRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MinstrelStatsRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { peer_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 buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MinstrelStatsResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MinstrelStatsResponse {
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<MinstrelStatsResponse, D>
for &MinstrelStatsResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MinstrelStatsResponse>(offset);
fidl::encoding::Encode::<MinstrelStatsResponse, D>::encode(
(
<fidl::encoding::Boxed<fidl_fuchsia_wlan_minstrel::Peer> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Boxed<fidl_fuchsia_wlan_minstrel::Peer>, D>,
> fidl::encoding::Encode<MinstrelStatsResponse, 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::<MinstrelStatsResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MinstrelStatsResponse {
#[inline(always)]
fn new_empty() -> Self {
Self {
peer: fidl::new_empty!(fidl::encoding::Boxed<fidl_fuchsia_wlan_minstrel::Peer>, 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<fidl_fuchsia_wlan_minstrel::Peer>,
D,
&mut self.peer,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeAssociateIndRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeAssociateIndRequest {
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<MlmeAssociateIndRequest, D> for &MlmeAssociateIndRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeAssociateIndRequest>(offset);
fidl::encoding::Encode::<MlmeAssociateIndRequest, D>::encode(
(<AssociateIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<AssociateIndication, D>,
> fidl::encoding::Encode<MlmeAssociateIndRequest, 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::<MlmeAssociateIndRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeAssociateIndRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { ind: fidl::new_empty!(AssociateIndication, 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!(AssociateIndication, D, &mut self.ind, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeAssociateRespRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeAssociateRespRequest {
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<MlmeAssociateRespRequest, D> for &MlmeAssociateRespRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeAssociateRespRequest>(offset);
fidl::encoding::Encode::<MlmeAssociateRespRequest, D>::encode(
(<AssociateResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<AssociateResponse, D>>
fidl::encoding::Encode<MlmeAssociateRespRequest, 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::<MlmeAssociateRespRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeAssociateRespRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(AssociateResponse, 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!(AssociateResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeAuthenticateIndRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeAuthenticateIndRequest {
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<MlmeAuthenticateIndRequest, D> for &MlmeAuthenticateIndRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeAuthenticateIndRequest>(offset);
fidl::encoding::Encode::<MlmeAuthenticateIndRequest, D>::encode(
(<AuthenticateIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<AuthenticateIndication, D>,
> fidl::encoding::Encode<MlmeAuthenticateIndRequest, 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::<MlmeAuthenticateIndRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeAuthenticateIndRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { ind: fidl::new_empty!(AuthenticateIndication, 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!(AuthenticateIndication, D, &mut self.ind, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeAuthenticateRespRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeAuthenticateRespRequest {
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<MlmeAuthenticateRespRequest, D> for &MlmeAuthenticateRespRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeAuthenticateRespRequest>(offset);
fidl::encoding::Encode::<MlmeAuthenticateRespRequest, D>::encode(
(<AuthenticateResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<AuthenticateResponse, D>,
> fidl::encoding::Encode<MlmeAuthenticateRespRequest, 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::<MlmeAuthenticateRespRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeAuthenticateRespRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(AuthenticateResponse, 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!(AuthenticateResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeConnectConfRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeConnectConfRequest {
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<MlmeConnectConfRequest, D> for &MlmeConnectConfRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeConnectConfRequest>(offset);
fidl::encoding::Encode::<MlmeConnectConfRequest, D>::encode(
(<ConnectConfirm as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ConnectConfirm, D>>
fidl::encoding::Encode<MlmeConnectConfRequest, 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::<MlmeConnectConfRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeConnectConfRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(ConnectConfirm, 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!(ConnectConfirm, D, &mut self.resp, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeConnectReqRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeConnectReqRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
96
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeConnectReqRequest, D>
for &MlmeConnectReqRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeConnectReqRequest>(offset);
fidl::encoding::Encode::<MlmeConnectReqRequest, D>::encode(
(<ConnectRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ConnectRequest, D>>
fidl::encoding::Encode<MlmeConnectReqRequest, 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::<MlmeConnectReqRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeConnectReqRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { req: fidl::new_empty!(ConnectRequest, 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!(ConnectRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeDeauthenticateConfRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeDeauthenticateConfRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
6
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<MlmeDeauthenticateConfRequest, D>
for &MlmeDeauthenticateConfRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeDeauthenticateConfRequest>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut MlmeDeauthenticateConfRequest)
.write_unaligned((self as *const MlmeDeauthenticateConfRequest).read());
}
Ok(())
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<DeauthenticateConfirm, D>,
> fidl::encoding::Encode<MlmeDeauthenticateConfRequest, 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::<MlmeDeauthenticateConfRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeDeauthenticateConfRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(DeauthenticateConfirm, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeDeauthenticateIndRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeDeauthenticateIndRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
2
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
10
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<MlmeDeauthenticateIndRequest, D> for &MlmeDeauthenticateIndRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeDeauthenticateIndRequest>(offset);
fidl::encoding::Encode::<MlmeDeauthenticateIndRequest, D>::encode(
(<DeauthenticateIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<DeauthenticateIndication, D>,
> fidl::encoding::Encode<MlmeDeauthenticateIndRequest, 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::<MlmeDeauthenticateIndRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeDeauthenticateIndRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { ind: fidl::new_empty!(DeauthenticateIndication, 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!(DeauthenticateIndication, D, &mut self.ind, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeDeauthenticateReqRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeDeauthenticateReqRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
2
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
8
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<MlmeDeauthenticateReqRequest, D> for &MlmeDeauthenticateReqRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeDeauthenticateReqRequest>(offset);
fidl::encoding::Encode::<MlmeDeauthenticateReqRequest, D>::encode(
(<DeauthenticateRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<DeauthenticateRequest, D>,
> fidl::encoding::Encode<MlmeDeauthenticateReqRequest, 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::<MlmeDeauthenticateReqRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeDeauthenticateReqRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { req: fidl::new_empty!(DeauthenticateRequest, 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!(DeauthenticateRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeDeleteKeysReqRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeDeleteKeysReqRequest {
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<MlmeDeleteKeysReqRequest, D> for &MlmeDeleteKeysReqRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeDeleteKeysReqRequest>(offset);
fidl::encoding::Encode::<MlmeDeleteKeysReqRequest, D>::encode(
(<DeleteKeysRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<DeleteKeysRequest, D>>
fidl::encoding::Encode<MlmeDeleteKeysReqRequest, 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::<MlmeDeleteKeysReqRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeDeleteKeysReqRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { req: fidl::new_empty!(DeleteKeysRequest, 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!(DeleteKeysRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeDisassociateConfRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeDisassociateConfRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<MlmeDisassociateConfRequest, D> for &MlmeDisassociateConfRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeDisassociateConfRequest>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut MlmeDisassociateConfRequest)
.write_unaligned((self as *const MlmeDisassociateConfRequest).read());
}
Ok(())
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<DisassociateConfirm, D>,
> fidl::encoding::Encode<MlmeDisassociateConfRequest, 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::<MlmeDisassociateConfRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeDisassociateConfRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(DisassociateConfirm, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeDisassociateIndRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeDisassociateIndRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
2
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
10
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<MlmeDisassociateIndRequest, D> for &MlmeDisassociateIndRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeDisassociateIndRequest>(offset);
fidl::encoding::Encode::<MlmeDisassociateIndRequest, D>::encode(
(<DisassociateIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<DisassociateIndication, D>,
> fidl::encoding::Encode<MlmeDisassociateIndRequest, 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::<MlmeDisassociateIndRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeDisassociateIndRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { ind: fidl::new_empty!(DisassociateIndication, 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!(DisassociateIndication, D, &mut self.ind, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeDisassociateReqRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeDisassociateReqRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
2
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
8
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<MlmeDisassociateReqRequest, D> for &MlmeDisassociateReqRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeDisassociateReqRequest>(offset);
fidl::encoding::Encode::<MlmeDisassociateReqRequest, D>::encode(
(<DisassociateRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<DisassociateRequest, D>,
> fidl::encoding::Encode<MlmeDisassociateReqRequest, 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::<MlmeDisassociateReqRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeDisassociateReqRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { req: fidl::new_empty!(DisassociateRequest, 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!(DisassociateRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeEapolConfRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeEapolConfRequest {
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<MlmeEapolConfRequest, D>
for &MlmeEapolConfRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeEapolConfRequest>(offset);
fidl::encoding::Encode::<MlmeEapolConfRequest, D>::encode(
(<EapolConfirm as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EapolConfirm, D>>
fidl::encoding::Encode<MlmeEapolConfRequest, 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::<MlmeEapolConfRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeEapolConfRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(EapolConfirm, 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!(EapolConfirm, D, &mut self.resp, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeEapolIndRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeEapolIndRequest {
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<MlmeEapolIndRequest, D>
for &MlmeEapolIndRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeEapolIndRequest>(offset);
fidl::encoding::Encode::<MlmeEapolIndRequest, D>::encode(
(<EapolIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EapolIndication, D>>
fidl::encoding::Encode<MlmeEapolIndRequest, 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::<MlmeEapolIndRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeEapolIndRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { ind: fidl::new_empty!(EapolIndication, 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!(EapolIndication, D, &mut self.ind, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeEapolReqRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeEapolReqRequest {
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<MlmeEapolReqRequest, D>
for &MlmeEapolReqRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeEapolReqRequest>(offset);
fidl::encoding::Encode::<MlmeEapolReqRequest, D>::encode(
(<EapolRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EapolRequest, D>>
fidl::encoding::Encode<MlmeEapolReqRequest, 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::<MlmeEapolReqRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeEapolReqRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { req: fidl::new_empty!(EapolRequest, 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!(EapolRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeFinalizeAssociationReqRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeFinalizeAssociationReqRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
56
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<MlmeFinalizeAssociationReqRequest, D>
for &MlmeFinalizeAssociationReqRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeFinalizeAssociationReqRequest>(offset);
fidl::encoding::Encode::<MlmeFinalizeAssociationReqRequest, D>::encode(
(<NegotiatedCapabilities as fidl::encoding::ValueTypeMarker>::borrow(
&self.negotiated_capabilities,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<NegotiatedCapabilities, D>,
> fidl::encoding::Encode<MlmeFinalizeAssociationReqRequest, 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::<MlmeFinalizeAssociationReqRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeFinalizeAssociationReqRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { negotiated_capabilities: fidl::new_empty!(NegotiatedCapabilities, 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!(
NegotiatedCapabilities,
D,
&mut self.negotiated_capabilities,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeGetIfaceCounterStatsResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeGetIfaceCounterStatsResponse {
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<MlmeGetIfaceCounterStatsResponse, D>
for &MlmeGetIfaceCounterStatsResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeGetIfaceCounterStatsResponse>(offset);
fidl::encoding::Encode::<MlmeGetIfaceCounterStatsResponse, D>::encode(
(<GetIfaceCounterStatsResponse as fidl::encoding::ValueTypeMarker>::borrow(
&self.resp,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<GetIfaceCounterStatsResponse, D>,
> fidl::encoding::Encode<MlmeGetIfaceCounterStatsResponse, 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::<MlmeGetIfaceCounterStatsResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeGetIfaceCounterStatsResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(GetIfaceCounterStatsResponse, 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!(
GetIfaceCounterStatsResponse,
D,
&mut self.resp,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeGetIfaceHistogramStatsResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeGetIfaceHistogramStatsResponse {
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<MlmeGetIfaceHistogramStatsResponse, D>
for &MlmeGetIfaceHistogramStatsResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeGetIfaceHistogramStatsResponse>(offset);
fidl::encoding::Encode::<MlmeGetIfaceHistogramStatsResponse, D>::encode(
(<GetIfaceHistogramStatsResponse as fidl::encoding::ValueTypeMarker>::borrow(
&self.resp,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<GetIfaceHistogramStatsResponse, D>,
> fidl::encoding::Encode<MlmeGetIfaceHistogramStatsResponse, 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::<MlmeGetIfaceHistogramStatsResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeGetIfaceHistogramStatsResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(GetIfaceHistogramStatsResponse, 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!(
GetIfaceHistogramStatsResponse,
D,
&mut self.resp,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeGetMinstrelStatsRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeGetMinstrelStatsRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
6
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<MlmeGetMinstrelStatsRequest, D> for &MlmeGetMinstrelStatsRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeGetMinstrelStatsRequest>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut MlmeGetMinstrelStatsRequest)
.write_unaligned((self as *const MlmeGetMinstrelStatsRequest).read());
}
Ok(())
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<MinstrelStatsRequest, D>,
> fidl::encoding::Encode<MlmeGetMinstrelStatsRequest, 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::<MlmeGetMinstrelStatsRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeGetMinstrelStatsRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { req: fidl::new_empty!(MinstrelStatsRequest, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeGetMinstrelStatsResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeGetMinstrelStatsResponse {
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<MlmeGetMinstrelStatsResponse, D> for &MlmeGetMinstrelStatsResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeGetMinstrelStatsResponse>(offset);
fidl::encoding::Encode::<MlmeGetMinstrelStatsResponse, D>::encode(
(<MinstrelStatsResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<MinstrelStatsResponse, D>,
> fidl::encoding::Encode<MlmeGetMinstrelStatsResponse, 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::<MlmeGetMinstrelStatsResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeGetMinstrelStatsResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(MinstrelStatsResponse, 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!(MinstrelStatsResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeListMinstrelPeersResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeListMinstrelPeersResponse {
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<MlmeListMinstrelPeersResponse, D>
for &MlmeListMinstrelPeersResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeListMinstrelPeersResponse>(offset);
fidl::encoding::Encode::<MlmeListMinstrelPeersResponse, D>::encode(
(<MinstrelListResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<MinstrelListResponse, D>,
> fidl::encoding::Encode<MlmeListMinstrelPeersResponse, 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::<MlmeListMinstrelPeersResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeListMinstrelPeersResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(MinstrelListResponse, 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!(MinstrelListResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeOnChannelSwitchedRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeOnChannelSwitchedRequest {
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<MlmeOnChannelSwitchedRequest, D> for &MlmeOnChannelSwitchedRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeOnChannelSwitchedRequest>(offset);
fidl::encoding::Encode::<MlmeOnChannelSwitchedRequest, 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<MlmeOnChannelSwitchedRequest, 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::<MlmeOnChannelSwitchedRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeOnChannelSwitchedRequest
{
#[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 MlmeOnPmkAvailableRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeOnPmkAvailableRequest {
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<MlmeOnPmkAvailableRequest, D> for &MlmeOnPmkAvailableRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeOnPmkAvailableRequest>(offset);
fidl::encoding::Encode::<MlmeOnPmkAvailableRequest, D>::encode(
(<PmkInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<PmkInfo, D>>
fidl::encoding::Encode<MlmeOnPmkAvailableRequest, 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::<MlmeOnPmkAvailableRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeOnPmkAvailableRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { info: fidl::new_empty!(PmkInfo, 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!(PmkInfo, D, &mut self.info, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeOnSaeFrameRxRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeOnSaeFrameRxRequest {
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<MlmeOnSaeFrameRxRequest, D> for &MlmeOnSaeFrameRxRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeOnSaeFrameRxRequest>(offset);
fidl::encoding::Encode::<MlmeOnSaeFrameRxRequest, D>::encode(
(<SaeFrame as fidl::encoding::ValueTypeMarker>::borrow(&self.frame),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SaeFrame, D>>
fidl::encoding::Encode<MlmeOnSaeFrameRxRequest, 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::<MlmeOnSaeFrameRxRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeOnSaeFrameRxRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { frame: fidl::new_empty!(SaeFrame, 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!(SaeFrame, D, &mut self.frame, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeOnSaeHandshakeIndRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeOnSaeHandshakeIndRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
6
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<MlmeOnSaeHandshakeIndRequest, D> for &MlmeOnSaeHandshakeIndRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeOnSaeHandshakeIndRequest>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut MlmeOnSaeHandshakeIndRequest)
.write_unaligned((self as *const MlmeOnSaeHandshakeIndRequest).read());
}
Ok(())
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<SaeHandshakeIndication, D>,
> fidl::encoding::Encode<MlmeOnSaeHandshakeIndRequest, 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::<MlmeOnSaeHandshakeIndRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeOnSaeHandshakeIndRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { ind: fidl::new_empty!(SaeHandshakeIndication, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeOnScanEndRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeOnScanEndRequest {
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<MlmeOnScanEndRequest, D>
for &MlmeOnScanEndRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeOnScanEndRequest>(offset);
fidl::encoding::Encode::<MlmeOnScanEndRequest, D>::encode(
(<ScanEnd as fidl::encoding::ValueTypeMarker>::borrow(&self.end),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ScanEnd, D>>
fidl::encoding::Encode<MlmeOnScanEndRequest, 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::<MlmeOnScanEndRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeOnScanEndRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { end: fidl::new_empty!(ScanEnd, 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!(ScanEnd, D, &mut self.end, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeOnScanResultRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeOnScanResultRequest {
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<MlmeOnScanResultRequest, D> for &MlmeOnScanResultRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeOnScanResultRequest>(offset);
fidl::encoding::Encode::<MlmeOnScanResultRequest, D>::encode(
(<ScanResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ScanResult, D>>
fidl::encoding::Encode<MlmeOnScanResultRequest, 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::<MlmeOnScanResultRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeOnScanResultRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { result: fidl::new_empty!(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!(ScanResult, D, &mut self.result, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeOnWmmStatusRespRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeOnWmmStatusRespRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
40
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<MlmeOnWmmStatusRespRequest, D> for &MlmeOnWmmStatusRespRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeOnWmmStatusRespRequest>(offset);
fidl::encoding::Encode::<MlmeOnWmmStatusRespRequest, D>::encode(
(
<i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.status),
<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<i32, D>,
T1: fidl::encoding::Encode<fidl_fuchsia_wlan_internal::WmmStatusResponse, D>,
> fidl::encoding::Encode<MlmeOnWmmStatusRespRequest, 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::<MlmeOnWmmStatusRespRequest>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(36);
(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 MlmeOnWmmStatusRespRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
status: fidl::new_empty!(i32, D),
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);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(36) };
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 + 36 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(i32, D, &mut self.status, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl_fuchsia_wlan_internal::WmmStatusResponse,
D,
&mut self.resp,
decoder,
offset + 4,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeQueryDeviceInfoResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeQueryDeviceInfoResponse {
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<MlmeQueryDeviceInfoResponse, D> for &MlmeQueryDeviceInfoResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeQueryDeviceInfoResponse>(offset);
fidl::encoding::Encode::<MlmeQueryDeviceInfoResponse, D>::encode(
(<DeviceInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<DeviceInfo, D>>
fidl::encoding::Encode<MlmeQueryDeviceInfoResponse, 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::<MlmeQueryDeviceInfoResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeQueryDeviceInfoResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { info: fidl::new_empty!(DeviceInfo, 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!(DeviceInfo, D, &mut self.info, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeQueryDiscoverySupportResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeQueryDiscoverySupportResponse {
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<MlmeQueryDiscoverySupportResponse, D>
for &MlmeQueryDiscoverySupportResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeQueryDiscoverySupportResponse>(offset);
fidl::encoding::Encode::<MlmeQueryDiscoverySupportResponse, 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<MlmeQueryDiscoverySupportResponse, 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::<MlmeQueryDiscoverySupportResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeQueryDiscoverySupportResponse
{
#[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 MlmeQueryMacSublayerSupportResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeQueryMacSublayerSupportResponse {
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<MlmeQueryMacSublayerSupportResponse, D>
for &MlmeQueryMacSublayerSupportResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeQueryMacSublayerSupportResponse>(offset);
fidl::encoding::Encode::<MlmeQueryMacSublayerSupportResponse, 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<MlmeQueryMacSublayerSupportResponse, 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::<MlmeQueryMacSublayerSupportResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeQueryMacSublayerSupportResponse
{
#[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 MlmeQuerySecuritySupportResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeQuerySecuritySupportResponse {
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<MlmeQuerySecuritySupportResponse, D>
for &MlmeQuerySecuritySupportResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeQuerySecuritySupportResponse>(offset);
fidl::encoding::Encode::<MlmeQuerySecuritySupportResponse, 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<MlmeQuerySecuritySupportResponse, 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::<MlmeQuerySecuritySupportResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeQuerySecuritySupportResponse
{
#[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 MlmeQuerySpectrumManagementSupportResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeQuerySpectrumManagementSupportResponse {
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<MlmeQuerySpectrumManagementSupportResponse, D>
for &MlmeQuerySpectrumManagementSupportResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeQuerySpectrumManagementSupportResponse>(offset);
fidl::encoding::Encode::<MlmeQuerySpectrumManagementSupportResponse, 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<MlmeQuerySpectrumManagementSupportResponse, 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::<MlmeQuerySpectrumManagementSupportResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeQuerySpectrumManagementSupportResponse
{
#[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::ValueTypeMarker for MlmeReconnectReqRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeReconnectReqRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
6
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<MlmeReconnectReqRequest, D> for &MlmeReconnectReqRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeReconnectReqRequest>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut MlmeReconnectReqRequest)
.write_unaligned((self as *const MlmeReconnectReqRequest).read());
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ReconnectRequest, D>>
fidl::encoding::Encode<MlmeReconnectReqRequest, 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::<MlmeReconnectReqRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeReconnectReqRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { req: fidl::new_empty!(ReconnectRequest, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeRelayCapturedFrameRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeRelayCapturedFrameRequest {
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<MlmeRelayCapturedFrameRequest, D>
for &MlmeRelayCapturedFrameRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeRelayCapturedFrameRequest>(offset);
fidl::encoding::Encode::<MlmeRelayCapturedFrameRequest, D>::encode(
(<CapturedFrameResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<CapturedFrameResult, D>,
> fidl::encoding::Encode<MlmeRelayCapturedFrameRequest, 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::<MlmeRelayCapturedFrameRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeRelayCapturedFrameRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { result: fidl::new_empty!(CapturedFrameResult, 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!(CapturedFrameResult, D, &mut self.result, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeResetReqRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeResetReqRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
7
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeResetReqRequest, D>
for &MlmeResetReqRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeResetReqRequest>(offset);
fidl::encoding::Encode::<MlmeResetReqRequest, D>::encode(
(<ResetRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ResetRequest, D>>
fidl::encoding::Encode<MlmeResetReqRequest, 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::<MlmeResetReqRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeResetReqRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { req: fidl::new_empty!(ResetRequest, 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!(ResetRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeRoamConfRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeRoamConfRequest {
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<MlmeRoamConfRequest, D>
for &MlmeRoamConfRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeRoamConfRequest>(offset);
fidl::encoding::Encode::<MlmeRoamConfRequest, D>::encode(
(<RoamConfirm as fidl::encoding::ValueTypeMarker>::borrow(&self.conf),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<RoamConfirm, D>>
fidl::encoding::Encode<MlmeRoamConfRequest, 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::<MlmeRoamConfRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeRoamConfRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { conf: fidl::new_empty!(RoamConfirm, 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!(RoamConfirm, D, &mut self.conf, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeRoamReqRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeRoamReqRequest {
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<MlmeRoamReqRequest, D>
for &MlmeRoamReqRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeRoamReqRequest>(offset);
fidl::encoding::Encode::<MlmeRoamReqRequest, 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<MlmeRoamReqRequest, 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::<MlmeRoamReqRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeRoamReqRequest {
#[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::ValueTypeMarker for MlmeRoamResultIndRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeRoamResultIndRequest {
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<MlmeRoamResultIndRequest, D> for &MlmeRoamResultIndRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeRoamResultIndRequest>(offset);
fidl::encoding::Encode::<MlmeRoamResultIndRequest, D>::encode(
(<RoamResultIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<RoamResultIndication, D>,
> fidl::encoding::Encode<MlmeRoamResultIndRequest, 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::<MlmeRoamResultIndRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeRoamResultIndRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { ind: fidl::new_empty!(RoamResultIndication, 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!(RoamResultIndication, D, &mut self.ind, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeRoamStartIndRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeRoamStartIndRequest {
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<MlmeRoamStartIndRequest, D> for &MlmeRoamStartIndRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeRoamStartIndRequest>(offset);
fidl::encoding::Encode::<MlmeRoamStartIndRequest, D>::encode(
(<RoamStartIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<RoamStartIndication, D>,
> fidl::encoding::Encode<MlmeRoamStartIndRequest, 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::<MlmeRoamStartIndRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeRoamStartIndRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { ind: fidl::new_empty!(RoamStartIndication, 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!(RoamStartIndication, D, &mut self.ind, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeSaeFrameTxRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeSaeFrameTxRequest {
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<MlmeSaeFrameTxRequest, D>
for &MlmeSaeFrameTxRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeSaeFrameTxRequest>(offset);
fidl::encoding::Encode::<MlmeSaeFrameTxRequest, D>::encode(
(<SaeFrame as fidl::encoding::ValueTypeMarker>::borrow(&self.frame),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SaeFrame, D>>
fidl::encoding::Encode<MlmeSaeFrameTxRequest, 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::<MlmeSaeFrameTxRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeSaeFrameTxRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { frame: fidl::new_empty!(SaeFrame, 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!(SaeFrame, D, &mut self.frame, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeSaeHandshakeRespRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeSaeHandshakeRespRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
2
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
8
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<MlmeSaeHandshakeRespRequest, D> for &MlmeSaeHandshakeRespRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeSaeHandshakeRespRequest>(offset);
fidl::encoding::Encode::<MlmeSaeHandshakeRespRequest, D>::encode(
(<SaeHandshakeResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<SaeHandshakeResponse, D>,
> fidl::encoding::Encode<MlmeSaeHandshakeRespRequest, 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::<MlmeSaeHandshakeRespRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeSaeHandshakeRespRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(SaeHandshakeResponse, 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!(SaeHandshakeResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeSetControlledPortRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeSetControlledPortRequest {
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<MlmeSetControlledPortRequest, D> for &MlmeSetControlledPortRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeSetControlledPortRequest>(offset);
fidl::encoding::Encode::<MlmeSetControlledPortRequest, D>::encode(
(<SetControlledPortRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<SetControlledPortRequest, D>,
> fidl::encoding::Encode<MlmeSetControlledPortRequest, 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::<MlmeSetControlledPortRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeSetControlledPortRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { req: fidl::new_empty!(SetControlledPortRequest, 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!(SetControlledPortRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeSetKeysConfRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeSetKeysConfRequest {
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<MlmeSetKeysConfRequest, D> for &MlmeSetKeysConfRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeSetKeysConfRequest>(offset);
fidl::encoding::Encode::<MlmeSetKeysConfRequest, D>::encode(
(<SetKeysConfirm as fidl::encoding::ValueTypeMarker>::borrow(&self.conf),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SetKeysConfirm, D>>
fidl::encoding::Encode<MlmeSetKeysConfRequest, 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::<MlmeSetKeysConfRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeSetKeysConfRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { conf: fidl::new_empty!(SetKeysConfirm, 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!(SetKeysConfirm, D, &mut self.conf, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeSetKeysReqRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeSetKeysReqRequest {
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<MlmeSetKeysReqRequest, D>
for &MlmeSetKeysReqRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeSetKeysReqRequest>(offset);
fidl::encoding::Encode::<MlmeSetKeysReqRequest, D>::encode(
(<SetKeysRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SetKeysRequest, D>>
fidl::encoding::Encode<MlmeSetKeysReqRequest, 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::<MlmeSetKeysReqRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeSetKeysReqRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { req: fidl::new_empty!(SetKeysRequest, 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!(SetKeysRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeSignalReportRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeSignalReportRequest {
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<MlmeSignalReportRequest, D> for &MlmeSignalReportRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeSignalReportRequest>(offset);
fidl::encoding::Encode::<MlmeSignalReportRequest, 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<MlmeSignalReportRequest, 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::<MlmeSignalReportRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeSignalReportRequest
{
#[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 MlmeStartCaptureFramesRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeStartCaptureFramesRequest {
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<MlmeStartCaptureFramesRequest, D>
for &MlmeStartCaptureFramesRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeStartCaptureFramesRequest>(offset);
fidl::encoding::Encode::<MlmeStartCaptureFramesRequest, D>::encode(
(<StartCaptureFramesRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<StartCaptureFramesRequest, D>,
> fidl::encoding::Encode<MlmeStartCaptureFramesRequest, 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::<MlmeStartCaptureFramesRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeStartCaptureFramesRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { req: fidl::new_empty!(StartCaptureFramesRequest, 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!(
StartCaptureFramesRequest,
D,
&mut self.req,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeStartCaptureFramesResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeStartCaptureFramesResponse {
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<MlmeStartCaptureFramesResponse, D>
for &MlmeStartCaptureFramesResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeStartCaptureFramesResponse>(offset);
fidl::encoding::Encode::<MlmeStartCaptureFramesResponse, D>::encode(
(<StartCaptureFramesResponse as fidl::encoding::ValueTypeMarker>::borrow(
&self.resp,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<StartCaptureFramesResponse, D>,
> fidl::encoding::Encode<MlmeStartCaptureFramesResponse, 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::<MlmeStartCaptureFramesResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for MlmeStartCaptureFramesResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(StartCaptureFramesResponse, 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!(
StartCaptureFramesResponse,
D,
&mut self.resp,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeStartConfRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeStartConfRequest {
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<MlmeStartConfRequest, D>
for &MlmeStartConfRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeStartConfRequest>(offset);
fidl::encoding::Encode::<MlmeStartConfRequest, D>::encode(
(<StartConfirm as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StartConfirm, D>>
fidl::encoding::Encode<MlmeStartConfRequest, 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::<MlmeStartConfRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeStartConfRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(StartConfirm, 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!(StartConfirm, D, &mut self.resp, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeStartReqRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeStartReqRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
96
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeStartReqRequest, D>
for &MlmeStartReqRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeStartReqRequest>(offset);
fidl::encoding::Encode::<MlmeStartReqRequest, D>::encode(
(<StartRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StartRequest, D>>
fidl::encoding::Encode<MlmeStartReqRequest, 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::<MlmeStartReqRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeStartReqRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { req: fidl::new_empty!(StartRequest, 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!(StartRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeStartScanRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeStartScanRequest {
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<MlmeStartScanRequest, D>
for &MlmeStartScanRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeStartScanRequest>(offset);
fidl::encoding::Encode::<MlmeStartScanRequest, D>::encode(
(<ScanRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ScanRequest, D>>
fidl::encoding::Encode<MlmeStartScanRequest, 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::<MlmeStartScanRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeStartScanRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { req: fidl::new_empty!(ScanRequest, 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!(ScanRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeStopConfRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeStopConfRequest {
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<MlmeStopConfRequest, D>
for &MlmeStopConfRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeStopConfRequest>(offset);
fidl::encoding::Encode::<MlmeStopConfRequest, D>::encode(
(<StopConfirm as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StopConfirm, D>>
fidl::encoding::Encode<MlmeStopConfRequest, 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::<MlmeStopConfRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeStopConfRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { resp: fidl::new_empty!(StopConfirm, 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!(StopConfirm, D, &mut self.resp, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for MlmeStopReqRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MlmeStopReqRequest {
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<MlmeStopReqRequest, D>
for &MlmeStopReqRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MlmeStopReqRequest>(offset);
fidl::encoding::Encode::<MlmeStopReqRequest, D>::encode(
(<StopRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StopRequest, D>>
fidl::encoding::Encode<MlmeStopReqRequest, 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::<MlmeStopReqRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeStopReqRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { req: fidl::new_empty!(StopRequest, 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!(StopRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for NegotiatedCapabilities {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for NegotiatedCapabilities {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
56
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<NegotiatedCapabilities, D> for &NegotiatedCapabilities
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<NegotiatedCapabilities>(offset);
fidl::encoding::Encode::<NegotiatedCapabilities, D>::encode(
(
<fidl_fuchsia_wlan_common::WlanChannel as fidl::encoding::ValueTypeMarker>::borrow(&self.channel),
<u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.capability_info),
<fidl::encoding::Vector<u8, 14> as fidl::encoding::ValueTypeMarker>::borrow(&self.rates),
<fidl::encoding::Boxed<WmmParameter> as fidl::encoding::ValueTypeMarker>::borrow(&self.wmm_param),
<fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities> as fidl::encoding::ValueTypeMarker>::borrow(&self.ht_cap),
<fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities> as fidl::encoding::ValueTypeMarker>::borrow(&self.vht_cap),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanChannel, D>,
T1: fidl::encoding::Encode<u16, D>,
T2: fidl::encoding::Encode<fidl::encoding::Vector<u8, 14>, D>,
T3: fidl::encoding::Encode<fidl::encoding::Boxed<WmmParameter>, D>,
T4: fidl::encoding::Encode<
fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities>,
D,
>,
T5: fidl::encoding::Encode<
fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>,
D,
>,
> fidl::encoding::Encode<NegotiatedCapabilities, 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::<NegotiatedCapabilities>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 12, depth)?;
self.2.encode(encoder, offset + 16, depth)?;
self.3.encode(encoder, offset + 32, depth)?;
self.4.encode(encoder, offset + 40, depth)?;
self.5.encode(encoder, offset + 48, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for NegotiatedCapabilities
{
#[inline(always)]
fn new_empty() -> Self {
Self {
channel: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanChannel, D),
capability_info: fidl::new_empty!(u16, D),
rates: fidl::new_empty!(fidl::encoding::Vector<u8, 14>, D),
wmm_param: fidl::new_empty!(fidl::encoding::Boxed<WmmParameter>, D),
ht_cap: fidl::new_empty!(
fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities>,
D
),
vht_cap: fidl::new_empty!(
fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>,
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 = 0xffff000000000000u64;
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::WlanChannel,
D,
&mut self.channel,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(u16, D, &mut self.capability_info, decoder, offset + 12, _depth)?;
fidl::decode!(fidl::encoding::Vector<u8, 14>, D, &mut self.rates, decoder, offset + 16, _depth)?;
fidl::decode!(
fidl::encoding::Boxed<WmmParameter>,
D,
&mut self.wmm_param,
decoder,
offset + 32,
_depth
)?;
fidl::decode!(
fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities>,
D,
&mut self.ht_cap,
decoder,
offset + 40,
_depth
)?;
fidl::decode!(
fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>,
D,
&mut self.vht_cap,
decoder,
offset + 48,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for PmkInfo {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for PmkInfo {
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<PmkInfo, D> for &PmkInfo {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<PmkInfo>(offset);
fidl::encoding::Encode::<PmkInfo, D>::encode(
(
<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.pmk),
<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.pmkid),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
> fidl::encoding::Encode<PmkInfo, 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::<PmkInfo>(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 PmkInfo {
#[inline(always)]
fn new_empty() -> Self {
Self {
pmk: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
pmkid: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedVector<u8>,
D,
&mut self.pmk,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(
fidl::encoding::UnboundedVector<u8>,
D,
&mut self.pmkid,
decoder,
offset + 16,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ReconnectRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ReconnectRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
6
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ReconnectRequest, D>
for &ReconnectRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ReconnectRequest>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut ReconnectRequest)
.write_unaligned((self as *const ReconnectRequest).read());
}
Ok(())
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
> fidl::encoding::Encode<ReconnectRequest, 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::<ReconnectRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ReconnectRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { peer_sta_address: 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 buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ResetRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ResetRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
7
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ResetRequest, D>
for &ResetRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ResetRequest>(offset);
fidl::encoding::Encode::<ResetRequest, D>::encode(
(
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(
&self.sta_address,
),
<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.set_default_mib),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
T1: fidl::encoding::Encode<bool, D>,
> fidl::encoding::Encode<ResetRequest, 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::<ResetRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 6, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ResetRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
set_default_mib: 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::encoding::Array<u8, 6>, D, &mut self.sta_address, decoder, offset + 0, _depth)?;
fidl::decode!(bool, D, &mut self.set_default_mib, decoder, offset + 6, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for RoamConfirm {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for RoamConfirm {
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<RoamConfirm, D>
for &RoamConfirm
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RoamConfirm>(offset);
fidl::encoding::Encode::<RoamConfirm, D>::encode(
(
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.selected_bssid),
<fidl_fuchsia_wlan_ieee80211::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.status_code),
<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.original_association_maintained),
<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.target_bss_authenticated),
<u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.association_id),
<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.association_ies),
),
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<bool, D>,
T4: fidl::encoding::Encode<u16, D>,
T5: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
> fidl::encoding::Encode<RoamConfirm, 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::<RoamConfirm>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
(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 + 9, depth)?;
self.4.encode(encoder, offset + 10, depth)?;
self.5.encode(encoder, offset + 16, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoamConfirm {
#[inline(always)]
fn new_empty() -> Self {
Self {
selected_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),
target_bss_authenticated: fidl::new_empty!(bool, D),
association_id: fidl::new_empty!(u16, D),
association_ies: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
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 + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.selected_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!(
bool,
D,
&mut self.target_bss_authenticated,
decoder,
offset + 9,
_depth
)?;
fidl::decode!(u16, D, &mut self.association_id, decoder, offset + 10, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedVector<u8>,
D,
&mut self.association_ies,
decoder,
offset + 16,
_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.selected_bss),
),
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 { selected_bss: 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.selected_bss,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for RoamResultIndication {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for RoamResultIndication {
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<RoamResultIndication, D>
for &RoamResultIndication
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RoamResultIndication>(offset);
fidl::encoding::Encode::<RoamResultIndication, D>::encode(
(
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.selected_bssid),
<fidl_fuchsia_wlan_ieee80211::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.status_code),
<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.original_association_maintained),
<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.target_bss_authenticated),
<u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.association_id),
<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.association_ies),
),
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<bool, D>,
T4: fidl::encoding::Encode<u16, D>,
T5: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
> fidl::encoding::Encode<RoamResultIndication, 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::<RoamResultIndication>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
(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 + 9, depth)?;
self.4.encode(encoder, offset + 10, depth)?;
self.5.encode(encoder, offset + 16, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoamResultIndication {
#[inline(always)]
fn new_empty() -> Self {
Self {
selected_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),
target_bss_authenticated: fidl::new_empty!(bool, D),
association_id: fidl::new_empty!(u16, D),
association_ies: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
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 + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.selected_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!(
bool,
D,
&mut self.target_bss_authenticated,
decoder,
offset + 9,
_depth
)?;
fidl::decode!(u16, D, &mut self.association_id, decoder, offset + 10, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedVector<u8>,
D,
&mut self.association_ies,
decoder,
offset + 16,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for RoamStartIndication {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for RoamStartIndication {
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<RoamStartIndication, D>
for &RoamStartIndication
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RoamStartIndication>(offset);
fidl::encoding::Encode::<RoamStartIndication, D>::encode(
(
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.selected_bssid),
<fidl_fuchsia_wlan_common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.selected_bss),
<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.original_association_maintained),
),
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_common::BssDescription, D>,
T2: fidl::encoding::Encode<bool, D>,
> fidl::encoding::Encode<RoamStartIndication, 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::<RoamStartIndication>(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(56);
(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 + 56, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoamStartIndication {
#[inline(always)]
fn new_empty() -> Self {
Self {
selected_bssid: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
selected_bss: fidl::new_empty!(fidl_fuchsia_wlan_common::BssDescription, D),
original_association_maintained: 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(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(56) };
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 + 56 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.selected_bssid, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl_fuchsia_wlan_common::BssDescription,
D,
&mut self.selected_bss,
decoder,
offset + 8,
_depth
)?;
fidl::decode!(
bool,
D,
&mut self.original_association_maintained,
decoder,
offset + 56,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for SaeFrame {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for SaeFrame {
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<SaeFrame, D> for &SaeFrame {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<SaeFrame>(offset);
fidl::encoding::Encode::<SaeFrame, D>::encode(
(
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
<fidl_fuchsia_wlan_ieee80211::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.status_code),
<u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.seq_num),
<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.sae_fields),
),
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<u16, D>,
T3: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
> fidl::encoding::Encode<SaeFrame, D> for (T0, T1, T2, T3)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<SaeFrame>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
(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)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SaeFrame {
#[inline(always)]
fn new_empty() -> Self {
Self {
peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
status_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::StatusCode, D),
seq_num: fidl::new_empty!(u16, D),
sae_fields: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffffffff0000u64;
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::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl_fuchsia_wlan_ieee80211::StatusCode,
D,
&mut self.status_code,
decoder,
offset + 6,
_depth
)?;
fidl::decode!(u16, D, &mut self.seq_num, decoder, offset + 8, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedVector<u8>,
D,
&mut self.sae_fields,
decoder,
offset + 16,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for SaeHandshakeIndication {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for SaeHandshakeIndication {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
6
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<SaeHandshakeIndication, D> for &SaeHandshakeIndication
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<SaeHandshakeIndication>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut SaeHandshakeIndication)
.write_unaligned((self as *const SaeHandshakeIndication).read());
}
Ok(())
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
> fidl::encoding::Encode<SaeHandshakeIndication, 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::<SaeHandshakeIndication>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for SaeHandshakeIndication
{
#[inline(always)]
fn new_empty() -> Self {
Self { peer_sta_address: 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 buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for SaeHandshakeResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for SaeHandshakeResponse {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
2
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
8
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SaeHandshakeResponse, D>
for &SaeHandshakeResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<SaeHandshakeResponse>(offset);
fidl::encoding::Encode::<SaeHandshakeResponse, D>::encode(
(
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
<fidl_fuchsia_wlan_ieee80211::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.status_code),
),
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>,
> fidl::encoding::Encode<SaeHandshakeResponse, 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::<SaeHandshakeResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 6, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SaeHandshakeResponse {
#[inline(always)]
fn new_empty() -> Self {
Self {
peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
status_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::StatusCode, 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::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl_fuchsia_wlan_ieee80211::StatusCode,
D,
&mut self.status_code,
decoder,
offset + 6,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ScanEnd {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ScanEnd {
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<ScanEnd, D> for &ScanEnd {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ScanEnd>(offset);
fidl::encoding::Encode::<ScanEnd, D>::encode(
(
<u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.txn_id),
<ScanResultCode as fidl::encoding::ValueTypeMarker>::borrow(&self.code),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<u64, D>,
T1: fidl::encoding::Encode<ScanResultCode, D>,
> fidl::encoding::Encode<ScanEnd, 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::<ScanEnd>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
(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 ScanEnd {
#[inline(always)]
fn new_empty() -> Self {
Self { txn_id: fidl::new_empty!(u64, D), code: fidl::new_empty!(ScanResultCode, 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 = 0xffffffff00000000u64;
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!(u64, D, &mut self.txn_id, decoder, offset + 0, _depth)?;
fidl::decode!(ScanResultCode, D, &mut self.code, decoder, offset + 8, _depth)?;
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 {
64
}
}
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);
fidl::encoding::Encode::<ScanRequest, D>::encode(
(
<u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.txn_id),
<ScanTypes as fidl::encoding::ValueTypeMarker>::borrow(&self.scan_type),
<fidl::encoding::Vector<u8, 256> as fidl::encoding::ValueTypeMarker>::borrow(&self.channel_list),
<fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssid_list),
<u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.probe_delay),
<u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.min_channel_time),
<u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.max_channel_time),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<u64, D>,
T1: fidl::encoding::Encode<ScanTypes, D>,
T2: fidl::encoding::Encode<fidl::encoding::Vector<u8, 256>, D>,
T3: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
D,
>,
T4: fidl::encoding::Encode<u32, D>,
T5: fidl::encoding::Encode<u32, D>,
T6: fidl::encoding::Encode<u32, D>,
> fidl::encoding::Encode<ScanRequest, D> for (T0, T1, T2, T3, T4, T5, T6)
{
#[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);
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(56);
(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 + 16, depth)?;
self.3.encode(encoder, offset + 32, depth)?;
self.4.encode(encoder, offset + 48, depth)?;
self.5.encode(encoder, offset + 52, depth)?;
self.6.encode(encoder, offset + 56, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
txn_id: fidl::new_empty!(u64, D),
scan_type: fidl::new_empty!(ScanTypes, D),
channel_list: fidl::new_empty!(fidl::encoding::Vector<u8, 256>, D),
ssid_list: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
D
),
probe_delay: fidl::new_empty!(u32, D),
min_channel_time: fidl::new_empty!(u32, D),
max_channel_time: fidl::new_empty!(u32, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
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 + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(56) };
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 + 56 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(u64, D, &mut self.txn_id, decoder, offset + 0, _depth)?;
fidl::decode!(ScanTypes, D, &mut self.scan_type, decoder, offset + 8, _depth)?;
fidl::decode!(fidl::encoding::Vector<u8, 256>, D, &mut self.channel_list, decoder, offset + 16, _depth)?;
fidl::decode!(
fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
D,
&mut self.ssid_list,
decoder,
offset + 32,
_depth
)?;
fidl::decode!(u32, D, &mut self.probe_delay, decoder, offset + 48, _depth)?;
fidl::decode!(u32, D, &mut self.min_channel_time, decoder, offset + 52, _depth)?;
fidl::decode!(u32, D, &mut self.max_channel_time, decoder, offset + 56, _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(
(
<u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.txn_id),
<i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.timestamp_nanos),
<fidl_fuchsia_wlan_common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.bss),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<u64, 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 {
txn_id: fidl::new_empty!(u64, D),
timestamp_nanos: fidl::new_empty!(i64, D),
bss: 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!(u64, D, &mut self.txn_id, 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,
decoder,
offset + 16,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for SetControlledPortRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for SetControlledPortRequest {
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<SetControlledPortRequest, D> for &SetControlledPortRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<SetControlledPortRequest>(offset);
fidl::encoding::Encode::<SetControlledPortRequest, D>::encode(
(
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(
&self.peer_sta_address,
),
<ControlledPortState as fidl::encoding::ValueTypeMarker>::borrow(&self.state),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
T1: fidl::encoding::Encode<ControlledPortState, D>,
> fidl::encoding::Encode<SetControlledPortRequest, 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::<SetControlledPortRequest>(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 + 8, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for SetControlledPortRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
state: fidl::new_empty!(ControlledPortState, 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!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
fidl::decode!(ControlledPortState, D, &mut self.state, decoder, offset + 8, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for SetKeyDescriptor {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for SetKeyDescriptor {
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<SetKeyDescriptor, D>
for &SetKeyDescriptor
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<SetKeyDescriptor>(offset);
fidl::encoding::Encode::<SetKeyDescriptor, D>::encode(
(
<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.key),
<u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.key_id),
<KeyType as fidl::encoding::ValueTypeMarker>::borrow(&self.key_type),
<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.address),
<u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.rsc),
<fidl::encoding::Array<u8, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.cipher_suite_oui),
<fidl_fuchsia_wlan_ieee80211::CipherSuiteType as fidl::encoding::ValueTypeMarker>::borrow(&self.cipher_suite_type),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
T1: fidl::encoding::Encode<u16, D>,
T2: fidl::encoding::Encode<KeyType, D>,
T3: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
T4: fidl::encoding::Encode<u64, D>,
T5: fidl::encoding::Encode<fidl::encoding::Array<u8, 3>, D>,
T6: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::CipherSuiteType, D>,
> fidl::encoding::Encode<SetKeyDescriptor, D> for (T0, T1, T2, T3, T4, T5, T6)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<SetKeyDescriptor>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
(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 + 16, depth)?;
self.2.encode(encoder, offset + 20, depth)?;
self.3.encode(encoder, offset + 24, depth)?;
self.4.encode(encoder, offset + 32, depth)?;
self.5.encode(encoder, offset + 40, depth)?;
self.6.encode(encoder, offset + 44, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetKeyDescriptor {
#[inline(always)]
fn new_empty() -> Self {
Self {
key: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
key_id: fidl::new_empty!(u16, D),
key_type: fidl::new_empty!(KeyType, D),
address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
rsc: fidl::new_empty!(u64, D),
cipher_suite_oui: fidl::new_empty!(fidl::encoding::Array<u8, 3>, D),
cipher_suite_type: fidl::new_empty!(
fidl_fuchsia_wlan_ieee80211::CipherSuiteType,
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 = 0xffff0000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 16 + ((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 = 0xffff000000000000u64;
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 = 0xff000000u64;
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::UnboundedVector<u8>,
D,
&mut self.key,
decoder,
offset + 0,
_depth
)?;
fidl::decode!(u16, D, &mut self.key_id, decoder, offset + 16, _depth)?;
fidl::decode!(KeyType, D, &mut self.key_type, decoder, offset + 20, _depth)?;
fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.address, decoder, offset + 24, _depth)?;
fidl::decode!(u64, D, &mut self.rsc, decoder, offset + 32, _depth)?;
fidl::decode!(fidl::encoding::Array<u8, 3>, D, &mut self.cipher_suite_oui, decoder, offset + 40, _depth)?;
fidl::decode!(
fidl_fuchsia_wlan_ieee80211::CipherSuiteType,
D,
&mut self.cipher_suite_type,
decoder,
offset + 44,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for SetKeyResult {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for SetKeyResult {
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<SetKeyResult, D>
for &SetKeyResult
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<SetKeyResult>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut SetKeyResult)
.write_unaligned((self as *const SetKeyResult).read());
let padding_ptr = buf_ptr.offset(0) as *mut u32;
let padding_mask = 0xffff0000u32;
padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
}
Ok(())
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<u16, D>,
T1: fidl::encoding::Encode<i32, D>,
> fidl::encoding::Encode<SetKeyResult, 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::<SetKeyResult>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
(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 SetKeyResult {
#[inline(always)]
fn new_empty() -> Self {
Self { key_id: fidl::new_empty!(u16, D), status: fidl::new_empty!(i32, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
let ptr = unsafe { buf_ptr.offset(0) };
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 + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for SetKeysConfirm {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for SetKeysConfirm {
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<SetKeysConfirm, D>
for &SetKeysConfirm
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<SetKeysConfirm>(offset);
fidl::encoding::Encode::<SetKeysConfirm, D>::encode(
(
<fidl::encoding::UnboundedVector<SetKeyResult> as fidl::encoding::ValueTypeMarker>::borrow(&self.results),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<SetKeyResult>, D>,
> fidl::encoding::Encode<SetKeysConfirm, 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::<SetKeysConfirm>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetKeysConfirm {
#[inline(always)]
fn new_empty() -> Self {
Self { results: fidl::new_empty!(fidl::encoding::UnboundedVector<SetKeyResult>, 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<SetKeyResult>,
D,
&mut self.results,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for SetKeysRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for SetKeysRequest {
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<SetKeysRequest, D>
for &SetKeysRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<SetKeysRequest>(offset);
fidl::encoding::Encode::<SetKeysRequest, D>::encode(
(
<fidl::encoding::UnboundedVector<SetKeyDescriptor> as fidl::encoding::ValueTypeMarker>::borrow(&self.keylist),
),
encoder, offset, _depth
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<SetKeyDescriptor>, D>,
> fidl::encoding::Encode<SetKeysRequest, 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::<SetKeysRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetKeysRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { keylist: fidl::new_empty!(fidl::encoding::UnboundedVector<SetKeyDescriptor>, 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<SetKeyDescriptor>,
D,
&mut self.keylist,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for StartCaptureFramesRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for StartCaptureFramesRequest {
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<StartCaptureFramesRequest, D> for &StartCaptureFramesRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<StartCaptureFramesRequest>(offset);
fidl::encoding::Encode::<StartCaptureFramesRequest, D>::encode(
(<MgmtFrameCaptureFlags as fidl::encoding::ValueTypeMarker>::borrow(
&self.mgmt_frame_flags,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<MgmtFrameCaptureFlags, D>,
> fidl::encoding::Encode<StartCaptureFramesRequest, 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::<StartCaptureFramesRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for StartCaptureFramesRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self { mgmt_frame_flags: fidl::new_empty!(MgmtFrameCaptureFlags, 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!(
MgmtFrameCaptureFlags,
D,
&mut self.mgmt_frame_flags,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for StartCaptureFramesResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for StartCaptureFramesResponse {
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<StartCaptureFramesResponse, D> for &StartCaptureFramesResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<StartCaptureFramesResponse>(offset);
fidl::encoding::Encode::<StartCaptureFramesResponse, D>::encode(
(
<i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.status),
<MgmtFrameCaptureFlags as fidl::encoding::ValueTypeMarker>::borrow(
&self.supported_mgmt_frames,
),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<i32, D>,
T1: fidl::encoding::Encode<MgmtFrameCaptureFlags, D>,
> fidl::encoding::Encode<StartCaptureFramesResponse, 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::<StartCaptureFramesResponse>(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 StartCaptureFramesResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self {
status: fidl::new_empty!(i32, D),
supported_mgmt_frames: fidl::new_empty!(MgmtFrameCaptureFlags, 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!(i32, D, &mut self.status, decoder, offset + 0, _depth)?;
fidl::decode!(
MgmtFrameCaptureFlags,
D,
&mut self.supported_mgmt_frames,
decoder,
offset + 4,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for StartConfirm {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for StartConfirm {
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<StartConfirm, D>
for &StartConfirm
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<StartConfirm>(offset);
fidl::encoding::Encode::<StartConfirm, D>::encode(
(<StartResultCode as fidl::encoding::ValueTypeMarker>::borrow(&self.result_code),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StartResultCode, D>>
fidl::encoding::Encode<StartConfirm, 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::<StartConfirm>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StartConfirm {
#[inline(always)]
fn new_empty() -> Self {
Self { result_code: fidl::new_empty!(StartResultCode, 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!(StartResultCode, D, &mut self.result_code, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for StartRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for StartRequest {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
96
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StartRequest, D>
for &StartRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<StartRequest>(offset);
fidl::encoding::Encode::<StartRequest, D>::encode(
(
<fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssid),
<fidl_fuchsia_wlan_common::BssType as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_type),
<u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.beacon_period),
<u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.dtim_period),
<u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.channel),
<u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.capability_info),
<fidl::encoding::Vector<u8, 14> as fidl::encoding::ValueTypeMarker>::borrow(&self.rates),
<Country as fidl::encoding::ValueTypeMarker>::borrow(&self.country),
<fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(&self.mesh_id),
<fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>> as fidl::encoding::ValueTypeMarker>::borrow(&self.rsne),
<fidl_fuchsia_wlan_common::WlanPhyType as fidl::encoding::ValueTypeMarker>::borrow(&self.phy),
<fidl_fuchsia_wlan_common::ChannelBandwidth as fidl::encoding::ValueTypeMarker>::borrow(&self.channel_bandwidth),
),
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::BssType, D>,
T2: fidl::encoding::Encode<u16, D>,
T3: fidl::encoding::Encode<u8, D>,
T4: fidl::encoding::Encode<u8, D>,
T5: fidl::encoding::Encode<u16, D>,
T6: fidl::encoding::Encode<fidl::encoding::Vector<u8, 14>, D>,
T7: fidl::encoding::Encode<Country, D>,
T8: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
T9: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>>, D>,
T10: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanPhyType, D>,
T11: fidl::encoding::Encode<fidl_fuchsia_wlan_common::ChannelBandwidth, D>,
> fidl::encoding::Encode<StartRequest, D>
for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<StartRequest>(offset);
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(48);
(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 + 20, depth)?;
self.3.encode(encoder, offset + 22, depth)?;
self.4.encode(encoder, offset + 23, depth)?;
self.5.encode(encoder, offset + 24, depth)?;
self.6.encode(encoder, offset + 32, depth)?;
self.7.encode(encoder, offset + 48, depth)?;
self.8.encode(encoder, offset + 56, depth)?;
self.9.encode(encoder, offset + 72, depth)?;
self.10.encode(encoder, offset + 88, depth)?;
self.11.encode(encoder, offset + 92, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StartRequest {
#[inline(always)]
fn new_empty() -> Self {
Self {
ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
bss_type: fidl::new_empty!(fidl_fuchsia_wlan_common::BssType, D),
beacon_period: fidl::new_empty!(u16, D),
dtim_period: fidl::new_empty!(u8, D),
channel: fidl::new_empty!(u8, D),
capability_info: fidl::new_empty!(u16, D),
rates: fidl::new_empty!(fidl::encoding::Vector<u8, 14>, D),
country: fidl::new_empty!(Country, D),
mesh_id: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
rsne: fidl::new_empty!(
fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>>,
D
),
phy: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanPhyType, D),
channel_bandwidth: fidl::new_empty!(fidl_fuchsia_wlan_common::ChannelBandwidth, 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(24) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffffffff0000u64;
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(48) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffffff000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 48 + ((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::BssType,
D,
&mut self.bss_type,
decoder,
offset + 16,
_depth
)?;
fidl::decode!(u16, D, &mut self.beacon_period, decoder, offset + 20, _depth)?;
fidl::decode!(u8, D, &mut self.dtim_period, decoder, offset + 22, _depth)?;
fidl::decode!(u8, D, &mut self.channel, decoder, offset + 23, _depth)?;
fidl::decode!(u16, D, &mut self.capability_info, decoder, offset + 24, _depth)?;
fidl::decode!(fidl::encoding::Vector<u8, 14>, D, &mut self.rates, decoder, offset + 32, _depth)?;
fidl::decode!(Country, D, &mut self.country, decoder, offset + 48, _depth)?;
fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.mesh_id, decoder, offset + 56, _depth)?;
fidl::decode!(
fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>>,
D,
&mut self.rsne,
decoder,
offset + 72,
_depth
)?;
fidl::decode!(
fidl_fuchsia_wlan_common::WlanPhyType,
D,
&mut self.phy,
decoder,
offset + 88,
_depth
)?;
fidl::decode!(
fidl_fuchsia_wlan_common::ChannelBandwidth,
D,
&mut self.channel_bandwidth,
decoder,
offset + 92,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for StopConfirm {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for StopConfirm {
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<StopConfirm, D>
for &StopConfirm
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<StopConfirm>(offset);
fidl::encoding::Encode::<StopConfirm, D>::encode(
(<StopResultCode as fidl::encoding::ValueTypeMarker>::borrow(&self.result_code),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StopResultCode, D>>
fidl::encoding::Encode<StopConfirm, 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::<StopConfirm>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StopConfirm {
#[inline(always)]
fn new_empty() -> Self {
Self { result_code: fidl::new_empty!(StopResultCode, 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!(StopResultCode, D, &mut self.result_code, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for StopRequest {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for StopRequest {
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<StopRequest, D>
for &StopRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<StopRequest>(offset);
fidl::encoding::Encode::<StopRequest, D>::encode(
(<fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
&self.ssid,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
> fidl::encoding::Encode<StopRequest, 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::<StopRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StopRequest {
#[inline(always)]
fn new_empty() -> Self {
Self { ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, 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)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for WmmParameter {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for WmmParameter {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
18
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<WmmParameter, D>
for &WmmParameter
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<WmmParameter>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut WmmParameter)
.write_unaligned((self as *const WmmParameter).read());
}
Ok(())
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 18>, D>,
> fidl::encoding::Encode<WmmParameter, 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::<WmmParameter>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WmmParameter {
#[inline(always)]
fn new_empty() -> Self {
Self { bytes: fidl::new_empty!(fidl::encoding::Array<u8, 18>, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 18);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for GetIfaceCounterStatsResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for GetIfaceCounterStatsResponse {
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<GetIfaceCounterStatsResponse, D> for &GetIfaceCounterStatsResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<GetIfaceCounterStatsResponse>(offset);
encoder.write_num::<u64>(self.ordinal(), offset);
match self {
GetIfaceCounterStatsResponse::Stats(ref val) => {
fidl::encoding::encode_in_envelope::<fidl_fuchsia_wlan_stats::IfaceCounterStats, D>(
<fidl_fuchsia_wlan_stats::IfaceCounterStats as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
GetIfaceCounterStatsResponse::ErrorStatus(ref val) => {
fidl::encoding::encode_in_envelope::<i32, D>(
<i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
}
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for GetIfaceCounterStatsResponse
{
#[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,
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 => <fidl_fuchsia_wlan_stats::IfaceCounterStats as fidl::encoding::TypeMarker>::inline_size(decoder.context),
2 => <i32 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 GetIfaceCounterStatsResponse::Stats(_) = self {
} else {
*self = GetIfaceCounterStatsResponse::Stats(fidl::new_empty!(
fidl_fuchsia_wlan_stats::IfaceCounterStats,
D
));
}
#[allow(irrefutable_let_patterns)]
if let GetIfaceCounterStatsResponse::Stats(ref mut val) = self {
fidl::decode!(
fidl_fuchsia_wlan_stats::IfaceCounterStats,
D,
val,
decoder,
_inner_offset,
depth
)?;
} else {
unreachable!()
}
}
2 => {
#[allow(irrefutable_let_patterns)]
if let GetIfaceCounterStatsResponse::ErrorStatus(_) = self {
} else {
*self = GetIfaceCounterStatsResponse::ErrorStatus(fidl::new_empty!(i32, D));
}
#[allow(irrefutable_let_patterns)]
if let GetIfaceCounterStatsResponse::ErrorStatus(ref mut val) = self {
fidl::decode!(i32, 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 GetIfaceHistogramStatsResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for GetIfaceHistogramStatsResponse {
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<GetIfaceHistogramStatsResponse, D>
for &GetIfaceHistogramStatsResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<GetIfaceHistogramStatsResponse>(offset);
encoder.write_num::<u64>(self.ordinal(), offset);
match self {
GetIfaceHistogramStatsResponse::Stats(ref val) => {
fidl::encoding::encode_in_envelope::<fidl_fuchsia_wlan_stats::IfaceHistogramStats, D>(
<fidl_fuchsia_wlan_stats::IfaceHistogramStats as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
GetIfaceHistogramStatsResponse::ErrorStatus(ref val) => {
fidl::encoding::encode_in_envelope::<i32, D>(
<i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder, offset + 8, _depth
)
}
}
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for GetIfaceHistogramStatsResponse
{
#[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,
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 => <fidl_fuchsia_wlan_stats::IfaceHistogramStats as fidl::encoding::TypeMarker>::inline_size(decoder.context),
2 => <i32 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 GetIfaceHistogramStatsResponse::Stats(_) = self {
} else {
*self = GetIfaceHistogramStatsResponse::Stats(fidl::new_empty!(
fidl_fuchsia_wlan_stats::IfaceHistogramStats,
D
));
}
#[allow(irrefutable_let_patterns)]
if let GetIfaceHistogramStatsResponse::Stats(ref mut val) = self {
fidl::decode!(
fidl_fuchsia_wlan_stats::IfaceHistogramStats,
D,
val,
decoder,
_inner_offset,
depth
)?;
} else {
unreachable!()
}
}
2 => {
#[allow(irrefutable_let_patterns)]
if let GetIfaceHistogramStatsResponse::ErrorStatus(_) = self {
} else {
*self =
GetIfaceHistogramStatsResponse::ErrorStatus(fidl::new_empty!(i32, D));
}
#[allow(irrefutable_let_patterns)]
if let GetIfaceHistogramStatsResponse::ErrorStatus(ref mut val) = self {
fidl::decode!(i32, 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(())
}
}
}