pub struct Random {
pub range: Range<f64>,
pub duration: Duration,
}Expand description
Generates a random value between the given range every tick.
Fields§
§range: Range<f64>§duration: DurationImplementations§
Trait Implementations§
Source§impl PatternGenerator for Random
impl PatternGenerator for Random
impl StructuralPartialEq for Random
Auto Trait Implementations§
impl Freeze for Random
impl RefUnwindSafe for Random
impl Send for Random
impl Sync for Random
impl Unpin for Random
impl UnsafeUnpin for Random
impl UnwindSafe for Random
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.