pub struct ShadowCascadeOrder(/* private fields */);Expand description
A counter to track how many shadow root rules deep we are. This is used to handle:
https://drafts.csswg.org/css-scoping/#shadow-cascading
See the static functions for the meaning of different values.
Implementations§
Source§impl ShadowCascadeOrder
impl ShadowCascadeOrder
Sourcepub fn for_outermost_shadow_tree() -> Self
pub fn for_outermost_shadow_tree() -> Self
A level for the outermost shadow tree (the shadow tree we own, and the ones from the slots we’re slotted in).
Sourcepub fn for_same_tree() -> Self
pub fn for_same_tree() -> Self
A level for the element’s tree.
Sourcepub fn for_innermost_containing_tree() -> Self
pub fn for_innermost_containing_tree() -> Self
A level for the innermost containing tree (the one closest to the element).
Trait Implementations§
Source§impl Clone for ShadowCascadeOrder
impl Clone for ShadowCascadeOrder
Source§fn clone(&self) -> ShadowCascadeOrder
fn clone(&self) -> ShadowCascadeOrder
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 ShadowCascadeOrder
impl Debug for ShadowCascadeOrder
Source§impl<'de> Deserialize<'de> for ShadowCascadeOrder
impl<'de> Deserialize<'de> for ShadowCascadeOrder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for ShadowCascadeOrder
impl Hash for ShadowCascadeOrder
Source§impl MallocSizeOf for ShadowCascadeOrder
impl MallocSizeOf for ShadowCascadeOrder
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 Neg for ShadowCascadeOrder
impl Neg for ShadowCascadeOrder
Source§impl Ord for ShadowCascadeOrder
impl Ord for ShadowCascadeOrder
Source§fn cmp(&self, other: &ShadowCascadeOrder) -> Ordering
fn cmp(&self, other: &ShadowCascadeOrder) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ShadowCascadeOrder
impl PartialEq for ShadowCascadeOrder
Source§impl PartialOrd for ShadowCascadeOrder
impl PartialOrd for ShadowCascadeOrder
Source§impl Serialize for ShadowCascadeOrder
impl Serialize for ShadowCascadeOrder
Source§impl SpecifiedValueInfo for ShadowCascadeOrder
impl SpecifiedValueInfo for ShadowCascadeOrder
Source§const SUPPORTED_TYPES: u8
const SUPPORTED_TYPES: u8
Supported CssTypes by the given value type. Read more
Source§impl ToAnimatedValue for ShadowCascadeOrder
impl ToAnimatedValue for ShadowCascadeOrder
Source§type AnimatedValue = ShadowCascadeOrder
type AnimatedValue = ShadowCascadeOrder
The type of the animated value.
Source§fn to_animated_value(self, _: &Context<'_>) -> Self::AnimatedValue
fn to_animated_value(self, _: &Context<'_>) -> Self::AnimatedValue
Converts this value to an animated value.
Source§fn from_animated_value(animated: Self::AnimatedValue) -> Self
fn from_animated_value(animated: Self::AnimatedValue) -> Self
Converts back an animated value into a computed value.
Source§impl ToComputedValue for ShadowCascadeOrder
impl ToComputedValue for ShadowCascadeOrder
Source§type ComputedValue = ShadowCascadeOrder
type ComputedValue = ShadowCascadeOrder
The computed value type we’re going to be converted to.
Source§fn from_computed_value(from: &Self::ComputedValue) -> Self
fn from_computed_value(from: &Self::ComputedValue) -> Self
Convert a computed value to specified value form. Read more
Source§fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
Convert a specified value to a computed value, using itself and the data
inside the
Context.Source§impl ToResolvedValue for ShadowCascadeOrder
impl ToResolvedValue for ShadowCascadeOrder
Source§type ResolvedValue = ShadowCascadeOrder
type ResolvedValue = ShadowCascadeOrder
The resolved value type we’re going to be converted to.
Source§fn from_resolved_value(from: Self::ResolvedValue) -> Self
fn from_resolved_value(from: Self::ResolvedValue) -> Self
Convert a resolved value to resolved value form.
Source§fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
Convert a resolved value to a resolved value.
Source§impl ToShmem for ShadowCascadeOrder
impl ToShmem for ShadowCascadeOrder
impl Copy for ShadowCascadeOrder
impl Eq for ShadowCascadeOrder
impl StructuralPartialEq for ShadowCascadeOrder
Auto Trait Implementations§
impl Freeze for ShadowCascadeOrder
impl RefUnwindSafe for ShadowCascadeOrder
impl Send for ShadowCascadeOrder
impl Sync for ShadowCascadeOrder
impl Unpin for ShadowCascadeOrder
impl UnwindSafe for ShadowCascadeOrder
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> 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