[−][src]Enum euca::vdom::DomItem
Items representing all of the data in the DOM tree.
This is the struct emitted from the Iterator
passed to our diff
function. The items emitted
should always be in the same order, given the same input. Each entry in the enum represents
some aspect of a DOM node. The idea here is the sequence of items will be the same sequence of
things seen if we were to walk the DOM tree depth first going through all nodes and their
various attributes and events.
Variants
An element in the tree.
Fields of Element
Text(&'a str)
A text node in the tree.
UnsafeInnerHtml(&'a str)
Raw HTML code to be rendered using innerHTML. Use with caution as this can be used as an attack vector to execute arbitrary code in the client's browser.
An attribute of the last node we saw.
An event handler from the last node we saw.
Fields of Event
trigger: &'a str
The trigger for this event.
handler: EventHandler<'a, Message>
The handler for this event.
We are finished processing children nodes, the next node is a sibling.
A component.
Fields of Component
key: Option<&'a K>
An optional key for this component.
This is necessary if a component has internal state that must be maintained between dom updates.
msg: Message
A message to send to the component.
create: fn(_: Dispatcher<Message, Command>) -> Box<dyn Component<Message>>
A function to create the component if necessary.
Key(&'a K)
For internal use. This is a reference to a keyed item.
Trait Implementations
impl<'a, Message: Debug, Command: Debug, K: Debug> Debug for DomItem<'a, Message, Command, K>
[src]
impl<'a, Message: PartialEq, Command: PartialEq, K: PartialEq> PartialEq<DomItem<'a, Message, Command, K>> for DomItem<'a, Message, Command, K>
[src]
fn eq(&self, other: &DomItem<'a, Message, Command, K>) -> bool
[src]
fn ne(&self, other: &DomItem<'a, Message, Command, K>) -> bool
[src]
impl<'a, Message, Command, K> StructuralPartialEq for DomItem<'a, Message, Command, K>
[src]
Auto Trait Implementations
impl<'a, Message, Command, K> RefUnwindSafe for DomItem<'a, Message, Command, K> where
K: RefUnwindSafe,
Message: RefUnwindSafe,
K: RefUnwindSafe,
Message: RefUnwindSafe,
impl<'a, Message, Command, K> Send for DomItem<'a, Message, Command, K> where
K: Sync,
Message: Send + Sync,
K: Sync,
Message: Send + Sync,
impl<'a, Message, Command, K> Sync for DomItem<'a, Message, Command, K> where
K: Sync,
Message: Sync,
K: Sync,
Message: Sync,
impl<'a, Message, Command, K> Unpin for DomItem<'a, Message, Command, K> where
Message: Unpin,
Message: Unpin,
impl<'a, Message, Command, K> UnwindSafe for DomItem<'a, Message, Command, K> where
K: RefUnwindSafe,
Message: RefUnwindSafe + UnwindSafe,
K: RefUnwindSafe,
Message: RefUnwindSafe + UnwindSafe,
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,
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, 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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.