pub struct CellGraph { /* private fields */ }Expand description
Directed acyclic graph tracking cell dependencies.
Implementations§
Source§impl CellGraph
impl CellGraph
Sourcepub fn update_cell(
&mut self,
id: CellId,
source: impl Into<String>,
) -> HashSet<CellId>
pub fn update_cell( &mut self, id: CellId, source: impl Into<String>, ) -> HashSet<CellId>
Update a cell’s source code.
Returns the set of cells that need re-execution.
Sourcepub fn remove_cell(&mut self, id: CellId) -> Option<Cell>
pub fn remove_cell(&mut self, id: CellId) -> Option<Cell>
Remove a cell from the graph.
Sourcepub fn get_cell_mut(&mut self, id: CellId) -> Option<&mut Cell>
pub fn get_cell_mut(&mut self, id: CellId) -> Option<&mut Cell>
Get a mutable reference to a cell.
Sourcepub fn topological_order(&self) -> Option<Vec<CellId>>
pub fn topological_order(&self) -> Option<Vec<CellId>>
Get cells in topological order based on dependencies.
Returns None if there’s a cycle.
Sourcepub fn cells_to_execute(&self) -> Vec<CellId> ⓘ
pub fn cells_to_execute(&self) -> Vec<CellId> ⓘ
Get cells that need execution (dirty cells in topological order).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CellGraph
impl RefUnwindSafe for CellGraph
impl Send for CellGraph
impl Sync for CellGraph
impl Unpin for CellGraph
impl UnsafeUnpin for CellGraph
impl UnwindSafe for CellGraph
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