Lines Matching refs:ErrorKind
7 use crate::error::ErrorKind;
73 _ => Err(Err::Error(Error::from_error_kind(i, ErrorKind::Satisfy))), in satisfy()
97 _ => Err(Err::Error(Error::from_error_kind(i, ErrorKind::OneOf))), in one_of()
121 _ => Err(Err::Error(Error::from_error_kind(i, ErrorKind::NoneOf))), in none_of()
151 let e: ErrorKind = ErrorKind::CrLf; in crlf()
200 let e: ErrorKind = ErrorKind::Tag; in not_line_ending()
235 CompareResult::Incomplete => Err(Err::Error(E::from_error_kind(input, ErrorKind::CrLf))), in line_ending()
240 _ => Err(Err::Error(E::from_error_kind(input, ErrorKind::CrLf))), in line_ending()
316 None => Err(Err::Error(E::from_error_kind(input, ErrorKind::Eof))), in anychar()
371 input.split_at_position1_complete(|item| !item.is_alpha(), ErrorKind::Alpha) in alpha1()
440 input.split_at_position1_complete(|item| !item.is_dec_digit(), ErrorKind::Digit) in digit1()
488 input.split_at_position1_complete(|item| !item.is_hex_digit(), ErrorKind::HexDigit) in hex_digit1()
538 input.split_at_position1_complete(|item| !item.is_oct_digit(), ErrorKind::OctDigit) in oct_digit1()
588 input.split_at_position1_complete(|item| !item.is_alphanum(), ErrorKind::AlphaNumeric) in alphanumeric1()
646 ErrorKind::Space, in space1()
705 ErrorKind::MultiSpace, in multispace1()
742 return Err(Err::Error(E::from_error_kind(input, ErrorKind::Digit)));
751 … return Err(Err::Error(E::from_error_kind(input, ErrorKind::Digit)));
757 … None => return Err(Err::Error(E::from_error_kind(input, ErrorKind::Digit))),
767 … return Err(Err::Error(E::from_error_kind(input, ErrorKind::Digit)));
773 … None => return Err(Err::Error(E::from_error_kind(input, ErrorKind::Digit))),
803 return Err(Err::Error(E::from_error_kind(i, ErrorKind::Digit)));
811 return Err(Err::Error(E::from_error_kind(i, ErrorKind::Digit)));
817 None => return Err(Err::Error(E::from_error_kind(i, ErrorKind::Digit))),
840 let res: $crate::IResult<_, _, (_, ErrorKind)> = $left;
856 assert_eq!(alpha1(b), Err(Err::Error((b, ErrorKind::Alpha)))); in character()
857 assert_eq!(alpha1::<_, (_, ErrorKind)>(c), Ok((&c[1..], &b"a"[..]))); in character()
859 alpha1::<_, (_, ErrorKind)>(d), in character()
862 assert_eq!(digit1(a), Err(Err::Error((a, ErrorKind::Digit)))); in character()
863 assert_eq!(digit1::<_, (_, ErrorKind)>(b), Ok((empty, b))); in character()
864 assert_eq!(digit1(c), Err(Err::Error((c, ErrorKind::Digit)))); in character()
865 assert_eq!(digit1(d), Err(Err::Error((d, ErrorKind::Digit)))); in character()
866 assert_eq!(hex_digit1::<_, (_, ErrorKind)>(a), Ok((empty, a))); in character()
867 assert_eq!(hex_digit1::<_, (_, ErrorKind)>(b), Ok((empty, b))); in character()
868 assert_eq!(hex_digit1::<_, (_, ErrorKind)>(c), Ok((empty, c))); in character()
870 hex_digit1::<_, (_, ErrorKind)>(d), in character()
873 assert_eq!(hex_digit1(e), Err(Err::Error((e, ErrorKind::HexDigit)))); in character()
874 assert_eq!(oct_digit1(a), Err(Err::Error((a, ErrorKind::OctDigit)))); in character()
875 assert_eq!(oct_digit1::<_, (_, ErrorKind)>(b), Ok((empty, b))); in character()
876 assert_eq!(oct_digit1(c), Err(Err::Error((c, ErrorKind::OctDigit)))); in character()
877 assert_eq!(oct_digit1(d), Err(Err::Error((d, ErrorKind::OctDigit)))); in character()
878 assert_eq!(alphanumeric1::<_, (_, ErrorKind)>(a), Ok((empty, a))); in character()
880 assert_eq!(alphanumeric1::<_, (_, ErrorKind)>(c), Ok((empty, c))); in character()
882 alphanumeric1::<_, (_, ErrorKind)>(d), in character()
885 assert_eq!(space1::<_, (_, ErrorKind)>(e), Ok((empty, e))); in character()
886 assert_eq!(space1::<_, (_, ErrorKind)>(f), Ok((&b";"[..], &b" "[..]))); in character()
898 assert_eq!(alpha1::<_, (_, ErrorKind)>(a), Ok((empty, a))); in character_s()
899 assert_eq!(alpha1(b), Err(Err::Error((b, ErrorKind::Alpha)))); in character_s()
900 assert_eq!(alpha1::<_, (_, ErrorKind)>(c), Ok((&c[1..], &"a"[..]))); in character_s()
901 assert_eq!(alpha1::<_, (_, ErrorKind)>(d), Ok(("é12", &"az"[..]))); in character_s()
902 assert_eq!(digit1(a), Err(Err::Error((a, ErrorKind::Digit)))); in character_s()
903 assert_eq!(digit1::<_, (_, ErrorKind)>(b), Ok((empty, b))); in character_s()
904 assert_eq!(digit1(c), Err(Err::Error((c, ErrorKind::Digit)))); in character_s()
905 assert_eq!(digit1(d), Err(Err::Error((d, ErrorKind::Digit)))); in character_s()
906 assert_eq!(hex_digit1::<_, (_, ErrorKind)>(a), Ok((empty, a))); in character_s()
907 assert_eq!(hex_digit1::<_, (_, ErrorKind)>(b), Ok((empty, b))); in character_s()
908 assert_eq!(hex_digit1::<_, (_, ErrorKind)>(c), Ok((empty, c))); in character_s()
909 assert_eq!(hex_digit1::<_, (_, ErrorKind)>(d), Ok(("zé12", &"a"[..]))); in character_s()
910 assert_eq!(hex_digit1(e), Err(Err::Error((e, ErrorKind::HexDigit)))); in character_s()
911 assert_eq!(oct_digit1(a), Err(Err::Error((a, ErrorKind::OctDigit)))); in character_s()
912 assert_eq!(oct_digit1::<_, (_, ErrorKind)>(b), Ok((empty, b))); in character_s()
913 assert_eq!(oct_digit1(c), Err(Err::Error((c, ErrorKind::OctDigit)))); in character_s()
914 assert_eq!(oct_digit1(d), Err(Err::Error((d, ErrorKind::OctDigit)))); in character_s()
915 assert_eq!(alphanumeric1::<_, (_, ErrorKind)>(a), Ok((empty, a))); in character_s()
917 assert_eq!(alphanumeric1::<_, (_, ErrorKind)>(c), Ok((empty, c))); in character_s()
918 assert_eq!(alphanumeric1::<_, (_, ErrorKind)>(d), Ok(("é12", "az"))); in character_s()
919 assert_eq!(space1::<_, (_, ErrorKind)>(e), Ok((empty, e))); in character_s()
932 match alpha1::<_, (_, ErrorKind)>(a) { in offset()
938 match digit1::<_, (_, ErrorKind)>(b) { in offset()
944 match alphanumeric1::<_, (_, ErrorKind)>(c) { in offset()
950 match space1::<_, (_, ErrorKind)>(d) { in offset()
956 match multispace1::<_, (_, ErrorKind)>(e) { in offset()
962 match hex_digit1::<_, (_, ErrorKind)>(f) { in offset()
968 match oct_digit1::<_, (_, ErrorKind)>(f) { in offset()
980 not_line_ending::<_, (_, ErrorKind)>(a), in is_not_line_ending_bytes()
986 not_line_ending::<_, (_, ErrorKind)>(b), in is_not_line_ending_bytes()
992 not_line_ending::<_, (_, ErrorKind)>(c), in is_not_line_ending_bytes()
998 not_line_ending::<_, (_, ErrorKind)>(d), in is_not_line_ending_bytes()
1023 assert_eq!(not_line_ending(f), Err(Err::Error((f, ErrorKind::Tag)))); in is_not_line_ending_str()
1026 assert_eq!(not_line_ending::<_, (_, ErrorKind)>(g2), Ok(("", g2))); in is_not_line_ending_str()
1037 Err(Err::Error(error_position!(i, ErrorKind::HexDigit))) in hex_digit_test()
1043 Err(Err::Error(error_position!(i, ErrorKind::HexDigit))) in hex_digit_test()
1068 Err(Err::Error(error_position!(i, ErrorKind::OctDigit))) in oct_digit_test()
1124 Err(Err::Error(error_position!(&b"\r"[..], ErrorKind::CrLf))) in cr_lf()
1128 Err(Err::Error(error_position!(&b"\ra"[..], ErrorKind::CrLf))) in cr_lf()
1134 Err(Err::Error(error_position!(&"\r"[..], ErrorKind::CrLf))) in cr_lf()
1138 Err(Err::Error(error_position!("\ra", ErrorKind::CrLf))) in cr_lf()
1148 Err(Err::Error(error_position!(&b"\r"[..], ErrorKind::CrLf))) in end_of_line()
1152 Err(Err::Error(error_position!(&b"\ra"[..], ErrorKind::CrLf))) in end_of_line()
1159 Err(Err::Error(error_position!(&"\r"[..], ErrorKind::CrLf))) in end_of_line()
1163 Err(Err::Error(error_position!("\ra", ErrorKind::CrLf))) in end_of_line()
1181 ErrorKind::Digit, in digit_to_i16()
1196 ErrorKind::Digit, in digit_to_i16()
1207 ErrorKind::Digit, in digit_to_u32()