Skip to main content

DataModelExt

Trait DataModelExt 

Source
pub trait DataModelExt {
    // Required methods
    fn content_points(&self) -> Vec<&DiagramPoint>;
    fn connections(&self) -> Vec<&DiagramConnection>;
    fn text(&self) -> Vec<String>;
}
Expand description

Extension trait for DataModel providing convenience access to SmartArt content.

Corresponds to ECMA-376 §21.4.2.8 (CT_DataModel).

Required Methods§

Source

fn content_points(&self) -> Vec<&DiagramPoint>

Returns all diagram points that represent actual content nodes.

Filters out connector/transition points (parTrans, sibTrans, pres) and returns only points of type node, asst, or doc.

Source

fn connections(&self) -> Vec<&DiagramConnection>

Returns all connections between diagram points.

Source

fn text(&self) -> Vec<String>

Extracts all text from diagram content nodes, in order.

Each node’s text paragraphs are joined with newlines. Nodes are separated by newlines in the returned string.

Implementors§

Source§

impl DataModelExt for DataModel

Available on crate features dml-diagrams and dml-text only.