| /linux/rust/zerocopy-derive/derive/ |
| H A D | mod.rs | 50 #core::hash::Hasher::write(state, #zerocopy_crate::IntoBytes::as_bytes(self)) in derive_hash() 54 #core::hash::Hasher::write(state, #zerocopy_crate::IntoBytes::as_bytes(data)) in derive_hash() 79 #zerocopy_crate::IntoBytes::as_bytes(self), in derive_eq() 80 #zerocopy_crate::IntoBytes::as_bytes(other), in derive_eq()
|
| /linux/rust/syn/ |
| H A D | whitespace.rs | 5 let byte = s.as_bytes()[0]; in skip() 25 let bytes = s.as_bytes(); in skip()
|
| H A D | lit.rs | 1384 let mut v = s.as_bytes(); in parse_lit_byte_str_cooked() 1460 let mut v = s.as_bytes(); in parse_lit_c_str_cooked() 1480 out.extend_from_slice(ch.encode_utf8(&mut [0u8; 4]).as_bytes()); in parse_lit_c_str_cooked() 1533 let mut v = &s.as_bytes()[2..]; in parse_lit_byte()
|
| /linux/rust/kernel/ |
| H A D | str.rs | 82 /// assert_eq!(s.to_bytes(), "Hello, BStr!".as_bytes()); in fmt() 86 /// assert_eq!(s.to_bytes(), "\\xf0\\x9f\\xa6\\x80".as_bytes()); in fmt() 114 /// assert_eq!(s.to_bytes(), "\"Hello, \\\"BStr\\\"!\"".as_bytes()); in fmt() 118 /// assert_eq!(s.to_bytes(), "\"\\xf0\\x9f\\x98\\xba\"".as_bytes()); in fmt() 195 const C: &'static $crate::str::BStr = $crate::str::BStr::from_bytes(S.as_bytes()); in as_char_ptr_in_const_context() 301 /// assert_eq!(s.to_bytes_with_nul(), "\\xf0\\x9f\\x90\\xa7\0".as_bytes()); in fmt() 305 /// assert_eq!(s.to_bytes_with_nul(), "so \"cool\"\0".as_bytes()); in fmt() 423 const C: &$crate::str::CStr = match $crate::str::CStr::from_bytes_with_nul(S.as_bytes()) { 631 s.as_bytes().as_ptr(), 715 let bytes = s.as_bytes(); in write_str() [all...] |
| H A D | bug.rs | 17 const _FILE: &[u8] = $file.as_bytes();
|
| H A D | firmware.rs | 289 self.push_internal(s.as_bytes()) in push()
|
| H A D | kunit.rs | 248 let name_u8 = ::core::stringify!($name).as_bytes();
|
| /linux/scripts/ |
| H A D | rustdoc_test_builder.rs | 77 std::fs::write(path, body.as_bytes()).unwrap(); in main()
|
| /linux/rust/zerocopy/src/ |
| H A D | lib.rs | 1891 Err(e.map_src(|src| src.as_bytes::<BecauseImmutable>().as_ref()).into()) in try_ref_from_bytes() 2217 Err(e) => Err(e.map_src(|src| src.as_bytes().as_mut()).into()), in try_mut_from_bytes() 2535 Err(e.map_src(|src| src.as_bytes::<BecauseImmutable>().as_ref()).into()) in try_ref_from_bytes_with_elems() 2859 Err(e) => Err(e.map_src(|src| src.as_bytes().as_mut()).into()), in try_mut_from_bytes_with_elems() 3310 Err(e) => Err(e.map_src(|src| src.as_bytes::<BecauseImmutable>().as_ref()).into()), in try_ref_from_prefix_suffix() 3330 Err(e) => Err(e.map_src(|src| src.as_bytes().as_mut()).into()), in try_mut_from_prefix_suffix() 5382 let ptr = ptr.as_bytes(); in read_from_io() 5746 fn as_bytes(&self) -> &[u8] in as_bytes() method 5926 let src = self.as_bytes(); in write_to() 6012 let src = self.as_bytes(); in write_to_prefix() [all …]
|
| H A D | ref.rs | 1271 let r1 = Ref::<_, u64>::from_bytes(buf1.as_bytes()).unwrap(); in test_eq() 1273 let r2 = Ref::<_, u64>::from_bytes(buf2.as_bytes()).unwrap(); in test_eq() 1280 let r1 = Ref::<_, u64>::from_bytes(buf1.as_bytes()).unwrap(); in test_ne() 1282 let r2 = Ref::<_, u64>::from_bytes(buf2.as_bytes()).unwrap(); in test_ne() 1289 let r1 = Ref::<_, u64>::from_bytes(buf1.as_bytes()).unwrap(); in test_ord() 1291 let r2 = Ref::<_, u64>::from_bytes(buf2.as_bytes()).unwrap(); in test_ord()
|
| H A D | split_at.rs | 1017 let dst = SliceDst::ref_from_bytes(arr.as_bytes()).unwrap(); in test_split_at_overlapping()
|
| H A D | byteorder.rs | 1354 bytes.as_mut_bytes().copy_from_slice(native.as_bytes()); in test_endian()
|
| H A D | impls.rs | 1647 Some(t.as_bytes()) in test_impls()
|
| /linux/rust/proc-macro2/ |
| H A D | parse.rs | 51 fn as_bytes(&self) -> &'a [u8] { in as_bytes() method 52 self.rest.as_bytes() in as_bytes() 83 let byte = s.as_bytes()[0]; in skip_whitespace() 133 let bytes = input.as_bytes(); in block_comment()
|
| /linux/rust/kernel/debugfs/ |
| H A D | traits.rs | 84 writer.write_slice_file(self.as_bytes(), offset) 156 writer.write_slice_file(self.as_bytes(), offset) in read_from_slice()
|
| /linux/rust/macros/ |
| H A D | module.rs | 61 let string = Literal::byte_string(string.as_bytes()); in emit_base()
|
| /linux/rust/zerocopy/src/pointer/ |
| H A D | mod.rs | 41 ptr.as_bytes().as_ref().iter().all( in is_zeroed()
|
| H A D | ptr.rs | 1018 pub fn as_bytes<R>(self) -> Ptr<'a, [u8], (I::Aliasing, Aligned, Valid)> in as_bytes() function
|
| /linux/rust/zerocopy/src/util/ |
| H A D | macro_util.rs | 480 let name = name.as_bytes(); in hash_name()
|
| /linux/drivers/android/binder/ |
| H A D | thread.rs | 1103 if let Err(err) = alloc.write(secctx_off, secctx.as_bytes()) { in copy_transaction_data()
|