#[repr(u8)]pub enum TreeCountingFunction {
SiblingCount = 0,
SiblingIndex = 1,
}Expand description
A CSS tree-counting function: sibling-index() or sibling-count().
See https://www.w3.org/TR/css-values-5/#tree-counting.
Variants§
SiblingCount = 0
sibling-count(): the total number of siblings of the element, including itself.
SiblingIndex = 1
sibling-index(): the 1-based index of the element among its siblings.
Implementations§
Source§impl TreeCountingFunction
impl TreeCountingFunction
Sourcepub fn to_computed_value(&self, context: &Context<'_>) -> u32
pub fn to_computed_value(&self, context: &Context<'_>) -> u32
Computes the value of this tree-counting function.
Trait Implementations§
Source§impl Clone for TreeCountingFunction
impl Clone for TreeCountingFunction
Source§fn clone(&self) -> TreeCountingFunction
fn clone(&self) -> TreeCountingFunction
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 TreeCountingFunction
impl Debug for TreeCountingFunction
Source§impl MallocSizeOf for TreeCountingFunction
impl MallocSizeOf for TreeCountingFunction
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 TreeCountingFunction
impl PartialEq for TreeCountingFunction
Source§impl PartialOrd for TreeCountingFunction
impl PartialOrd for TreeCountingFunction
Source§impl ToCss for TreeCountingFunction
impl ToCss for TreeCountingFunction
Source§fn to_css<W>(&self, dest: &mut CssWriter<'_, W>) -> Resultwhere
W: Write,
fn to_css<W>(&self, dest: &mut CssWriter<'_, W>) -> Resultwhere
W: Write,
Serialize
self in CSS syntax, writing to dest.Source§fn to_css_string(&self) -> String
fn to_css_string(&self) -> String
Serialize
self in CSS syntax and return a string. Read moreSource§fn to_css_cssstring(&self) -> String
fn to_css_cssstring(&self) -> String
Serialize
self in CSS syntax and return a CssString. Read moreSource§impl ToShmem for TreeCountingFunction
impl ToShmem for TreeCountingFunction
Source§impl ToTyped for TreeCountingFunction
impl ToTyped for TreeCountingFunction
Source§fn to_typed_value(&self) -> Option<TypedValue>
fn to_typed_value(&self) -> Option<TypedValue>
Source§fn to_numeric_value(&self) -> Option<NumericValue>
fn to_numeric_value(&self) -> Option<NumericValue>
Source§fn to_typed_value_list(&self) -> Option<TypedValueList>
fn to_typed_value_list(&self) -> Option<TypedValueList>
impl Copy for TreeCountingFunction
impl StructuralPartialEq for TreeCountingFunction
Auto Trait Implementations§
impl Freeze for TreeCountingFunction
impl RefUnwindSafe for TreeCountingFunction
impl Send for TreeCountingFunction
impl Sync for TreeCountingFunction
impl Unpin for TreeCountingFunction
impl UnsafeUnpin for TreeCountingFunction
impl UnwindSafe for TreeCountingFunction
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<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