Struct selectors::parser::NthSelectorData
source · pub struct NthSelectorData {
pub ty: NthType,
pub is_function: bool,
pub a: i32,
pub b: i32,
}
Expand description
The properties that comprise an :nth- pseudoclass as of Selectors 3 (e.g., nth-child(An+B)). https://www.w3.org/TR/selectors-3/#nth-child-pseudo
Fields§
§ty: NthType
§is_function: bool
§a: i32
§b: i32
Implementations§
source§impl NthSelectorData
impl NthSelectorData
sourcepub fn is_simple_edge(&self) -> bool
pub fn is_simple_edge(&self) -> bool
Returns true if this is an edge selector that is not `:*-of-type``
sourcefn write_start<W: Write>(&self, dest: &mut W) -> Result
fn write_start<W: Write>(&self, dest: &mut W) -> Result
Writes the beginning of the selector.
sourcefn write_affine<W: Write>(&self, dest: &mut W) -> Result
fn write_affine<W: Write>(&self, dest: &mut W) -> Result
Serialize <an+b> (part of the CSS Syntax spec, but currently only used here). https://drafts.csswg.org/css-syntax-3/#serialize-an-anb-value
Trait Implementations§
source§impl Clone for NthSelectorData
impl Clone for NthSelectorData
source§fn clone(&self) -> NthSelectorData
fn clone(&self) -> NthSelectorData
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 PartialEq for NthSelectorData
impl PartialEq for NthSelectorData
source§impl ToShmem for NthSelectorData
impl ToShmem for NthSelectorData
impl Copy for NthSelectorData
impl Eq for NthSelectorData
impl StructuralPartialEq for NthSelectorData
Auto Trait Implementations§
impl Freeze for NthSelectorData
impl RefUnwindSafe for NthSelectorData
impl Send for NthSelectorData
impl Sync for NthSelectorData
impl Unpin for NthSelectorData
impl UnwindSafe for NthSelectorData
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
)