pub struct Connection { /* private fields */ }
Implementations§
Source§impl Connection
impl Connection
pub fn settings(&self) -> &ConnectionSettings
pub fn get_state(&self) -> Result<ConnectionState>
pub fn delete(&self) -> Result<()>
Sourcepub fn activate(&self) -> Result<ConnectionState>
pub fn activate(&self) -> Result<ConnectionState>
Activate a Network Manager connection.
§Examples
use network_manager::NetworkManager;
let manager = NetworkManager::new();
let connections = manager.get_connections().unwrap();
connections[0].activate().unwrap();
Sourcepub fn deactivate(&self) -> Result<ConnectionState>
pub fn deactivate(&self) -> Result<ConnectionState>
Deactivates a Network Manager connection.
§Examples
use network_manager::NetworkManager;
let manager = NetworkManager::new();
let connections = manager.get_connections().unwrap();
connections[0].deactivate().unwrap();
pub fn get_devices(&self) -> Result<Vec<Device>>
Trait Implementations§
Source§impl Clone for Connection
impl Clone for Connection
Source§fn clone(&self) -> Connection
fn clone(&self) -> Connection
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Connection
impl Debug for Connection
Source§impl<'a> From<&'a Connection> for i32
impl<'a> From<&'a Connection> for i32
Source§fn from(val: &Connection) -> i32
fn from(val: &Connection) -> i32
Converts to this type from the input type.
Source§impl Ord for Connection
impl Ord for Connection
Source§impl PartialEq for Connection
impl PartialEq for Connection
Source§impl PartialOrd for Connection
impl PartialOrd for Connection
impl Eq for Connection
Auto Trait Implementations§
impl Freeze for Connection
impl !RefUnwindSafe for Connection
impl !Send for Connection
impl !Sync for Connection
impl Unpin for Connection
impl !UnwindSafe for Connection
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