Skip to main content

SchemaInterfaces

Trait SchemaInterfaces 

Source
pub trait SchemaInterfaces<'a>: Sized {
    // Required methods
    fn add_interface(&mut self, ctx: &'a ASTContext, interface: &'a str);
    fn get_interfaces(&self) -> Vec<'a, &'a str>;

    // Provided method
    fn implements_interface(
        &self,
        schema_interface: &SchemaInterface<'a>,
    ) -> bool { ... }
}
Expand description

Generic trait for any schema type that implements interfaces

Required Methods§

Source

fn add_interface(&mut self, ctx: &'a ASTContext, interface: &'a str)

Add a new SchemaInterface to the list of implemented interfaces

Source

fn get_interfaces(&self) -> Vec<'a, &'a str>

Get list of implemented SchemaInterfaces

Provided Methods§

Source

fn implements_interface(&self, schema_interface: &SchemaInterface<'a>) -> bool

Checks whether given [ObjectType] is a possible subtype

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§