#[non_exhaustive]pub struct AnswerCitation {
pub start_index: i32,
pub end_index: i32,
pub sources: Vec<CitationSource>,
/* private fields */
}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: i32Output only. Indicates the start of the segment, measured in bytes (UTF-8 unicode), inclusive. If there are multi-byte characters, such as non-ASCII characters, the index measurement is longer than the string length.
end_index: i32Output only. Indicates the end of the segment, measured in bytes (UTF-8 unicode), exclusive. If there are multi-byte characters, such as non-ASCII characters, the index measurement is longer than the string length.
sources: Vec<CitationSource>Output only. Contains citation sources for the attributed segment.
Implementations§
Source§impl AnswerCitation
impl AnswerCitation
Sourcepub fn set_start_index<T: Into<i32>>(self, v: T) -> Self
pub fn set_start_index<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_end_index<T: Into<i32>>(self, v: T) -> Self
pub fn set_end_index<T: Into<i32>>(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§
Source§impl Clone for AnswerCitation
impl Clone for AnswerCitation
Source§fn clone(&self) -> AnswerCitation
fn clone(&self) -> AnswerCitation
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 AnswerCitation
impl Debug for AnswerCitation
Source§impl Default for AnswerCitation
impl Default for AnswerCitation
Source§fn default() -> AnswerCitation
fn default() -> AnswerCitation
Returns the “default value” for a type. Read more
Source§impl Message for AnswerCitation
impl Message for AnswerCitation
Source§impl PartialEq for AnswerCitation
impl PartialEq for AnswerCitation
impl StructuralPartialEq for AnswerCitation
Auto Trait Implementations§
impl Freeze for AnswerCitation
impl RefUnwindSafe for AnswerCitation
impl Send for AnswerCitation
impl Sync for AnswerCitation
impl Unpin for AnswerCitation
impl UnsafeUnpin for AnswerCitation
impl UnwindSafe for AnswerCitation
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