#[repr(u8)]pub enum CascadeOrigin {
UA = 0,
User = 1,
PresHints = 2,
Author = 3,
PositionFallback = 4,
SMILOverride = 5,
Animations = 6,
Transitions = 7,
}Expand description
The cascade origin of rules.
Presentational hints for SVG and HTML are in the “author-level zero-specificity” level, that is, right after user rules, and before author rules.
The order of variants declared here is significant, and must be in ascending order of precedence.
Variants§
UA = 0
Normal User-Agent rules.
User = 1
User normal rules.
PresHints = 2
Presentational hints.
Author = 3
Styles from author styles.
PositionFallback = 4
https://drafts.csswg.org/css-anchor-position-1/#position-fallback-origin
SMILOverride = 5
SVG SMIL animations.
Animations = 6
CSS animations and script-generated animations.
Transitions = 7
CSS Transitions
Implementations§
Source§impl CascadeOrigin
impl CascadeOrigin
Returns whether this is an “author” origin (in the “simplified” sense of the word).
Sourcepub fn guard<'a>(
&self,
guards: &'a StylesheetGuards<'a>,
) -> &'a SharedRwLockReadGuard<'a>
pub fn guard<'a>( &self, guards: &'a StylesheetGuards<'a>, ) -> &'a SharedRwLockReadGuard<'a>
Select a lock guard for this origin.
Trait Implementations§
Source§impl Clone for CascadeOrigin
impl Clone for CascadeOrigin
Source§fn clone(&self) -> CascadeOrigin
fn clone(&self) -> CascadeOrigin
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 CascadeOrigin
impl Debug for CascadeOrigin
Source§impl<'de> Deserialize<'de> for CascadeOrigin
impl<'de> Deserialize<'de> for CascadeOrigin
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 FromPrimitive for CascadeOrigin
impl FromPrimitive for CascadeOrigin
Source§fn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
Converts an
i64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
Converts an
u64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
Converts an
isize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
Converts an
i8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
Converts an
i16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
Converts an
i32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
Converts an
i128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moreSource§fn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
Converts a
usize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
Converts an
u8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
Converts an
u16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
Converts an
u32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
Converts an
u128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moreSource§impl Hash for CascadeOrigin
impl Hash for CascadeOrigin
Source§impl MallocSizeOf for CascadeOrigin
impl MallocSizeOf for CascadeOrigin
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 Ord for CascadeOrigin
impl Ord for CascadeOrigin
Source§fn cmp(&self, other: &CascadeOrigin) -> Ordering
fn cmp(&self, other: &CascadeOrigin) -> 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 CascadeOrigin
impl PartialEq for CascadeOrigin
Source§impl PartialOrd for CascadeOrigin
impl PartialOrd for CascadeOrigin
Source§impl Serialize for CascadeOrigin
impl Serialize for CascadeOrigin
Source§impl ToAnimatedValue for CascadeOrigin
impl ToAnimatedValue for CascadeOrigin
Source§type AnimatedValue = CascadeOrigin
type AnimatedValue = CascadeOrigin
The type of the animated value.
Source§fn from_animated_value(from: Self::AnimatedValue) -> Self
fn from_animated_value(from: Self::AnimatedValue) -> Self
Converts back an animated value into a computed value.
Source§fn to_animated_value(self, context: &Context<'_>) -> Self::AnimatedValue
fn to_animated_value(self, context: &Context<'_>) -> Self::AnimatedValue
Converts this value to an animated value.
Source§impl ToResolvedValue for CascadeOrigin
impl ToResolvedValue for CascadeOrigin
Source§type ResolvedValue = CascadeOrigin
type ResolvedValue = CascadeOrigin
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 CascadeOrigin
impl ToShmem for CascadeOrigin
impl Copy for CascadeOrigin
impl Eq for CascadeOrigin
impl StructuralPartialEq for CascadeOrigin
Auto Trait Implementations§
impl Freeze for CascadeOrigin
impl RefUnwindSafe for CascadeOrigin
impl Send for CascadeOrigin
impl Sync for CascadeOrigin
impl Unpin for CascadeOrigin
impl UnwindSafe for CascadeOrigin
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