MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / Directive

Class Directive

atomic-canonical/src/directive.rs:24–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22/// A parsed directive block.
23#[derive(Debug, Clone, PartialEq)]
24pub struct Directive {
25 pub name: String,
26 pub id: Option<String>,
27 pub attrs: BTreeMap<String, String>,
28 /// Prose inside a container directive (trimmed). Empty for leaf directives.
29 pub body: String,
30 /// The `[label]` of an inline directive. `None` for container/leaf forms.
31 pub label: Option<String>,
32 /// Leaf and inline directives nested inside this container.
33 pub children: Vec<Directive>,
34}
35
36impl Directive {
37 pub fn attr(&self, key: &str) -> Option<&str> {

Callers 4

parseFunction · 0.85
parse_inlineFunction · 0.85
check_knownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected