Enum nut_client::Variable[][src]

pub enum Variable {
    DeviceModel(String),
    DeviceManufacturer(String),
    DeviceSerial(String),
    DeviceType(DeviceType),
    DeviceDescription(String),
    DeviceContact(String),
    DeviceLocation(String),
    DevicePart(String),
    DeviceMacAddress(String),
    DeviceUptime(Duration),
    Other((String, String)),
}
Expand description

Well-known variables for NUT UPS devices.

List retrieved from: https://networkupstools.org/docs/user-manual.chunked/apcs01.html

Variants

DeviceModel

Device model.

Tuple Fields of DeviceModel

0: String
DeviceManufacturer

Device manufacturer.

Tuple Fields of DeviceManufacturer

0: String
DeviceSerial

Device serial number.

Tuple Fields of DeviceSerial

0: String
DeviceType

Device type.

Tuple Fields of DeviceType

0: DeviceType
DeviceDescription

Device description.

Tuple Fields of DeviceDescription

0: String
DeviceContact

Device administrator name.

Tuple Fields of DeviceContact

0: String
DeviceLocation

Device physical location.

Tuple Fields of DeviceLocation

0: String
DevicePart

Device part number.

Tuple Fields of DevicePart

0: String
DeviceMacAddress

Device MAC address.

Tuple Fields of DeviceMacAddress

0: String
DeviceUptime

Device uptime.

Tuple Fields of DeviceUptime

0: Duration
Other

Any other variable. Value is a tuple of (key, value).

Tuple Fields of Other

0: (String, String)

Implementations

Parses a variable from its key and value.

Returns the NUT name of the variable.

Returns the value of the NUT variable.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.