pub trait IntoNode<'a, Message: 'a>: 'a + Sized {
fn into_node(self) -> Node<'a, Message>;
fn class(self, class: &'a str) -> Node<'a, Message> { ... }
fn key<K: Hash>(self, key: K) -> Node<'a, Message> { ... }
}
Expand description
Convert widget to a Node.
All widgets should implement this trait.
It is also implemented by Node itself, which simply returns self.
Convenience function that converts to a node and then adds a style class to the resulting Node.
Convenience function that converts to a node and then sets a custom id to the resulting Node.
impl<'a, Message: 'a> IntoNode<'a, Message> for Node<'a, Message>
impl<'a, T, F, S> IntoNode<'a, T> for Input<'a, T, F, S> where
T: 'a + Send,
F: 'a + Send + Fn(String) -> T,
S: 'a + Send + AsRef<str>,
impl<'a, T: DragDropId + Send + Sync, Message: 'a, OnAccept: 'a, OnDrop: 'a> IntoNode<'a, Message> for Drop<'a, T, Message, OnAccept, OnDrop> where
OnAccept: Send + Fn(T) -> bool,
OnDrop: Send + Fn(T, (f32, f32)) -> Message,