pub enum UrlMatchingFunction {
Url(SpecifiedUrl),
UrlPrefix(String),
Domain(String),
RegExp(String),
}
Expand description
A URL matching function for a @document
rule’s condition.
Variants§
Url(SpecifiedUrl)
Exact URL matching function. It evaluates to true whenever the URL of the document being styled is exactly the URL given.
UrlPrefix(String)
URL prefix matching function. It evaluates to true whenever the URL of the document being styled has the argument to the function as an initial substring (which is true when the two strings are equal). When the argument is the empty string, it evaluates to true for all documents.
Domain(String)
Domain matching function. It evaluates to true whenever the URL of the document being styled has a host subcomponent and that host subcomponent is exactly the argument to the ‘domain()’ function or a final substring of the host component is a period (U+002E) immediately followed by the argument to the ‘domain()’ function.
RegExp(String)
Regular expression matching function. It evaluates to true whenever the regular expression matches the entirety of the URL of the document being styled.
Implementations§
Trait Implementations§
Source§impl Clone for UrlMatchingFunction
impl Clone for UrlMatchingFunction
Source§fn clone(&self) -> UrlMatchingFunction
fn clone(&self) -> UrlMatchingFunction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more