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<'_>
impl Interface<'_>
sourcepub fn Scan(&self, args: InterfaceScan) -> Result<()>
pub fn Scan(&self, args: InterfaceScan) -> Result<()>
Triggers a scan.
§Errors
fi.w1.wpa_supplicant1.InvalidArgs
Invalid entries were found in the passed argument.
sourcepub fn Disconnect(&self) -> Result<()>
pub fn Disconnect(&self) -> Result<()>
Disassociates the interface from current network.
§Errors
fi.w1.wpa_supplicant1.NotConnected
Interface is not connected to any network.
sourcepub fn AddNetwork(
&self,
args: HashMap<String, Variant<Box<dyn RefArg + 'static>>>,
) -> Result<Network<'_>>
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 inwpa_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<'_>
impl Append for Interface<'_>
source§fn append_by_ref(&self, __i: &mut IterAppend<'_>)
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,
fn append(self, ia: &mut IterAppend<'_>)where
Self: Sized,
Performs the append operation by consuming self.
source§impl<'a> DbusObject<'a> for Interface<'a>
impl<'a> DbusObject<'a> for Interface<'a>
fn new( connection: impl Into<MaybeOwned<'a, Connection>>, destination: impl Into<BusName<'a>>, path: impl Into<Path<'a>>, timeout: Duration, ) -> Self
fn connection(this: &Self) -> &Connection
fn destination(this: &Self) -> &BusName<'a>
fn path(this: &Self) -> &Path<'a>
fn timeout(this: &Self) -> Duration
fn sub_object<T>(this: &'a Self, path: impl Into<Path<'a>>) -> Twhere
T: DbusObject<'a>,
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 Properties for Interface<'_>
impl Properties for Interface<'_>
fn get<R0: for<'b> Get<'b> + 'static>( &self, interface_name: &str, property_name: &str, ) -> Result<R0, Error>
fn get_all(&self, interface_name: &str) -> Result<PropMap, Error>
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> 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