logo
pub fn attr<MSG, V>(
    att: &'static str,
    v: V
) -> Attribute<&'static str, &'static str, AttributeValue<MSG>> where
    V: Into<Value>, 
Expand description

a utility function to convert simple value into attribute

Examples

use sauron::prelude::*;

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