pub enum Sort {
Show 14 variants
Entity,
Physical,
Animate,
Human,
Plant,
Place,
Time,
Abstract,
Information,
Event,
Celestial,
Value,
Signal,
Group,
}Expand description
Semantic sorts for type checking.
Variants§
Entity
Top of the hierarchy; any individual.
Physical
Concrete, spatially located objects.
Animate
Living beings capable of self-motion.
Human
Persons with intentional agency.
Plant
Non-animal living organisms.
Place
Locations and regions.
Time
Temporal intervals and points.
Abstract
Non-physical, conceptual entities.
Information
Propositional content and data.
Event
Occurrences and happenings.
Celestial
Stars, planets, and astronomical bodies.
Value
Numeric or monetary amounts.
Signal
Hardware signals, wires, clocks, and buses.
Group
Collections of individuals.
Implementations§
Source§impl Sort
impl Sort
Sourcepub fn is_compatible_with(self, other: Sort) -> bool
pub fn is_compatible_with(self, other: Sort) -> bool
Check if this sort can be used where other is expected.
Sort compatibility follows a subsumption hierarchy:
- Human ⊆ Animate ⊆ Physical ⊆ Entity
- Plant ⊆ Animate ⊆ Physical ⊆ Entity
- Everything ⊆ Entity
For example, a Human noun can fill an Animate slot, but not vice versa.
Sourcepub fn is_occasion(self) -> bool
pub fn is_occasion(self) -> bool
Whether this sort denotes an OCCASION — an occurrence or happening whose head noun behaves as a soft type. For occasion sorts, “the [modifier] [head]” lets the modifier do the referring (the same event can be a “trip”, a “vacation”, or a “holiday”), so two such definite descriptions corefer when their modifier matches and their head sorts agree.
Concrete physical objects (box, ball) are NOT occasions: “the red box”
and “the red ball” are distinct things even though both are Physical,
so they must never corefer through a shared modifier.
Trait Implementations§
impl Copy for Sort
impl Eq for Sort
impl StructuralPartialEq for Sort
Auto Trait Implementations§
impl Freeze for Sort
impl RefUnwindSafe for Sort
impl Send for Sort
impl Sync for Sort
impl Unpin for Sort
impl UnsafeUnpin for Sort
impl UnwindSafe for Sort
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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.