Struct signalo_filters::source::PadConstant [−][src]
pub struct PadConstant<S, T> { /* fields omitted */ }
A source that pads an inner source with a specified number of constant values at the edges.
Example:
use signalo_filters::source::Increment; let increment = Increment::new(0, 1); // ╭───╮ ╭───╮ ╭───╮ ╭───╮ ╭───╮ // │ 0 │─▶│ 1 │─▶│ 2 │─▶│ 3 │─▶│ 4 │─▶ ... // ╰───╯ ╰───╯ ╰───╯ ╰───╯ ╰───╯ use signalo_filters::source::Take; let take = Take::new(increment, 3); // ╭───╮ ╭───╮ ╭───╮ // │ 0 │─▶│ 1 │─▶│ 2 │ // ╰───╯ ╰───╯ ╰───╯ use signalo_filters::source::PadConstant; let pad_constant = PadConstant::new(take, 42, 2); // ╭────╮ ╭────╮ ╭───╮ ╭───╮ ╭───╮ ╭────╮ ╭────╮ // │ 42 │─▶│ 42 │─▶│ 0 │─▶│ 1 │─▶│ 2 │─▶│ 42 │─▶│ 42 │ // ╰────╯ ╰────╯ ╰───╯ ╰───╯ ╰───╯ ╰────╯ ╰────╯
Methods
impl<S, T> Pad<S, T> where
T: Clone,
[src]
impl<S, T> Pad<S, T> where
T: Clone,
pub fn new(inner: S, value: T, count: usize) -> Self
[src]
pub fn new(inner: S, value: T, count: usize) -> Self
Creates a new Pad
source from an inner source and specified padding.
Trait Implementations
impl<S: Clone, T: Clone> Clone for Pad<S, T>
[src]
impl<S: Clone, T: Clone> Clone for Pad<S, T>
fn clone(&self) -> Pad<S, T>
[src]
fn clone(&self) -> Pad<S, 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<S: Debug, T: Debug> Debug for Pad<S, T>
[src]
impl<S: Debug, T: Debug> Debug for Pad<S, 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<S, T> Source for Pad<S, T> where
T: Clone,
S: Source<Output = T>,
[src]
impl<S, T> Source for Pad<S, T> where
T: Clone,
S: Source<Output = T>,
Auto Trait Implementations
impl<S, T> Send for PadConstant<S, T> where
S: Send,
T: Send,
impl<S, T> Send for PadConstant<S, T> where
S: Send,
T: Send,
impl<S, T> Sync for PadConstant<S, T> where
S: Sync,
T: Sync,
impl<S, T> Sync for PadConstant<S, T> where
S: Sync,
T: Sync,