Skip to main content

Scope

Trait Scope 

Source
pub trait Scope {
    // Required methods
    fn core(&self) -> Rc<dyn Core>;
    fn scope(&self) -> Option<Rc<dyn Scope>>;
    fn get_fields(&self) -> Vec<Rc<Field>>;
    fn get_field(&self, name: &str) -> Option<Rc<Field>>;
    fn get_function(
        &self,
        name: &str,
        types: &[Rc<dyn Type>],
    ) -> Option<Rc<Function>>;
    fn get_type(&self, name: &str) -> Option<Rc<dyn Type>>;
    fn get_predicate(&self, name: &str) -> Option<Rc<Predicate>>;

    // Provided method
    fn as_class(self: Rc<Self>) -> Option<Rc<dyn Class>> { ... }
}

Required Methods§

Source

fn core(&self) -> Rc<dyn Core>

Source

fn scope(&self) -> Option<Rc<dyn Scope>>

Source

fn get_fields(&self) -> Vec<Rc<Field>>

Source

fn get_field(&self, name: &str) -> Option<Rc<Field>>

Source

fn get_function( &self, name: &str, types: &[Rc<dyn Type>], ) -> Option<Rc<Function>>

Source

fn get_type(&self, name: &str) -> Option<Rc<dyn Type>>

Source

fn get_predicate(&self, name: &str) -> Option<Rc<Predicate>>

Provided Methods§

Source

fn as_class(self: Rc<Self>) -> Option<Rc<dyn Class>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§