pub struct MergeEntry {
pub is_start: bool,
pub is_end: bool,
pub locked: bool,
pub moved: bool,
/* private fields */
}Expand description
A single entry in a merge list.
An entry contains a node and any “hangon” nodes that should be placed after it in the merged output. Hangons are typically:
- Newly inserted nodes
- Nodes copied from elsewhere in the tree
- Far-moved nodes (moved from a different parent)
Fields§
§is_start: boolWhether this is the START marker.
is_end: boolWhether this is the END marker.
locked: boolWhether this entry is locked (cannot be freely reordered).
moved: boolWhether this node was moved within the child list.
Implementations§
Source§impl MergeEntry
impl MergeEntry
Sourcepub fn add_hangon(&mut self, node: NodeRef)
pub fn add_hangon(&mut self, node: NodeRef)
Adds a hangon node.
Sourcepub fn hangon_count(&self) -> usize
pub fn hangon_count(&self) -> usize
Returns the number of hangon nodes.
Sourcepub fn set_merge_partner(&mut self, partner: Option<NodeRef>)
pub fn set_merge_partner(&mut self, partner: Option<NodeRef>)
Sets the merge partner.
Sourcepub fn merge_partner(&self) -> Option<&NodeRef>
pub fn merge_partner(&self) -> Option<&NodeRef>
Returns the merge partner.
Sourcepub fn base_match(&self) -> Option<NodeRef>
pub fn base_match(&self) -> Option<NodeRef>
Returns the base match of this entry’s node (if any).
Trait Implementations§
Source§impl Clone for MergeEntry
impl Clone for MergeEntry
Source§fn clone(&self) -> MergeEntry
fn clone(&self) -> MergeEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MergeEntry
impl !RefUnwindSafe for MergeEntry
impl !Send for MergeEntry
impl !Sync for MergeEntry
impl Unpin for MergeEntry
impl !UnwindSafe for MergeEntry
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