Lines Matching refs:from_bytes
31 pub const fn from_bytes(bytes: &[u8]) -> &Self { in from_bytes() method
126 const C: &'static $crate::str::BStr = $crate::str::BStr::from_bytes(S.as_bytes());
441 BStr::from_bytes(self.as_bytes()) in as_ref()
604 let hello_world = BStr::from_bytes(b"hello, world!"); in test_bstr_display()
606 let escapes = BStr::from_bytes(b"_\t_\n_\r_\\_\'_\"_"); in test_bstr_display()
608 let others = BStr::from_bytes(b"\x01"); in test_bstr_display()
610 let non_ascii = BStr::from_bytes(b"d\xe9j\xe0 vu"); in test_bstr_display()
612 let good_bytes = BStr::from_bytes(b"\xf0\x9f\xa6\x80"); in test_bstr_display()
618 let hello_world = BStr::from_bytes(b"hello, world!"); in test_bstr_debug()
620 let escapes = BStr::from_bytes(b"_\t_\n_\r_\\_\'_\"_"); in test_bstr_debug()
622 let others = BStr::from_bytes(b"\x01"); in test_bstr_debug()
624 let non_ascii = BStr::from_bytes(b"d\xe9j\xe0 vu"); in test_bstr_debug()
626 let good_bytes = BStr::from_bytes(b"\xf0\x9f\xa6\x80"); in test_bstr_debug()