Struct dbus_udisks2::UDisks2
source · pub struct UDisks2 { /* private fields */ }
Implementations
sourceimpl UDisks2
impl UDisks2
pub fn new() -> Result<Self, Error>
sourcepub fn update(&mut self) -> Result<(), Error>
pub fn update(&mut self) -> Result<(), Error>
Refresh the managed objects fetched from the DBus server.
sourcepub fn get_drive(&self, path: &str) -> Option<Drive>
pub fn get_drive(&self, path: &str) -> Option<Drive>
Find the drive that corresponds to the given dbus object path.
sourcepub fn get_drives<'a>(&'a self) -> impl Iterator<Item = Drive> + 'a
pub fn get_drives<'a>(&'a self) -> impl Iterator<Item = Drive> + 'a
An iterator of Drive
objects fetched from the inner cached managed objects.
sourcepub fn get_block(&self, path: &str) -> Option<Block>
pub fn get_block(&self, path: &str) -> Option<Block>
Find the block that corresponds to the given dbus object path.
sourcepub fn get_blocks<'a>(&'a self) -> impl Iterator<Item = Block> + 'a
pub fn get_blocks<'a>(&'a self) -> impl Iterator<Item = Block> + 'a
An iterator of Block
objects fetched from the inner cached managed objects.
sourcepub fn smart_update<'a>(
&'a self,
drive: impl Into<Path<'a>>,
allow_wakeup: bool
) -> Result<(), Error>
pub fn smart_update<'a>(
&'a self,
drive: impl Into<Path<'a>>,
allow_wakeup: bool
) -> Result<(), Error>
Update the S.M.A.R.T. attributes of a drive. You may pass either a &
Drive
or &str
which is a path to a drive, starting with /org/freedesktop/UDisks2/drives/
.
sourcepub fn smart_attributes<'a>(
&'a self,
drive: impl Into<Path<'a>>,
allow_wakeup: bool
) -> Result<SmartValue, Error>
pub fn smart_attributes<'a>(
&'a self,
drive: impl Into<Path<'a>>,
allow_wakeup: bool
) -> Result<SmartValue, Error>
Get the S.M.A.R.T. attributes of a drive. You may pass either a &
Drive
or &str
which
is a path to a drive, starting with /org/freedesktop/UDisks2/drives/
.
Auto Trait Implementations
impl !RefUnwindSafe for UDisks2
impl Send for UDisks2
impl !Sync for UDisks2
impl Unpin for UDisks2
impl !UnwindSafe for UDisks2
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more