struct DeviceNode {
visible: bool,
_name: String,
idcode: u32,
device_type: DeviceTypes,
}
Expand description
Represents a single device in a device chain. Part of the “Facade” pattern example.
Fields§
§visible: bool
Whether the device is visible in the device chain.
_name: String
Name of this device.
idcode: u32
The idcode for this device.
device_type: DeviceTypes
A value from the DeviceTypes enumeration identifying the type of the device.
Implementations§
source§impl DeviceNode
impl DeviceNode
sourcefn new(
name: &str,
idcode: u32,
tap_type: DeviceTypes,
initially_visible: bool
) -> DeviceNode
fn new( name: &str, idcode: u32, tap_type: DeviceTypes, initially_visible: bool ) -> DeviceNode
Constructor.
Parameters
-
name
Name to use.
-
idcode
idcode for the device.
-
tap_type
Value from the DeviceTypes enumeration.
-
initially_visible
true if initially visible; otherwise false.
Returns
Returns a new DeviceNode instance.