Struct vertigo::DomElement
source · pub struct DomElement { /* private fields */ }
Expand description
A Real DOM representative - element kind
Implementations
sourceimpl DomElement
impl DomElement
pub fn new(name: &'static str) -> Self
pub fn from_parts<T: Into<String> + Clone + PartialEq>(
name: &'static str,
attrs: Vec<(&'static str, AttrValue<T>)>,
children: Vec<DomNode>
) -> Self
pub fn get_ref(&self) -> DomElementRef
pub fn create_with_id(id: DomId) -> Self
pub fn css(self, css: CssValue) -> Self
pub fn attr<T: Into<String> + Clone + PartialEq + 'static>(
self,
name: &'static str,
value: AttrValue<T>
) -> Self
pub fn id_dom(&self) -> DomId
pub fn add_child(&self, child_node: impl Into<DomNodeFragment>)
pub fn child(self, child_node: impl Into<DomNodeFragment>) -> Self
pub fn on_click(self, on_click: impl Fn() + 'static) -> Self
pub fn on_mouse_enter(self, on_mouse_enter: impl Fn() + 'static) -> Self
pub fn on_mouse_leave(self, on_mouse_leave: impl Fn() + 'static) -> Self
pub fn on_input(self, on_input: impl Fn(String) + 'static) -> Self
pub fn on_key_down(
self,
on_key_down: impl Fn(KeyDownEvent) -> bool + 'static
) -> Self
pub fn on_dropfile(self, on_dropfile: impl Fn(DropFileEvent) + 'static) -> Self
pub fn hook_key_down(
self,
on_hook_key_down: impl Fn(KeyDownEvent) -> bool + 'static
) -> Self
Trait Implementations
sourceimpl Drop for DomElement
impl Drop for DomElement
sourceimpl EmbedDom for DomElement
impl EmbedDom for DomElement
fn embed(self) -> DomNodeFragment
sourceimpl From<DomElement> for DomNode
impl From<DomElement> for DomNode
sourcefn from(node: DomElement) -> Self
fn from(node: DomElement) -> Self
Converts to this type from the input type.
sourceimpl From<DomElement> for DomNodeFragment
impl From<DomElement> for DomNodeFragment
sourcefn from(node: DomElement) -> Self
fn from(node: DomElement) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for DomElement
impl !Send for DomElement
impl !Sync for DomElement
impl Unpin for DomElement
impl !UnwindSafe for DomElement
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more