[−][src]Enum dioxus::prelude::VNode
Variants
Element(VElement)
An element node (node type ELEMENT_NODE
).
Text(VText)
A text node (node type TEXT_NODE
).
Note: This wraps a VText
instead of a plain String
in
order to enable custom methods like create_text_node()
on the
wrapped type.
Component(VComponent)
A User-defined componen node (node type COMPONENT_NODE)
Implementations
impl VNode
[src]
pub fn element<S>(tag: S) -> VNode where
S: Into<String>,
[src]
S: Into<String>,
Create a new virtual element node with a given tag.
These get patched into the DOM using document.createElement
let div = VNode::element("div");
pub fn text<S>(text: S) -> VNode where
S: Into<String>,
[src]
S: Into<String>,
Create a new virtual text node with the given text.
These get patched into the DOM using document.createTextNode
let div = VNode::text("div");
pub fn as_velement_ref(&self) -> Option<&VElement>
[src]
pub fn as_velement_mut(&mut self) -> Option<&mut VElement>
[src]
pub fn as_vtext_ref(&self) -> Option<&VText>
[src]
pub fn as_vtext_mut(&mut self) -> Option<&mut VText>
[src]
pub fn insert_space_before_text(&mut self)
[src]
Used by html-macro to insert space before text that is inside of a block that came after an open tag.
html! {
So that we end up with
pub fn insert_space_after_text(&mut self)
[src]
Used by html-macro to insert space after braced text if we know that the next block is another block or a closing tag.
html! {
So that we end up with
Trait Implementations
impl Debug for VNode
[src]
impl Display for VNode
[src]
impl<'_> From<&'_ str> for VNode
[src]
impl From<String> for VNode
[src]
impl From<VElement> for VNode
[src]
impl From<VNode> for IterableNodes
[src]
pub fn from(other: VNode) -> IterableNodes
[src]
impl From<VText> for VNode
[src]
impl Into<IntoIter<VNode, Global>> for VNode
[src]
impl IntoIterator for VNode
[src]
type Item = VNode
The type of the elements being iterated over.
type IntoIter = IntoIter<VNode, Global>
Which kind of iterator are we turning this into?
pub fn into_iter(self) -> <VNode as IntoIterator>::IntoIter
[src]
impl PartialEq<VNode> for VNode
[src]
impl StructuralPartialEq for VNode
[src]
Auto Trait Implementations
impl RefUnwindSafe for VNode
[src]
impl Send for VNode
[src]
impl Sync for VNode
[src]
impl Unpin for VNode
[src]
impl UnwindSafe for VNode
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,