pub struct PseudoElementChain {
    pub primary: Option<PseudoElement>,
    pub secondary: Option<PseudoElement>,
}Expand description
A chain of pseudo-elements up to two levels deep. This is used to represent cases
where a pseudo-element has its own child pseudo element (for instance
.div::after::marker). If both Self::primary and Self::secondary are None,
then this chain represents the element itself. Not all combinations of pseudo-elements
are possible and we may not be able to calculate a style for all
PseudoElementChains.
Fields§
§primary: Option<PseudoElement>§secondary: Option<PseudoElement>Implementations§
Source§impl PseudoElementChain
 
impl PseudoElementChain
pub fn unnested(pseudo_element: PseudoElement) -> Self
pub fn innermost(&self) -> Option<PseudoElement>
Sourcepub fn with_pseudo(&self, pseudo_element: PseudoElement) -> Self
 
pub fn with_pseudo(&self, pseudo_element: PseudoElement) -> Self
Return a possibly nested PseudoElementChain. Currently only ::before and
::after only support nesting. If the primary PseudoElement on the chain is
not ::before or ::after a single element chain is returned for the given
PseudoElement.
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for PseudoElementChain
 
impl Clone for PseudoElementChain
Source§fn clone(&self) -> PseudoElementChain
 
fn clone(&self) -> PseudoElementChain
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 moreSource§impl Debug for PseudoElementChain
 
impl Debug for PseudoElementChain
Source§impl Default for PseudoElementChain
 
impl Default for PseudoElementChain
Source§fn default() -> PseudoElementChain
 
fn default() -> PseudoElementChain
Returns the “default value” for a type. Read more
Source§impl Hash for PseudoElementChain
 
impl Hash for PseudoElementChain
Source§impl MallocSizeOf for PseudoElementChain
 
impl MallocSizeOf for PseudoElementChain
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.
Source§impl PartialEq for PseudoElementChain
 
impl PartialEq for PseudoElementChain
impl Copy for PseudoElementChain
impl Eq for PseudoElementChain
impl StructuralPartialEq for PseudoElementChain
Auto Trait Implementations§
impl Freeze for PseudoElementChain
impl RefUnwindSafe for PseudoElementChain
impl Send for PseudoElementChain
impl Sync for PseudoElementChain
impl Unpin for PseudoElementChain
impl UnwindSafe for PseudoElementChain
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§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.Source§impl<T> Instrument for T
 
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
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