FieldResolver

Trait FieldResolver 

Source
pub trait FieldResolver: Send + Sync {
    // Required methods
    fn resolve_field<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        ctx: &'life1 Context<'life2>,
    ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn type_name() -> String;
}

Required Methods§

Source

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn type_name() -> String

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.

Implementations on Foreign Types§

Source§

impl FieldResolver for &str

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl FieldResolver for bool

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl FieldResolver for f32

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl FieldResolver for f64

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl FieldResolver for i8

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl FieldResolver for i16

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl FieldResolver for i32

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl FieldResolver for i64

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl FieldResolver for isize

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl FieldResolver for str

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl FieldResolver for u8

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl FieldResolver for u16

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl FieldResolver for u32

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl FieldResolver for u64

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl FieldResolver for usize

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl FieldResolver for String

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl<'a, T: FieldResolver + 'a> FieldResolver for &'a [T]

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl<K, V> FieldResolver for BTreeMap<K, V>
where K: ToString + Eq + Send + Sync, V: Serialize + Send + Sync,

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl<K, V> FieldResolver for HashMap<K, V>
where K: ToString + Eq + Send + Sync, V: Serialize + Send + Sync,

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl<T: FieldResolver> FieldResolver for Option<T>

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl<T: FieldResolver> FieldResolver for &T

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl<T: FieldResolver> FieldResolver for Box<T>

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl<T: FieldResolver> FieldResolver for LinkedList<T>

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl<T: FieldResolver> FieldResolver for VecDeque<T>

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl<T: FieldResolver> FieldResolver for Arc<T>

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl<T: FieldResolver> FieldResolver for Vec<T>

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl<T: FieldResolver> FieldResolver for HashSet<T>

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Source§

impl<T: FieldResolver, const N: usize> FieldResolver for [T; N]

Source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 Context<'life2>, ) -> Pin<Box<dyn Future<Output = ResolverResult<Option<GqlValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn type_name() -> String

Implementors§