pub struct AltModePath<Parent: DevicePath> {
pub parent: Parent,
pub index: u32,
}Expand description
A path to an AltMode.
Fields§
§parent: ParentThe path of this alternate mode’s parent device.
index: u32The index of this alternate mode in the parent’s collection.
Trait Implementations§
Source§impl<Parent: Clone + DevicePath> Clone for AltModePath<Parent>
impl<Parent: Clone + DevicePath> Clone for AltModePath<Parent>
Source§fn clone(&self) -> AltModePath<Parent>
fn clone(&self) -> AltModePath<Parent>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Parent: Debug + DevicePath> Debug for AltModePath<Parent>
impl<Parent: Debug + DevicePath> Debug for AltModePath<Parent>
Source§impl<Parent: DevicePath> DevicePath for AltModePath<Parent>
impl<Parent: DevicePath> DevicePath for AltModePath<Parent>
Source§type Parent = Parent
type Parent = Parent
The parent of this path, i.e. the
DevicePath representing the
filesystem location that contains this device. If this device is not
nested within another, then this will be NoParent.fn parse_basename(s: &str, parent: Self::Parent) -> Option<Self>
fn build_basename(&self, s: &mut String)
fn parent(&self) -> Self::Parent
Source§impl<Parent: DevicePath> DevicePathIndexed for AltModePath<Parent>
impl<Parent: DevicePath> DevicePathIndexed for AltModePath<Parent>
Source§impl DevicePathWatchable for AltModePath<PartnerPath>
impl DevicePathWatchable for AltModePath<PartnerPath>
Source§fn any_added(ctx: &Watcher) -> WatchResult<DevicePathStream<NoParent, Self>>
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>>
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>>
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>>
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>>
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>>
fn removed(&self, ctx: &Watcher) -> WatchResult<DevicePathStream<Self, Self>>
Returns a stream containing only this
DevicePath whenever it’s
removed.Source§impl DevicePathWatchable for AltModePath<PlugPath>
impl DevicePathWatchable for AltModePath<PlugPath>
Source§fn any_added(ctx: &Watcher) -> WatchResult<DevicePathStream<NoParent, Self>>
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>>
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>>
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>>
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>>
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>>
fn removed(&self, ctx: &Watcher) -> WatchResult<DevicePathStream<Self, Self>>
Returns a stream containing only this
DevicePath whenever it’s
removed.Source§impl DevicePathWatchableFromParent for AltModePath<PartnerPath>
impl DevicePathWatchableFromParent for AltModePath<PartnerPath>
Source§fn added_in(
parent: Self::Parent,
ctx: &Watcher,
) -> WatchResult<DevicePathStream<Self::Parent, Self>>
fn added_in( parent: Self::Parent, ctx: &Watcher, ) -> WatchResult<DevicePathStream<Self::Parent, Self>>
Prefer using [
DevicePathCollection.added].Source§fn changed_in(
parent: Self::Parent,
ctx: &Watcher,
) -> WatchResult<DevicePathStream<Self::Parent, Self>>
fn changed_in( parent: Self::Parent, ctx: &Watcher, ) -> WatchResult<DevicePathStream<Self::Parent, Self>>
Prefer using [
DevicePathCollection.changed].Source§fn removed_in(
parent: Self::Parent,
ctx: &Watcher,
) -> WatchResult<DevicePathStream<Self::Parent, Self>>
fn removed_in( parent: Self::Parent, ctx: &Watcher, ) -> WatchResult<DevicePathStream<Self::Parent, Self>>
Prefer using [
DevicePathCollection.removed].Source§impl DevicePathWatchableFromParent for AltModePath<PlugPath>
impl DevicePathWatchableFromParent for AltModePath<PlugPath>
Source§fn added_in(
parent: Self::Parent,
ctx: &Watcher,
) -> WatchResult<DevicePathStream<Self::Parent, Self>>
fn added_in( parent: Self::Parent, ctx: &Watcher, ) -> WatchResult<DevicePathStream<Self::Parent, Self>>
Prefer using [
DevicePathCollection.added].Source§fn changed_in(
parent: Self::Parent,
ctx: &Watcher,
) -> WatchResult<DevicePathStream<Self::Parent, Self>>
fn changed_in( parent: Self::Parent, ctx: &Watcher, ) -> WatchResult<DevicePathStream<Self::Parent, Self>>
Prefer using [
DevicePathCollection.changed].Source§fn removed_in(
parent: Self::Parent,
ctx: &Watcher,
) -> WatchResult<DevicePathStream<Self::Parent, Self>>
fn removed_in( parent: Self::Parent, ctx: &Watcher, ) -> WatchResult<DevicePathStream<Self::Parent, Self>>
Prefer using [
DevicePathCollection.removed].Source§impl<Parent: Hash + DevicePath> Hash for AltModePath<Parent>
impl<Parent: Hash + DevicePath> Hash for AltModePath<Parent>
Source§impl<Parent: PartialEq + DevicePath> PartialEq for AltModePath<Parent>
impl<Parent: PartialEq + DevicePath> PartialEq for AltModePath<Parent>
impl<Parent: Copy + DevicePath> Copy for AltModePath<Parent>
impl<Parent: Eq + DevicePath> Eq for AltModePath<Parent>
impl<Parent: DevicePath> StructuralPartialEq for AltModePath<Parent>
Auto Trait Implementations§
impl<Parent> Freeze for AltModePath<Parent>where
Parent: Freeze,
impl<Parent> RefUnwindSafe for AltModePath<Parent>where
Parent: RefUnwindSafe,
impl<Parent> Send for AltModePath<Parent>where
Parent: Send,
impl<Parent> Sync for AltModePath<Parent>where
Parent: Sync,
impl<Parent> Unpin for AltModePath<Parent>
impl<Parent> UnwindSafe for AltModePath<Parent>where
Parent: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more