pub struct Atom<'a> {
pub subject: &'a str,
pub predicate: &'a str,
pub object: Option<&'a str>,
}Expand description
An atom is the triple (subject, predicate, object?) — the unit of identity.
Creature.A has flying and Creature.A has swimming are DIFFERENT atoms.
Fields§
§subject: &'a strThe entity the claim is about, e.g. Creature.A or Motor.
predicate: &'a strThe relation or property asserted, e.g. has or over_100.
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.
Trait Implementations§
impl<'a> Eq for Atom<'a>
impl<'a> StructuralPartialEq for Atom<'a>
Auto Trait Implementations§
impl<'a> Freeze for Atom<'a>
impl<'a> RefUnwindSafe for Atom<'a>
impl<'a> Send for Atom<'a>
impl<'a> Sync for Atom<'a>
impl<'a> Unpin for Atom<'a>
impl<'a> UnsafeUnpin for Atom<'a>
impl<'a> UnwindSafe for Atom<'a>
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