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 duplicate of the value. Read more
1.0.0 (const: unstable) · 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
impl Eq 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
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Connection
impl PartialEq for Connection
Source§fn eq(&self, other: &Connection) -> bool
fn eq(&self, other: &Connection) -> bool
Tests for
self and other values to be equal, and is used by ==.Auto Trait Implementations§
impl !RefUnwindSafe for Connection
impl !Send for Connection
impl !Sync for Connection
impl !UnwindSafe for Connection
impl Freeze for Connection
impl Unpin for Connection
impl UnsafeUnpin 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