Added impl GraphQLValueAsync for HashSet
This commit is contained in:
parent
5fe61419a7
commit
c5e9f9ead5
1 changed files with 21 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
use std::{
|
||||
collections::HashSet,
|
||||
mem::{self, MaybeUninit},
|
||||
ptr,
|
||||
};
|
||||
|
@ -220,7 +221,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
impl<S, T> GraphQLType<S> for std::collections::HashSet<T>
|
||||
impl<S, T> GraphQLType<S> for HashSet<T>
|
||||
where
|
||||
T: GraphQLType<S>,
|
||||
S: ScalarValue,
|
||||
|
@ -237,7 +238,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
impl<S, T> GraphQLValue<S> for std::collections::HashSet<T>
|
||||
impl<S, T> GraphQLValue<S> for HashSet<T>
|
||||
where
|
||||
T: GraphQLValue<S>,
|
||||
S: ScalarValue,
|
||||
|
@ -259,6 +260,24 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
impl<S, T> GraphQLValueAsync<S> for HashSet<T>
|
||||
where
|
||||
T: GraphQLValueAsync<S>,
|
||||
T::TypeInfo: Sync,
|
||||
T::Context: Sync,
|
||||
S: ScalarValue + Send + Sync,
|
||||
{
|
||||
fn resolve_async<'a>(
|
||||
&'a self,
|
||||
info: &'a Self::TypeInfo,
|
||||
_: Option<&'a [Selection<S>]>,
|
||||
executor: &'a Executor<Self::Context, S>,
|
||||
) -> crate::BoxFuture<'a, ExecutionResult<S>> {
|
||||
let f = resolve_into_list_async(executor, info, self.iter());
|
||||
Box::pin(f)
|
||||
}
|
||||
}
|
||||
|
||||
impl<S, T> GraphQLType<S> for [T]
|
||||
where
|
||||
S: ScalarValue,
|
||||
|
|
Loading…
Reference in a new issue