pub struct SpectrometerConfig(/* private fields */);Expand description
Spectrometer configuration setter.
This struct gives shared access to getters and setters for the spectrometer sample rate and mode. It is used to update the sample rate and mode from other parts of the code.
Implementations§
Source§impl SpectrometerConfig
impl SpectrometerConfig
Sourcepub fn samp_rate(&self) -> f32
pub fn samp_rate(&self) -> f32
Returns the spectrometer sample rate.
The units are samples per second.
Sourcepub fn mode(&self) -> SpectrometerMode
pub fn mode(&self) -> SpectrometerMode
Returns the spectrometer mode.
Sourcepub fn samp_rate_mode(&self) -> (f32, SpectrometerMode)
pub fn samp_rate_mode(&self) -> (f32, SpectrometerMode)
Returns the spectrometer sample rate and mode
Sourcepub fn set_samp_rate(&self, samp_rate: f32)
pub fn set_samp_rate(&self, samp_rate: f32)
Sets the spectrometer sample rate.
Updates the spectrometer sample rate to the value give, in units of samples per second.
Sourcepub fn set_mode(&self, mode: SpectrometerMode)
pub fn set_mode(&self, mode: SpectrometerMode)
Sets the spectrometer mode.
Sourcepub fn set_samp_rate_mode(&self, samp_rate: f32, mode: SpectrometerMode)
pub fn set_samp_rate_mode(&self, samp_rate: f32, mode: SpectrometerMode)
Sets the spectrometer sample rate and mode.
Trait Implementations§
Source§impl Debug for SpectrometerConfig
impl Debug for SpectrometerConfig
Source§impl Default for SpectrometerConfig
impl Default for SpectrometerConfig
Source§fn default() -> SpectrometerConfig
fn default() -> SpectrometerConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for SpectrometerConfig
impl RefUnwindSafe for SpectrometerConfig
impl Send for SpectrometerConfig
impl Sync for SpectrometerConfig
impl Unpin for SpectrometerConfig
impl UnwindSafe for SpectrometerConfig
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> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more