[−][src]Struct seed::dom_types::El
An component in our virtual DOM.
Fields
tag: Tag
attrs: Attrs
style: Style
listeners: Vec<Listener<Ms>>
text: Option<String>
children: Vec<El<Ms>>
id: Option<u32>
nest_level: Option<u32>
el_ws: Option<Element>
raw_html: bool
namespace: Option<Namespace>
did_mount: Option<Box<dyn FnMut(&Element)>>
did_update: Option<Box<dyn FnMut(&Element)>>
will_unmount: Option<Box<dyn FnMut(&Element)>>
Methods
impl<Ms: Clone + 'static> El<Ms>
[src]
impl<Ms: Clone + 'static> El<Ms>
pub fn empty(tag: Tag) -> Self | [src] |
Create an empty element, specifying only the tag
pub fn empty_svg(tag: Tag) -> Self | [src] |
Create an empty SVG element, specifying only the tag
pub fn from_markdown(markdown: &str) -> Self | [src] |
Create an element that will display markdown from the text you pass to it, as HTML
pub fn from_html(html: &str) -> Self | [src] |
Create an element that will display raw HTML
pub fn add_child(&mut self, element: El<Ms>) | [src] |
Add a new child to the element
pub fn add_attr(&mut self, key: String, val: String) | [src] |
Add an attribute (eg class, or href)
pub fn add_style(&mut self, key: String, val: String) | [src] |
Add a new style (eg display, or height)
pub fn set_text(&mut self, text: &str) | [src] |
Replace the element's text node. (ie between the HTML tags)
pub fn quick_clone(&self) -> Self | [src] |
This is used to provide access to el_ws while recursively appending children to it.
pub fn is_dummy(&self) -> bool | [src] |
Dummy elements are used when logic must return an El due to the type system, but we don't want to render anything.
Trait Implementations
impl<Ms: Clone> UpdateEl<El<Ms>> for Attrs
[src]
impl<Ms: Clone> UpdateEl<El<Ms>> for Attrs
impl<Ms: Clone, '_> UpdateEl<El<Ms>> for &'_ Attrs
[src]
impl<Ms: Clone, '_> UpdateEl<El<Ms>> for &'_ Attrs
impl<Ms: Clone> UpdateEl<El<Ms>> for Style
[src]
impl<Ms: Clone> UpdateEl<El<Ms>> for Style
impl<Ms: Clone, '_> UpdateEl<El<Ms>> for &'_ Style
[src]
impl<Ms: Clone, '_> UpdateEl<El<Ms>> for &'_ Style
impl<Ms: Clone> UpdateEl<El<Ms>> for Listener<Ms>
[src]
impl<Ms: Clone> UpdateEl<El<Ms>> for Listener<Ms>
impl<Ms: Clone> UpdateEl<El<Ms>> for Vec<Listener<Ms>>
[src]
impl<Ms: Clone> UpdateEl<El<Ms>> for Vec<Listener<Ms>>
impl<Ms: Clone> UpdateEl<El<Ms>> for DidMount
[src]
impl<Ms: Clone> UpdateEl<El<Ms>> for DidMount
impl<Ms: Clone> UpdateEl<El<Ms>> for DidUpdate
[src]
impl<Ms: Clone> UpdateEl<El<Ms>> for DidUpdate
impl<Ms: Clone> UpdateEl<El<Ms>> for WillUnmount
[src]
impl<Ms: Clone> UpdateEl<El<Ms>> for WillUnmount
impl<Ms: Clone, '_> UpdateEl<El<Ms>> for &'_ str
[src]
impl<Ms: Clone, '_> UpdateEl<El<Ms>> for &'_ str
impl<Ms: Clone> UpdateEl<El<Ms>> for Vec<El<Ms>>
[src]
impl<Ms: Clone> UpdateEl<El<Ms>> for Vec<El<Ms>>
impl<Ms: Clone> UpdateEl<El<Ms>> for El<Ms>
[src]
impl<Ms: Clone> UpdateEl<El<Ms>> for El<Ms>
impl<Ms: Clone> UpdateEl<El<Ms>> for Tag
[src]
impl<Ms: Clone> UpdateEl<El<Ms>> for Tag
This is intended only to be used for the custom! element macro.
impl<Ms: Clone + 'static> PartialEq<El<Ms>> for El<Ms>
[src]
impl<Ms: Clone + 'static> PartialEq<El<Ms>> for El<Ms>
fn eq(&self, other: &Self) -> bool | [src] |
| 1.0.0 [src] |
This method tests for !=
.
impl<Ms: Clone + 'static> Clone for El<Ms>
[src]
impl<Ms: Clone + 'static> Clone for El<Ms>
Allow the user to clone their Els. Note that there's no easy way to clone the closures within listeners or lifestyle hooks, so we ommit them.
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |