Skip to main content

Extract

Derive Macro Extract 

Source
#[derive(Extract)]
{
    // Attributes available to this derive:
    #[selector]
}
Expand description

Derive stygian_browser::extract::Extractable for a struct.

Each field must carry #[selector("css")], #[selector("css", attr = "name")], or #[selector("css", nested)]. Wrapping the field type in Option<T> makes a missing element produce None instead of ExtractionError::Missing.