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§
Sourcefn into_callback_attribute(self) -> AttributeValue
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.
impl IntoCallbackAttribute for Option<NativeEventHandler>
Converts an optional event handler into a callback attribute value.
fn into_callback_attribute(self) -> AttributeValue
Implementors§
impl IntoCallbackAttribute for NativeEventHandler
Converts an owned event handler into a callback attribute value.
impl<F> IntoCallbackAttribute for Fwhere
F: FnMut(NativeEvent) + 'static,
Converts a closure into a callback attribute value.