Skip to main content

jellyflow_core/ops/fragment/paste/
mod.rs

1mod planner;
2mod remapped_ids;
3mod tuning;
4
5pub use tuning::PasteTuning;
6
7use crate::ops::GraphTransaction;
8
9use super::model::GraphFragment;
10use super::remap::IdRemapper;
11
12impl GraphFragment {
13    /// Remaps IDs and produces a transaction that inserts the fragment into a graph.
14    ///
15    /// The resulting transaction is deterministic for a given seed.
16    pub fn to_paste_transaction(
17        &self,
18        remapper: &IdRemapper,
19        tuning: PasteTuning,
20    ) -> GraphTransaction {
21        planner::FragmentPastePlanner::new(self, remapper, tuning).finish()
22    }
23}