Skip to main content

Wifi

Trait Wifi 

Source
pub trait Wifi {
    type Error: Debug;

    // Required methods
    async fn get_capabilities(&self) -> Result<EnumSet<Capability>, Self::Error>;
    async fn get_configuration(&self) -> Result<Configuration, Self::Error>;
    async fn set_configuration(
        &mut self,
        conf: &Configuration,
    ) -> Result<(), Self::Error>;
    async fn start(&mut self) -> Result<(), Self::Error>;
    async fn stop(&mut self) -> Result<(), Self::Error>;
    async fn connect(&mut self) -> Result<(), Self::Error>;
    async fn disconnect(&mut self) -> Result<(), Self::Error>;
    async fn is_started(&self) -> Result<bool, Self::Error>;
    async fn is_connected(&self) -> Result<bool, Self::Error>;
    async fn scan_n<const N: usize>(
        &mut self,
    ) -> Result<(Vec<AccessPointInfo, N>, usize), Self::Error>;
    async fn scan(&mut self) -> Result<Vec<AccessPointInfo>, Self::Error>;
}

Required Associated Types§

Source

type Error: Debug

Required Methods§

Source

async fn get_capabilities(&self) -> Result<EnumSet<Capability>, Self::Error>

Source

async fn get_configuration(&self) -> Result<Configuration, Self::Error>

Source

async fn set_configuration( &mut self, conf: &Configuration, ) -> Result<(), Self::Error>

Source

async fn start(&mut self) -> Result<(), Self::Error>

Source

async fn stop(&mut self) -> Result<(), Self::Error>

Source

async fn connect(&mut self) -> Result<(), Self::Error>

Source

async fn disconnect(&mut self) -> Result<(), Self::Error>

Source

async fn is_started(&self) -> Result<bool, Self::Error>

Source

async fn is_connected(&self) -> Result<bool, Self::Error>

Source

async fn scan_n<const N: usize>( &mut self, ) -> Result<(Vec<AccessPointInfo, N>, usize), Self::Error>

Source

async fn scan(&mut self) -> Result<Vec<AccessPointInfo>, Self::Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<W> Wifi for &mut W
where W: Wifi,

Source§

type Error = <W as Wifi>::Error

Source§

async fn get_capabilities(&self) -> Result<EnumSet<Capability>, Self::Error>

Source§

async fn get_configuration(&self) -> Result<Configuration, Self::Error>

Source§

async fn set_configuration( &mut self, conf: &Configuration, ) -> Result<(), Self::Error>

Source§

async fn start(&mut self) -> Result<(), Self::Error>

Source§

async fn stop(&mut self) -> Result<(), Self::Error>

Source§

async fn connect(&mut self) -> Result<(), Self::Error>

Source§

async fn disconnect(&mut self) -> Result<(), Self::Error>

Source§

async fn is_started(&self) -> Result<bool, Self::Error>

Source§

async fn is_connected(&self) -> Result<bool, Self::Error>

Source§

async fn scan_n<const N: usize>( &mut self, ) -> Result<(Vec<AccessPointInfo, N>, usize), Self::Error>

Source§

async fn scan(&mut self) -> Result<Vec<AccessPointInfo>, Self::Error>

Implementors§