(&self)
| 94 | } |
| 95 | |
| 96 | pub fn maybe_unsized(&self) -> bool { |
| 97 | // Check for specific types that require allocations |
| 98 | matches!( |
| 99 | self.ident_str(), |
| 100 | // Hand-written types that contain other allocating types |
| 101 | "Color" // Color<'a> |
| 102 | | "Shadow" // Shadow<'a> (contains Color<'a>) |
| 103 | | "SpreadShadow" // SpreadShadow<'a> (contains Color<'a>) |
| 104 | | "Image" // contains Gradient<'a> |
| 105 | | "Image1d" // contains StripesFunction<'a> |
| 106 | | "ContentList" // Vec<'a, ContentListItem<'a>> |
| 107 | | "ContentAltItem" // contains Counter<'a> and AttrFunction<'a> |
| 108 | | "ContentReplacement" // type alias for Image<'a> |
| 109 | | "Counter" // Counter<'a> enum with CounterFunction/CountersFunction variants |
| 110 | | "CounterStyle" // complex hand-written type |
| 111 | | "CursorImage" // contains Image<'a> |
| 112 | | "EasingFunction" // contains LinearFunction<'a> with CommaSeparated |
| 113 | // Types that reference other allocating types |
| 114 | | "LineWidthOrRepeat" // contains Repeat<'a> |
| 115 | | "LineWidthList" // contains LineWidthOrRepeat<'a> |
| 116 | | "AutoLineWidthList" // contains Repeat<'a> and LineWidthOrRepeat<'a> |
| 117 | | "GapRuleList" // contains Vec<'a, ...> |
| 118 | | "GapAutoRuleList" // contains Vec<'a, ...> |
| 119 | | "FontFamilyName" // may contain allocating elements |
| 120 | | "VoiceFamilyName" // may contain allocating elements |
| 121 | | "BgImage" // contains Image<'a> |
| 122 | | "MaskLayer" // contains Image<'a> |
| 123 | | "MaskReference" // contains Image<'a> |
| 124 | | "DynamicRangeLimit" // contains DynamicRangeLimitMixFunction<'a> |
| 125 | | "DynamicRangeLimitMixFunction" // contains allocating params |
| 126 | // Additional types that reference allocating types |
| 127 | | "Outline" |
| 128 | | "SingleTransition" |
| 129 | | "Symbol" // Symbol<'a> |
| 130 | | "TransformList" |
| 131 | | "FilterValueList" // contains Vec<'a, FilterValue<'a>> |
| 132 | | "FilterValue" // contains FilterFunction<'a> |
| 133 | | "FilterFunction" // contains DropShadowFunction<'a> |
| 134 | | "BgLayer" // contains BgImage<'a> and Color<'a> |
| 135 | | "FinalBgLayer" // type alias for BgLayer<'a> |
| 136 | | "BgPositionAndSize" // contains BgPosition which contains Position |
| 137 | ) |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | impl Parse for Def { |
no test coverage detected