Struct vertigo::DomElement

source ·
pub struct DomElement { /* private fields */ }
Expand description

A Real DOM representative - element kind

Implementations§

source§

impl DomElement

source

pub fn new(name: impl Into<StaticString>) -> Self

source

pub fn get_ref(&self) -> DomElementRef

source

pub fn css(self, css: impl Into<CssAttrValue>) -> Self

source

pub fn suspense(self, callback: Option<fn(_: bool) -> Css>) -> Self

source

pub fn add_attr( &self, name: impl Into<StaticString>, value: impl Into<AttrValue> )

source

pub fn attr( self, name: impl Into<StaticString>, value: impl Into<AttrValue> ) -> Self

source

pub fn attrs<T: Into<AttrValue>>( self, attrs: Vec<(impl Into<StaticString>, T)> ) -> Self

source

pub fn id_dom(&self) -> DomId

source

pub fn add_child(&self, child_node: impl Into<DomNode>)

source

pub fn child(self, child_node: impl Into<DomNode>) -> Self

source

pub fn add_child_text(&self, text: impl Into<String>)

source

pub fn child_text(self, text: impl Into<String>) -> Self

source

pub fn children<C: Into<DomNode>>(self, children: Vec<C>) -> Self

source

pub fn on_click(self, on_click: impl Into<Callback<()>>) -> Self

source

pub fn on_mouse_down(self, on_mouse_down: impl Into<Callback<bool>>) -> Self

source

pub fn on_mouse_up(self, on_mouse_up: impl Into<Callback<bool>>) -> Self

source

pub fn on_mouse_enter(self, on_mouse_enter: impl Into<Callback<()>>) -> Self

source

pub fn on_mouse_leave(self, on_mouse_leave: impl Into<Callback<()>>) -> Self

source

pub fn on_input(self, on_input: impl Into<Callback1<String, ()>>) -> Self

source

pub fn on_change(self, on_change: impl Into<Callback1<String, ()>>) -> Self

source

pub fn on_blur(self, on_blur: impl Into<Callback<()>>) -> Self

source

pub fn on_key_down( self, on_key_down: impl Into<Callback1<KeyDownEvent, bool>> ) -> Self

source

pub fn on_dropfile( self, on_dropfile: impl Into<Callback1<DropFileEvent, ()>> ) -> Self

source

pub fn hook_key_down( self, on_hook_key_down: impl Into<Callback1<KeyDownEvent, bool>> ) -> Self

source

pub fn on_load(self, on_load: impl Into<Callback<()>>) -> Self

Trait Implementations§

source§

impl Drop for DomElement

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl EmbedDom for DomElement

source§

impl From<DomElement> for DomNode

source§

fn from(node: DomElement) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.