pub struct TriangleWave { /* private fields */ }Expand description
Generates a Triangle wave between 0 and an amplitude for a given duration.
Waves are generated as single pulses with a given wavelength.
To play several cycles of the wave in sequence, use the repeat method.
Implementations§
Trait Implementations§
Source§impl Clone for TriangleWave
impl Clone for TriangleWave
Source§fn clone(&self) -> TriangleWave
fn clone(&self) -> TriangleWave
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TriangleWave
Source§impl Debug for TriangleWave
impl Debug for TriangleWave
Source§impl PartialEq for TriangleWave
impl PartialEq for TriangleWave
Source§fn eq(&self, other: &TriangleWave) -> bool
fn eq(&self, other: &TriangleWave) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PatternGenerator for TriangleWave
impl PatternGenerator for TriangleWave
impl StructuralPartialEq for TriangleWave
Auto Trait Implementations§
impl Freeze for TriangleWave
impl RefUnwindSafe for TriangleWave
impl Send for TriangleWave
impl Sync for TriangleWave
impl Unpin for TriangleWave
impl UnsafeUnpin for TriangleWave
impl UnwindSafe for TriangleWave
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Pattern for Twhere
T: PatternGenerator,
impl<T> Pattern for Twhere
T: PatternGenerator,
Source§fn scale_time(self, scalar: f64) -> ScaleTime<Self>
fn scale_time(self, scalar: f64) -> ScaleTime<Self>
Scales the pattern in the time domain by a given
scalar. Read moreSource§fn scale_intensity(self, scalar: f64) -> ScaleIntensity<Self>
fn scale_intensity(self, scalar: f64) -> ScaleIntensity<Self>
Scales the pattern in the intensity domain by a given
scalar. Read moreSource§fn subtract<Q: Pattern>(self, other: Q) -> Subtract<Self, Q>
fn subtract<Q: Pattern>(self, other: Q) -> Subtract<Self, Q>
Takes the difference of two patterns. Read more
Source§fn average<Q: Pattern>(self, other: Q) -> Average<Self, Q>
fn average<Q: Pattern>(self, other: Q) -> Average<Self, Q>
Takes the average of two patterns. Read more
Source§fn clamp(self, floor: f64, ceiling: f64) -> Clamp<Self>
fn clamp(self, floor: f64, ceiling: f64) -> Clamp<Self>
Clamps the pattern to a given range. Read more
Source§fn clamp_valid(self) -> Clamp<Self>
fn clamp_valid(self) -> Clamp<Self>
Clamps the pattern to a valid scalar value for a buttplug command.
This is in the range of 0.0 to 1.0.
Source§fn scale_valid(self) -> ValidScale<Self>
fn scale_valid(self) -> ValidScale<Self>
Scales a pattern to a valid range for a buttplug command. Read more
fn shift(self, time_shift: f64) -> Shift<Self>
Source§fn repeat(self, count: f64) -> Repeat<Self>
fn repeat(self, count: f64) -> Repeat<Self>
Repeats a pattern
count times, fractional repeats are supported, so pattern.repeat(1.5) is validSource§fn chain<Q: Pattern>(self, other: Q) -> Chain<Self, Q>
fn chain<Q: Pattern>(self, other: Q) -> Chain<Self, Q>
Chains two patterns together,
other is run after self’s duration.Source§fn multiply<M: Pattern>(self, modulator: M) -> AmplitudeModulator<Self, M>
fn multiply<M: Pattern>(self, modulator: M) -> AmplitudeModulator<Self, M>
Modulates the amplitude of the pattern by another pattern.