pub struct Control<'a> { /* private fields */ }
Expand description
Handle for managing the network and WiFI state.
Implementations§
Source§impl<'a> Control<'a>
impl<'a> Control<'a>
Sourcepub async fn get_status(&mut self) -> Result<Status, Error>
pub async fn get_status(&mut self) -> Result<Status, Error>
Get the current status.
Sourcepub async fn connect(&mut self, ssid: &str, password: &str) -> Result<(), Error>
pub async fn connect(&mut self, ssid: &str, password: &str) -> Result<(), Error>
Connect to the network identified by ssid using the provided password.
Sourcepub async fn disconnect(&mut self) -> Result<(), Error>
pub async fn disconnect(&mut self) -> Result<(), Error>
Disconnect from any currently connected network.
Auto Trait Implementations§
impl<'a> Freeze for Control<'a>
impl<'a> !RefUnwindSafe for Control<'a>
impl<'a> !Send for Control<'a>
impl<'a> !Sync for Control<'a>
impl<'a> Unpin for Control<'a>
impl<'a> !UnwindSafe for Control<'a>
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