pub struct FragmentGraph { /* private fields */ }Expand description
Fragment dependency graph and cycle detection
Implementations§
Source§impl FragmentGraph
impl FragmentGraph
Sourcepub fn new(query: &ParsedQuery) -> Self
pub fn new(query: &ParsedQuery) -> Self
Create a new fragment graph from parsed query
Sourcepub fn detect_cycles(&self) -> Result<(), Vec<String>>
pub fn detect_cycles(&self) -> Result<(), Vec<String>>
Detect cycles in fragment dependencies using DFS
Returns Ok(()) if no cycles found, Err(cycle_path) if cycle detected
§Errors
Returns an error with the cycle path if:
- A circular fragment dependency is detected
- A fragment references itself directly or indirectly
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FragmentGraph
impl RefUnwindSafe for FragmentGraph
impl Send for FragmentGraph
impl Sync for FragmentGraph
impl Unpin for FragmentGraph
impl UnsafeUnpin for FragmentGraph
impl UnwindSafe for FragmentGraph
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