Enum style::properties::StyleStructRef [] [src]

pub enum StyleStructRef<'a, T: 'static> {
    Borrowed(&'a BuilderArc<T>),
    Owned(UniqueArc<T>),
    Vacated,
}

A reference to a style struct of the parent, or our own style struct.

Variants

A borrowed struct from the parent, for example, for inheriting style.

An owned struct, that we've already mutated.

Temporarily vacated, will panic if accessed

Methods

impl<'a, T: 'a> StyleStructRef<'a, T> where
    T: Clone
[src]

Important traits for &'a mut W
[src]

Ensure a mutable reference of this value exists, either cloning the borrowed value, or returning the owned one.

[src]

Extract a unique Arc from this struct, vacating it.

The vacated state is a transient one, please put the Arc back when done via put(). This function is to be used to separate the struct being mutated from the computed context

[src]

Replace vacated ref with an arc

[src]

Get a mutable reference to the owned struct, or None if the struct hasn't been mutated.

[src]

Returns an Arc to the internal struct, constructing one if appropriate.

Trait Implementations

impl<'a, T: 'a> Deref for StyleStructRef<'a, T>
[src]

The resulting type after dereferencing.

Important traits for &'a mut W
[src]

Dereferences the value.