-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to insert node(s) at specified index or before existing node? #61
Comments
I think I would like to have the method pub enum Placement {
AtStart,
AtEnd,
AtIndex(usize),
BeforeNode(Node),
}
// ...
impl Stretch {
// ...
fn replace_children<I>(&mut self,
node: Node,
place: Placement,
remove: usize,
insert: I) -> Vec<Node>
where
I: IntoIterator<Item = Node>;
// ...
} |
The another option is the DOM-like API but in practice it not so usable. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently is this a missing feature?
I see only
add_child ()
which likely insert children at end, andset_children()
which reloads all children, also it hasreplace_child_at_index()
but I want to insert new node without removing existing node.The text was updated successfully, but these errors were encountered: