[][src]Struct mag::Frequency

pub struct Frequency<U> where
    U: Unit
{ pub quantity: f64, // some fields omitted }

A measurement of temporal frequency for repeating events.

Frequency is a derived quantity with a specific unit.

Operations

  • Frequency + Frequency => Frequency
  • Frequency - Frequency => Frequency
  • Frequency * f64 => Frequency
  • f64 * Frequency => Frequency
  • f64 / Period => Frequency
  • f64 / unit => Frequency
  • f64 / Frequency => Period

Units must be the same for operations with two Frequency operands. The to method can be used for conversion.

Fields

quantity: f64

Frequency quantity

Methods

impl<U> Frequency<U> where
    U: Unit
[src]

pub fn new(quantity: f64) -> Self[src]

Create a new frequency measurement

pub fn to<T: Unit>(self) -> Frequency<T>[src]

Convert to specified units

Trait Implementations

impl<U: Clone> Clone for Frequency<U> where
    U: Unit
[src]

impl<U: Copy> Copy for Frequency<U> where
    U: Unit
[src]

impl<U: PartialEq> PartialEq<Frequency<U>> for Frequency<U> where
    U: Unit
[src]

impl<U> Display for Frequency<U> where
    U: Unit
[src]

impl<U: Debug> Debug for Frequency<U> where
    U: Unit
[src]

impl<U> Div<f64> for Frequency<U> where
    U: Unit
[src]

type Output = Self

The resulting type after applying the / operator.

impl<U> Div<Frequency<U>> for f64 where
    U: Unit
[src]

type Output = Period<U>

The resulting type after applying the / operator.

impl<U> Sub<Frequency<U>> for Frequency<U> where
    U: Unit
[src]

type Output = Self

The resulting type after applying the - operator.

impl<U> Add<Frequency<U>> for Frequency<U> where
    U: Unit
[src]

type Output = Self

The resulting type after applying the + operator.

impl<U> Mul<f64> for Frequency<U> where
    U: Unit
[src]

type Output = Self

The resulting type after applying the * operator.

impl<U> Mul<Frequency<U>> for f64 where
    U: Unit
[src]

type Output = Frequency<U>

The resulting type after applying the * operator.

impl<U> StructuralPartialEq for Frequency<U> where
    U: Unit
[src]

Auto Trait Implementations

impl<U> Send for Frequency<U> where
    U: Send

impl<U> Sync for Frequency<U> where
    U: Sync

impl<U> Unpin for Frequency<U> where
    U: Unpin

impl<U> UnwindSafe for Frequency<U> where
    U: UnwindSafe

impl<U> RefUnwindSafe for Frequency<U> where
    U: RefUnwindSafe

Blanket Implementations

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.

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.

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

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

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