Home
last modified time | relevance | path

Searched refs:CString (Results 1 – 10 of 10) sorted by relevance

/linux/rust/kernel/
H A Dstr.rs79 /// # use kernel::{prelude::fmt, b_str, str::{BStr, CString}}; in fmt()
81 /// let s = CString::try_from_fmt(fmt!("{ascii}"))?; in fmt()
85 /// let s = CString::try_from_fmt(fmt!("{non_ascii}"))?; in fmt()
110 /// # use kernel::{prelude::fmt, b_str, str::{BStr, CString}}; in fmt()
113 /// let s = CString::try_from_fmt(fmt!("{ascii:?}"))?; in fmt()
117 /// let s = CString::try_from_fmt(fmt!("{non_ascii:?}"))?; in fmt()
243 /// Convert this [`CStr`] into a [`CString`] by allocating memory and in make_ascii_lowercase()
245 fn to_cstring(&self) -> Result<CString, AllocError>;
269 /// Returns a copy of this [`CString`] where each character is mapped to its
278 fn to_ascii_lowercase(&self) -> Result<CString, AllocErro
232 to_cstring(&self) -> Result<CString, AllocError> to_cstring() argument
265 to_ascii_lowercase(&self) -> Result<CString, AllocError> to_ascii_lowercase() argument
276 to_ascii_uppercase(&self) -> Result<CString, AllocError> to_ascii_uppercase() argument
344 to_cstring(&self) -> Result<CString, AllocError> to_cstring() argument
358 to_ascii_lowercase(&self) -> Result<CString, AllocError> to_ascii_lowercase() argument
366 to_ascii_uppercase(&self) -> Result<CString, AllocError> to_ascii_uppercase() argument
826 pub struct CString { global() struct
827 bufBStr::fmt::CString global() argument
830 impl CString { global() implementation
868 impl Deref for CString { global() implementation
878 impl DerefMut for CString { global() implementation
886 impl<'a> TryFrom<&'a CStr> for CString { global() implementation
889 try_from(cstr: &'a CStr) -> Result<CString, AllocError> try_from() argument
900 impl fmt::Debug for CString { global() implementation
[all...]
H A Dopp.rs18 str::CString,
90 /// Creates a null-terminated slice of pointers to [`CString`]s.
91 fn to_c_str_array(names: &[CString]) -> Result<KVec<*const c_char>> { in to_c_str_array()
338 /// use kernel::str::CString;
349 /// let name = CString::try_from_fmt(fmt!("slow"))?;
362 clk_names: Option<KVec<CString>>,
363 prop_name: Option<CString>,
364 regulator_names: Option<KVec<CString>>,
380 pub fn set_clk_names(mut self, names: KVec<CString>) -> Result<Self> { in set_clk_names()
394 pub fn set_prop_name(mut self, name: CString)
[all...]
H A Dconfigfs.rs116 use crate::str::CString;
258 name: CString, in new()
259 new( name: CString, item_type: &'static ItemType<Group<Data>, Data>, data: impl PinInit<Data, Error>, ) -> impl PinInit<Self, Error> new() argument
/linux/samples/rust/
H A Drust_debugfs_scoped.rs17 str::CString,
70 let name = CString::try_from_fmt(fmt!("{name_str}"))?; in create_file_write()
71 let file_name = CString::try_from_fmt(fmt!("{name_str}"))?; in create_file_write()
89 let Ok(name) = CString::try_from_fmt(fmt!("{idx}")) else { in create_file_write()
127 name: CString, in init_control()
H A Drust_debugfs.rs47 str::CString,
73 _compatible: File<CString>,
161 .property_read::<CString>(c"compatible") in new()
H A Drust_driver_platform.rs78 str::CString,
135 let prop = fwnode.property_read::<CString>(name).required_by(dev)?; in properties_parse()
/linux/rust/kernel/io/
H A Dresource.rs15 str::CString,
35 _name: CString,
105 name: CString, in request_region() argument
/linux/drivers/android/binder/
H A Dcontext.rs10 str::{CStr, CString},
50 pub(crate) name: CString,
55 let name = CString::try_from(name)?; in new()
/linux/rust/quote/
H A Dto_tokens.rs8 use std::ffi::{CStr, CString};
229 impl ToTokens for CString { implementation
/linux/rust/syn/
H A Dlit.rs11 use std::ffi::{CStr, CString};
322 pub fn value(&self) -> CString { in value() argument
1135 use std::ffi::CString;
1445 pub(crate) fn parse_lit_c_str(s: &str) -> (CString, Box<str>) { in parse_lit_c_str() argument
1454 fn parse_lit_c_str_cooked(mut s: &str) -> (CString, Box<str>) { in parse_lit_c_str_cooked() argument
1518 (CString::new(out).unwrap(), suffix) in parse_lit_c_str_cooked()
1521 fn parse_lit_c_str_raw(s: &str) -> (CString, Box<str>) { in parse_lit_c_str_raw() argument
1524 (CString::new(String::from(value)).unwrap(), suffix) in parse_lit_c_str_raw()