pub struct CitationReference {
pub cited_text: Option<String>,
pub location: Option<Value>,
pub provider_metadata: Option<Value>,
pub source_id: String,
}Expand description
A single citation occurrence linking a span of generated text to a supporting source.
Experimental. This type is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases.
Fields§
§cited_text: Option<String>The exact text from the source that supports the cited span, when provided by the model.
location: Option<Value>Location within the source that supports the cited span, when the provider reports one.
provider_metadata: Option<Value>Provider-native citation correlation data (e.g. Anthropic search_result_index / document_index), passed through opaquely for debugging and forward compatibility.
source_id: StringIdentifier of the CitationSource this reference points to (CitationSource.id).
Trait Implementations§
Source§impl Clone for CitationReference
impl Clone for CitationReference
Source§fn clone(&self) -> CitationReference
fn clone(&self) -> CitationReference
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 CitationReference
impl Debug for CitationReference
Source§impl Default for CitationReference
impl Default for CitationReference
Source§fn default() -> CitationReference
fn default() -> CitationReference
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CitationReference
impl<'de> Deserialize<'de> for CitationReference
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 CitationReference
impl RefUnwindSafe for CitationReference
impl Send for CitationReference
impl Sync for CitationReference
impl Unpin for CitationReference
impl UnsafeUnpin for CitationReference
impl UnwindSafe for CitationReference
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