pub enum PathElement {
Component {
key: DiffKey,
comp: Rc<dyn Fn(Rc<dyn ComponentProps>) -> Element>,
props: Rc<dyn ComponentProps>,
path: Box<[u32]>,
},
Element {
key: DiffKey,
element: Rc<dyn ElementExt>,
elements: Box<[PathElement]>,
path: Box<[u32]>,
},
}Variants§
Implementations§
Source§impl PathElement
impl PathElement
pub fn with_element<D>(&self, target_path: &[u32], with: D)where
D: FnOnce(&PathElement),
pub fn from_element(path: Vec<u32>, element: Element) -> Self
Trait Implementations§
Source§impl Debug for PathElement
impl Debug for PathElement
Source§impl DiffNode for PathElement
impl DiffNode for PathElement
type Key = DiffKey
type Modifications = DiffModifies
fn key(&self) -> &DiffKey
fn path(&self) -> &[u32]
fn children(&self) -> &[Self]
Source§fn compatible(&self, previous: &Self) -> bool
fn compatible(&self, previous: &Self) -> bool
Whether these nodes have compatible kinds, independently of their keys.
Source§fn modifications(&self, previous: &Self) -> Option<DiffModifies>
fn modifications(&self, previous: &Self) -> Option<DiffModifies>
Returns changes for compatible nodes with matching keys, or
None if unchanged.Source§fn validate_children(&self)
fn validate_children(&self)
Checks application-specific sibling key rules before matching children in debug builds.
Auto Trait Implementations§
impl !RefUnwindSafe for PathElement
impl !Send for PathElement
impl !Sync for PathElement
impl !UnwindSafe for PathElement
impl Freeze for PathElement
impl Unpin for PathElement
impl UnsafeUnpin for PathElement
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more