sycamore::web

Trait SetAttribute

pub trait SetAttribute {
    // Required methods
    fn set_attribute(&mut self, name: &'static str, value: impl AttributeValue);
    fn set_event_handler(
        &mut self,
        name: &'static str,
        value: impl FnMut(Event) + 'static,
    );
}
Expand description

Implemented for all types that can accept attributes (AttributeValue).

Required Methods§

fn set_attribute(&mut self, name: &'static str, value: impl AttributeValue)

fn set_event_handler( &mut self, name: &'static str, value: impl FnMut(Event) + 'static, )

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

§

impl SetAttribute for Attributes

§

impl<T> SetAttribute for T
where T: AsHtmlNode,