pub struct MonitorBuilder { /* private fields */ }
Expand description

Monitors for device events.

A monitor communicates with the kernel over a socket. Filtering events is performed efficiently in the kernel, and only events that match the filters are received by the socket. Filters must be setup before listening for events.

Implementations

Creates a new Monitor.

Adds a filter that matches events for devices with the given subsystem.

Adds a filter that matches events for devices with the given subsystem and device type.

Adds a filter that matches events for devices with the given tag.

Removes all filters currently set on the monitor.

Listens for events matching the current filters.

This method consumes the Monitor.

Trait Implementations

Get a reference of the underlying struct. Read more

The udev context with which this struct was created. This must live at least as long as the struct itself or undefined behavior will result. Read more

Convert the object into the raw udev pointer and the underlying pointer for this object. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Executes the destructor for this type. Read more

Create an object from a given raw pointer and udev context pointer. Read more

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)

Uses borrowed data to replace owned data, usually by cloning. 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.