pub struct Property {
pub property_set: String,
pub name: String,
pub value: PropertyValue,
pub evidence: Option<Evidence>,
}Expand description
A named semantic property.
Fields§
§property_set: String§name: String§value: PropertyValue§evidence: Option<Evidence>Implementations§
Source§impl Property
impl Property
Sourcepub fn new(
property_set: impl Into<String>,
name: impl Into<String>,
value: PropertyValue,
) -> Result<Self, IrError>
pub fn new( property_set: impl Into<String>, name: impl Into<String>, value: PropertyValue, ) -> Result<Self, IrError>
Creates a property without provenance.
Sourcepub fn with_evidence(self, evidence: Evidence) -> Self
pub fn with_evidence(self, evidence: Evidence) -> Self
Attaches source evidence.
Sourcepub fn value(&self) -> &PropertyValue
pub fn value(&self) -> &PropertyValue
Returns the typed property value.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Property
impl<'de> Deserialize<'de> for Property
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 StructuralPartialEq for Property
Auto Trait Implementations§
impl Freeze for Property
impl RefUnwindSafe for Property
impl Send for Property
impl Sync for Property
impl Unpin for Property
impl UnwindSafe for Property
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