pub struct CitationDelta {
    pub type: String,
    pub source: Option<String>,
    pub title: Option<String>,
    pub cited_text: Option<String>,
    pub start_index: Option<usize>,
    pub end_index: Option<usize>,
}Expand description
A delta update for a citation part, used in streaming of citation messages.
Fields§
§type: StringThe type of the citation delta.
source: Option<String>The URL or identifier of the document being cited.
title: Option<String>The title of the document being cited.
cited_text: Option<String>The text snippet from the document being cited.
start_index: Option<usize>The start index of the document content part being cited.
end_index: Option<usize>The end index of the document content part being cited.
Implementations§
Source§impl CitationDelta
 
impl CitationDelta
pub fn with_source(self, source: impl Into<String>) -> Self
pub fn with_title(self, title: impl Into<String>) -> Self
pub fn with_cited_text(self, cited_text: impl Into<String>) -> Self
pub fn with_start_index(self, start_index: usize) -> Self
pub fn with_end_index(self, end_index: usize) -> Self
Trait Implementations§
Source§impl Clone for CitationDelta
 
impl Clone for CitationDelta
Source§fn clone(&self) -> CitationDelta
 
fn clone(&self) -> CitationDelta
Returns a duplicate of the value. Read more
1.0.0 · 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 CitationDelta
 
impl Debug for CitationDelta
Source§impl Default for CitationDelta
 
impl Default for CitationDelta
Source§fn default() -> CitationDelta
 
fn default() -> CitationDelta
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CitationDelta
 
impl<'de> Deserialize<'de> for CitationDelta
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 CitationDelta
 
impl PartialEq for CitationDelta
Source§impl Serialize for CitationDelta
 
impl Serialize for CitationDelta
impl StructuralPartialEq for CitationDelta
Auto Trait Implementations§
impl Freeze for CitationDelta
impl RefUnwindSafe for CitationDelta
impl Send for CitationDelta
impl Sync for CitationDelta
impl Unpin for CitationDelta
impl UnwindSafe for CitationDelta
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