pub trait ResolverDefinition: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn output_type(&self) -> &'static str;
fn computed_methods(&self) -> &'static [ResolverComputedMethod];
fn evaluate_computed(
&self,
method: &str,
args: &[Value],
) -> Result<Value, Box<dyn Error>>;
// Provided methods
fn typescript_interface(&self) -> Option<&'static str> { ... }
fn typescript_schema(&self) -> Option<ResolverTypeScriptSchema> { ... }
fn extra_output_types(&self) -> &'static [&'static str] { ... }
}Required Methods§
fn name(&self) -> &'static str
fn output_type(&self) -> &'static str
fn computed_methods(&self) -> &'static [ResolverComputedMethod]
fn evaluate_computed( &self, method: &str, args: &[Value], ) -> Result<Value, Box<dyn Error>>
Provided Methods§
fn typescript_interface(&self) -> Option<&'static str>
fn typescript_schema(&self) -> Option<ResolverTypeScriptSchema>
fn extra_output_types(&self) -> &'static [&'static str]
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".