pub struct TextAnnotation {
pub start: usize,
pub end: usize,
pub origin: String,
pub source: AnnotationSource,
pub external_id: Option<String>,
pub verified: Option<VerificationVerdict>,
}Expand description
A claim-level citation attached to a span of generated text.
The single shared type across every citation capability: a text span linked
to a source. Producers agree only on this render contract — each capability
keeps its own richer representation (e.g. KnowledgeIndexCitation) and maps
into this envelope at emit time. See specs/citations.md.
Fields§
§start: usize0-indexed start char offset into the enclosing TextContentPart.text.
end: usizeExclusive end char offset.
origin: StringCapability id that produced this annotation (e.g. citation_retrieval).
Lets the UI and evals attribute and filter each citation by feed.
source: AnnotationSourceThe cited source.
external_id: Option<String>Opaque producer id (e.g. kchk_…, kbe_…, a URL hash). Not interpreted
by the render contract.
verified: Option<VerificationVerdict>Verification verdict, filled by the citation_verification capability.
Absent means unverified (not “unsupported”).
Trait Implementations§
Source§impl Clone for TextAnnotation
impl Clone for TextAnnotation
Source§fn clone(&self) -> TextAnnotation
fn clone(&self) -> TextAnnotation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TextAnnotation
impl Debug for TextAnnotation
Source§impl<'de> Deserialize<'de> for TextAnnotation
impl<'de> Deserialize<'de> for TextAnnotation
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>,
Source§impl PartialEq for TextAnnotation
impl PartialEq for TextAnnotation
Source§impl Serialize for TextAnnotation
impl Serialize for TextAnnotation
impl StructuralPartialEq for TextAnnotation
Auto Trait Implementations§
impl Freeze for TextAnnotation
impl RefUnwindSafe for TextAnnotation
impl Send for TextAnnotation
impl Sync for TextAnnotation
impl Unpin for TextAnnotation
impl UnsafeUnpin for TextAnnotation
impl UnwindSafe for TextAnnotation
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request