1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::{ConstDirectives, Value};
use std::borrow::Cow;

pub trait ScalarTypeDefinition {
    type Directives: ConstDirectives;

    fn description(&self) -> Option<&str>;
    fn name(&self) -> &str;
    fn directives(&self) -> Option<&Self::Directives>;

    fn coerce_input<const CONST: bool>(
        &self,
        _value: &impl Value<CONST>,
    ) -> Result<(), Cow<'static, str>> {
        Ok(())
    }
}