alpm_types/
size.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/// Compressed size of a file (in bytes)
///
/// This is a type alias for [`u64`].
///
/// ## Examples
/// ```
/// use std::num::IntErrorKind;
/// use std::str::FromStr;
///
/// use alpm_types::{CompressedSize, Error};
///
/// assert_eq!(CompressedSize::from_str("1"), Ok(1));
/// assert!(CompressedSize::from_str("-1").is_err());
/// ```
pub type CompressedSize = u64;

/// Installed size of a package (in bytes)
///
/// This is a type alias for [`u64`].
///
/// ## Examples
/// ```
/// use std::num::IntErrorKind;
/// use std::str::FromStr;
///
/// use alpm_types::{Error, InstalledSize};
///
/// // create InstalledSize from &str
/// assert_eq!(InstalledSize::from_str("1"), Ok(1));
/// assert!(InstalledSize::from_str("-1").is_err());
/// ```
pub type InstalledSize = u64;