pub struct VariantDef {
pub id: String,
pub source: String,
pub w: Dimension,
pub h: Dimension,
pub overrides: Vec<VariantOverride>,
pub source_span: Option<Span>,
pub unknown_props: BTreeMap<String, UnknownProperty>,
}Expand description
A single variant declaration within a variants block.
Fields§
§id: StringThe variant’s own stable id. Required.
source: StringThe canonical page id this variant derives from. Required; existence is validated later, not by the parser.
w: DimensionTarget page width for this variant. Required.
h: DimensionTarget page height for this variant. Required.
overrides: Vec<VariantOverride>Per-node property overrides; empty when no override children are
present.
source_span: Option<Span>Source declaration span, when available.
unknown_props: BTreeMap<String, UnknownProperty>Forward-compat: unrecognized attributes preserved with typed values + annotations.
Trait Implementations§
Source§impl Clone for VariantDef
impl Clone for VariantDef
Source§fn clone(&self) -> VariantDef
fn clone(&self) -> VariantDef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VariantDef
impl Debug for VariantDef
Source§impl PartialEq for VariantDef
impl PartialEq for VariantDef
Source§fn eq(&self, other: &VariantDef) -> bool
fn eq(&self, other: &VariantDef) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for VariantDef
Auto Trait Implementations§
impl Freeze for VariantDef
impl RefUnwindSafe for VariantDef
impl Send for VariantDef
impl Sync for VariantDef
impl Unpin for VariantDef
impl UnsafeUnpin for VariantDef
impl UnwindSafe for VariantDef
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