Trait ux::prelude::DriveExt [−]
pub trait DriveExt: 'static {
Show methods
pub fn can_eject(&self) -> bool;
pub fn can_poll_for_media(&self) -> bool;
pub fn can_start(&self) -> bool;
pub fn can_start_degraded(&self) -> bool;
pub fn can_stop(&self) -> bool;
pub fn eject_with_operation<P, Q, R>(
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>,
cancellable: Option<&Q>,
callback: R
)
where
P: IsA<MountOperation>,
Q: IsA<Cancellable>,
R: 'static + FnOnce(Result<(), Error>) + Send;
pub fn eject_with_operation_future<P>(
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>>
where
P: 'static + IsA<MountOperation> + Clone;
pub fn enumerate_identifiers(&self) -> Vec<GString, Global>;
pub fn get_icon(&self) -> Option<Icon>;
pub fn get_identifier(&self, kind: &str) -> Option<GString>;
pub fn get_name(&self) -> Option<GString>;
pub fn get_sort_key(&self) -> Option<GString>;
pub fn get_start_stop_type(&self) -> DriveStartStopType;
pub fn get_symbolic_icon(&self) -> Option<Icon>;
pub fn get_volumes(&self) -> Vec<Volume, Global>;
pub fn has_media(&self) -> bool;
pub fn has_volumes(&self) -> bool;
pub fn is_media_check_automatic(&self) -> bool;
pub fn is_media_removable(&self) -> bool;
pub fn is_removable(&self) -> bool;
pub fn poll_for_media<P, Q>(&self, cancellable: Option<&P>, callback: Q)
where
P: IsA<Cancellable>,
Q: 'static + FnOnce(Result<(), Error>) + Send;
pub fn poll_for_media_future(
&self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>>;
pub fn start<P, Q, R>(
&self,
flags: DriveStartFlags,
mount_operation: Option<&P>,
cancellable: Option<&Q>,
callback: R
)
where
P: IsA<MountOperation>,
Q: IsA<Cancellable>,
R: 'static + FnOnce(Result<(), Error>) + Send;
pub fn start_future<P>(
&self,
flags: DriveStartFlags,
mount_operation: Option<&P>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>>
where
P: 'static + IsA<MountOperation> + Clone;
pub fn stop<P, Q, R>(
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>,
cancellable: Option<&Q>,
callback: R
)
where
P: IsA<MountOperation>,
Q: IsA<Cancellable>,
R: 'static + FnOnce(Result<(), Error>) + Send;
pub fn stop_future<P>(
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>>
where
P: 'static + IsA<MountOperation> + Clone;
pub fn connect_changed<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self);
pub fn connect_disconnected<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self);
pub fn connect_eject_button<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self);
pub fn connect_stop_button<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self);
}Required methods
pub fn can_eject(&self) -> bool
pub fn can_poll_for_media(&self) -> bool
pub fn can_start(&self) -> bool
pub fn can_start_degraded(&self) -> bool
pub fn can_stop(&self) -> bool
pub fn eject_with_operation<P, Q, R>(
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>,
cancellable: Option<&Q>,
callback: R
) where
P: IsA<MountOperation>,
Q: IsA<Cancellable>,
R: 'static + FnOnce(Result<(), Error>) + Send,
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>,
cancellable: Option<&Q>,
callback: R
) where
P: IsA<MountOperation>,
Q: IsA<Cancellable>,
R: 'static + FnOnce(Result<(), Error>) + Send,
pub fn eject_with_operation_future<P>(
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>> where
P: 'static + IsA<MountOperation> + Clone,
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>> where
P: 'static + IsA<MountOperation> + Clone,
pub fn enumerate_identifiers(&self) -> Vec<GString, Global>
pub fn get_icon(&self) -> Option<Icon>
pub fn get_identifier(&self, kind: &str) -> Option<GString>
pub fn get_name(&self) -> Option<GString>
pub fn get_sort_key(&self) -> Option<GString>
pub fn get_start_stop_type(&self) -> DriveStartStopType
pub fn get_symbolic_icon(&self) -> Option<Icon>
pub fn get_volumes(&self) -> Vec<Volume, Global>
pub fn has_media(&self) -> bool
pub fn has_volumes(&self) -> bool
pub fn is_media_check_automatic(&self) -> bool
pub fn is_media_removable(&self) -> bool
pub fn is_removable(&self) -> bool
pub fn poll_for_media<P, Q>(&self, cancellable: Option<&P>, callback: Q) where
P: IsA<Cancellable>,
Q: 'static + FnOnce(Result<(), Error>) + Send,
P: IsA<Cancellable>,
Q: 'static + FnOnce(Result<(), Error>) + Send,
pub fn poll_for_media_future(
&self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>>
&self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>>
pub fn start<P, Q, R>(
&self,
flags: DriveStartFlags,
mount_operation: Option<&P>,
cancellable: Option<&Q>,
callback: R
) where
P: IsA<MountOperation>,
Q: IsA<Cancellable>,
R: 'static + FnOnce(Result<(), Error>) + Send,
&self,
flags: DriveStartFlags,
mount_operation: Option<&P>,
cancellable: Option<&Q>,
callback: R
) where
P: IsA<MountOperation>,
Q: IsA<Cancellable>,
R: 'static + FnOnce(Result<(), Error>) + Send,
pub fn start_future<P>(
&self,
flags: DriveStartFlags,
mount_operation: Option<&P>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>> where
P: 'static + IsA<MountOperation> + Clone,
&self,
flags: DriveStartFlags,
mount_operation: Option<&P>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>> where
P: 'static + IsA<MountOperation> + Clone,
pub fn stop<P, Q, R>(
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>,
cancellable: Option<&Q>,
callback: R
) where
P: IsA<MountOperation>,
Q: IsA<Cancellable>,
R: 'static + FnOnce(Result<(), Error>) + Send,
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>,
cancellable: Option<&Q>,
callback: R
) where
P: IsA<MountOperation>,
Q: IsA<Cancellable>,
R: 'static + FnOnce(Result<(), Error>) + Send,
pub fn stop_future<P>(
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>> where
P: 'static + IsA<MountOperation> + Clone,
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>> where
P: 'static + IsA<MountOperation> + Clone,
pub fn connect_changed<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self),
F: 'static + Fn(&Self),
pub fn connect_disconnected<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self),
F: 'static + Fn(&Self),
pub fn connect_eject_button<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self),
F: 'static + Fn(&Self),
pub fn connect_stop_button<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self),
F: 'static + Fn(&Self),
Implementors
impl<O> DriveExt for O where
O: IsA<Drive>,
O: IsA<Drive>,
pub fn can_eject(&self) -> bool
pub fn can_poll_for_media(&self) -> bool
pub fn can_start(&self) -> bool
pub fn can_start_degraded(&self) -> bool
pub fn can_stop(&self) -> bool
pub fn eject_with_operation<P, Q, R>(
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>,
cancellable: Option<&Q>,
callback: R
) where
P: IsA<MountOperation>,
Q: IsA<Cancellable>,
R: 'static + FnOnce(Result<(), Error>) + Send,
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>,
cancellable: Option<&Q>,
callback: R
) where
P: IsA<MountOperation>,
Q: IsA<Cancellable>,
R: 'static + FnOnce(Result<(), Error>) + Send,
pub fn eject_with_operation_future<P>(
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>> where
P: 'static + IsA<MountOperation> + Clone,
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>> where
P: 'static + IsA<MountOperation> + Clone,
pub fn enumerate_identifiers(&self) -> Vec<GString, Global>
pub fn get_icon(&self) -> Option<Icon>
pub fn get_identifier(&self, kind: &str) -> Option<GString>
pub fn get_name(&self) -> Option<GString>
pub fn get_sort_key(&self) -> Option<GString>
pub fn get_start_stop_type(&self) -> DriveStartStopType
pub fn get_symbolic_icon(&self) -> Option<Icon>
pub fn get_volumes(&self) -> Vec<Volume, Global>
pub fn has_media(&self) -> bool
pub fn has_volumes(&self) -> bool
pub fn is_media_check_automatic(&self) -> bool
pub fn is_media_removable(&self) -> bool
pub fn is_removable(&self) -> bool
pub fn poll_for_media<P, Q>(&self, cancellable: Option<&P>, callback: Q) where
P: IsA<Cancellable>,
Q: 'static + FnOnce(Result<(), Error>) + Send,
P: IsA<Cancellable>,
Q: 'static + FnOnce(Result<(), Error>) + Send,
pub fn poll_for_media_future(
&self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>>
&self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>>
pub fn start<P, Q, R>(
&self,
flags: DriveStartFlags,
mount_operation: Option<&P>,
cancellable: Option<&Q>,
callback: R
) where
P: IsA<MountOperation>,
Q: IsA<Cancellable>,
R: 'static + FnOnce(Result<(), Error>) + Send,
&self,
flags: DriveStartFlags,
mount_operation: Option<&P>,
cancellable: Option<&Q>,
callback: R
) where
P: IsA<MountOperation>,
Q: IsA<Cancellable>,
R: 'static + FnOnce(Result<(), Error>) + Send,
pub fn start_future<P>(
&self,
flags: DriveStartFlags,
mount_operation: Option<&P>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>> where
P: 'static + IsA<MountOperation> + Clone,
&self,
flags: DriveStartFlags,
mount_operation: Option<&P>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>> where
P: 'static + IsA<MountOperation> + Clone,
pub fn stop<P, Q, R>(
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>,
cancellable: Option<&Q>,
callback: R
) where
P: IsA<MountOperation>,
Q: IsA<Cancellable>,
R: 'static + FnOnce(Result<(), Error>) + Send,
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>,
cancellable: Option<&Q>,
callback: R
) where
P: IsA<MountOperation>,
Q: IsA<Cancellable>,
R: 'static + FnOnce(Result<(), Error>) + Send,
pub fn stop_future<P>(
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>> where
P: 'static + IsA<MountOperation> + Clone,
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>> where
P: 'static + IsA<MountOperation> + Clone,
pub fn connect_changed<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
F: 'static + Fn(&O),
pub fn connect_disconnected<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
F: 'static + Fn(&O),
pub fn connect_eject_button<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
F: 'static + Fn(&O),
pub fn connect_stop_button<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
F: 'static + Fn(&O),