Client

Trait Client 

Source
pub trait Client {
    // Required methods
    fn command_done(&self, rval: Result<(), ErrorCode>);
    fn scanned_network(&self, ssid: Ssid);
    fn scan_done(&self);
}
Expand description

Client trait

Required Methods§

Source

fn command_done(&self, rval: Result<(), ErrorCode>)

Command is complete. This is an universal callback method for all the Device methods except set_client and mac which are expected to be synchronous.

§Arguments
  • rval: Status of the command. Ok(()) means that it has been completed successfully. If the command has failed, it will provide an ErrorCode to signal the motive.

TODO: This maybe should be split between commands. I haven’t figured it out yet on the CYW4343x but we might be able to retrieve from the event status code why the join failed, for example.

Source

fn scanned_network(&self, ssid: Ssid)

Scanned a network

§Arguments
  • ssid: The SSID of the scanned network

TODO: Also add rssi

Source

fn scan_done(&self)

The device finished scanning on its own

Implementors§

Source§

impl<'a, D: Device<'a>> Client for WifiDriver<'a, D>