[][src]Struct sample::signal::Rms

pub struct Rms<S, D> where
    S: Signal,
    D: Slice<Element = <S::Frame as Frame>::Float>, 
{ /* fields omitted */ }

An adaptor that yields the RMS of the signal.

The window size of the RMS detector is equal to the given ring buffer length.

Implementations

impl<S, D> Rms<S, D> where
    S: Signal,
    D: Slice<Element = <S::Frame as Frame>::Float> + SliceMut
[src]

pub fn next_squared(&mut self) -> Self::Frame[src]

The same as Signal::next but does not calculate the final square root required to determine the RMS.

pub fn into_parts(self) -> (S, Rms<S::Frame, D>)[src]

Consumes the Rms signal and returns its inner signal S and Rms detector.

Trait Implementations

impl<S: Clone, D: Clone> Clone for Rms<S, D> where
    S: Signal,
    D: Slice<Element = <S::Frame as Frame>::Float>,
    S::Frame: Clone
[src]

impl<S, D> Signal for Rms<S, D> where
    S: Signal,
    D: Slice<Element = <S::Frame as Frame>::Float> + SliceMut
[src]

type Frame = <S::Frame as Frame>::Float

The Frame type returned by the Signal.

Auto Trait Implementations

impl<S, D> RefUnwindSafe for Rms<S, D> where
    D: RefUnwindSafe,
    S: RefUnwindSafe,
    <<S as Signal>::Frame as Frame>::Float: RefUnwindSafe,
    <S as Signal>::Frame: RefUnwindSafe

impl<S, D> Send for Rms<S, D> where
    D: Send,
    S: Send,
    <<S as Signal>::Frame as Frame>::Float: Send,
    <S as Signal>::Frame: Send

impl<S, D> Sync for Rms<S, D> where
    D: Sync,
    S: Sync,
    <<S as Signal>::Frame as Frame>::Float: Sync,
    <S as Signal>::Frame: Sync

impl<S, D> Unpin for Rms<S, D> where
    D: Unpin,
    S: Unpin,
    <<S as Signal>::Frame as Frame>::Float: Unpin,
    <S as Signal>::Frame: Unpin

impl<S, D> UnwindSafe for Rms<S, D> where
    D: UnwindSafe,
    S: UnwindSafe,
    <<S as Signal>::Frame as Frame>::Float: UnwindSafe,
    <S as Signal>::Frame: UnwindSafe

Blanket Implementations

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

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

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

impl<S, T> Duplex<S> for T where
    T: FromSample<S> + ToSample<S>, 
[src]

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

impl<S> FromSample<S> for S[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> ToSample<U> for T where
    U: FromSample<T>, 
[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.