Skip to main content

ByteUnit

Struct ByteUnit 

Source
pub struct ByteUnit(/* private fields */);

Implementations§

Source§

impl ByteUnit

Source

pub const ZERO: ByteUnit

Source

pub const MAX: ByteUnit

Source

pub const KB: ByteUnit

Source

pub const MB: ByteUnit

Source

pub const GB: ByteUnit

Source

pub const TB: ByteUnit

Source

pub const PB: ByteUnit

Source

pub const EB: ByteUnit

Source

pub const fn new(bytes: u64) -> ByteUnit

Source

pub const fn size_of<T>() -> ByteUnit

Source

pub const fn as_u64(&self) -> u64

Source

pub const fn as_u32(&self) -> u32

Source

pub const fn as_u16(&self) -> u16

Source

pub const fn as_usize(&self) -> usize

Source

pub const fn is_power_of_two(&self) -> bool

Source

pub const fn from_kb(kb: u64) -> ByteUnit

Source

pub const fn from_mb(mb: u64) -> ByteUnit

Source

pub const fn from_gb(gb: u64) -> ByteUnit

Source

pub const fn from_tb(tb: u64) -> ByteUnit

Source

pub const fn from_pb(pb: u64) -> ByteUnit

Source

pub const fn from_eb(eb: u64) -> ByteUnit

Source

pub const fn diff(self, other: ByteUnit) -> ByteUnit

Returns the absolute difference between two ByteUnit values.

Source

pub const fn range(self, end: ByteUnit) -> Range<usize>

Returns a range representing the byte range from self to end.

Trait Implementations§

Source§

impl Add<ByteUnit> for i16

Source§

type Output = ByteUnit

The resulting type after applying the + operator.
Source§

fn add(self, rhs: ByteUnit) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<ByteUnit> for i32

Source§

type Output = ByteUnit

The resulting type after applying the + operator.
Source§

fn add(self, rhs: ByteUnit) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<ByteUnit> for i64

Source§

type Output = ByteUnit

The resulting type after applying the + operator.
Source§

fn add(self, rhs: ByteUnit) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<ByteUnit> for i8

Source§

type Output = ByteUnit

The resulting type after applying the + operator.
Source§

fn add(self, rhs: ByteUnit) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<ByteUnit> for isize

Source§

type Output = ByteUnit

The resulting type after applying the + operator.
Source§

fn add(self, rhs: ByteUnit) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<ByteUnit> for u16

Source§

type Output = ByteUnit

The resulting type after applying the + operator.
Source§

fn add(self, rhs: ByteUnit) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<ByteUnit> for u32

Source§

type Output = ByteUnit

The resulting type after applying the + operator.
Source§

fn add(self, rhs: ByteUnit) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<ByteUnit> for u64

Source§

type Output = ByteUnit

The resulting type after applying the + operator.
Source§

fn add(self, rhs: ByteUnit) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<ByteUnit> for u8

Source§

type Output = ByteUnit

The resulting type after applying the + operator.
Source§

fn add(self, rhs: ByteUnit) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<ByteUnit> for usize

Source§

type Output = ByteUnit

The resulting type after applying the + operator.
Source§

fn add(self, rhs: ByteUnit) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: Into<ByteUnit>> Add<T> for ByteUnit

Source§

type Output = ByteUnit

The resulting type after applying the + operator.
Source§

fn add(self, rhs: T) -> Self::Output

Performs the + operation. Read more
Source§

impl Clone for ByteUnit

Source§

fn clone(&self) -> ByteUnit

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ByteUnit

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ByteUnit

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for ByteUnit

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Div<ByteUnit> for i16

Source§

type Output = ByteUnit

The resulting type after applying the / operator.
Source§

fn div(self, rhs: ByteUnit) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<ByteUnit> for i32

Source§

type Output = ByteUnit

The resulting type after applying the / operator.
Source§

fn div(self, rhs: ByteUnit) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<ByteUnit> for i64

Source§

type Output = ByteUnit

The resulting type after applying the / operator.
Source§

fn div(self, rhs: ByteUnit) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<ByteUnit> for i8

Source§

type Output = ByteUnit

The resulting type after applying the / operator.
Source§

fn div(self, rhs: ByteUnit) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<ByteUnit> for isize

Source§

type Output = ByteUnit

The resulting type after applying the / operator.
Source§

fn div(self, rhs: ByteUnit) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<ByteUnit> for u16

Source§

type Output = ByteUnit

The resulting type after applying the / operator.
Source§

fn div(self, rhs: ByteUnit) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<ByteUnit> for u32

Source§

type Output = ByteUnit

The resulting type after applying the / operator.
Source§

fn div(self, rhs: ByteUnit) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<ByteUnit> for u64

Source§

type Output = ByteUnit

The resulting type after applying the / operator.
Source§

fn div(self, rhs: ByteUnit) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<ByteUnit> for u8

Source§

type Output = ByteUnit

The resulting type after applying the / operator.
Source§

fn div(self, rhs: ByteUnit) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<ByteUnit> for usize

Source§

type Output = ByteUnit

The resulting type after applying the / operator.
Source§

fn div(self, rhs: ByteUnit) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: Into<ByteUnit>> Div<T> for ByteUnit

Source§

type Output = ByteUnit

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
Source§

impl From<i16> for ByteUnit

Source§

fn from(bytes: i16) -> ByteUnit

Converts to this type from the input type.
Source§

impl From<i32> for ByteUnit

Source§

fn from(bytes: i32) -> ByteUnit

Converts to this type from the input type.
Source§

impl From<i64> for ByteUnit

Source§

fn from(bytes: i64) -> ByteUnit

Converts to this type from the input type.
Source§

impl From<i8> for ByteUnit

Source§

fn from(bytes: i8) -> ByteUnit

Converts to this type from the input type.
Source§

impl From<isize> for ByteUnit

Source§

fn from(bytes: isize) -> ByteUnit

Converts to this type from the input type.
Source§

impl From<u16> for ByteUnit

Source§

fn from(bytes: u16) -> ByteUnit

Converts to this type from the input type.
Source§

impl From<u32> for ByteUnit

Source§

fn from(bytes: u32) -> ByteUnit

Converts to this type from the input type.
Source§

impl From<u64> for ByteUnit

Source§

fn from(bytes: u64) -> ByteUnit

Converts to this type from the input type.
Source§

impl From<u8> for ByteUnit

Source§

fn from(bytes: u8) -> ByteUnit

Converts to this type from the input type.
Source§

impl From<usize> for ByteUnit

Source§

fn from(bytes: usize) -> ByteUnit

Converts to this type from the input type.
Source§

impl FromStr for ByteUnit

Source§

type Err = ByteUnitParseError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Mul<ByteUnit> for i16

Source§

type Output = ByteUnit

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: ByteUnit) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<ByteUnit> for i32

Source§

type Output = ByteUnit

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: ByteUnit) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<ByteUnit> for i64

Source§

type Output = ByteUnit

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: ByteUnit) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<ByteUnit> for i8

Source§

type Output = ByteUnit

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: ByteUnit) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<ByteUnit> for isize

Source§

type Output = ByteUnit

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: ByteUnit) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<ByteUnit> for u16

Source§

type Output = ByteUnit

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: ByteUnit) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<ByteUnit> for u32

Source§

type Output = ByteUnit

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: ByteUnit) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<ByteUnit> for u64

Source§

type Output = ByteUnit

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: ByteUnit) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<ByteUnit> for u8

Source§

type Output = ByteUnit

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: ByteUnit) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<ByteUnit> for usize

Source§

type Output = ByteUnit

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: ByteUnit) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: Into<ByteUnit>> Mul<T> for ByteUnit

Source§

type Output = ByteUnit

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl Ord for ByteUnit

Source§

fn cmp(&self, other: &ByteUnit) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq<ByteUnit> for i16

Source§

fn eq(&self, other: &ByteUnit) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<ByteUnit> for i32

Source§

fn eq(&self, other: &ByteUnit) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<ByteUnit> for i64

Source§

fn eq(&self, other: &ByteUnit) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<ByteUnit> for i8

Source§

fn eq(&self, other: &ByteUnit) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<ByteUnit> for isize

Source§

fn eq(&self, other: &ByteUnit) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<ByteUnit> for u16

Source§

fn eq(&self, other: &ByteUnit) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<ByteUnit> for u32

Source§

fn eq(&self, other: &ByteUnit) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<ByteUnit> for u64

Source§

fn eq(&self, other: &ByteUnit) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<ByteUnit> for u8

Source§

fn eq(&self, other: &ByteUnit) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<ByteUnit> for usize

Source§

fn eq(&self, other: &ByteUnit) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: Into<ByteUnit> + Copy> PartialEq<T> for ByteUnit

Source§

fn eq(&self, other: &T) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd<ByteUnit> for i16

Source§

fn partial_cmp(&self, other: &ByteUnit) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<ByteUnit> for i32

Source§

fn partial_cmp(&self, other: &ByteUnit) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<ByteUnit> for i64

Source§

fn partial_cmp(&self, other: &ByteUnit) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<ByteUnit> for i8

Source§

fn partial_cmp(&self, other: &ByteUnit) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<ByteUnit> for isize

Source§

fn partial_cmp(&self, other: &ByteUnit) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<ByteUnit> for u16

Source§

fn partial_cmp(&self, other: &ByteUnit) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<ByteUnit> for u32

Source§

fn partial_cmp(&self, other: &ByteUnit) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<ByteUnit> for u64

Source§

fn partial_cmp(&self, other: &ByteUnit) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<ByteUnit> for u8

Source§

fn partial_cmp(&self, other: &ByteUnit) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<ByteUnit> for usize

Source§

fn partial_cmp(&self, other: &ByteUnit) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<T: Into<ByteUnit> + Copy> PartialOrd<T> for ByteUnit

Source§

fn partial_cmp(&self, other: &T) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Rem<ByteUnit> for i16

Source§

type Output = ByteUnit

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: ByteUnit) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<ByteUnit> for i32

Source§

type Output = ByteUnit

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: ByteUnit) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<ByteUnit> for i64

Source§

type Output = ByteUnit

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: ByteUnit) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<ByteUnit> for i8

Source§

type Output = ByteUnit

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: ByteUnit) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<ByteUnit> for isize

Source§

type Output = ByteUnit

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: ByteUnit) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<ByteUnit> for u16

Source§

type Output = ByteUnit

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: ByteUnit) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<ByteUnit> for u32

Source§

type Output = ByteUnit

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: ByteUnit) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<ByteUnit> for u64

Source§

type Output = ByteUnit

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: ByteUnit) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<ByteUnit> for u8

Source§

type Output = ByteUnit

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: ByteUnit) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<ByteUnit> for usize

Source§

type Output = ByteUnit

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: ByteUnit) -> Self::Output

Performs the % operation. Read more
Source§

impl<T: Into<ByteUnit>> Rem<T> for ByteUnit

Source§

type Output = ByteUnit

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: T) -> Self::Output

Performs the % operation. Read more
Source§

impl Serialize for ByteUnit

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Shl<ByteUnit> for i16

Source§

type Output = ByteUnit

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: ByteUnit) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<ByteUnit> for i32

Source§

type Output = ByteUnit

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: ByteUnit) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<ByteUnit> for i64

Source§

type Output = ByteUnit

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: ByteUnit) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<ByteUnit> for i8

Source§

type Output = ByteUnit

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: ByteUnit) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<ByteUnit> for isize

Source§

type Output = ByteUnit

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: ByteUnit) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<ByteUnit> for u16

Source§

type Output = ByteUnit

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: ByteUnit) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<ByteUnit> for u32

Source§

type Output = ByteUnit

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: ByteUnit) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<ByteUnit> for u64

Source§

type Output = ByteUnit

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: ByteUnit) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<ByteUnit> for u8

Source§

type Output = ByteUnit

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: ByteUnit) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<ByteUnit> for usize

Source§

type Output = ByteUnit

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: ByteUnit) -> Self::Output

Performs the << operation. Read more
Source§

impl<T: Into<ByteUnit>> Shl<T> for ByteUnit

Source§

type Output = ByteUnit

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: T) -> Self::Output

Performs the << operation. Read more
Source§

impl Shr<ByteUnit> for i16

Source§

type Output = ByteUnit

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: ByteUnit) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<ByteUnit> for i32

Source§

type Output = ByteUnit

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: ByteUnit) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<ByteUnit> for i64

Source§

type Output = ByteUnit

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: ByteUnit) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<ByteUnit> for i8

Source§

type Output = ByteUnit

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: ByteUnit) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<ByteUnit> for isize

Source§

type Output = ByteUnit

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: ByteUnit) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<ByteUnit> for u16

Source§

type Output = ByteUnit

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: ByteUnit) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<ByteUnit> for u32

Source§

type Output = ByteUnit

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: ByteUnit) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<ByteUnit> for u64

Source§

type Output = ByteUnit

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: ByteUnit) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<ByteUnit> for u8

Source§

type Output = ByteUnit

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: ByteUnit) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<ByteUnit> for usize

Source§

type Output = ByteUnit

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: ByteUnit) -> Self::Output

Performs the >> operation. Read more
Source§

impl<T: Into<ByteUnit>> Shr<T> for ByteUnit

Source§

type Output = ByteUnit

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: T) -> Self::Output

Performs the >> operation. Read more
Source§

impl Sub<ByteUnit> for i16

Source§

type Output = ByteUnit

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: ByteUnit) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<ByteUnit> for i32

Source§

type Output = ByteUnit

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: ByteUnit) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<ByteUnit> for i64

Source§

type Output = ByteUnit

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: ByteUnit) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<ByteUnit> for i8

Source§

type Output = ByteUnit

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: ByteUnit) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<ByteUnit> for isize

Source§

type Output = ByteUnit

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: ByteUnit) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<ByteUnit> for u16

Source§

type Output = ByteUnit

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: ByteUnit) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<ByteUnit> for u32

Source§

type Output = ByteUnit

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: ByteUnit) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<ByteUnit> for u64

Source§

type Output = ByteUnit

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: ByteUnit) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<ByteUnit> for u8

Source§

type Output = ByteUnit

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: ByteUnit) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<ByteUnit> for usize

Source§

type Output = ByteUnit

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: ByteUnit) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: Into<ByteUnit>> Sub<T> for ByteUnit

Source§

type Output = ByteUnit

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> Self::Output

Performs the - operation. Read more
Source§

impl Copy for ByteUnit

Source§

impl Eq for ByteUnit

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> Context for T
where T: Display + Debug + Send + Sync + 'static,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,