@@ -875,7 +875,13 @@ where
875
875
}
876
876
}
877
877
878
- pub fn validate < ' a , Q , M , Sub , F , S > ( r : Q , m : M , s : Sub , q : & ' a str , visit_fn : F ) -> Vec < RuleError >
878
+ pub ( crate ) fn validate < ' a , Q , M , Sub , F , S > (
879
+ r : Q ,
880
+ m : M ,
881
+ s : Sub ,
882
+ q : & ' a str ,
883
+ visit_fn : F ,
884
+ ) -> Vec < RuleError >
879
885
where
880
886
S : ScalarValue + ' a ,
881
887
Q : GraphQLType < S , TypeInfo = ( ) > ,
@@ -931,7 +937,7 @@ where
931
937
ctx. into_errors ( )
932
938
}
933
939
934
- pub fn expect_passes_rule < ' a , V , F , S > ( factory : F , q : & ' a str )
940
+ pub ( crate ) fn expect_passes_rule < ' a , V , F , S > ( factory : F , q : & ' a str )
935
941
where
936
942
S : ScalarValue + ' a ,
937
943
V : Visitor < ' a , S > + ' a ,
@@ -940,15 +946,7 @@ where
940
946
expect_passes_rule_with_schema ( QueryRoot , MutationRoot , SubscriptionRoot , factory, q) ;
941
947
}
942
948
943
- pub fn expect_passes_fn < ' a , F , S > ( visit_fn : F , q : & ' a str )
944
- where
945
- S : ScalarValue + ' a ,
946
- F : FnOnce ( & mut ValidatorContext < ' a , S > , & ' a Document < S > ) ,
947
- {
948
- expect_passes_fn_with_schema ( QueryRoot , MutationRoot , SubscriptionRoot , visit_fn, q) ;
949
- }
950
-
951
- pub fn expect_passes_rule_with_schema < ' a , Q , M , Sub , V , F , S > (
949
+ pub ( crate ) fn expect_passes_rule_with_schema < ' a , Q , M , Sub , V , F , S > (
952
950
r : Q ,
953
951
m : M ,
954
952
s : Sub ,
@@ -973,28 +971,7 @@ pub fn expect_passes_rule_with_schema<'a, Q, M, Sub, V, F, S>(
973
971
}
974
972
}
975
973
976
- pub fn expect_passes_fn_with_schema < ' a , Q , M , Sub , F , S > (
977
- r : Q ,
978
- m : M ,
979
- s : Sub ,
980
- visit_fn : F ,
981
- q : & ' a str ,
982
- ) where
983
- S : ScalarValue + ' a ,
984
- Q : GraphQLType < S , TypeInfo = ( ) > ,
985
- M : GraphQLType < S , TypeInfo = ( ) > ,
986
- Sub : GraphQLType < S , TypeInfo = ( ) > ,
987
- F : FnOnce ( & mut ValidatorContext < ' a , S > , & ' a Document < S > ) ,
988
- {
989
- let errs = validate ( r, m, s, q, visit_fn) ;
990
-
991
- if !errs. is_empty ( ) {
992
- print_errors ( & errs) ;
993
- panic ! ( "Expected `visit_fn` to pass, but errors found" ) ;
994
- }
995
- }
996
-
997
- pub fn expect_fails_rule < ' a , V , F , S > ( factory : F , q : & ' a str , expected_errors : & [ RuleError ] )
974
+ pub ( crate ) fn expect_fails_rule < ' a , V , F , S > ( factory : F , q : & ' a str , expected_errors : & [ RuleError ] )
998
975
where
999
976
S : ScalarValue + ' a ,
1000
977
V : Visitor < ' a , S > + ' a ,
@@ -1003,15 +980,15 @@ where
1003
980
expect_fails_rule_with_schema ( QueryRoot , MutationRoot , factory, q, expected_errors) ;
1004
981
}
1005
982
1006
- pub fn expect_fails_fn < ' a , F , S > ( visit_fn : F , q : & ' a str , expected_errors : & [ RuleError ] )
983
+ pub ( crate ) fn expect_fails_fn < ' a , F , S > ( visit_fn : F , q : & ' a str , expected_errors : & [ RuleError ] )
1007
984
where
1008
985
S : ScalarValue + ' a ,
1009
986
F : FnOnce ( & mut ValidatorContext < ' a , S > , & ' a Document < S > ) ,
1010
987
{
1011
988
expect_fails_fn_with_schema ( QueryRoot , MutationRoot , visit_fn, q, expected_errors) ;
1012
989
}
1013
990
1014
- pub fn expect_fails_rule_with_schema < ' a , Q , M , V , F , S > (
991
+ pub ( crate ) fn expect_fails_rule_with_schema < ' a , Q , M , V , F , S > (
1015
992
r : Q ,
1016
993
m : M ,
1017
994
factory : F ,
@@ -1048,7 +1025,7 @@ pub fn expect_fails_rule_with_schema<'a, Q, M, V, F, S>(
1048
1025
}
1049
1026
}
1050
1027
1051
- pub fn expect_fails_fn_with_schema < ' a , Q , M , F , S > (
1028
+ pub ( crate ) fn expect_fails_fn_with_schema < ' a , Q , M , F , S > (
1052
1029
r : Q ,
1053
1030
m : M ,
1054
1031
visit_fn : F ,
0 commit comments