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 is_available_for_app_storage: bool,
pub is_available_for_public_storage: bool,
pub id: StorageVolumeId,
}Fields§
§description: StringA 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 storageSDCARDSD cardVirtual SD card
is_primary: boolIndicates whether this is primary storage volume. A device always has one (and one only) primary storage volume.
is_removable: boolIndicates whether this is physically removable.
If false, this is device’s built-in storage.
is_stable: boolIndicates 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: boolIndicates 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: boolIndicates 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.
is_available_for_app_storage: bool§is_available_for_public_storage: bool§id: StorageVolumeIdTrait 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 moreSource§impl Debug for StorageVolume
impl Debug for StorageVolume
Source§impl<'de> Deserialize<'de> for StorageVolume
impl<'de> Deserialize<'de> for StorageVolume
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for StorageVolume
impl Hash for StorageVolume
Source§impl PartialEq for StorageVolume
impl PartialEq for StorageVolume
Source§impl Serialize for StorageVolume
impl Serialize for StorageVolume
impl Eq for StorageVolume
impl StructuralPartialEq for StorageVolume
Auto Trait Implementations§
impl Freeze for StorageVolume
impl RefUnwindSafe for StorageVolume
impl Send for StorageVolume
impl Sync for StorageVolume
impl Unpin for StorageVolume
impl UnwindSafe for StorageVolume
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
Source§fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.