Skip to main content

CustomAttribute

Trait CustomAttribute 

pub trait CustomAttribute<K, V>: Sized + AddAnyAttr
where K: CustomAttributeKey, V: AttributeValue,
{ // Provided method fn attr(self, key: K, value: V) -> Self::Output<CustomAttr<K, V>> { ... } }
Expand description

Adds a custom attribute to an element.

Provided Methods§

fn attr(self, key: K, value: V) -> Self::Output<CustomAttr<K, V>>

Adds an HTML attribute by key and value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

§

impl<T, K, V> CustomAttribute<K, V> for T
where T: AddAnyAttr, K: CustomAttributeKey, V: AttributeValue,