ContentExtractor

Trait ContentExtractor 

Source
pub trait ContentExtractor {
    // Required methods
    fn extract_tagged(&self, text: &str, tag: &str) -> Option<String>;
    fn extract_json_like(&self, text: &str) -> Option<String>;
    fn extract_pattern(&self, text: &str, pattern: &str) -> Option<String>;
}
Expand description

Trait for extracting tagged or structured content

Required Methods§

Source

fn extract_tagged(&self, text: &str, tag: &str) -> Option<String>

Extract content within specified tags

Source

fn extract_json_like(&self, text: &str) -> Option<String>

Extract JSON-like content

Source

fn extract_pattern(&self, text: &str, pattern: &str) -> Option<String>

Extract using custom pattern

Implementors§