Struct devicemapper::Sectors
source · pub struct Sectors(pub u64);
Expand description
A type for sectors
Tuple Fields§
§0: u64
Implementations§
source§impl Sectors
impl Sectors
sourcepub fn checked_add(&self, other: Sectors) -> Option<Sectors>
pub fn checked_add(&self, other: Sectors) -> Option<Sectors>
Add two items of the same type, return None if overflow.
source§impl Sectors
impl Sectors
sourcepub fn metablocks(self) -> MetaBlocks
pub fn metablocks(self) -> MetaBlocks
The number of whole metablocks contained in these sectors.
Methods from Deref<Target = u64>§
pub const MIN: u64 = 0u64
pub const MAX: u64 = 18_446_744_073_709_551_615u64
pub const BITS: u32 = 64u32
Trait Implementations§
source§impl AddAssign for Sectors
impl AddAssign for Sectors
source§fn add_assign(&mut self, rhs: Sectors)
fn add_assign(&mut self, rhs: Sectors)
Performs the
+=
operation. Read moresource§impl<'de> Deserialize<'de> for Sectors
impl<'de> Deserialize<'de> for Sectors
source§fn deserialize<D>(deserializer: D) -> Result<Sectors, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Sectors, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for Sectors
impl Ord for Sectors
source§impl PartialEq for Sectors
impl PartialEq for Sectors
source§impl PartialOrd for Sectors
impl PartialOrd for Sectors
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl SubAssign for Sectors
impl SubAssign for Sectors
source§fn sub_assign(&mut self, rhs: Sectors)
fn sub_assign(&mut self, rhs: Sectors)
Performs the
-=
operation. Read moreimpl Copy for Sectors
impl Eq for Sectors
impl StructuralPartialEq for Sectors
Auto Trait Implementations§
impl Freeze for Sectors
impl RefUnwindSafe for Sectors
impl Send for Sectors
impl Sync for Sectors
impl Unpin for Sectors
impl UnwindSafe for Sectors
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