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