Lines Matching refs:from_bytes
39 pub const fn from_bytes(bytes: &[u8]) -> &Self { in from_bytes() method
58 .map(Self::from_bytes) in strip_prefix()
150 BStr::from_bytes(&self.0[index]) in index()
156 BStr::from_bytes(self) in as_ref()
182 const C: &'static $crate::str::BStr = $crate::str::BStr::from_bytes(S.as_bytes());
375 BStr::from_bytes(self.to_bytes()) in as_ref()
486 let hello_world = BStr::from_bytes(b"hello, world!"); in test_bstr_display()
488 let escapes = BStr::from_bytes(b"_\t_\n_\r_\\_\'_\"_"); in test_bstr_display()
490 let others = BStr::from_bytes(b"\x01"); in test_bstr_display()
492 let non_ascii = BStr::from_bytes(b"d\xe9j\xe0 vu"); in test_bstr_display()
494 let good_bytes = BStr::from_bytes(b"\xf0\x9f\xa6\x80"); in test_bstr_display()
501 let hello_world = BStr::from_bytes(b"hello, world!"); in test_bstr_debug()
503 let escapes = BStr::from_bytes(b"_\t_\n_\r_\\_\'_\"_"); in test_bstr_debug()
505 let others = BStr::from_bytes(b"\x01"); in test_bstr_debug()
507 let non_ascii = BStr::from_bytes(b"d\xe9j\xe0 vu"); in test_bstr_debug()
509 let good_bytes = BStr::from_bytes(b"\xf0\x9f\xa6\x80"); in test_bstr_debug()