pub struct ListOptions { /* private fields */ }Expand description
Options for listing mounted volumes.
Use ListOptions::default() for all real disks,
ListOptions::ejectable_only() for removable media only, or
ListOptions::non_ejectable_only() for non-removable media only.
Implementations§
Source§impl ListOptions
impl ListOptions
Sourcepub const fn ejectable_only() -> Self
pub const fn ejectable_only() -> Self
List only ejectable/removable volumes (USB drives, SD cards, etc.).
Sourcepub const fn non_ejectable_only() -> Self
pub const fn non_ejectable_only() -> Self
List only non-ejectable/non-removable volumes (internal drives, etc.).
Sourcepub const fn set_ejectable_only(self, ejectable_only: bool) -> Self
pub const fn set_ejectable_only(self, ejectable_only: bool) -> Self
Set whether to filter to ejectable volumes only.
Enabling this option will automatically disable the
non_ejectable_only filter to keep the options consistent.
Sourcepub const fn set_non_ejectable_only(self, non_ejectable_only: bool) -> Self
pub const fn set_non_ejectable_only(self, non_ejectable_only: bool) -> Self
Set whether to filter to non-ejectable volumes only.
Enabling this option will automatically disable the
ejectable_only filter to keep the options consistent.
Sourcepub const fn is_ejectable_only(&self) -> bool
pub const fn is_ejectable_only(&self) -> bool
Returns true if only ejectable volumes will be listed.
Sourcepub const fn is_non_ejectable_only(&self) -> bool
pub const fn is_non_ejectable_only(&self) -> bool
Returns true if only non-ejectable volumes will be listed.
Trait Implementations§
Source§impl Clone for ListOptions
impl Clone for ListOptions
Source§fn clone(&self) -> ListOptions
fn clone(&self) -> ListOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more