pub enum TextCitation {
CharLocation {
cited_text: String,
document_index: usize,
document_title: Option<String>,
start_char_index: usize,
end_char_index: usize,
},
PageLocation {
cited_text: String,
document_index: usize,
document_title: Option<String>,
start_page_number: usize,
end_page_number: usize,
},
ContentBlockLocation {
cited_text: String,
document_index: usize,
document_title: Option<String>,
start_block_index: usize,
end_block_index: usize,
},
WebSearchResultLocation {
cited_text: String,
encrypted_index: String,
title: Option<String>,
url: String,
},
}Expand description
Citation information for text blocks.
Citations provide source attribution for generated text, with different types depending on the source document.
Variants§
CharLocation
Citation pointing to character locations in plain text.
Fields
PageLocation
Citation pointing to page locations in PDFs.
Fields
ContentBlockLocation
Citation pointing to content block locations.
Fields
WebSearchResultLocation
Citation pointing to web search results.
Trait Implementations§
Source§impl Clone for TextCitation
impl Clone for TextCitation
Source§fn clone(&self) -> TextCitation
fn clone(&self) -> TextCitation
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 TextCitation
impl Debug for TextCitation
Source§impl<'de> Deserialize<'de> for TextCitation
impl<'de> Deserialize<'de> for TextCitation
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
Source§impl PartialEq for TextCitation
impl PartialEq for TextCitation
Source§fn eq(&self, other: &TextCitation) -> bool
fn eq(&self, other: &TextCitation) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TextCitation
impl Serialize for TextCitation
impl StructuralPartialEq for TextCitation
Auto Trait Implementations§
impl Freeze for TextCitation
impl RefUnwindSafe for TextCitation
impl Send for TextCitation
impl Sync for TextCitation
impl Unpin for TextCitation
impl UnsafeUnpin for TextCitation
impl UnwindSafe for TextCitation
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