Skip to main content

TransformConfig

Trait TransformConfig 

Source
pub trait TransformConfig: Serialize {
    // Required method
    fn name(&self) -> &'static str;

    // Provided method
    fn to_transform_string(&self) -> String { ... }
}
Expand description

Trait for typed transform configurations.

Implementors derive serde::Serialize and provide a transform name(). The default to_transform_string() serializes the struct as a JSON object and injects the "name" key.

Required Methods§

Source

fn name(&self) -> &'static str

The transform registry name (e.g. "pulse", "float_precision").

Provided Methods§

Source

fn to_transform_string(&self) -> String

Produce the string the transform registry expects.

The default implementation serializes self to a JSON object and inserts "name".

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§