pub struct SemanticEntity { /* private fields */ }Expand description
A strongly-typed semantic entity derived deterministically from evidence.
Note: Plane classification is NOT an intrinsic attribute of SemanticEntity.
Entities are reusable across multiple planes (e.g. AuthArtifact is relevant to
both Identity and API planes).
Implementations§
Source§impl SemanticEntity
impl SemanticEntity
Sourcepub fn new(
id: EntityId,
entity_type: SemanticEntityType,
attributes: BTreeMap<String, BTreeSet<String>>,
source_evidence_ids: Vec<EvidenceId>,
) -> Self
pub fn new( id: EntityId, entity_type: SemanticEntityType, attributes: BTreeMap<String, BTreeSet<String>>, source_evidence_ids: Vec<EvidenceId>, ) -> Self
Creates a new semantic entity with canonical identity and deterministic attribute merging.
Sourcepub const fn entity_type(&self) -> SemanticEntityType
pub const fn entity_type(&self) -> SemanticEntityType
Returns the semantic entity type.
Sourcepub fn attributes(&self) -> &BTreeMap<String, BTreeSet<String>>
pub fn attributes(&self) -> &BTreeMap<String, BTreeSet<String>>
Returns the multi-valued attribute map.
Sourcepub fn source_evidence_ids(&self) -> &[EvidenceId]
pub fn source_evidence_ids(&self) -> &[EvidenceId]
Returns reference to source evidence IDs.
Sourcepub fn into_parts(
self,
) -> (EntityId, SemanticEntityType, BTreeMap<String, BTreeSet<String>>, Vec<EvidenceId>)
pub fn into_parts( self, ) -> (EntityId, SemanticEntityType, BTreeMap<String, BTreeSet<String>>, Vec<EvidenceId>)
Destructures entity into ID, type, attributes, and source evidence IDs.
Trait Implementations§
Source§impl Clone for SemanticEntity
impl Clone for SemanticEntity
Source§fn clone(&self) -> SemanticEntity
fn clone(&self) -> SemanticEntity
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 SemanticEntity
impl Debug for SemanticEntity
Source§impl<'de> Deserialize<'de> for SemanticEntity
impl<'de> Deserialize<'de> for SemanticEntity
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 SemanticEntity
Source§impl PartialEq for SemanticEntity
impl PartialEq for SemanticEntity
Source§impl Serialize for SemanticEntity
impl Serialize for SemanticEntity
impl StructuralPartialEq for SemanticEntity
Auto Trait Implementations§
impl Freeze for SemanticEntity
impl RefUnwindSafe for SemanticEntity
impl Send for SemanticEntity
impl Sync for SemanticEntity
impl Unpin for SemanticEntity
impl UnsafeUnpin for SemanticEntity
impl UnwindSafe for SemanticEntity
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more