pub struct PercyDom {
pub events: VirtualEvents,
/* private fields */
}Expand description
Used for keeping a real DOM node up to date based on the current VirtualNode and a new incoming VirtualNode that represents our latest DOM state.
Also powers event delegation.
Fields§
§events: VirtualEventsThe closures that are currently attached to elements in the page. We keep these around so that they don’t get dropped, (and thus stop working).
Implementations§
Source§impl PercyDom
impl PercyDom
Sourcepub fn new(current_vdom: VirtualNode) -> PercyDom
pub fn new(current_vdom: VirtualNode) -> PercyDom
Create a new PercyDom.
A root Node will be created but not added to your DOM.
Sourcepub fn new_append_to_mount(
current_vdom: VirtualNode,
mount: &Element,
) -> PercyDom
pub fn new_append_to_mount( current_vdom: VirtualNode, mount: &Element, ) -> PercyDom
Create a new PercyDom.
A root Node will be created and append (as a child) to your passed
in mount element.
Sourcepub fn new_replace_mount(current_vdom: VirtualNode, mount: Element) -> PercyDom
pub fn new_replace_mount(current_vdom: VirtualNode, mount: Element) -> PercyDom
Create a new PercyDom.
A root Node will be created and it will replace your passed in mount
element.
Sourcepub fn update(&mut self, new_vdom: VirtualNode)
pub fn update(&mut self, new_vdom: VirtualNode)
Diff the current virtual dom with the new virtual dom that is being passed in.
Then use that diff to patch the real DOM in the user’s browser so that they are seeing the latest state of the application.
Auto Trait Implementations§
impl !Freeze for PercyDom
impl !RefUnwindSafe for PercyDom
impl !Send for PercyDom
impl !Sync for PercyDom
impl Unpin for PercyDom
impl !UnwindSafe for PercyDom
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self to an expression for Diesel’s query builder. Read more