Struct wpa::Interface

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

Interface implemented by objects related to network interface added to wpa_supplicant, i.e., returned WpaSupplicant::CreateInterface.

Implementations§

source§

impl Interface<'_>

source

pub fn Scan(&self, args: InterfaceScan) -> Result<()>

Triggers a scan.

§Errors
  • fi.w1.wpa_supplicant1.InvalidArgs Invalid entries were found in the passed argument.
source

pub fn Disconnect(&self) -> Result<()>

Disassociates the interface from current network.

§Errors
  • fi.w1.wpa_supplicant1.NotConnected Interface is not connected to any network.
source

pub fn AddNetwork( &self, args: HashMap<String, Variant<Box<dyn RefArg + 'static>>>, ) -> Result<Network<'_>>

Adds a new network to the interface.

§Arguments
  • args A dictionary with network configuration. Dictionary entries are equivalent to entries in the “network” block in wpa_supplicant configuration file. Entry values should be appropriate type to the entry, e.g., an entry with key “frequency” should have value type int.
§Errors
  • fi.w1.wpa_supplicant1.InvalidArgs Invalid entries were found in the passed argument.
  • fi.w1.wpa_supplicant1.UnknownError Adding network failed for an unknown reason.

Trait Implementations§

source§

impl Append for Interface<'_>

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 Interface<'_>

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<'a> DbusObject<'a> for Interface<'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 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 Interface<'_>

source§

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

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

impl Properties for Interface<'_>

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>

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

impl<'a> Unpin for Interface<'a>

§

impl<'a> !UnwindSafe for Interface<'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.