pub trait ToSelector {
// Required method
fn to_selector(&self) -> Result<Selector, SpiderError>;
}Expand description
Converts a string selector expression into a parsed Selector.
Required Methods§
Sourcefn to_selector(&self) -> Result<Selector, SpiderError>
fn to_selector(&self) -> Result<Selector, SpiderError>
Parses a string slice into a scraper::Selector, returning a SpiderError on failure.
§Errors
Returns SpiderError::HtmlParseError when selector parsing fails.