pub struct ExtractedRelation {
pub local_id: String,
pub source: String,
pub relation: String,
pub target: String,
pub confidence: Confidence,
pub valid_from: Option<Timestamp>,
pub valid_until: Option<Timestamp>,
pub span: Option<TextSpan>,
}Fields§
§local_id: String§source: String§relation: String§target: String§confidence: Confidence§valid_from: Option<Timestamp>§valid_until: Option<Timestamp>§span: Option<TextSpan>Implementations§
Source§impl ExtractedRelation
impl ExtractedRelation
Sourcepub fn new(
local_id: impl Into<String>,
source: impl Into<String>,
relation: impl Into<String>,
target: impl Into<String>,
confidence: Confidence,
) -> Result<Self>
pub fn new( local_id: impl Into<String>, source: impl Into<String>, relation: impl Into<String>, target: impl Into<String>, confidence: Confidence, ) -> Result<Self>
Creates a provider-local relation between two mentions.
§Errors
Rejects invalid identifiers or relation text.
pub const fn valid_from(self, value: Timestamp) -> Self
pub const fn valid_until(self, value: Timestamp) -> Self
pub const fn with_span(self, span: TextSpan) -> Self
Trait Implementations§
Source§impl Clone for ExtractedRelation
impl Clone for ExtractedRelation
Source§fn clone(&self) -> ExtractedRelation
fn clone(&self) -> ExtractedRelation
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 ExtractedRelation
impl Debug for ExtractedRelation
Source§impl<'de> Deserialize<'de> for ExtractedRelation
impl<'de> Deserialize<'de> for ExtractedRelation
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
impl Eq for ExtractedRelation
Source§impl PartialEq for ExtractedRelation
impl PartialEq for ExtractedRelation
Source§impl Serialize for ExtractedRelation
impl Serialize for ExtractedRelation
impl StructuralPartialEq for ExtractedRelation
Auto Trait Implementations§
impl Freeze for ExtractedRelation
impl RefUnwindSafe for ExtractedRelation
impl Send for ExtractedRelation
impl Sync for ExtractedRelation
impl Unpin for ExtractedRelation
impl UnsafeUnpin for ExtractedRelation
impl UnwindSafe for ExtractedRelation
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