pub struct Style {
pub id: String,
pub properties: BTreeMap<String, PropertyValue>,
pub unknown_props: BTreeMap<String, UnknownStyleProp>,
pub source_span: Option<Span>,
}Expand description
A named style definition, holding a map of recognized visual properties.
Fields§
§id: StringGlobally unique style ID.
properties: BTreeMap<String, PropertyValue>Recognized visual properties, keyed by their canonical hyphenated name.
Canonical keys: fill, stroke, stroke-width, stroke-alignment,
font-family, font-size, font-weight, line-height, radius,
padding, gap.
unknown_props: BTreeMap<String, UnknownStyleProp>Unknown (unrecognized) child node names encountered in the style block.
These are preserved so the validator can emit style.unknown_property
warnings without re-parsing the source.
source_span: Option<Span>Byte-range of this style node in the source (for diagnostics).
Trait Implementations§
impl StructuralPartialEq for Style
Auto Trait Implementations§
impl Freeze for Style
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnsafeUnpin for Style
impl UnwindSafe for Style
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more