Struct mio_udev::Context[][src]

pub struct Context { /* fields omitted */ }

A libudev context.


impl Context

Creates a new context.

Creates a device for a given syspath.

The syspath parameter should be a path to the device file within the sysfs file system, e.g., /sys/devices/virtual/tty/tty0.

Creates a device for a given device type and number.

Creates a device from a given subsystem and sysname.

Creates a device from a given device id.

The device id should be in one of these formats:

  • b8:2 - block device major:minor
  • c128:1 - char device major:minor
  • n3 - network device ifindex
  • +sound:card29 - kernel driver core subsystem:device name

Creates a device from the current environment (see environ(7)).

Each key-value pair is interpreted in the same way as if it was received in an uevent (see udev_monitor_receive_device(3)). The keys DEVPATH, SUBSYSTEM, ACTION, and SEQNUM are mandatory.

Trait Implementations

impl FromRaw<udev> for Context

Create an object from a given raw pointer. Read more

impl AsRaw<udev> for Context

Get a reference of the underlying struct. Read more

Convert the object into the underlying pointer. Read more

impl Clone for Context

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Drop for Context

Executes the destructor for this type. Read more

Auto Trait Implementations

impl !Send for Context

impl !Sync for Context