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§
Sourcefn add_interface(&mut self, ctx: &'a ASTContext, interface: &'a str)
fn add_interface(&mut self, ctx: &'a ASTContext, interface: &'a str)
Add a new SchemaInterface to the list of implemented interfaces
Sourcefn get_interfaces(&self) -> Vec<'a, &'a str>
fn get_interfaces(&self) -> Vec<'a, &'a str>
Get list of implemented SchemaInterfaces
Provided Methods§
Sourcefn implements_interface(&self, schema_interface: &SchemaInterface<'a>) -> bool
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.