Lines Matching defs:text
48 // Usage: text!(haystack)
56 // The text given to the macro is always a String, which is guaranteed to be
61 macro_rules! text {
62 ($text:expr) => {{
64 Text::new($text)
69 macro_rules! text {
70 ($text:expr) => {{
71 let text: String = $text;
72 text.into_bytes()
77 macro_rules! text {
78 ($text:expr) => { $text }
151 static ref TEXT: Mutex<Text> = Mutex::new(text!($haystack));
154 let text = TEXT.lock().unwrap();
155 b.bytes = text.len() as u64;
157 if re.is_match(&text) != $is_match {
189 static ref TEXT: Mutex<Text> = Mutex::new(text!($haystack));
192 let text = TEXT.lock().unwrap();
193 b.bytes = text.len() as u64;
195 let count = re.find_iter(&text).count();
222 static ref TEXT: Mutex<Text> = Mutex::new(text!($haystack));
225 let text = TEXT.lock().unwrap();
226 b.bytes = text.len() as u64;
227 b.iter(|| match re.captures(&text) {
245 static ref TEXT: Mutex<Text> = Mutex::new(text!($haystack));
248 let text = TEXT.lock().unwrap();
249 b.bytes = text.len() as u64;
251 if re.is_match(&text) != $is_match {
273 static ref TEXT: Mutex<Text> = Mutex::new(text!($haystack));
276 let text = TEXT.lock().unwrap();
277 b.bytes = text.len() as u64;
279 if re.matches(&text).matched_any() != $is_match {