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]
impl<T> Repeat<T>
pub fn new(value: T, count: usize) -> Self
[src]
pub fn new(value: T, count: usize) -> Self
Creates a new Repeat
source for a given initial
value and an interval
.
Trait Implementations
impl<T: Clone> Clone for Repeat<T>
[src]
impl<T: Clone> Clone for Repeat<T>
fn clone(&self) -> Repeat<T>
[src]
fn clone(&self) -> Repeat<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<T: Debug> Debug for Repeat<T>
[src]
impl<T: Debug> Debug for Repeat<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
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]
impl<T> Source for Repeat<T> where
T: Clone,
Constant<T>: Source<Output = T>,
Take<Constant<T>>: Source<Output = T>,