substrate_data/forms/text/spans.rs
1//! [`Spans`]: where each value of a parsed document is.
2
3use super::Span;
4
5/// Where each value of a parsed document is: the value's span, its key's
6/// (map entries), and its children's, in the same order as the value's.
7#[derive(Debug, Clone, Default, PartialEq)]
8pub struct Spans {
9 /// The value's span.
10 pub span: Span,
11 /// Its key's span, for a map entry.
12 pub key: Option<Span>,
13 /// Its children's spans, in the order of the value's.
14 pub children: Vec<Spans>,
15}