pub struct DeviceInfo {
pub path: String,
pub size_bytes: u64,
pub model: String,
pub internal: bool,
pub is_boot_disk: bool,
pub removable: bool,
}Expand description
Description of a candidate target device, returned by enumeration so we can show the user a clear confirm prompt.
Fields§
§path: String§size_bytes: u64§model: String§internal: bool§is_boot_disk: bool§removable: boolImplementations§
Source§impl DeviceInfo
impl DeviceInfo
Sourcepub fn check_writable(&self, safety: &SafetyConfig) -> Result<()>
pub fn check_writable(&self, safety: &SafetyConfig) -> Result<()>
Apply the safety policy. Returns Ok(()) if the device may be written.
Trait Implementations§
Source§impl Clone for DeviceInfo
impl Clone for DeviceInfo
Source§fn clone(&self) -> DeviceInfo
fn clone(&self) -> DeviceInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DeviceInfo
impl RefUnwindSafe for DeviceInfo
impl Send for DeviceInfo
impl Sync for DeviceInfo
impl Unpin for DeviceInfo
impl UnsafeUnpin for DeviceInfo
impl UnwindSafe for DeviceInfo
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