pub struct TextCollector {
skip_tags: HashSet<String>,
attribute_tags: HashMap<String, Vec<String>>,
}Expand description
文本收集器
Fields§
跳过的标签集合
收集属性文本的标签映射
Implementations§
Source§impl TextCollector
impl TextCollector
Sourcepub fn collect_from_dom(&self, dom: &RcDom) -> TranslationResult<Vec<TextItem>>
pub fn collect_from_dom(&self, dom: &RcDom) -> TranslationResult<Vec<TextItem>>
从DOM中收集文本
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TextCollector
impl RefUnwindSafe for TextCollector
impl Send for TextCollector
impl Sync for TextCollector
impl Unpin for TextCollector
impl UnwindSafe for TextCollector
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