pub struct StorageVolume {
pub description: String,
pub is_primary: bool,
pub is_removable: bool,
pub is_stable: bool,
pub is_emulated: bool,
pub is_readonly: bool,
pub id: StorageVolumeId,
}
Fields§
§description: String
A user-visible description of the volume.
This can be determined by the manufacturer and is often localized according to the user’s language.
e.g.
Internal shared storage
SDCARD
SD card
Virtual SD card
is_primary: bool
Indicates whether this is primary storage volume. A device always has one (and one only) primary storage volume.
is_removable: bool
Indicates whether this is physically removable.
If false
, this is device’s built-in storage.
is_stable: bool
Indicates whether thit is stable part of the device.
For example, a device’s built-in storage and physical media slots under protective covers are considered stable, while USB flash drives connected to handheld devices are not.
is_emulated: bool
Indicates whether this is backed by private user data partition, either internal storage or adopted storage.
On most recent devices, the primary storage volume will often have this set to true
.
is_readonly: bool
Indicates whether this is readonly storage volume.
e.g. SD card with readonly mode.
§Remark
As far as I understand, this should never be true
when either is_primary
or is_emulated
is true,
or when is_removable
is false,
but it might not be the case due to any issues or rare cases.
id: StorageVolumeId
Trait Implementations§
Source§impl Clone for StorageVolume
impl Clone for StorageVolume
Source§fn clone(&self) -> StorageVolume
fn clone(&self) -> StorageVolume
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more