pub struct FetchResult {
pub title: String,
pub final_url: String,
pub content: String,
pub content_type: ContentType,
pub media: String,
pub token_estimate: usize,
pub status: ContentStatus,
pub references: Vec<UrlReference>,
pub metadata: Metadata,
pub source: String,
}Expand description
Result of fetching and converting a web page.
Fields§
§title: String§final_url: StringThe URL the content actually came from, after redirects.
content: String§content_type: ContentType§media: StringThe detected source media kind: “html”, “json”, “text”, or a raw content-type for anything not rendered.
token_estimate: usize§status: ContentStatusWhether content was extracted — see ContentStatus.
references: Vec<UrlReference>References cited by content. When max_tokens truncates the body,
references the surviving text no longer cites are dropped from both, so
this list and the inline [N] markers always agree.
metadata: Metadata§source: StringThe URL that was requested, before any redirect.
Trait Implementations§
Source§impl Clone for FetchResult
impl Clone for FetchResult
Source§fn clone(&self) -> FetchResult
fn clone(&self) -> FetchResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FetchResult
impl Debug for FetchResult
Source§impl<'de> Deserialize<'de> for FetchResult
impl<'de> Deserialize<'de> for FetchResult
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
Auto Trait Implementations§
impl Freeze for FetchResult
impl RefUnwindSafe for FetchResult
impl Send for FetchResult
impl Sync for FetchResult
impl Unpin for FetchResult
impl UnsafeUnpin for FetchResult
impl UnwindSafe for FetchResult
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