DevicePathWatchable

Trait DevicePathWatchable 

Source
pub trait DevicePathWatchable: DevicePath {
    // Required methods
    fn any_added(ctx: &Watcher) -> WatchResult<DevicePathStream<NoParent, Self>>;
    fn any_changed(
        ctx: &Watcher,
    ) -> WatchResult<DevicePathStream<NoParent, Self>>;
    fn any_removed(
        ctx: &Watcher,
    ) -> WatchResult<DevicePathStream<NoParent, Self>>;
    fn added(&self, ctx: &Watcher) -> WatchResult<DevicePathStream<Self, Self>>;
    fn changed(
        &self,
        ctx: &Watcher,
    ) -> WatchResult<DevicePathStream<Self, Self>>;
    fn removed(
        &self,
        ctx: &Watcher,
    ) -> WatchResult<DevicePathStream<Self, Self>>;
}
Expand description

A DevicePath that can be watched for add/change/remove events.

Required Methods§

Source

fn any_added(ctx: &Watcher) -> WatchResult<DevicePathStream<NoParent, Self>>

Returns a stream of all DevicePaths of this type that are added.

Source

fn any_changed(ctx: &Watcher) -> WatchResult<DevicePathStream<NoParent, Self>>

Returns a stream of all DevicePaths of this type that are changed.

Source

fn any_removed(ctx: &Watcher) -> WatchResult<DevicePathStream<NoParent, Self>>

Returns a stream of all DevicePaths of this type that are removed.

Source

fn added(&self, ctx: &Watcher) -> WatchResult<DevicePathStream<Self, Self>>

Returns a stream containing only this DevicePath whenever it’s added.

Source

fn changed(&self, ctx: &Watcher) -> WatchResult<DevicePathStream<Self, Self>>

Returns a stream containing only this DevicePath whenever it’s changed.

Source

fn removed(&self, ctx: &Watcher) -> WatchResult<DevicePathStream<Self, Self>>

Returns a stream containing only this DevicePath whenever it’s removed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§