Struct alpm_types::InstalledSize
source · pub struct InstalledSize(pub u64);
Expand description
Installed size of a package (in bytes)
§Examples
use alpm_types::{InstalledSize, Error};
use std::str::FromStr;
// create InstalledSize from &str
assert_eq!(InstalledSize::from_str("1"), Ok(InstalledSize(1)));
assert_eq!(
InstalledSize::from_str("-1"),
Err(Error::InvalidInstalledSize(String::from("-1")))
);
// format as String
assert_eq!("1", format!("{}", InstalledSize(1)));
Tuple Fields§
§0: u64
Trait Implementations§
source§impl Clone for InstalledSize
impl Clone for InstalledSize
source§fn clone(&self) -> InstalledSize
fn clone(&self) -> InstalledSize
Returns a copy of the value. Read more
1.0.0 · 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 InstalledSize
impl Debug for InstalledSize
source§impl Display for InstalledSize
impl Display for InstalledSize
source§impl FromStr for InstalledSize
impl FromStr for InstalledSize
source§impl PartialEq for InstalledSize
impl PartialEq for InstalledSize
source§fn eq(&self, other: &InstalledSize) -> bool
fn eq(&self, other: &InstalledSize) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for InstalledSize
impl Eq for InstalledSize
impl StructuralPartialEq for InstalledSize
Auto Trait Implementations§
impl Freeze for InstalledSize
impl RefUnwindSafe for InstalledSize
impl Send for InstalledSize
impl Sync for InstalledSize
impl Unpin for InstalledSize
impl UnwindSafe for InstalledSize
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