[][src]Trait zamm_yin::tao::archetype::ArchetypeFormTrait

pub trait ArchetypeFormTrait<'a>: ArchetypeTrait<'a> + FormTrait + Wrapper<BaseType = FinalNode> {
    type SubjectForm: ArchetypeTrait<'a> + FormTrait;
    pub fn as_archetype(&self) -> Archetype { ... }
pub fn individuate_as_archetype(&self) -> Self::Form { ... }
pub fn individuate_as_form(&self) -> Self::SubjectForm { ... }
pub fn individuals(&self) -> Vec<Self::SubjectForm> { ... }
pub fn child_archetypes(&self) -> Vec<Self::Form> { ... }
pub fn add_attribute_type(&mut self, attribute_type: AttributeArchetype) { ... }
pub fn introduced_attribute_archetypes(&self) -> Vec<AttributeArchetype> { ... } }

Every concept represents a different way of looking at and manipulating the world. This one allows one to treat an archetype -- nothing more than an idea, a piece of metadata -- as if it had form, as if it were actual data. But of course metadata is also data, and if you look around in the KB, this class definition is no different from any other class definition.

In fact, with the exception of Tao and Archetype, you're pretty much only ever viewing a node from another node's perspective. When you manipulate an individual, you do so according to the logic defined in its archetype. When you manipulate its archetype, you do so according to the logic defined in the Archetype node.

Keep in mind that due to the melding of archetype and form in all Archetype structs, any
references to self here refers to the node-as-archetype in question, whereas any references to Self refers to the Archetype node itself. Since this FormTrait is supposed to reason about the node-as-archetype, there should be no instances of Self here.

Associated Types

type SubjectForm: ArchetypeTrait<'a> + FormTrait[src]

The ArchetypeTrait as defined for an Archetype will have an Archetype-based Form for reasoning about other nodes as archetypes. The Archetype's Form is the observer, and the subject under observation will have a different type for its leaves. This subject's Form should therefore be the most specific FormTrait that is still general enough to represent everything this ArchetypeTrait can observe.

Here, Self::ArchetypeForm should never be used, Self::Form is the self as the observer, and Self::SubjectForm is the subject archetype that is currently being observed.

Loading content...

Provided methods

pub fn as_archetype(&self) -> Archetype[src]

Forget everything about the current form, except that it's an ArchetypeForm representing some type.

pub fn individuate_as_archetype(&self) -> Self::Form[src]

Create a subtype of the archetype represented by this Archetype instance.

pub fn individuate_as_form(&self) -> Self::SubjectForm[src]

Create a new individual of the archetype represented by this Archetype instance.

Convenience function for the static one.

pub fn individuals(&self) -> Vec<Self::SubjectForm>[src]

Individuals that adhere to this archetype. It is possible that some of these individuals might not be direct descendants of the archetype in question.

pub fn child_archetypes(&self) -> Vec<Self::Form>[src]

Retrieve child archetypes.

pub fn add_attribute_type(&mut self, attribute_type: AttributeArchetype)[src]

Add an attribute type to this archetype.

pub fn introduced_attribute_archetypes(&self) -> Vec<AttributeArchetype>[src]

Retrieve non-inherited attribute types that are introduced by this archetype to all descendant archetypes. Attribute types introduced by an ancestor do not count.

Loading content...

Implementors

impl<'a> ArchetypeFormTrait<'a> for Archetype[src]

impl<'a> ArchetypeFormTrait<'a> for AttributeArchetype[src]

Loading content...