Lines Matching defs:as_bytes
49 pub fn as_bytes(&self) -> &'t [u8] {
213 /// assert_eq!(caps.get(1).unwrap().as_bytes(), &b"Citizen Kane"[..]);
214 /// assert_eq!(caps.get(2).unwrap().as_bytes(), &b"1941"[..]);
215 /// assert_eq!(caps.get(0).unwrap().as_bytes(), &b"'Citizen Kane' (1941)"[..]);
236 /// assert_eq!(caps.name("title").unwrap().as_bytes(), b"Citizen Kane");
237 /// assert_eq!(caps.name("year").unwrap().as_bytes(), b"1941");
238 /// assert_eq!(caps.get(0).unwrap().as_bytes(), &b"'Citizen Kane' (1941)"[..]);
933 /// let text1 = caps.get(1).map_or(&b""[..], |m| m.as_bytes());
934 /// let text2 = caps.get(2).map_or(&b""[..], |m| m.as_bytes());
1050 .map(|m| m.as_bytes())
1072 .map(|m| m.as_bytes())