css_select/selector
Types
A single attribute-based selector component.
pub type AttributeSelector {
Id(String)
Class(String)
AttributeExists(String)
AttributeEqual(String, String)
AttributePrefix(String, String)
AttributeSuffix(String, String)
AttributeIncludes(String, String)
Psuedo(String)
}
Constructors
-
Id(String)Matches elements with the given ID attribute.
-
Class(String)Matches elements with the given class.
-
AttributeExists(String)Matches elements that have the given attribute.
-
AttributeEqual(String, String)Matches elements where the attribute equals the given value.
-
AttributePrefix(String, String)Matches elements where the attribute value starts with the given prefix.
-
AttributeSuffix(String, String)Matches elements where the attribute value ends with the given suffix.
-
AttributeIncludes(String, String)Matches elements where the attribute value contains the given substring.
-
Psuedo(String)Matches elements with the given pseudo-class.
A complete simple CSS selector, consisting of a tag selector and zero or more attribute selectors.
pub type Selector {
ElementSelector(TagSelector, List(AttributeSelector))
}
Constructors
-
ElementSelector(TagSelector, List(AttributeSelector))
The element type part of a selector.
pub type TagSelector {
Any
Tag(String)
}
Constructors
-
AnyMatches any element type.
-
Tag(String)Matches elements of the given tag name.