attribute_static!() { /* proc-macro */ }Expand description
Generate static HTML attributes.
This will return a RawAttribute<&'static str>,
which can be used in const contexts.
Note that the macro cannot process any dynamic content, so you cannot use any expressions inside the macro.
ยงExample
use hypertext::{RawAttribute, attribute_static, prelude::*};
assert_eq!(
attribute_static! { "my attribute " 1 }.into_inner(),
"my attribute 1"
);