pub struct ScDistortionDto {
pub id: u32,
pub name: String,
pub is_active: bool,
pub color: String,
pub threshold: f32,
pub level: f32,
pub smoothing: f32,
}Expand description
§Data Transfer Object for SC Distortion Effect
ScDistortionDto is the serialisable representation of an SCDistortion effect
for communication between the Rust backend and the TypeScript frontend.
This DTO is automatically generated for TypeScript via the ts-rs crate
Fields§
§id: u32Unique identifier for this effect instance. Used for targeting commands.
name: StringHuman-readable name displayed in the UI pedal. Example: "Distortion".
is_active: boolWhether the effect is currently active/processing audio (true) or bypassed (false).
When false, the input signal passes through unchanged.
color: StringUI colour for the pedal chassis. Hex string format: "#rrggbb".
threshold: f32clipping threshold in the range [0.0, 1.0].
level: f32Normalised output level boost in [0.0, 1.0].
0.0= unity gain (no boost)1.0= ×2.0 boost
smoothing: f32The smoothing factor that determines how much the curve is curved towards the clipping threshold [1.0,10.0].
Trait Implementations§
Source§impl Clone for ScDistortionDto
impl Clone for ScDistortionDto
Source§fn clone(&self) -> ScDistortionDto
fn clone(&self) -> ScDistortionDto
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ScDistortionDto
impl Debug for ScDistortionDto
Source§impl<'de> Deserialize<'de> for ScDistortionDto
impl<'de> Deserialize<'de> for ScDistortionDto
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ScDistortionDto
impl PartialEq for ScDistortionDto
Source§impl Serialize for ScDistortionDto
impl Serialize for ScDistortionDto
Source§impl TS for ScDistortionDto
impl TS for ScDistortionDto
Source§type WithoutGenerics = ScDistortionDto
type WithoutGenerics = ScDistortionDto
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or (). The only requirement for these dummy types is that
EXPORT_TO must be None. Read moreSource§type OptionInnerType = ScDistortionDto
type OptionInnerType = ScDistortionDto
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete(cfg: &Config) -> String
fn decl_concrete(cfg: &Config) -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl(cfg: &Config) -> String
fn decl(cfg: &Config) -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline(cfg: &Config) -> String
fn inline(cfg: &Config) -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened(cfg: &Config) -> String
fn inline_flattened(cfg: &Config) -> String
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported, relative to the output directory.
The returned path does not include any base directory. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
§fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
§fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export_all]. Read more§fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export]. Read more