Struct wpa_ctrl::WpaController
source · [−]pub struct WpaController { /* private fields */ }
Expand description
WPA controller
Implementations
sourceimpl WpaController
impl WpaController
sourcepub fn open<P: AsRef<Path>>(path: P) -> Result<Self, Error>
pub fn open<P: AsRef<Path>>(path: P) -> Result<Self, Error>
Attempts to connect to WPA controller at specified path
sourcepub fn open_path(path: &Path) -> Result<Self, Error>
pub fn open_path(path: &Path) -> Result<Self, Error>
Attempts to connect to WPA controller at specified path
sourcepub fn request(&mut self, req: WpaControlReq) -> Result<usize, Error>
pub fn request(&mut self, req: WpaControlReq) -> Result<usize, Error>
Sends request, returning number of bytes written.
sourcepub fn recv(&mut self) -> Result<Option<WpaControlMessage<'_>>, Error>
pub fn recv(&mut self) -> Result<Option<WpaControlMessage<'_>>, Error>
Attempts to receive message.
sourcepub fn recv_req_result(&mut self) -> Option<Result<Result<(), ()>, Error>>
pub fn recv_req_result(&mut self) -> Option<Result<Result<(), ()>, Error>>
Attempts to receive reply for result of command.
This method will continuously recv
skipping unsolicited
messages
Result
-
Returns
None
if neither success or fail are present among replies. -
Ok(())
indicates success. -
Err(())
indicates failure.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for WpaController
impl Send for WpaController
impl Sync for WpaController
impl Unpin for WpaController
impl UnwindSafe for WpaController
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more