Function sauron::attr

source ·
pub fn attr<MSG>(att: &'static str, v: impl Into<Value>) -> Attribute<MSG>
Expand description

a utility function to convert simple value into attribute

§Examples

use sauron::{*,html::attributes::attr};

let data_id: Attribute<()> = attr("data-id", 42);