type OptionalLengthList<N> = Option<CommaSeparatedList<Length<N>, 1, 4096>>;Expand description
Type for the x/y/dx/dy attributes of the <text> and <tspan> elements
https://svgwg.org/svg2-draft/text.html#TSpanAttributes
Explanation of this type:
- Option - the attribute can be specified or not, so make it optional
CommaSeparatedList<Length<Horizontal>> - This type knows how to parse a list of values
that are separated by commas and/or spaces; the values are eventually available as a Vec.
-
1 is the minimum number of elements in the list, so one can have x=“42” for example.
-
4096 is an arbitrary limit on the number of length values for each array, as a mitigation against malicious files which may want to have millions of elements to exhaust memory.
Aliased Type§
enum OptionalLengthList<N> {
None,
Some(CommaSeparatedList<CssLength<N, Signed>, 1, 4096>),
}Variants§
None
No value.
Some(CommaSeparatedList<CssLength<N, Signed>, 1, 4096>)
Some value of type T.