Macro slint::slint

slint!() { /* proc-macro */ }
Expand description

This macro allows you to use the Slint design markup language inline in Rust code. Within the braces of the macro you can use place Slint code and the named exported components will be available for instantiation.

For the documentation about the syntax of the language, see The Slint Language Documentation

When importing .slint files or loading images with @image-url, the specified paths are relative to the the directory that contains Cargo.toml.

Limitations

Within .slint files, you can interpolate string literals using \{...} syntax. This is not possible in this macro as this wouldn’t parse as a Rust string.