[][src]Enum nut_client::blocking::Connection

pub enum Connection {
    Tcp(TcpConnection),
}

A blocking NUT client connection.

Variants

A TCP connection.

Implementations

impl Connection[src]

pub fn new(config: Config) -> Result<Self>[src]

Initializes a connection to a NUT server (upsd).

pub fn list_ups(&mut self) -> Result<Vec<(String, String)>>[src]

Queries a list of UPS devices.

pub fn list_vars(&mut self, ups_name: &str) -> Result<Vec<(String, String)>>[src]

Queries the list of variables for a UPS device.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.