pub struct KoboWifiManager {
config: WifiModuleConfig,
lock: Mutex<()>,
}Fields§
§config: WifiModuleConfig§lock: Mutex<()>Implementations§
Source§impl KoboWifiManager
impl KoboWifiManager
pub fn new(config: WifiModuleConfig) -> Self
fn run_script(&self, script: &str)
fn insmod(&self, path: &str) -> Result<(), WifiError>
Sourcefn insmod_asneeded(
&self,
path: &str,
module_name: &str,
) -> Result<(), WifiError>
fn insmod_asneeded( &self, path: &str, module_name: &str, ) -> Result<(), WifiError>
Loads a kernel module if it is not already loaded.
This function is idempotent: if the module is already loaded, this returns Ok(())
without attempting to reload it.
Sourcefn insmod_asneeded_with_params(
&self,
path: &str,
module_name: &str,
params: &[&str],
) -> Result<(), WifiError>
fn insmod_asneeded_with_params( &self, path: &str, module_name: &str, params: &[&str], ) -> Result<(), WifiError>
Loads a kernel module with parameters if it is not already loaded.
This function is idempotent: if the module is already loaded, this returns Ok(())
without attempting to reload it.
fn rmmod(&self, module_name: &str) -> Result<(), WifiError>
fn power_up_ntx_io(&self) -> Result<(), WifiError>
fn power_down_ntx_io(&self) -> Result<(), WifiError>
fn ioctl_wifi_ctrl(&self, fd: RawFd, enable: u8) -> Result<(), WifiError>
fn power_up_wmt(&self) -> Result<(), WifiError>
fn power_down_wmt(&self) -> Result<(), WifiError>
fn power_up_module(&self) -> Result<(), WifiError>
fn power_down_module(&self) -> Result<(), WifiError>
fn read_country_code(&self) -> Option<String>
fn build_module_params(&self) -> Vec<String>
fn load_wifi_module(&self) -> Result<(), WifiError>
fn wait_for_interface(&self) -> Result<(), WifiError>
fn start_wpa_supplicant(&self) -> Result<(), WifiError>
fn is_wpa_supplicant_running(&self) -> bool
fn stop_wpa_supplicant(&self) -> Result<(), WifiError>
fn ifconfig_up(&self) -> Result<(), WifiError>
fn ifconfig_down(&self) -> Result<(), WifiError>
fn wlarm_le_up(&self) -> Result<(), WifiError>
fn wlarm_le_down(&self) -> Result<(), WifiError>
fn power_up(&self) -> Result<(), WifiError>
fn power_down(&self) -> Result<(), WifiError>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for KoboWifiManager
impl RefUnwindSafe for KoboWifiManager
impl Send for KoboWifiManager
impl Sync for KoboWifiManager
impl Unpin for KoboWifiManager
impl UnwindSafe for KoboWifiManager
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more