pub struct SelectorTerm<'a, T> {
pub id: Option<&'a str>,
pub class: Vec<&'a str>,
pub tag: T,
pub attribute: Vec<SelectorAttr<'a>>,
pub pseudo: Vec<Pseudo<'a>>,
}Expand description
A single compound CSS selector, parameterized over it’s tag field such
that the uniqu wildcard and self selectors can re-use the same struct and
some tag-irrelevent functions can be shared between impls.
Fields§
§id: Option<&'a str>§class: Vec<&'a str>§tag: T§attribute: Vec<SelectorAttr<'a>>§pseudo: Vec<Pseudo<'a>>Implementations§
Source§impl<'a, T: Clone> SelectorTerm<'a, T>
impl<'a, T: Clone> SelectorTerm<'a, T>
Sourcepub fn join(&self, other: &SelectorTerm<'a, ()>) -> Self
pub fn join(&self, other: &SelectorTerm<'a, ()>) -> Self
Join to another “self” selector.
TODO Joining two selectors with populated id fields will discard the
parent’s id.
Trait Implementations§
Source§impl<'a, T: Clone> Clone for SelectorTerm<'a, T>
impl<'a, T: Clone> Clone for SelectorTerm<'a, T>
Source§fn clone(&self) -> SelectorTerm<'a, T>
fn clone(&self) -> SelectorTerm<'a, T>
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<'a, T: Debug> Debug for SelectorTerm<'a, T>
impl<'a, T: Debug> Debug for SelectorTerm<'a, T>
Source§impl<'a, T: Default> Default for SelectorTerm<'a, T>
impl<'a, T: Default> Default for SelectorTerm<'a, T>
Source§fn default() -> SelectorTerm<'a, T>
fn default() -> SelectorTerm<'a, T>
Returns the “default value” for a type. Read more
Source§impl<'a, T: Hash> Hash for SelectorTerm<'a, T>
impl<'a, T: Hash> Hash for SelectorTerm<'a, T>
Source§impl<'a, T: PartialEq> PartialEq for SelectorTerm<'a, T>
impl<'a, T: PartialEq> PartialEq for SelectorTerm<'a, T>
Source§impl<'a, T: RenderCss> RenderCss for SelectorTerm<'a, T>
impl<'a, T: RenderCss> RenderCss for SelectorTerm<'a, T>
impl<'a, T: Eq> Eq for SelectorTerm<'a, T>
impl<'a, T> StructuralPartialEq for SelectorTerm<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for SelectorTerm<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for SelectorTerm<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for SelectorTerm<'a, T>where
T: Send,
impl<'a, T> Sync for SelectorTerm<'a, T>where
T: Sync,
impl<'a, T> Unpin for SelectorTerm<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for SelectorTerm<'a, T>where
T: UnwindSafe,
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