pub struct Extractor {
pub field: String,
pub selector: String,
pub attr: Option<String>,
}Expand description
A rule for extracting one profile field from a page.
Fields§
§field: StringOutput field name, e.g. "avatar", "bio", "name".
selector: StringCSS selector locating the element.
attr: Option<String>Attribute to read (e.g. "src", "content"). When omitted, the
element’s trimmed text content is used.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Extractor
impl<'de> Deserialize<'de> for Extractor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Extractor
impl RefUnwindSafe for Extractor
impl Send for Extractor
impl Sync for Extractor
impl Unpin for Extractor
impl UnsafeUnpin for Extractor
impl UnwindSafe for Extractor
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