pub struct Cursor(/* private fields */);Expand description
Hydration works by walking over the DOM, adding interactivity as needed.
This cursor tracks the location in the DOM that is currently being hydrated. Each that type
implements RenderHtml knows how to advance the cursor to access
the nodes it needs.
Implementations§
Source§impl Cursor
impl Cursor
Sourcepub fn child(&self)
pub fn child(&self)
Advances to the next child of the node at which the cursor is located.
Does nothing if there is no child.
Sourcepub fn sibling(&self)
pub fn sibling(&self)
Advances to the next sibling of the node at which the cursor is located.
Does nothing if there is no sibling.
Sourcepub fn parent(&self)
pub fn parent(&self)
Moves to the parent of the node at which the cursor is located.
Does nothing if there is no parent.
Sourcepub fn next_placeholder(&self, position: &PositionState) -> Placeholder
pub fn next_placeholder(&self, position: &PositionState) -> Placeholder
Advances to the next placeholder node and returns it
Sourcepub fn advance_to_placeholder(&self, position: &PositionState)
pub fn advance_to_placeholder(&self, position: &PositionState)
Advances to the next placeholder node.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cursor
impl !RefUnwindSafe for Cursor
impl !Send for Cursor
impl !Sync for Cursor
impl Unpin for Cursor
impl UnsafeUnpin for Cursor
impl !UnwindSafe for Cursor
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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