[][src]Trait extrablatt::clean::DocumentCleaner

pub trait DocumentCleaner {
    fn clean_node_text(&self, node: Node<'_>) -> String { ... }
fn is_good_node(&self, node: Node<'_>) -> bool { ... }
fn is_bad_node_name(&self, node: Node<'_>) -> bool { ... }
fn iter_clean_nodes<'a>(&'a self, node: Node<'a>) -> CleanNodeIter<'a, Self>

Notable traits for CleanNodeIter<'a, T>

impl<'a, T: DocumentCleaner> Iterator for CleanNodeIter<'a, T> type Item = Node<'a>;

    where
        Self: Sized
, { ... } }

Provided methods

fn clean_node_text(&self, node: Node<'_>) -> String

Extract all textual content from the node, but ignore those nodes, that do not contain parts of the article.

fn is_good_node(&self, node: Node<'_>) -> bool

Whether the node should be considered

fn is_bad_node_name(&self, node: Node<'_>) -> bool

Whether the node's should be ignored based on its name

fn iter_clean_nodes<'a>(&'a self, node: Node<'a>) -> CleanNodeIter<'a, Self>

Notable traits for CleanNodeIter<'a, T>

impl<'a, T: DocumentCleaner> Iterator for CleanNodeIter<'a, T> type Item = Node<'a>;
where
    Self: Sized

Create an iterator that yields every node that this cleaner considers good

Loading content...

Implementors

impl DocumentCleaner for DefaultDocumentCleaner[src]

impl<P> DocumentCleaner for CommonCleaner<P> where
    P: Fn(Node<'_>) -> bool
[src]

fn is_bad_node_name(&self, node: Node<'_>) -> bool[src]

Whether the node's should be ignored based on its name

Loading content...