pub struct Atom<'a> {
pub domain: Option<&'a str>,
pub subject: &'a str,
pub predicate: Option<&'a str>,
pub object: Option<&'a str>,
}Expand description
An atom is the triple (subject, predicate, object?) — the unit of identity —
optionally qualified by a domain (physics.engine has fuel).
Creature_A has flying and Creature_A has swimming are DIFFERENT atoms.
Fields§
§domain: Option<&'a str>The domain this atom is qualified into, written as a domain. prefix on
the subject (e.g. physics in physics.engine has fuel). None means the
atom belongs to the current file’s own declared domain (no prefix).
subject: &'a strThe entity the claim is about, e.g. Creature_A or Motor.
predicate: Option<&'a str>The relation or property asserted, e.g. has or over_100. None for a
bare proposition — a single-word atom such as db_ready, introduced by
a VAR port and used directly in bodies (WHEN db_ready THEN …). The
compiler requires any bare-proposition atom to be a declared VAR.
object: Option<&'a str>Optional value the predicate relates the subject to, e.g. flying.
None for two-word atoms such as Motor over_100. The object is part of
identity: has flying and has swimming are different atoms. Always None
when predicate is None (a bare proposition has neither).