#[non_exhaustive]pub struct Citation {
pub start_index: i64,
pub end_index: i64,
pub sources: Vec<CitationSource>,
/* private fields */
}Available on crate features
conversational-search-service or session-service only.Expand description
Citation info for a segment.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.start_index: i64Index indicates the start of the segment, measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.
end_index: i64End of the attributed segment, exclusive. Measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.
sources: Vec<CitationSource>Citation sources for the attributed segment.
Implementations§
Source§impl Citation
impl Citation
pub fn new() -> Self
Sourcepub fn set_start_index<T: Into<i64>>(self, v: T) -> Self
pub fn set_start_index<T: Into<i64>>(self, v: T) -> Self
Sourcepub fn set_end_index<T: Into<i64>>(self, v: T) -> Self
pub fn set_end_index<T: Into<i64>>(self, v: T) -> Self
Sourcepub fn set_sources<T, V>(self, v: T) -> Self
pub fn set_sources<T, V>(self, v: T) -> Self
Trait Implementations§
impl StructuralPartialEq for Citation
Auto Trait Implementations§
impl Freeze for Citation
impl RefUnwindSafe for Citation
impl Send for Citation
impl Sync for Citation
impl Unpin for Citation
impl UnwindSafe for Citation
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