Struct signalo_filters::source::Repeat[][src]

pub struct Repeat<T> { /* fields omitted */ }

A source that returns a specified number of constant values.

Example:

use signalo_filters::source::Repeat;
let repeat = Repeat::new(42, 3);
// ╭────╮  ╭────╮  ╭────╮
// │ 42 │─▶│ 42 │─▶│ 42 │
// ╰────╯  ╰────╯  ╰────╯

Methods

impl<T> Repeat<T>
[src]

Creates a new Repeat source for a given initial value and an interval.

Trait Implementations

impl<T: Clone> Clone for Repeat<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Debug> Debug for Repeat<T>
[src]

Formats the value using the given formatter. Read more

impl<T> Source for Repeat<T> where
    T: Clone,
    Constant<T>: Source<Output = T>,
    Take<Constant<T>>: Source<Output = T>, 
[src]

The source's output type.

Produces the next value in the stream of values.

Auto Trait Implementations

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

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