pub struct DownloadDiskUsage {
pub sizes: HashMap<String, i64>,
pub partial_containers: HashMap<String, bool>,
pub device_total_bytes: i64,
pub item_count: u32,
}Expand description
On-disk usage of downloaded content, for the Downloads surface.
sizes maps an item id (leaf or container) to its bytes on disk: a leaf’s
own file size, a container’s summed downloaded descendants. device_total_bytes
and item_count are the headline figures for the Downloaded surface top bar.
TRACES: UR-056 | DR-085
Fields§
§sizes: HashMap<String, i64>item id → bytes on disk (leaf’s own size, or a container’s subtotal).
partial_containers: HashMap<String, bool>Container id → true when it is only partially downloaded (has cached children that are not downloaded). Absent/false ⇒ fully downloaded. Lets the Downloaded surface badge partial vs. full containers.
device_total_bytes: i64Sum of all downloaded leaf sizes — the device total.
item_count: u32Number of downloaded leaf items (not containers).
Trait Implementations§
Source§impl Clone for DownloadDiskUsage
impl Clone for DownloadDiskUsage
Source§fn clone(&self) -> DownloadDiskUsage
fn clone(&self) -> DownloadDiskUsage
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 moreSource§impl Debug for DownloadDiskUsage
impl Debug for DownloadDiskUsage
Source§impl<'de> Deserialize<'de> for DownloadDiskUsage
impl<'de> Deserialize<'de> for DownloadDiskUsage
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl NamedType for DownloadDiskUsage
impl NamedType for DownloadDiskUsage
fn sid() -> SpectaID
Source§fn named_data_type(
type_map: &mut TypeCollection,
generics: &[DataType],
) -> NamedDataType
fn named_data_type( type_map: &mut TypeCollection, generics: &[DataType], ) -> NamedDataType
this is equivalent to [Type::inline] but returns a [NamedDataType] instead.
Source§fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
this is equivalent to [Type::definition] but returns a [NamedDataType] instead.
Source§impl Serialize for DownloadDiskUsage
impl Serialize for DownloadDiskUsage
Source§impl Type for DownloadDiskUsage
impl Type for DownloadDiskUsage
Source§fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
Returns the definition of a type using the provided generics. Read more
Source§fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
Generates a datatype corresponding to a reference to this type,
as determined by its category. Getting a reference to a type implies that
it should belong in the type map (since it has to be referenced from somewhere),
so the output of
definition will be put into the type map.impl Flatten for DownloadDiskUsage
Auto Trait Implementations§
impl Freeze for DownloadDiskUsage
impl RefUnwindSafe for DownloadDiskUsage
impl Send for DownloadDiskUsage
impl Sync for DownloadDiskUsage
impl Unpin for DownloadDiskUsage
impl UnsafeUnpin for DownloadDiskUsage
impl UnwindSafe for DownloadDiskUsage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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,
§fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
§impl<T> FunctionArg for Twhere
T: Type,
impl<T> FunctionArg for Twhere
T: Type,
§fn to_datatype(type_map: &mut TypeCollection) -> Option<DataType>
fn to_datatype(type_map: &mut TypeCollection) -> Option<DataType>
Gets the type of an argument as a [
DataType]. Read more