Home
last modified time | relevance | path

Searched refs:str (Results 1 – 17 of 17) sorted by relevance

/rust/macros/
Dmodule.rs26 module: &'a str,
32 fn new(module: &'a str) -> Self { in new()
40 fn emit_base(&mut self, field: &str, content: &str, builtin: bool) { in emit_base() argument
78 fn emit_only_builtin(&mut self, field: &str, content: &str) { in emit_only_builtin() argument
82 fn emit_only_loadable(&mut self, field: &str, content: &str) { in emit_only_loadable() argument
86 fn emit(&mut self, field: &str, content: &str) { in emit() argument
107 const EXPECTED_KEYS: &[&str] = &[ in parse()
116 const REQUIRED_KEYS: &[&str] = &["type", "name", "license"]; in parse()
156 let mut ordered_keys: Vec<&str> = Vec::new(); in parse()
/rust/kernel/
Dstr.rs123 ($str:literal) => {{
124 const S: &'static str = $str;
125 const C: &'static $crate::str::BStr = $crate::str::BStr::from_bytes(S.as_bytes());
280 pub fn to_str(&self) -> Result<&str, core::str::Utf8Error> { in to_str() argument
281 core::str::from_utf8(self.as_bytes()) in to_str()
302 pub unsafe fn as_str_unchecked(&self) -> &str { in as_str_unchecked() argument
304 unsafe { core::str::from_utf8_unchecked(self.as_bytes()) } in as_str_unchecked()
514 ($str:expr) => {{
515 const S: &str = concat!($str, "\0");
516 const C: &$crate::str::CStr = match $crate::str::CStr::from_bytes_with_nul(S.as_bytes()) {
[all …]
Derror.rs7 use crate::{alloc::AllocError, str::CStr};
14 use core::str::Utf8Error;
192 unsafe { core::str::from_utf8_unchecked(name) }, in fmt()
349 pub const VTABLE_DEFAULT_ERROR: &str =
Dprelude.rs35 pub use super::{str::CStr, ThisModule};
Dkunit.rs61 static FILE: &'static $crate::str::CStr = $crate::c_str!($file);
63 static CONDITION: &'static $crate::str::CStr = $crate::c_str!(stringify!($condition));
173 name: &'static kernel::str::CStr, in kunit_case()
Djump_label.rs39 const _: &str = include!(concat!(
Dfirmware.rs7 use crate::{bindings, device::Device, error::Error, error::Result, ffi, str::CStr};
Dlib.rs66 pub mod str; module
Dprint.rs11 str::RawFormatter,
Dtypes.rs521 str,
Dinit.rs1423 {<T>} *mut [T], {<T>} *const [T], *mut str, *const str,
Dmiscdevice.rs20 str::CStr,
/rust/
Dbuild_error.rs29 pub const fn build_error(msg: &'static str) -> ! { in build_error() argument
/rust/kernel/block/mq/
Draw_writer.rs39 fn write_str(&mut self, s: &str) -> fmt::Result { in write_str()
/rust/kernel/sync/lock/
Dglobal.rs8 str::CStr,
269 const NAME: &'static $crate::str::CStr = $crate::c_str!(::core::stringify!($name));
/rust/kernel/sync/
Dcondvar.rs13 str::CStr,
Dlock.rs12 str::CStr,