watch_interfaces

Function watch_interfaces 

Source
pub async fn watch_interfaces(
    tx: Sender<InterfaceEvent>,
    cancel: CancellationToken,
)
Expand description

Spawn an async task that watches for interface add/remove events.

Events are sent on tx. The task exits when the receiver is dropped or cancel is triggered.

On unsupported platforms the task logs a warning and returns immediately.