pub struct FakeDevice { /* private fields */ }
Expand description
Wrapper struct that can share mutable access to the internal FakeDeviceState.
Implementations§
Source§impl FakeDevice
impl FakeDevice
pub async fn new() -> (FakeDevice, Arc<Mutex<FakeDeviceState>>)
pub async fn new_with_config( config: FakeDeviceConfig, ) -> (FakeDevice, Arc<Mutex<FakeDeviceState>>)
pub fn state(&self) -> Arc<Mutex<FakeDeviceState>>
Trait Implementations§
Source§impl Clone for FakeDevice
impl Clone for FakeDevice
Source§fn clone(&self) -> FakeDevice
fn clone(&self) -> FakeDevice
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl DeviceOps for FakeDevice
impl DeviceOps for FakeDevice
async fn wlan_softmac_query_response( &mut self, ) -> Result<WlanSoftmacQueryResponse, Status>
async fn discovery_support(&mut self) -> Result<DiscoverySupport, Status>
async fn mac_sublayer_support(&mut self) -> Result<MacSublayerSupport, Status>
async fn security_support(&mut self) -> Result<SecuritySupport, Status>
async fn spectrum_management_support( &mut self, ) -> Result<SpectrumManagementSupport, Status>
async fn start( &mut self, ifc_bridge: ClientEnd<WlanSoftmacIfcBridgeMarker>, _ethernet_tx: EthernetTx, _wlan_rx: WlanRx, ) -> Result<Channel, Status>
fn deliver_eth_frame(&mut self, packet: &[u8]) -> Result<(), Status>
Source§fn send_wlan_frame(
&mut self,
buffer: ArenaStaticBox<[u8]>,
_tx_flags: WlanTxInfoFlags,
_async_id: Option<TraceId>,
) -> Result<(), Status>
fn send_wlan_frame( &mut self, buffer: ArenaStaticBox<[u8]>, _tx_flags: WlanTxInfoFlags, _async_id: Option<TraceId>, ) -> Result<(), Status>
Sends the slice corresponding to |buffer| as a frame over the air. If the
caller does not pass an |async_id| to this function, then this function will
generate its own |async_id| and end the trace if an error occurs.
async fn set_ethernet_status( &mut self, status: LinkStatus, ) -> Result<(), Status>
async fn set_channel(&mut self, wlan_channel: WlanChannel) -> Result<(), Status>
async fn start_passive_scan( &mut self, request: &WlanSoftmacBaseStartPassiveScanRequest, ) -> Result<WlanSoftmacBaseStartPassiveScanResponse, Status>
async fn start_active_scan( &mut self, request: &WlanSoftmacStartActiveScanRequest, ) -> Result<WlanSoftmacBaseStartActiveScanResponse, Status>
async fn cancel_scan( &mut self, _request: &WlanSoftmacBaseCancelScanRequest, ) -> Result<(), Status>
async fn join_bss(&mut self, request: &JoinBssRequest) -> Result<(), Status>
async fn enable_beaconing( &mut self, request: WlanSoftmacBaseEnableBeaconingRequest, ) -> Result<(), Status>
async fn disable_beaconing(&mut self) -> Result<(), Status>
async fn install_key( &mut self, key_configuration: &WlanKeyConfiguration, ) -> Result<(), Status>
async fn notify_association_complete( &mut self, cfg: WlanAssociationConfig, ) -> Result<(), Status>
async fn clear_association( &mut self, request: &WlanSoftmacBaseClearAssociationRequest, ) -> Result<(), Status>
async fn update_wmm_parameters( &mut self, request: &WlanSoftmacBaseUpdateWmmParametersRequest, ) -> Result<(), Status>
fn take_mlme_event_stream(&mut self) -> Option<UnboundedReceiver<MlmeEvent>>
fn send_mlme_event(&mut self, event: MlmeEvent) -> Result<(), Error>
fn set_minstrel( &mut self, minstrel: Arc<Mutex<MinstrelRateSelector<MinstrelTimer>>>, )
fn minstrel( &mut self, ) -> Option<Arc<Mutex<MinstrelRateSelector<MinstrelTimer>>>>
fn set_ethernet_up(&mut self) -> impl Future<Output = Result<(), Status>>
fn set_ethernet_down(&mut self) -> impl Future<Output = Result<(), Status>>
fn tx_vector_idx( &mut self, frame_control: &FrameControl, peer_addr: &MacAddr, flags: WlanTxInfoFlags, ) -> TxVecIdx
Auto Trait Implementations§
impl Freeze for FakeDevice
impl !RefUnwindSafe for FakeDevice
impl Send for FakeDevice
impl Sync for FakeDevice
impl Unpin for FakeDevice
impl !UnwindSafe for FakeDevice
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)