pub enum ArticleItem {
Paragraph(TextSegment),
Image(ImageSegment),
References(HashMap<String, String>),
}Expand description
A single item extracted from a Wikipedia article, in document order.
Paragraphs and images are interleaved as they appear in the source HTML,
so formatters can reproduce the original reading order. If references were
found, a single ArticleItem::References item is appended last.
Variants§
Paragraph(TextSegment)
A paragraph extracted from a <p> element.
Image(ImageSegment)
An image extracted from a <figure> element.
References(HashMap<String, String>)
All citation references collected from <ol class="references"> lists.
Keyed by the fragment id (e.g. "cite_note-Foo-1"), valued by the
full plain-text citation string.
Trait Implementations§
Source§impl Clone for ArticleItem
impl Clone for ArticleItem
Source§fn clone(&self) -> ArticleItem
fn clone(&self) -> ArticleItem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ArticleItem
impl RefUnwindSafe for ArticleItem
impl Send for ArticleItem
impl Sync for ArticleItem
impl Unpin for ArticleItem
impl UnsafeUnpin for ArticleItem
impl UnwindSafe for ArticleItem
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