pub struct StyleInheritance<'a> {
pub name: &'a str,
pub parents: Vec<&'a str>,
pub children: Vec<&'a str>,
pub depth: usize,
pub has_circular_inheritance: bool,
}Available on crate feature
analysis only.Expand description
Style inheritance tracking and analysis
Fields§
§name: &'a strStyle name (zero-copy reference)
parents: Vec<&'a str>Parent styles in inheritance chain
children: Vec<&'a str>Child styles that inherit from this style
depth: usizeInheritance depth (0 = root style, no parents)
has_circular_inheritance: boolWhether circular inheritance was detected
Implementations§
Source§impl<'a> StyleInheritance<'a>
impl<'a> StyleInheritance<'a>
Sourcepub fn add_parent(&mut self, parent: &'a str)
pub fn add_parent(&mut self, parent: &'a str)
Add parent style to inheritance chain
Sourcepub fn set_parent(&mut self, parent: &'a str)
pub fn set_parent(&mut self, parent: &'a str)
Set parent style (for single inheritance)
Sourcepub fn has_inheritance(&self) -> bool
pub fn has_inheritance(&self) -> bool
Check if style has inheritance relationships
Trait Implementations§
Source§impl<'a> Clone for StyleInheritance<'a>
impl<'a> Clone for StyleInheritance<'a>
Source§fn clone(&self) -> StyleInheritance<'a>
fn clone(&self) -> StyleInheritance<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for StyleInheritance<'a>
impl<'a> RefUnwindSafe for StyleInheritance<'a>
impl<'a> Send for StyleInheritance<'a>
impl<'a> Sync for StyleInheritance<'a>
impl<'a> Unpin for StyleInheritance<'a>
impl<'a> UnwindSafe for StyleInheritance<'a>
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