Trait CoerceInput

Source
pub trait CoerceInput: SchemaDefinition {
    // Required method
    fn coerce_value<'a, const CONST: bool, I: InputType<CustomScalarTypeDefinition = Self::CustomScalarTypeDefinition, InputObjectTypeDefinition = Self::InputObjectTypeDefinition, EnumTypeDefinition = Self::EnumTypeDefinition>, V: Value<CONST>>(
        &'a self,
        input_type: &'a I,
        value: &'a V,
        path: Path<'a>,
    ) -> Result<(), Vec<Error<'a, CONST, V>>>;

    // Provided method
    fn coerce_const_value<'a, I: InputType<CustomScalarTypeDefinition = Self::CustomScalarTypeDefinition, InputObjectTypeDefinition = Self::InputObjectTypeDefinition, EnumTypeDefinition = Self::EnumTypeDefinition>, V: Value<true>>(
        &'a self,
        input_type: &'a I,
        value: &'a V,
        path: Path<'a>,
    ) -> Result<(), Vec<Error<'a, true, V>>> { ... }
}

Required Methods§

Source

fn coerce_value<'a, const CONST: bool, I: InputType<CustomScalarTypeDefinition = Self::CustomScalarTypeDefinition, InputObjectTypeDefinition = Self::InputObjectTypeDefinition, EnumTypeDefinition = Self::EnumTypeDefinition>, V: Value<CONST>>( &'a self, input_type: &'a I, value: &'a V, path: Path<'a>, ) -> Result<(), Vec<Error<'a, CONST, V>>>

Provided Methods§

Source

fn coerce_const_value<'a, I: InputType<CustomScalarTypeDefinition = Self::CustomScalarTypeDefinition, InputObjectTypeDefinition = Self::InputObjectTypeDefinition, EnumTypeDefinition = Self::EnumTypeDefinition>, V: Value<true>>( &'a self, input_type: &'a I, value: &'a V, path: Path<'a>, ) -> Result<(), Vec<Error<'a, true, V>>>

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§