• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 pub use self::imp::*;
2 
3 #[cfg(feature = "perf-literal")]
4 mod imp;
5 
6 #[allow(missing_docs)]
7 #[cfg(not(feature = "perf-literal"))]
8 mod imp {
9     use regex_syntax::hir::literal::Literals;
10 
11     #[derive(Clone, Debug)]
12     pub struct LiteralSearcher(());
13 
14     impl LiteralSearcher {
empty() -> Self15         pub fn empty() -> Self {
16             LiteralSearcher(())
17         }
18 
prefixes(_: Literals) -> Self19         pub fn prefixes(_: Literals) -> Self {
20             LiteralSearcher(())
21         }
22 
suffixes(_: Literals) -> Self23         pub fn suffixes(_: Literals) -> Self {
24             LiteralSearcher(())
25         }
26 
complete(&self) -> bool27         pub fn complete(&self) -> bool {
28             false
29         }
30 
find(&self, _: &[u8]) -> Option<(usize, usize)>31         pub fn find(&self, _: &[u8]) -> Option<(usize, usize)> {
32             unreachable!()
33         }
34 
find_start(&self, _: &[u8]) -> Option<(usize, usize)>35         pub fn find_start(&self, _: &[u8]) -> Option<(usize, usize)> {
36             unreachable!()
37         }
38 
find_end(&self, _: &[u8]) -> Option<(usize, usize)>39         pub fn find_end(&self, _: &[u8]) -> Option<(usize, usize)> {
40             unreachable!()
41         }
42 
is_empty(&self) -> bool43         pub fn is_empty(&self) -> bool {
44             true
45         }
46 
len(&self) -> usize47         pub fn len(&self) -> usize {
48             0
49         }
50 
approximate_size(&self) -> usize51         pub fn approximate_size(&self) -> usize {
52             0
53         }
54     }
55 }
56