pub struct SnapshotConfigBuilder { /* private fields */ }Expand description
Builder for SnapshotConfig.
Implementations§
Source§impl SnapshotConfigBuilder
impl SnapshotConfigBuilder
Sourcepub fn num_samples(&mut self, value: usize) -> &mut Self
pub fn num_samples(&mut self, value: usize) -> &mut Self
Number of samples to generate.
Default is 1024
Sourcepub fn sample_rate(&mut self, value: f64) -> &mut Self
pub fn sample_rate(&mut self, value: f64) -> &mut Self
Sample rate of the audio unit.
Default is 44100.0 fundsp::DEFAULT_SR
Sourcepub fn svg_width(&mut self, value: usize) -> &mut Self
pub fn svg_width(&mut self, value: usize) -> &mut Self
Optional width of the SVG viewBox
None means proportional to num_samples
Sourcepub fn svg_height_per_channel(&mut self, value: usize) -> &mut Self
pub fn svg_height_per_channel(&mut self, value: usize) -> &mut Self
Height of one channel in the SVG viewBox
None fallbacks to default - 100
Sourcepub fn processing_mode(&mut self, value: Processing) -> &mut Self
pub fn processing_mode(&mut self, value: Processing) -> &mut Self
Processing mode for snapshotting an audio unit.
Default is Tick
Sourcepub fn with_inputs(&mut self, value: bool) -> &mut Self
pub fn with_inputs(&mut self, value: bool) -> &mut Self
Whether to include inputs in snapshot
Default is false
Sourcepub fn chart_title<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn chart_title<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Optional chart title
Default is None
Sourcepub fn output_titles<VALUE: Into<Vec<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn output_titles<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self
Optional titles for output channels
Default is empty Vec
Sourcepub fn output_title<VALUE, FROM_VALUE: Into<VALUE>>(
&mut self,
item: FROM_VALUE,
) -> &mut Self
pub fn output_title<VALUE, FROM_VALUE: Into<VALUE>>( &mut self, item: FROM_VALUE, ) -> &mut Self
Optional titles for output channels
Default is empty Vec
Sourcepub fn input_titles<VALUE: Into<Vec<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn input_titles<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self
Optional titles for input channels
Default is empty Vec
Sourcepub fn input_title<VALUE, FROM_VALUE: Into<VALUE>>(
&mut self,
item: FROM_VALUE,
) -> &mut Self
pub fn input_title<VALUE, FROM_VALUE: Into<VALUE>>( &mut self, item: FROM_VALUE, ) -> &mut Self
Optional titles for input channels
Default is empty Vec
Sourcepub fn show_grid(&mut self, value: bool) -> &mut Self
pub fn show_grid(&mut self, value: bool) -> &mut Self
Show grid lines on the chart
Default is false
Sourcepub fn show_labels(&mut self, value: bool) -> &mut Self
pub fn show_labels(&mut self, value: bool) -> &mut Self
Show axis labels
Default is true
Sourcepub fn output_colors<VALUE: Into<Vec<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn output_colors<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self
Custom colors for output channels (hex strings)
Default is None (uses default palette)
Sourcepub fn output_color<VALUE, FROM_VALUE: Into<VALUE>>(
&mut self,
item: FROM_VALUE,
) -> &mut Self
pub fn output_color<VALUE, FROM_VALUE: Into<VALUE>>( &mut self, item: FROM_VALUE, ) -> &mut Self
Custom colors for output channels (hex strings)
Default is None (uses default palette)
Sourcepub fn input_colors<VALUE: Into<Vec<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn input_colors<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self
Custom colors for input channels (hex strings)
Default is None (uses default palette)
Sourcepub fn input_color<VALUE, FROM_VALUE: Into<VALUE>>(
&mut self,
item: FROM_VALUE,
) -> &mut Self
pub fn input_color<VALUE, FROM_VALUE: Into<VALUE>>( &mut self, item: FROM_VALUE, ) -> &mut Self
Custom colors for input channels (hex strings)
Default is None (uses default palette)
Sourcepub fn background_color<VALUE: Into<String>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn background_color<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self
Chart background color (hex string)
Default is “#000000” (black)
Sourcepub fn line_width(&mut self, value: f32) -> &mut Self
pub fn line_width(&mut self, value: f32) -> &mut Self
Waveform line thickness
Default is 2.0
Sourcepub fn build(&self) -> Result<SnapshotConfig, SnapshotConfigBuilderError>
pub fn build(&self) -> Result<SnapshotConfig, SnapshotConfigBuilderError>
Trait Implementations§
Source§impl Clone for SnapshotConfigBuilder
impl Clone for SnapshotConfigBuilder
Source§fn clone(&self) -> SnapshotConfigBuilder
fn clone(&self) -> SnapshotConfigBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more