pub struct StructureAnalysis {
pub depth_distribution: Vec<usize>,
pub element_counts: Vec<usize>,
pub nesting_patterns: Vec<String>,
pub summary: String,
}Expand description
Results from structure analysis utilities.
Provides detailed information about pattern structural characteristics including depth distribution, element counts, nesting patterns, and summaries.
§Examples
use pattern_core::{Pattern, StructureAnalysis};
let pattern = Pattern::pattern("root".to_string(), vec![/* ... */]);
let analysis = pattern.analyze_structure();
println!("Depth distribution: {:?}", analysis.depth_distribution);
println!("Summary: {}", analysis.summary);Fields§
§depth_distribution: Vec<usize>Count of nodes at each depth level (index = depth, value = count)
element_counts: Vec<usize>Element counts at each level (index = level, value = count)
nesting_patterns: Vec<String>Identified structural patterns (e.g., “linear”, “tree”, “balanced”)
summary: StringHuman-readable summary of structure
Trait Implementations§
Source§impl Clone for StructureAnalysis
impl Clone for StructureAnalysis
Source§fn clone(&self) -> StructureAnalysis
fn clone(&self) -> StructureAnalysis
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 StructureAnalysis
impl RefUnwindSafe for StructureAnalysis
impl Send for StructureAnalysis
impl Sync for StructureAnalysis
impl Unpin for StructureAnalysis
impl UnsafeUnpin for StructureAnalysis
impl UnwindSafe for StructureAnalysis
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