pub struct PageResult {
pub url: String,
pub title: String,
pub markdown: String,
pub timestamp: DateTime<Utc>,
}Expand description
The result of a successful page fetch and extraction.
Contains the page’s URL, title, and main content converted to Markdown, along with a UTC timestamp of when the fetch occurred.
Returned by crate::Web2llm::fetch and the free crate::fetch function.
Fields§
§url: StringThe URL that was fetched.
title: StringThe page’s <title> tag content, or an empty string if not found.
markdown: StringThe main page content converted to clean Markdown. Structural noise (nav, footer, sidebar) is excluded by the scoring stage.
timestamp: DateTime<Utc>UTC timestamp of when the page was fetched.
Implementations§
Source§impl PageResult
impl PageResult
Sourcepub fn new(url: &str, title: &str, markdown: String) -> Self
pub fn new(url: &str, title: &str, markdown: String) -> Self
Creates a new PageResult, stamping the current UTC time as the timestamp.
Called internally by the extraction stage — consumers receive a fully
populated PageResult and do not need to call this directly.
pub fn save(&self, path: &Path) -> Result<()>
pub fn save_auto(&self, dir: &Path) -> Result<()>
Auto Trait Implementations§
impl Freeze for PageResult
impl RefUnwindSafe for PageResult
impl Send for PageResult
impl Sync for PageResult
impl Unpin for PageResult
impl UnsafeUnpin for PageResult
impl UnwindSafe for PageResult
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