Struct devicemapper::Sectors
[−]
pub struct Sectors(pub u64);
A separate type to store counts and offsets expressed in 512-byte sectors.
Methods
impl Sectors
[src]
pub fn bytes(&self) -> Bytes
[src]
The number of bytes in these sectors.
pub fn metablocks(&self) -> MetaBlocks
[src]
The number of whole metablocks contained in these sectors.
pub fn checked_add(&self, other: Sectors) -> Option<Sectors>
[src]
Add two items of type $T, return None if overflow.
Methods from Deref<Target = u64>
Trait Implementations
impl Clone for Sectors
fn clone(&self) -> Sectors
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Sectors
impl Debug for Sectors
fn fmt(&self, __arg_0: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for Sectors
impl Eq for Sectors
impl Ord for Sectors
fn cmp(&self, __arg_0: &Sectors) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl PartialEq for Sectors
fn eq(&self, __arg_0: &Sectors) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Sectors) -> bool
This method tests for !=
.
impl PartialOrd for Sectors
fn partial_cmp(&self, __arg_0: &Sectors) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Sectors) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Sectors) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Sectors) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Sectors) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Add<Sectors> for Sectors
type Output = Sectors
The resulting type after applying the +
operator.
fn add(self, rhs: Self) -> Sectors
Performs the +
operation.
impl AddAssign<Sectors> for Sectors
fn add_assign(&mut self, rhs: Self)
Performs the +=
operation.
impl Deref for Sectors
type Target = u64
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
Dereferences the value.
impl From<u64> for Sectors
impl From<Sectors> for u64
impl Sub<Sectors> for Sectors
type Output = Sectors
The resulting type after applying the -
operator.
fn sub(self, rhs: Self) -> Sectors
Performs the -
operation.
impl SubAssign<Sectors> for Sectors
fn sub_assign(&mut self, rhs: Self)
Performs the -=
operation.
impl Div<Sectors> for Sectors
[src]
type Output = u64
The resulting type after applying the /
operator.
fn div(self, rhs: Sectors) -> u64
[src]
Performs the /
operation.
impl Serialize for Sectors
[src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<'de> Deserialize<'de> for Sectors
[src]
fn deserialize<D>(deserializer: D) -> Result<Sectors, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Sum for Sectors
[src]
fn sum<I: Iterator<Item = Sectors>>(iter: I) -> Sectors
[src]
Method which takes an iterator and generates Self
from the elements by "summing up" the items. Read more
impl Div<u64> for Sectors
[src]
type Output = Sectors
The resulting type after applying the /
operator.
fn div(self, rhs: u64) -> Sectors
[src]
Performs the /
operation.
impl Div<u32> for Sectors
[src]
type Output = Sectors
The resulting type after applying the /
operator.
fn div(self, rhs: u32) -> Sectors
[src]
Performs the /
operation.
impl Div<u16> for Sectors
[src]
type Output = Sectors
The resulting type after applying the /
operator.
fn div(self, rhs: u16) -> Sectors
[src]
Performs the /
operation.
impl Div<u8> for Sectors
[src]
type Output = Sectors
The resulting type after applying the /
operator.
fn div(self, rhs: u8) -> Sectors
[src]
Performs the /
operation.
impl Div<usize> for Sectors
[src]
type Output = Sectors
The resulting type after applying the /
operator.
fn div(self, rhs: usize) -> Sectors
[src]
Performs the /
operation.
impl Mul<u64> for Sectors
[src]
type Output = Sectors
The resulting type after applying the *
operator.
fn mul(self, rhs: u64) -> Sectors
[src]
Performs the *
operation.
impl Mul<Sectors> for u64
[src]
type Output = Sectors
The resulting type after applying the *
operator.
fn mul(self, rhs: Sectors) -> Sectors
[src]
Performs the *
operation.
impl Mul<u32> for Sectors
[src]
type Output = Sectors
The resulting type after applying the *
operator.
fn mul(self, rhs: u32) -> Sectors
[src]
Performs the *
operation.
impl Mul<Sectors> for u32
[src]
type Output = Sectors
The resulting type after applying the *
operator.
fn mul(self, rhs: Sectors) -> Sectors
[src]
Performs the *
operation.
impl Mul<u16> for Sectors
[src]
type Output = Sectors
The resulting type after applying the *
operator.
fn mul(self, rhs: u16) -> Sectors
[src]
Performs the *
operation.
impl Mul<Sectors> for u16
[src]
type Output = Sectors
The resulting type after applying the *
operator.
fn mul(self, rhs: Sectors) -> Sectors
[src]
Performs the *
operation.
impl Mul<u8> for Sectors
[src]
type Output = Sectors
The resulting type after applying the *
operator.
fn mul(self, rhs: u8) -> Sectors
[src]
Performs the *
operation.
impl Mul<Sectors> for u8
[src]
type Output = Sectors
The resulting type after applying the *
operator.
fn mul(self, rhs: Sectors) -> Sectors
[src]
Performs the *
operation.
impl Mul<usize> for Sectors
[src]
type Output = Sectors
The resulting type after applying the *
operator.
fn mul(self, rhs: usize) -> Sectors
[src]
Performs the *
operation.
impl Mul<Sectors> for usize
[src]
type Output = Sectors
The resulting type after applying the *
operator.
fn mul(self, rhs: Sectors) -> Sectors
[src]
Performs the *
operation.
impl Rem<u64> for Sectors
[src]
type Output = Sectors
The resulting type after applying the %
operator.
fn rem(self, rhs: u64) -> Sectors
[src]
Performs the %
operation.
impl Rem<u32> for Sectors
[src]
type Output = Sectors
The resulting type after applying the %
operator.
fn rem(self, rhs: u32) -> Sectors
[src]
Performs the %
operation.
impl Rem<u16> for Sectors
[src]
type Output = Sectors
The resulting type after applying the %
operator.
fn rem(self, rhs: u16) -> Sectors
[src]
Performs the %
operation.
impl Rem<u8> for Sectors
[src]
type Output = Sectors
The resulting type after applying the %
operator.
fn rem(self, rhs: u8) -> Sectors
[src]
Performs the %
operation.
impl Rem<usize> for Sectors
[src]
type Output = Sectors
The resulting type after applying the %
operator.
fn rem(self, rhs: usize) -> Sectors
[src]
Performs the %
operation.