Struct wpa::WpaSupplicant

source ·
pub struct WpaSupplicant<'a> { /* private fields */ }
Expand description

Interface implemented by the main wpa_supplicant D-Bus object registered in the bus with fi.w1.wpa_supplicant1 name.

Implementations§

source§

impl WpaSupplicant<'_>

source

pub fn CreateInterface(&self, args: CreateInterface) -> Result<Interface<'_>>

Registers a wireless interface in wpa_supplicant.

§Errors
  • fi.w1.wpa_supplicant1.InterfaceExists wpa_supplicant already controls this interface.
  • fi.w1.wpa_supplicant1.UnknownError Creating interface failed for an unknown reason.
  • fi.w1.wpa_supplicant1.InvalidArgs Invalid entries were found in the passed argument.
source

pub fn RemoveInterface(&self, o: Interface<'_>) -> Result<()>

Deregisters a wireless interface from wpa_supplicant.

§Arguments
  • o A D-Bus path to an object representing an interface to remove returned by CreateInterface.
§Errors
  • fi.w1.wpa_supplicant1.InterfaceUnknown Object pointed by the path doesn’t exist or doesn’t represent an interface.
  • fi.w1.wpa_supplicant1.UnknownError Removing interface failed for an unknown reason.
source

pub fn GetInterface(&self, ifname: String) -> Result<Interface<'_>>

Returns a D-Bus path to an object related to an interface which wpa_supplicant already controls.

§Arguments
  • ifname Name of the network interface, e.g., wlan0
§Errors
  • fi.w1.wpa_supplicant1.InterfaceUnknown An interface with the passed name in not controlled by wpa_supplicant.
  • fi.w1.wpa_supplicant1.UnknownError Getting an interface object path failed for an unknown reason.
source

pub fn set_DebugLevel(&self, value: DebugLevel) -> Result<()>

Global wpa_supplicant debugging level.

source

pub fn get_DebugLevel(&self) -> Result<DebugLevel>

Global wpa_supplicant debugging level.

source

pub fn set_DebugTimestamp(&self, value: bool) -> Result<()>

Global wpa_supplicant debugging parameter. Determines if timestamps are shown in debug logs.

source

pub fn get_DebugTimestamp(&self) -> Result<bool>

Global wpa_supplicant debugging parameter. Determines if timestamps are shown in debug logs.

source

pub fn set_DebugShowKeys(&self, value: bool) -> Result<()>

Global wpa_supplicant debugging parameter. Determines if secrets are shown in debug logs.

source

pub fn get_DebugShowKeys(&self) -> Result<bool>

Global wpa_supplicant debugging parameter. Determines if secrets are shown in debug logs.

source

pub fn get_Interfaces(&self) -> Result<Vec<Interface<'_>>>

An array with paths to D-Bus objects representing controlled interfaces each.

source

pub fn get_EapMethods(&self) -> Result<Vec<String>>

An array with supported EAP methods names.

source

pub fn get_Capabilities(&self) -> Result<Vec<String>>

An array with supported capabilities (e.g., “ap”, “ibss-rsn”, “p2p”, “interworking”).

source

pub fn set_WFDIEs(&self, value: Vec<u8>) -> Result<()>

Wi-Fi Display subelements.

source

pub fn get_WFDIEs(&self) -> Result<Vec<u8>>

Wi-Fi Display subelements.

Trait Implementations§

source§

impl Append for WpaSupplicant<'_>

source§

fn append_by_ref(&self, __i: &mut IterAppend<'_>)

Performs the append operation by borrowing self.
source§

fn append(self, ia: &mut IterAppend<'_>)
where Self: Sized,

Performs the append operation by consuming self.
source§

impl Arg for WpaSupplicant<'_>

source§

const ARG_TYPE: ArgType = <::dbus_client::__private::dbus::strings::Path as ::dbus_client::__private::dbus::arg::Arg>::ARG_TYPE

The corresponding D-Bus argument type code.
source§

fn signature() -> Signature<'static>

The corresponding D-Bus type signature for this type.
source§

impl CommonDestination for WpaSupplicant<'_>

source§

const DESTINATION: &'static str = "fi.w1.wpa_supplicant1"

source§

impl CommonPath for WpaSupplicant<'_>

source§

const PATH: &'static str = "/fi/w1/wpa_supplicant1"

source§

impl<'a> DbusObject<'a> for WpaSupplicant<'a>

source§

fn new( connection: impl Into<MaybeOwned<'a, Connection>>, destination: impl Into<BusName<'a>>, path: impl Into<Path<'a>>, timeout: Duration, ) -> Self

source§

fn connection(this: &Self) -> &Connection

source§

fn destination(this: &Self) -> &BusName<'a>

source§

fn path(this: &Self) -> &Path<'a>

source§

fn timeout(this: &Self) -> Duration

source§

fn connect( conn: impl Into<MaybeOwned<'a, Connection>>, timeout: Duration, ) -> Self

source§

fn with_destination( conn: impl Into<MaybeOwned<'a, Connection>>, destination: impl Into<BusName<'a>>, timeout: Duration, ) -> Self
where Self: CommonPath,

source§

fn with_path( conn: impl Into<MaybeOwned<'a, Connection>>, path: impl Into<Path<'a>>, timeout: Duration, ) -> Self
where Self: CommonDestination,

source§

fn system(timeout: Duration) -> Result<Self, Error>
where 'a: 'static, Self: CommonDestination + CommonPath + CommonlySystem,

source§

fn sub_object<T>(this: &'a Self, path: impl Into<Path<'a>>) -> T
where T: DbusObject<'a>,

source§

fn method_call<'b, R>( &'a self, interface: impl Into<Interface<'b>>, member: impl Into<Member<'b>>, args: impl AppendAll, ) -> Result<R, Error>
where R: ReadAll,

source§

impl Debug for WpaSupplicant<'_>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Properties for WpaSupplicant<'_>

source§

fn get<R0: for<'b> Get<'b> + 'static>( &self, interface_name: &str, property_name: &str, ) -> Result<R0, Error>

source§

fn get_all(&self, interface_name: &str) -> Result<PropMap, Error>

source§

fn set<I2: Arg + Append>( &self, interface_name: &str, property_name: &str, value: I2, ) -> Result<(), Error>

source§

impl CommonlySystem for WpaSupplicant<'_>

Auto Trait Implementations§

§

impl<'a> !Freeze for WpaSupplicant<'a>

§

impl<'a> !RefUnwindSafe for WpaSupplicant<'a>

§

impl<'a> !Send for WpaSupplicant<'a>

§

impl<'a> !Sync for WpaSupplicant<'a>

§

impl<'a> Unpin for WpaSupplicant<'a>

§

impl<'a> !UnwindSafe for WpaSupplicant<'a>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.