pub struct PaperText {
pub arxiv_id: String,
pub source: TextSource,
pub title: Option<String>,
pub sections: Vec<TextSection>,
pub char_count: usize,
pub truncated: bool,
pub retrieved_from: String,
}Expand description
Extracted full text of an arXiv paper.
The value returned by paper_text reflects the caller’s max_chars
(see PaperText::truncated); the cached form is always the full
text.
Fields§
§arxiv_id: StringThe arXiv id this text belongs to.
source: TextSourceWhich source produced the text (PR4: always TextSource::Ar5iv).
title: Option<String>Document title, if one was extracted (the <title> element).
sections: Vec<TextSection>Ordered sections.
char_count: usizeTotal chars across sections[].text (after any truncation).
truncated: booltrue when the returned text was truncated to honor max_chars.
retrieved_from: StringFinal URL the text was retrieved from (after redirects), for provenance. Carried through the cache.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PaperText
impl<'de> Deserialize<'de> for PaperText
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PaperText
impl StructuralPartialEq for PaperText
Auto Trait Implementations§
impl Freeze for PaperText
impl RefUnwindSafe for PaperText
impl Send for PaperText
impl Sync for PaperText
impl Unpin for PaperText
impl UnsafeUnpin for PaperText
impl UnwindSafe for PaperText
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