Lines Matching refs:from_bytes
30 pub const fn from_bytes(bytes: &[u8]) -> &Self { in from_bytes() method
49 .map(Self::from_bytes) in strip_prefix()
141 BStr::from_bytes(&self.0[index]) in index()
147 BStr::from_bytes(self) in as_ref()
173 const C: &'static $crate::str::BStr = $crate::str::BStr::from_bytes(S.as_bytes());
492 BStr::from_bytes(self.as_bytes()) in as_ref()
678 let hello_world = BStr::from_bytes(b"hello, world!"); in test_bstr_display()
680 let escapes = BStr::from_bytes(b"_\t_\n_\r_\\_\'_\"_"); in test_bstr_display()
682 let others = BStr::from_bytes(b"\x01"); in test_bstr_display()
684 let non_ascii = BStr::from_bytes(b"d\xe9j\xe0 vu"); in test_bstr_display()
686 let good_bytes = BStr::from_bytes(b"\xf0\x9f\xa6\x80"); in test_bstr_display()
692 let hello_world = BStr::from_bytes(b"hello, world!"); in test_bstr_debug()
694 let escapes = BStr::from_bytes(b"_\t_\n_\r_\\_\'_\"_"); in test_bstr_debug()
696 let others = BStr::from_bytes(b"\x01"); in test_bstr_debug()
698 let non_ascii = BStr::from_bytes(b"d\xe9j\xe0 vu"); in test_bstr_debug()
700 let good_bytes = BStr::from_bytes(b"\xf0\x9f\xa6\x80"); in test_bstr_debug()