pub struct EntityOntology {
pub entity_id: EntityId,
pub origin: OntologicalOrigin,
pub taxon_or_system_iri: String,
pub stage: LifecycleStage,
pub energy_permill: u16,
pub damage_permill: u16,
pub hydration_permill: u16,
pub wear_permill: u16,
pub affordances: Vec<ActionAffordance>,
}Expand description
Entity behavioral and affordance ontology profile for an entity instance.
Fields§
§entity_id: EntityIdEntity ID of the referent digital twin.
origin: OntologicalOriginOntological origin (Darwinian taxon, manufactured property, abiotic aggregate, liberal arts work).
taxon_or_system_iri: StringIRI or ontological class (e.g. qualia:EucalyptusRegnans, qualia:CentrifugalPump).
stage: LifecycleStageCurrent developmental or functional lifecycle stage.
energy_permill: u16Current internal energy / biomass reserve (0..1000).
damage_permill: u16Current damage / degradation level (0..1000).
hydration_permill: u16Current hydration or fluid reserve (0..1000).
wear_permill: u16Current mechanical / biological wear level (0..1000).
affordances: Vec<ActionAffordance>List of discoverable affordances published by this entity.
Implementations§
Source§impl EntityOntology
impl EntityOntology
Sourcepub fn new(entity_id: EntityId, taxon_or_system_iri: impl Into<String>) -> Self
pub fn new(entity_id: EntityId, taxon_or_system_iri: impl Into<String>) -> Self
Create a healthy adult DarwinianTaxon profile (full energy and
hydration, no damage/wear, no affordances).
Sourcepub fn add_affordance(&mut self, affordance: ActionAffordance)
pub fn add_affordance(&mut self, affordance: ActionAffordance)
Add an affordance to the entity ontology.
Sourcepub fn export_ai_tools_json(&self) -> String
pub fn export_ai_tools_json(&self) -> String
Generate a standard JSON tool manifest compatible with LLM function-calling APIs (OpenAI, Anthropic, Gemini, local Ollama/vLLM) for AI agent triggering.
Sourcepub fn evaluate_intent(
&self,
intent: &ActionIntent,
caller_status: ObserverStatus,
) -> Result<ActionEvaluationVerdict, IntentError>
pub fn evaluate_intent( &self, intent: &ActionIntent, caller_status: ObserverStatus, ) -> Result<ActionEvaluationVerdict, IntentError>
Evaluate an incoming action intent against this entity ontology.
Pure, zero-heap evaluation that validates preconditions, enforces permissions,
updates internal state registers, and generates an auditable 48-byte NQuin.
Trait Implementations§
Source§impl Clone for EntityOntology
impl Clone for EntityOntology
Source§impl Debug for EntityOntology
impl Debug for EntityOntology
Source§impl<'de> Deserialize<'de> for EntityOntology
impl<'de> Deserialize<'de> for EntityOntology
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>,
impl Eq for EntityOntology
Source§impl PartialEq for EntityOntology
impl PartialEq for EntityOntology
Source§impl Serialize for EntityOntology
impl Serialize for EntityOntology
impl StructuralPartialEq for EntityOntology
Auto Trait Implementations§
impl Freeze for EntityOntology
impl RefUnwindSafe for EntityOntology
impl Send for EntityOntology
impl Sync for EntityOntology
impl Unpin for EntityOntology
impl UnsafeUnpin for EntityOntology
impl UnwindSafe for EntityOntology
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
§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
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more