Struct style::stylist::GenericElementAndPseudoRules
source · struct GenericElementAndPseudoRules<Map> {
element_map: Map,
pseudos_map: PerPseudoElementMap<Box<Map>>,
}
Expand description
A set of rules for element and pseudo-elements.
Fields§
§element_map: Map
Rules from stylesheets at this CascadeData
’s origin.
pseudos_map: PerPseudoElementMap<Box<Map>>
Rules from stylesheets at this CascadeData
’s origin that correspond
to a given pseudo-element.
FIXME(emilio): There are a bunch of wasted entries here in practice.
Figure out a good way to do a PerNonAnonBox
and PerAnonBox
(for
precomputed_values_for_pseudo
) without duplicating a lot of code.
Implementations§
source§impl<Map: Default + MallocSizeOf> GenericElementAndPseudoRules<Map>
impl<Map: Default + MallocSizeOf> GenericElementAndPseudoRules<Map>
fn for_insertion(&mut self, pseudo_element: Option<&PseudoElement>) -> &mut Map
fn rules(&self, pseudo: Option<&PseudoElement>) -> Option<&Map>
source§impl GenericElementAndPseudoRules<SelectorMap<Rule>>
impl GenericElementAndPseudoRules<SelectorMap<Rule>>
fn clear(&mut self)
fn shrink_if_needed(&mut self)
Trait Implementations§
source§impl<Map: Clone> Clone for GenericElementAndPseudoRules<Map>
impl<Map: Clone> Clone for GenericElementAndPseudoRules<Map>
source§fn clone(&self) -> GenericElementAndPseudoRules<Map>
fn clone(&self) -> GenericElementAndPseudoRules<Map>
Returns a copy 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 moresource§impl<Map: Debug> Debug for GenericElementAndPseudoRules<Map>
impl<Map: Debug> Debug for GenericElementAndPseudoRules<Map>
source§impl<Map: Default> Default for GenericElementAndPseudoRules<Map>
impl<Map: Default> Default for GenericElementAndPseudoRules<Map>
source§fn default() -> GenericElementAndPseudoRules<Map>
fn default() -> GenericElementAndPseudoRules<Map>
Returns the “default value” for a type. Read more
source§impl<Map> MallocSizeOf for GenericElementAndPseudoRules<Map>where
Map: MallocSizeOf,
impl<Map> MallocSizeOf for GenericElementAndPseudoRules<Map>where
Map: MallocSizeOf,
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Auto Trait Implementations§
impl<Map> Freeze for GenericElementAndPseudoRules<Map>where
Map: Freeze,
impl<Map> RefUnwindSafe for GenericElementAndPseudoRules<Map>where
Map: RefUnwindSafe,
impl<Map> Send for GenericElementAndPseudoRules<Map>where
Map: Send,
impl<Map> Sync for GenericElementAndPseudoRules<Map>where
Map: Sync,
impl<Map> Unpin for GenericElementAndPseudoRules<Map>where
Map: Unpin,
impl<Map> UnwindSafe for GenericElementAndPseudoRules<Map>where
Map: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert