Lines Matching refs:BStr
14 pub struct BStr([u8]); struct
16 impl BStr { implementation
33 unsafe { &*(bytes as *const [u8] as *const BStr) } in from_bytes() constant
37 impl fmt::Display for BStr { implementation
66 impl fmt::Debug for BStr { implementation
101 impl Deref for BStr { implementation
126 const C: &'static $crate::str::BStr = $crate::str::BStr::from_bytes(S.as_bytes());
438 impl AsRef<BStr> for CStr {
440 fn as_ref(&self) -> &BStr { in as_ref() argument
441 BStr::from_bytes(self.as_bytes()) in as_ref()
446 type Target = BStr;
491 BStr: Index<Idx>,
493 type Output = <BStr as Index<Idx>>::Output;
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()