#[non_exhaustive]pub struct Claim {
pub start_index: Option<i32>,
pub end_index: Option<i32>,
pub fact_indexes: Vec<i32>,
pub score: Option<f32>,
/* private fields */
}Available on crate feature
vertex-rag-service only.Expand description
Claim that is extracted from the input text and facts that support it.
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: Option<i32>Index in the input text where the claim starts (inclusive).
end_index: Option<i32>Index in the input text where the claim ends (exclusive).
fact_indexes: Vec<i32>Indexes of the facts supporting this claim.
score: Option<f32>Confidence score of this corroboration.
Implementations§
Source§impl Claim
impl Claim
pub fn new() -> Self
Sourcepub fn set_start_index<T>(self, v: T) -> Self
pub fn set_start_index<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_start_index<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_start_index<T>(self, v: Option<T>) -> Self
Sets or clears the value of start_index.
§Example
ⓘ
let x = Claim::new().set_or_clear_start_index(Some(42));
let x = Claim::new().set_or_clear_start_index(None::<i32>);Sourcepub fn set_end_index<T>(self, v: T) -> Self
pub fn set_end_index<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_end_index<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_end_index<T>(self, v: Option<T>) -> Self
Sourcepub fn set_fact_indexes<T, V>(self, v: T) -> Self
pub fn set_fact_indexes<T, V>(self, v: T) -> Self
Trait Implementations§
impl StructuralPartialEq for Claim
Auto Trait Implementations§
impl Freeze for Claim
impl RefUnwindSafe for Claim
impl Send for Claim
impl Sync for Claim
impl Unpin for Claim
impl UnwindSafe for Claim
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