[][src]Struct crabler::Document

pub struct Document { /* fields omitted */ }

Methods

impl Document[src]

pub fn select(&self, selector: &str) -> Vec<Element>[src]

Select elements using given css selector

Example

use crabquery::Document;

let doc = Document::from("<span>hi there</span>");
let sel = doc.select("span");
let el = sel.first().unwrap();

assert_eq!(el.text().unwrap(), "hi there");

Trait Implementations

impl<'_> From<&'_ str> for Document[src]

fn from(input: &str) -> Document[src]

Create document from a string slice

impl From<String> for Document[src]

fn from(input: String) -> Document[src]

Create document from String

Auto Trait Implementations

impl !RefUnwindSafe for Document

impl !Send for Document

impl !Sync for Document

impl Unpin for Document

impl !UnwindSafe for Document

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.