This is unreleased documentation for Yew Next version.
For up-to-date documentation, see the latest version on docs.rs.
yew::html

Trait IntoEventCallback

Source
pub trait IntoEventCallback<EVENT> {
    // Required method
    fn into_event_callback(self) -> Option<Callback<EVENT>>;
}
Expand description

A trait similar to Into<T> which allows conversion of a value into a Callback. This is used for event listeners.

Required Methods§

Source

fn into_event_callback(self) -> Option<Callback<EVENT>>

Convert self to Option<Callback<EVENT>>

Implementations on Foreign Types§

Source§

impl<EVENT> IntoEventCallback<EVENT> for Option<Callback<EVENT>>

Source§

impl<T, EVENT> IntoEventCallback<EVENT> for Option<T>
where T: Fn(EVENT) + 'static,

Implementors§

Source§

impl<EVENT> IntoEventCallback<EVENT> for &Callback<EVENT>

Source§

impl<EVENT> IntoEventCallback<EVENT> for Callback<EVENT>

Source§

impl<T, EVENT> IntoEventCallback<EVENT> for T
where T: Fn(EVENT) + 'static,