pub struct MoveTreeMerger { /* private fields */ }Expand description
Stateful, deterministic policy for merging raw lines into one repertoire tree.
A session remembers which source first selected the repertoire move at each position. Opponent alternatives remain ordered branches. A later source’s main variation is promoted when it is accepted, matching the current Python ordering behavior.
Implementations§
Source§impl MoveTreeMerger
impl MoveTreeMerger
pub fn new(repertoire_side: RepertoireSide) -> Self
Sourcepub fn merge(
&mut self,
target: &mut MoveTree,
source: &MoveTree,
source_id: impl Into<SourceId>,
) -> Result<MergeReport, MergeError>
pub fn merge( &mut self, target: &mut MoveTree, source: &MoveTree, source_id: impl Into<SourceId>, ) -> Result<MergeReport, MergeError>
Merges a source tree into target, returning all policy conflicts.
The first call requires an empty target so every selected move has known provenance. Subsequent calls must use the same target and session.
Trait Implementations§
Source§impl Clone for MoveTreeMerger
impl Clone for MoveTreeMerger
Auto Trait Implementations§
impl Freeze for MoveTreeMerger
impl RefUnwindSafe for MoveTreeMerger
impl Send for MoveTreeMerger
impl Sync for MoveTreeMerger
impl Unpin for MoveTreeMerger
impl UnsafeUnpin for MoveTreeMerger
impl UnwindSafe for MoveTreeMerger
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