Struct embedded_time::rate::BitsPerSecond[][src]

pub struct BitsPerSecond<T: TimeInt = u32>(pub T);
Expand description

Bits/s

Implementations

impl<T: TimeInt> BitsPerSecond<T>[src]

pub fn new(value: T) -> Self[src]

Trait Implementations

impl<T: TimeInt, Rhs: Rate> Add<Rhs> for BitsPerSecond<T> where
    Rhs: FixedPoint,
    Self: TryFrom<Rhs>, 
[src]

fn add(self, rhs: Rhs) -> Self::Output[src]

See Add/Sub

type Output = Self

The resulting type after applying the + operator.

impl<T: Clone + TimeInt> Clone for BitsPerSecond<T>[src]

fn clone(&self) -> BitsPerSecond<T>[src]

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<T: Debug + TimeInt> Debug for BitsPerSecond<T>[src]

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

Formats the value using the given formatter. Read more

impl<T: Default + TimeInt> Default for BitsPerSecond<T>[src]

fn default() -> BitsPerSecond<T>[src]

Returns the “default value” for a type. Read more

impl<T: TimeInt> Display for BitsPerSecond<T>[src]

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

impl<T: TimeInt> Div<T> for BitsPerSecond<T>[src]

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

See Mul/Div

type Output = Self

The resulting type after applying the / operator.

impl<T: TimeInt> FixedPoint for BitsPerSecond<T>[src]

fn integer(&self) -> Self::T[src]

type T = T

The integer (magnitude) type

const SCALING_FACTOR: Fraction[src]

The fractional scaling factor

fn new(value: Self::T) -> Self[src]

fn checked_mul(&self, rhs: &Self::T) -> Option<Self>[src]

Multiply with overflow checking

fn checked_div(&self, rhs: &Self::T) -> Option<Self>[src]

Multiply with overflow checking

fn min_value() -> Self::T[src]

Returns the minimum integer value

fn max_value() -> Self::T[src]

Returns the maximum integer value

impl<T: TimeInt> From<BitsPerSecond<T>> for Generic<T>[src]

impl<T: TimeInt> From<BitsPerSecond<T>> for MebibytesPerSecond<T>[src]

impl<T: TimeInt> From<BitsPerSecond<T>> for MebibitsPerSecond<T>[src]

impl<T: TimeInt> From<BitsPerSecond<T>> for KibibytesPerSecond<T>[src]

impl<T: TimeInt> From<BitsPerSecond<T>> for KibibitsPerSecond<T>[src]

impl<T: TimeInt> From<BitsPerSecond<T>> for MegabytesPerSecond<T>[src]

impl<T: TimeInt> From<BitsPerSecond<T>> for MegabitsPerSecond<T>[src]

impl<T: TimeInt> From<BitsPerSecond<T>> for KilobytesPerSecond<T>[src]

impl<T: TimeInt> From<BitsPerSecond<T>> for KilobitsPerSecond<T>[src]

impl<T: TimeInt> From<BitsPerSecond<T>> for BytesPerSecond<T>[src]

impl From<BitsPerSecond<u32>> for MebibytesPerSecond<u64>[src]

impl From<BitsPerSecond<u32>> for MebibitsPerSecond<u64>[src]

impl From<BitsPerSecond<u32>> for KibibytesPerSecond<u64>[src]

impl From<BitsPerSecond<u32>> for KibibitsPerSecond<u64>[src]

impl From<BitsPerSecond<u32>> for MegabytesPerSecond<u64>[src]

impl From<BitsPerSecond<u32>> for MegabitsPerSecond<u64>[src]

impl From<BitsPerSecond<u32>> for KilobytesPerSecond<u64>[src]

impl From<BitsPerSecond<u32>> for KilobitsPerSecond<u64>[src]

impl From<BitsPerSecond<u32>> for BytesPerSecond<u64>[src]

impl From<BitsPerSecond<u32>> for BitsPerSecond<u64>[src]

fn from(source: BitsPerSecond<u32>) -> Self[src]

impl From<BytesPerSecond<u32>> for BitsPerSecond<u64>[src]

impl From<KibibitsPerSecond<u32>> for BitsPerSecond<u64>[src]

impl From<KibibytesPerSecond<u32>> for BitsPerSecond<u64>[src]

impl From<KilobitsPerSecond<u32>> for BitsPerSecond<u64>[src]

impl From<KilobytesPerSecond<u32>> for BitsPerSecond<u64>[src]

impl From<MebibitsPerSecond<u32>> for BitsPerSecond<u64>[src]

impl From<MebibytesPerSecond<u32>> for BitsPerSecond<u64>[src]

impl From<MegabitsPerSecond<u32>> for BitsPerSecond<u64>[src]

impl From<MegabytesPerSecond<u32>> for BitsPerSecond<u64>[src]

impl<T: Hash + TimeInt> Hash for BitsPerSecond<T>[src]

fn hash<__H: Hasher>(&self, state: &mut __H)[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl<T: TimeInt> Mul<T> for BitsPerSecond<T>[src]

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

See Mul/Div

type Output = Self

The resulting type after applying the * operator.

impl<T: Ord + TimeInt> Ord for BitsPerSecond<T>[src]

fn cmp(&self, other: &BitsPerSecond<T>) -> Ordering[src]

This method returns an Ordering between self and other. Read more

#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]

Compares and returns the maximum of two values. Read more

#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]

Compares and returns the minimum of two values. Read more

#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]

Restrict a value to a certain interval. Read more

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<BitsPerSecond<RhsInt>> for MebibytesPerSecond<T> where
    BitsPerSecond<RhsInt>: PartialEq<MebibytesPerSecond<T>>, 
[src]

fn eq(&self, rhs: &BitsPerSecond<RhsInt>) -> bool[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<BitsPerSecond<RhsInt>> for MebibitsPerSecond<T> where
    BitsPerSecond<RhsInt>: PartialEq<MebibitsPerSecond<T>>, 
[src]

fn eq(&self, rhs: &BitsPerSecond<RhsInt>) -> bool[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<BitsPerSecond<RhsInt>> for KibibytesPerSecond<T> where
    BitsPerSecond<RhsInt>: PartialEq<KibibytesPerSecond<T>>, 
[src]

fn eq(&self, rhs: &BitsPerSecond<RhsInt>) -> bool[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<BitsPerSecond<RhsInt>> for KibibitsPerSecond<T> where
    BitsPerSecond<RhsInt>: PartialEq<KibibitsPerSecond<T>>, 
[src]

fn eq(&self, rhs: &BitsPerSecond<RhsInt>) -> bool[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<BitsPerSecond<RhsInt>> for MegabytesPerSecond<T> where
    BitsPerSecond<RhsInt>: PartialEq<MegabytesPerSecond<T>>, 
[src]

fn eq(&self, rhs: &BitsPerSecond<RhsInt>) -> bool[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<BitsPerSecond<RhsInt>> for MegabitsPerSecond<T> where
    BitsPerSecond<RhsInt>: PartialEq<MegabitsPerSecond<T>>, 
[src]

fn eq(&self, rhs: &BitsPerSecond<RhsInt>) -> bool[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<BitsPerSecond<RhsInt>> for KilobytesPerSecond<T> where
    BitsPerSecond<RhsInt>: PartialEq<KilobytesPerSecond<T>>, 
[src]

fn eq(&self, rhs: &BitsPerSecond<RhsInt>) -> bool[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<BitsPerSecond<RhsInt>> for KilobitsPerSecond<T> where
    BitsPerSecond<RhsInt>: PartialEq<KilobitsPerSecond<T>>, 
[src]

fn eq(&self, rhs: &BitsPerSecond<RhsInt>) -> bool[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<BitsPerSecond<RhsInt>> for BytesPerSecond<T> where
    BitsPerSecond<RhsInt>: PartialEq<BytesPerSecond<T>>, 
[src]

fn eq(&self, rhs: &BitsPerSecond<RhsInt>) -> bool[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<BitsPerSecond<RhsInt>> for BitsPerSecond<T> where
    T: TryFrom<RhsInt>, 
[src]

fn eq(&self, rhs: &BitsPerSecond<RhsInt>) -> bool[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<BytesPerSecond<RhsInt>> for BitsPerSecond<T> where
    Self: TryFrom<BytesPerSecond<RhsInt>>, 
[src]

fn eq(&self, rhs: &BytesPerSecond<RhsInt>) -> bool[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<KibibitsPerSecond<RhsInt>> for BitsPerSecond<T> where
    Self: TryFrom<KibibitsPerSecond<RhsInt>>, 
[src]

fn eq(&self, rhs: &KibibitsPerSecond<RhsInt>) -> bool[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<KibibytesPerSecond<RhsInt>> for BitsPerSecond<T> where
    Self: TryFrom<KibibytesPerSecond<RhsInt>>, 
[src]

fn eq(&self, rhs: &KibibytesPerSecond<RhsInt>) -> bool[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<KilobitsPerSecond<RhsInt>> for BitsPerSecond<T> where
    Self: TryFrom<KilobitsPerSecond<RhsInt>>, 
[src]

fn eq(&self, rhs: &KilobitsPerSecond<RhsInt>) -> bool[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<KilobytesPerSecond<RhsInt>> for BitsPerSecond<T> where
    Self: TryFrom<KilobytesPerSecond<RhsInt>>, 
[src]

fn eq(&self, rhs: &KilobytesPerSecond<RhsInt>) -> bool[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<MebibitsPerSecond<RhsInt>> for BitsPerSecond<T> where
    Self: TryFrom<MebibitsPerSecond<RhsInt>>, 
[src]

fn eq(&self, rhs: &MebibitsPerSecond<RhsInt>) -> bool[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<MebibytesPerSecond<RhsInt>> for BitsPerSecond<T> where
    Self: TryFrom<MebibytesPerSecond<RhsInt>>, 
[src]

fn eq(&self, rhs: &MebibytesPerSecond<RhsInt>) -> bool[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<MegabitsPerSecond<RhsInt>> for BitsPerSecond<T> where
    Self: TryFrom<MegabitsPerSecond<RhsInt>>, 
[src]

fn eq(&self, rhs: &MegabitsPerSecond<RhsInt>) -> bool[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<MegabytesPerSecond<RhsInt>> for BitsPerSecond<T> where
    Self: TryFrom<MegabytesPerSecond<RhsInt>>, 
[src]

fn eq(&self, rhs: &MegabytesPerSecond<RhsInt>) -> bool[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<BitsPerSecond<RhsInt>> for MebibytesPerSecond<T> where
    BitsPerSecond<RhsInt>: TryFrom<Self> + Ord
[src]

fn partial_cmp(&self, rhs: &BitsPerSecond<RhsInt>) -> Option<Ordering>[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<BitsPerSecond<RhsInt>> for MebibitsPerSecond<T> where
    BitsPerSecond<RhsInt>: TryFrom<Self> + Ord
[src]

fn partial_cmp(&self, rhs: &BitsPerSecond<RhsInt>) -> Option<Ordering>[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<BitsPerSecond<RhsInt>> for KibibytesPerSecond<T> where
    BitsPerSecond<RhsInt>: TryFrom<Self> + Ord
[src]

fn partial_cmp(&self, rhs: &BitsPerSecond<RhsInt>) -> Option<Ordering>[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<BitsPerSecond<RhsInt>> for KibibitsPerSecond<T> where
    BitsPerSecond<RhsInt>: TryFrom<Self> + Ord
[src]

fn partial_cmp(&self, rhs: &BitsPerSecond<RhsInt>) -> Option<Ordering>[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<BitsPerSecond<RhsInt>> for MegabytesPerSecond<T> where
    BitsPerSecond<RhsInt>: TryFrom<Self> + Ord
[src]

fn partial_cmp(&self, rhs: &BitsPerSecond<RhsInt>) -> Option<Ordering>[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<BitsPerSecond<RhsInt>> for MegabitsPerSecond<T> where
    BitsPerSecond<RhsInt>: TryFrom<Self> + Ord
[src]

fn partial_cmp(&self, rhs: &BitsPerSecond<RhsInt>) -> Option<Ordering>[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<BitsPerSecond<RhsInt>> for KilobytesPerSecond<T> where
    BitsPerSecond<RhsInt>: TryFrom<Self> + Ord
[src]

fn partial_cmp(&self, rhs: &BitsPerSecond<RhsInt>) -> Option<Ordering>[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<BitsPerSecond<RhsInt>> for KilobitsPerSecond<T> where
    BitsPerSecond<RhsInt>: TryFrom<Self> + Ord
[src]

fn partial_cmp(&self, rhs: &BitsPerSecond<RhsInt>) -> Option<Ordering>[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<BitsPerSecond<RhsInt>> for BytesPerSecond<T> where
    BitsPerSecond<RhsInt>: TryFrom<Self> + Ord
[src]

fn partial_cmp(&self, rhs: &BitsPerSecond<RhsInt>) -> Option<Ordering>[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<BitsPerSecond<RhsInt>> for BitsPerSecond<T> where
    T: TryFrom<RhsInt>, 
[src]

fn partial_cmp(&self, rhs: &BitsPerSecond<RhsInt>) -> Option<Ordering>[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<BytesPerSecond<RhsInt>> for BitsPerSecond<T> where
    Self: TryFrom<BytesPerSecond<RhsInt>>, 
[src]

fn partial_cmp(&self, rhs: &BytesPerSecond<RhsInt>) -> Option<Ordering>[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<KibibitsPerSecond<RhsInt>> for BitsPerSecond<T> where
    Self: TryFrom<KibibitsPerSecond<RhsInt>>, 
[src]

fn partial_cmp(&self, rhs: &KibibitsPerSecond<RhsInt>) -> Option<Ordering>[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<KibibytesPerSecond<RhsInt>> for BitsPerSecond<T> where
    Self: TryFrom<KibibytesPerSecond<RhsInt>>, 
[src]

fn partial_cmp(&self, rhs: &KibibytesPerSecond<RhsInt>) -> Option<Ordering>[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<KilobitsPerSecond<RhsInt>> for BitsPerSecond<T> where
    Self: TryFrom<KilobitsPerSecond<RhsInt>>, 
[src]

fn partial_cmp(&self, rhs: &KilobitsPerSecond<RhsInt>) -> Option<Ordering>[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<KilobytesPerSecond<RhsInt>> for BitsPerSecond<T> where
    Self: TryFrom<KilobytesPerSecond<RhsInt>>, 
[src]

fn partial_cmp(&self, rhs: &KilobytesPerSecond<RhsInt>) -> Option<Ordering>[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<MebibitsPerSecond<RhsInt>> for BitsPerSecond<T> where
    Self: TryFrom<MebibitsPerSecond<RhsInt>>, 
[src]

fn partial_cmp(&self, rhs: &MebibitsPerSecond<RhsInt>) -> Option<Ordering>[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<MebibytesPerSecond<RhsInt>> for BitsPerSecond<T> where
    Self: TryFrom<MebibytesPerSecond<RhsInt>>, 
[src]

fn partial_cmp(&self, rhs: &MebibytesPerSecond<RhsInt>) -> Option<Ordering>[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<MegabitsPerSecond<RhsInt>> for BitsPerSecond<T> where
    Self: TryFrom<MegabitsPerSecond<RhsInt>>, 
[src]

fn partial_cmp(&self, rhs: &MegabitsPerSecond<RhsInt>) -> Option<Ordering>[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<MegabytesPerSecond<RhsInt>> for BitsPerSecond<T> where
    Self: TryFrom<MegabytesPerSecond<RhsInt>>, 
[src]

fn partial_cmp(&self, rhs: &MegabytesPerSecond<RhsInt>) -> Option<Ordering>[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: TimeInt> Rate for BitsPerSecond<T>[src]

fn to_generic<DestInt: TimeInt>(
    self,
    scaling_factor: Fraction
) -> Result<Generic<DestInt>, ConversionError> where
    Self: FixedPoint,
    DestInt: TryFrom<Self::T>, 
[src]

Construct a Generic Rate from a named Rate (eg. Kilohertz) Read more

fn to_duration<Duration: Duration>(&self) -> Result<Duration, ConversionError> where
    Duration: FixedPoint,
    Self: FixedPoint,
    Duration::T: TryFrom<Self::T>, 
[src]

Convert to named Duration Read more

impl<T: TimeInt, Rhs: Rate> Rem<Rhs> for BitsPerSecond<T> where
    Self: TryFrom<Rhs>,
    Rhs: FixedPoint
[src]

fn rem(self, rhs: Rhs) -> Self::Output[src]

type Output = Self

The resulting type after applying the % operator.

impl<T: TimeInt, Rhs: Rate> Sub<Rhs> for BitsPerSecond<T> where
    Self: TryFrom<Rhs>,
    Rhs: FixedPoint
[src]

fn sub(self, rhs: Rhs) -> Self::Output[src]

See Add/Sub

type Output = Self

The resulting type after applying the - operator.

impl TryFrom<BitsPerSecond<u64>> for MebibytesPerSecond<u32>[src]

fn try_from(small: BitsPerSecond<u64>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<BitsPerSecond<u64>> for MebibitsPerSecond<u32>[src]

fn try_from(small: BitsPerSecond<u64>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<BitsPerSecond<u64>> for KibibytesPerSecond<u32>[src]

fn try_from(small: BitsPerSecond<u64>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<BitsPerSecond<u64>> for KibibitsPerSecond<u32>[src]

fn try_from(small: BitsPerSecond<u64>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<BitsPerSecond<u64>> for MegabytesPerSecond<u32>[src]

fn try_from(small: BitsPerSecond<u64>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<BitsPerSecond<u64>> for MegabitsPerSecond<u32>[src]

fn try_from(small: BitsPerSecond<u64>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<BitsPerSecond<u64>> for KilobytesPerSecond<u32>[src]

fn try_from(small: BitsPerSecond<u64>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<BitsPerSecond<u64>> for KilobitsPerSecond<u32>[src]

fn try_from(small: BitsPerSecond<u64>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<BitsPerSecond<u64>> for BytesPerSecond<u32>[src]

fn try_from(small: BitsPerSecond<u64>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<BitsPerSecond<u64>> for BitsPerSecond<u32>[src]

fn try_from(source: BitsPerSecond<u64>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<T: TimeInt> TryFrom<BytesPerSecond<T>> for BitsPerSecond<T>[src]

fn try_from(big: BytesPerSecond<T>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<BytesPerSecond<u64>> for BitsPerSecond<u32>[src]

fn try_from(big: BytesPerSecond<u64>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<SourceInt: TimeInt, DestInt: TimeInt> TryFrom<Generic<SourceInt>> for BitsPerSecond<DestInt> where
    DestInt: TryFrom<SourceInt>, 
[src]

fn try_from(generic_rate: Generic<SourceInt>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<T: TimeInt> TryFrom<KibibitsPerSecond<T>> for BitsPerSecond<T>[src]

fn try_from(big: KibibitsPerSecond<T>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<KibibitsPerSecond<u64>> for BitsPerSecond<u32>[src]

fn try_from(big: KibibitsPerSecond<u64>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<T: TimeInt> TryFrom<KibibytesPerSecond<T>> for BitsPerSecond<T>[src]

fn try_from(big: KibibytesPerSecond<T>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<KibibytesPerSecond<u64>> for BitsPerSecond<u32>[src]

fn try_from(big: KibibytesPerSecond<u64>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<T: TimeInt> TryFrom<KilobitsPerSecond<T>> for BitsPerSecond<T>[src]

fn try_from(big: KilobitsPerSecond<T>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<KilobitsPerSecond<u64>> for BitsPerSecond<u32>[src]

fn try_from(big: KilobitsPerSecond<u64>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<T: TimeInt> TryFrom<KilobytesPerSecond<T>> for BitsPerSecond<T>[src]

fn try_from(big: KilobytesPerSecond<T>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<KilobytesPerSecond<u64>> for BitsPerSecond<u32>[src]

fn try_from(big: KilobytesPerSecond<u64>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<T: TimeInt> TryFrom<MebibitsPerSecond<T>> for BitsPerSecond<T>[src]

fn try_from(big: MebibitsPerSecond<T>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<MebibitsPerSecond<u64>> for BitsPerSecond<u32>[src]

fn try_from(big: MebibitsPerSecond<u64>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<T: TimeInt> TryFrom<MebibytesPerSecond<T>> for BitsPerSecond<T>[src]

fn try_from(big: MebibytesPerSecond<T>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<MebibytesPerSecond<u64>> for BitsPerSecond<u32>[src]

fn try_from(big: MebibytesPerSecond<u64>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<T: TimeInt> TryFrom<MegabitsPerSecond<T>> for BitsPerSecond<T>[src]

fn try_from(big: MegabitsPerSecond<T>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<MegabitsPerSecond<u64>> for BitsPerSecond<u32>[src]

fn try_from(big: MegabitsPerSecond<u64>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<T: TimeInt> TryFrom<MegabytesPerSecond<T>> for BitsPerSecond<T>[src]

fn try_from(big: MegabytesPerSecond<T>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<MegabytesPerSecond<u64>> for BitsPerSecond<u32>[src]

fn try_from(big: MegabytesPerSecond<u64>) -> Result<Self, Self::Error>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<T: Copy + TimeInt> Copy for BitsPerSecond<T>[src]

impl<T: Eq + TimeInt> Eq for BitsPerSecond<T>[src]

impl<T: TimeInt> StructuralEq for BitsPerSecond<T>[src]

Auto Trait Implementations

impl<T> Send for BitsPerSecond<T> where
    T: Send

impl<T> Sync for BitsPerSecond<T> where
    T: Sync

impl<T> Unpin for BitsPerSecond<T> where
    T: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
    T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>, 
[src]