pub trait WallpaperBackend {
// Required method
fn build_commands(
images: &[FileInfo],
config: &Config,
) -> WallSwitchResult<Vec<Command>>;
// Provided method
fn apply(images: &[FileInfo], config: &Config) -> WallSwitchResult<()> { ... }
}Expand description
Core trait defining the wallpaper application logic. Follows the “Functional Core, Imperative Shell” pattern.
Required Methods§
Sourcefn build_commands(
images: &[FileInfo],
config: &Config,
) -> WallSwitchResult<Vec<Command>>
fn build_commands( images: &[FileInfo], config: &Config, ) -> WallSwitchResult<Vec<Command>>
PURE FUNCTION: Only constructs the required system commands. Does NOT execute them. This makes the logic highly testable and predictable.
Provided Methods§
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.