Home
last modified time | relevance | path

Searched refs:as_bytes (Results 1 – 12 of 12) sorted by relevance

/linux/rust/syn/
H A Dwhitespace.rs5 let byte = s.as_bytes()[0]; in skip()
25 let bytes = s.as_bytes(); in skip()
H A Dlit.rs1384 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 Dstr.rs82 /// 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 Dbug.rs16 const _FILE: &[u8] = $file.as_bytes();
H A Dfirmware.rs293 self.push_internal(s.as_bytes()) in push()
H A Dkunit.rs248 let name_u8 = ::core::stringify!($name).as_bytes();
/linux/scripts/
H A Drustdoc_test_builder.rs77 std::fs::write(path, body.as_bytes()).unwrap();
/linux/rust/proc-macro2/
H A Dparse.rs51 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/drivers/gpu/nova-core/gsp/
H A Dcmdq.rs664 dst.header.as_bytes(), in send_single_command()
778 header.as_bytes(), in wait_for_msg()
/linux/rust/kernel/debugfs/
H A Dtraits.rs86 writer.write_slice_file(self.as_bytes(), offset)
/linux/rust/macros/
H A Dmodule.rs61 let string = Literal::byte_string(string.as_bytes()); in emit_base()
/linux/drivers/android/binder/
H A Dthread.rs1096 if let Err(err) = alloc.write(secctx_off, secctx.as_bytes()) { in copy_transaction_data()