Struct style::data::EagerPseudoStyles
[−]
[src]
pub struct EagerPseudoStyles(_);
A lazily-allocated list of styles for eagerly-cascaded pseudo-elements.
We use an Arc so that sharing these styles via the style sharing cache does not require duplicate allocations. We leverage the copy-on-write semantics of Arc::make_mut(), which is free (i.e. does not require atomic RMU operations) in servo_arc.
Methods
impl EagerPseudoStyles
[src]
pub fn is_empty(&self) -> bool
[src]
Returns whether there are any pseudo styles.
pub fn as_optional_array(&self) -> Option<&[Option<Arc<ComputedValues>>; 3]>
[src]
Grabs a reference to the list of styles, if they exist.
pub fn as_array(&self) -> &[Option<Arc<ComputedValues>>; 3]
[src]
Grabs a reference to the list of styles or a list of None if there are no styles to be had.
pub fn get(&self, pseudo: &PseudoElement) -> Option<&Arc<ComputedValues>>
[src]
Returns a reference to the style for a given eager pseudo, if it exists.
pub fn set(&mut self, pseudo: &PseudoElement, value: Arc<ComputedValues>)
[src]
Sets the style for the eager pseudo.
Trait Implementations
impl Clone for EagerPseudoStyles
[src]
fn clone(&self) -> EagerPseudoStyles
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for EagerPseudoStyles
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Default for EagerPseudoStyles
[src]
fn default() -> EagerPseudoStyles
[src]
Returns the "default value" for a type. Read more