1 #[cfg(target_arch = "x86_64")] 2 pub use crate::packed::teddy::compile::Builder; 3 #[cfg(not(target_arch = "x86_64"))] 4 pub use crate::packed::teddy::fallback::Builder; 5 #[cfg(not(target_arch = "x86_64"))] 6 pub use crate::packed::teddy::fallback::Teddy; 7 #[cfg(target_arch = "x86_64")] 8 pub use crate::packed::teddy::runtime::Teddy; 9 10 #[cfg(target_arch = "x86_64")] 11 mod compile; 12 #[cfg(target_arch = "x86_64")] 13 mod runtime; 14 15 #[cfg(not(target_arch = "x86_64"))] 16 mod fallback { 17 use crate::packed::pattern::Patterns; 18 use crate::Match; 19 20 #[derive(Clone, Debug, Default)] 21 pub struct Builder(()); 22 23 impl Builder { new() -> Builder24 pub fn new() -> Builder { 25 Builder(()) 26 } 27 build(&self, _: &Patterns) -> Option<Teddy>28 pub fn build(&self, _: &Patterns) -> Option<Teddy> { 29 None 30 } 31 fat(&mut self, _: Option<bool>) -> &mut Builder32 pub fn fat(&mut self, _: Option<bool>) -> &mut Builder { 33 self 34 } 35 avx(&mut self, _: Option<bool>) -> &mut Builder36 pub fn avx(&mut self, _: Option<bool>) -> &mut Builder { 37 self 38 } 39 } 40 41 #[derive(Clone, Debug)] 42 pub struct Teddy(()); 43 44 impl Teddy { find_at( &self, _: &Patterns, _: &[u8], _: usize, ) -> Option<Match>45 pub fn find_at( 46 &self, 47 _: &Patterns, 48 _: &[u8], 49 _: usize, 50 ) -> Option<Match> { 51 None 52 } 53 minimum_len(&self) -> usize54 pub fn minimum_len(&self) -> usize { 55 0 56 } 57 heap_bytes(&self) -> usize58 pub fn heap_bytes(&self) -> usize { 59 0 60 } 61 } 62 } 63