Added BaseType and WrapType impl for HashSet
This commit is contained in:
parent
740a35b4b1
commit
5fe61419a7
1 changed files with 13 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
//! Compile-time reflection of Rust types into GraphQL types.
|
//! Compile-time reflection of Rust types into GraphQL types.
|
||||||
|
|
||||||
use std::{rc::Rc, sync::Arc};
|
use std::{collections::HashSet, rc::Rc, sync::Arc};
|
||||||
|
|
||||||
use futures::future::BoxFuture;
|
use futures::future::BoxFuture;
|
||||||
|
|
||||||
|
@ -72,6 +72,10 @@ impl<S, T: BaseType<S>> BaseType<S> for Vec<T> {
|
||||||
const NAME: Type = T::NAME;
|
const NAME: Type = T::NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<S, T: BaseType<S>> BaseType<S> for HashSet<T> {
|
||||||
|
const NAME: Type = T::NAME;
|
||||||
|
}
|
||||||
|
|
||||||
impl<S, T: BaseType<S>> BaseType<S> for [T] {
|
impl<S, T: BaseType<S>> BaseType<S> for [T] {
|
||||||
const NAME: Type = T::NAME;
|
const NAME: Type = T::NAME;
|
||||||
}
|
}
|
||||||
|
@ -133,6 +137,10 @@ impl<S, T: BaseSubTypes<S>> BaseSubTypes<S> for Vec<T> {
|
||||||
const NAMES: Types = T::NAMES;
|
const NAMES: Types = T::NAMES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<S, T: BaseSubTypes<S>> BaseSubTypes<S> for HashSet<T> {
|
||||||
|
const NAMES: Types = T::NAMES;
|
||||||
|
}
|
||||||
|
|
||||||
impl<S, T: BaseSubTypes<S>> BaseSubTypes<S> for [T] {
|
impl<S, T: BaseSubTypes<S>> BaseSubTypes<S> for [T] {
|
||||||
const NAMES: Types = T::NAMES;
|
const NAMES: Types = T::NAMES;
|
||||||
}
|
}
|
||||||
|
@ -229,6 +237,10 @@ impl<S, T: WrappedType<S>> WrappedType<S> for Vec<T> {
|
||||||
const VALUE: u128 = T::VALUE * 10 + 3;
|
const VALUE: u128 = T::VALUE * 10 + 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<S, T: WrappedType<S>> WrappedType<S> for HashSet<T> {
|
||||||
|
const VALUE: u128 = T::VALUE * 10 + 3;
|
||||||
|
}
|
||||||
|
|
||||||
impl<S, T: WrappedType<S>> WrappedType<S> for [T] {
|
impl<S, T: WrappedType<S>> WrappedType<S> for [T] {
|
||||||
const VALUE: u128 = T::VALUE * 10 + 3;
|
const VALUE: u128 = T::VALUE * 10 + 3;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue