Skip to main content

Class

Trait Class 

Source
pub trait Class: Type + Scope {
    // Required methods
    fn parents(&self) -> &[Vec<String>];
    fn constructors(&self) -> Vec<Rc<Constructor>>;
    fn constructor(&self, args: &[Rc<dyn Type>]) -> Option<Rc<Constructor>>;
    fn predicates(&self) -> Vec<Rc<Predicate>>;
    fn classes(&self) -> Vec<Rc<dyn Class>>;
    fn instances(&self) -> Vec<ObjectId>;
}
Expand description

Class-specific API surface layered on top of type and scope behavior.

Required Methods§

Source

fn parents(&self) -> &[Vec<String>]

Source

fn constructors(&self) -> Vec<Rc<Constructor>>

Source

fn constructor(&self, args: &[Rc<dyn Type>]) -> Option<Rc<Constructor>>

Source

fn predicates(&self) -> Vec<Rc<Predicate>>

Source

fn classes(&self) -> Vec<Rc<dyn Class>>

Source

fn instances(&self) -> Vec<ObjectId>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§