pub struct SelectorList { /* private fields */ }Expand description
Shared runtime data types and convenience helpers. A Scrapy-like selection result list.
Implementations§
Source§impl SelectorList
impl SelectorList
Sourcepub fn css(&self, query: &str) -> Result<SelectorList, SpiderError>
pub fn css(&self, query: &str) -> Result<SelectorList, SpiderError>
Applies a CSS selector relative to every node in the list.
§Errors
Returns SpiderError::HtmlParseError when the selector is invalid or
when chaining from a text/attribute extraction.
Sourcepub fn attrib(&self, name: &str) -> Option<String>
pub fn attrib(&self, name: &str) -> Option<String>
Returns the named attribute from the first selected element.
Sourcepub fn first(&self) -> Option<SelectorNode>
pub fn first(&self) -> Option<SelectorNode>
Returns the first selected node.
Trait Implementations§
Source§impl Clone for SelectorList
impl Clone for SelectorList
Source§fn clone(&self) -> SelectorList
fn clone(&self) -> SelectorList
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 Debug for SelectorList
impl Debug for SelectorList
Source§impl IntoIterator for SelectorList
impl IntoIterator for SelectorList
Source§type Item = SelectorNode
type Item = SelectorNode
The type of the elements being iterated over.
Source§type IntoIter = IntoIter<SelectorNode>
type IntoIter = IntoIter<SelectorNode>
Which kind of iterator are we turning this into?
Source§fn into_iter(self) -> <SelectorList as IntoIterator>::IntoIter
fn into_iter(self) -> <SelectorList as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
Auto Trait Implementations§
impl Freeze for SelectorList
impl RefUnwindSafe for SelectorList
impl Send for SelectorList
impl Sync for SelectorList
impl Unpin for SelectorList
impl UnwindSafe for SelectorList
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