Skip to main content

IntoCallbackAttribute

Trait IntoCallbackAttribute 

Source
pub trait IntoCallbackAttribute {
    // Required method
    fn into_callback_attribute(self) -> AttributeValue;
}
Expand description

Trait for types that can be converted into a callback attribute value.

This allows closures to be passed as custom component props.

Required Methods§

Source

fn into_callback_attribute(self) -> AttributeValue

Converts this value into an AttributeValue, wrapping the callback for use as a component prop.

Implementations on Foreign Types§

Source§

impl IntoCallbackAttribute for Option<NativeEventHandler>

Converts an optional event handler into a callback attribute value.

Implementors§

Source§

impl IntoCallbackAttribute for NativeEventHandler

Converts an owned event handler into a callback attribute value.

Source§

impl<F> IntoCallbackAttribute for F
where F: FnMut(NativeEvent) + 'static,

Converts a closure into a callback attribute value.