Struct maia_httpd::spectrometer::SpectrometerConfig
source · 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 Clone for SpectrometerConfig
impl Clone for SpectrometerConfig
source§fn clone(&self) -> SpectrometerConfig
fn clone(&self) -> SpectrometerConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
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