/third_party/rust/crates/cxx/src/ |
D | cxx_string.rs | 18 fn string_init(this: &mut MaybeUninit<CxxString>, ptr: *const u8, len: usize); in string_init() argument 20 fn string_destroy(this: &mut MaybeUninit<CxxString>); in string_destroy() argument 22 fn string_data(this: &CxxString) -> *const u8; in string_data() 24 fn string_length(this: &CxxString) -> usize; in string_length() 26 fn string_clear(this: Pin<&mut CxxString>); in string_clear() argument 28 fn string_reserve_total(this: Pin<&mut CxxString>, new_cap: usize); in string_reserve_total() argument 30 fn string_push(this: Pin<&mut CxxString>, ptr: *const u8, len: usize); in string_push() argument 44 pub struct CxxString { struct 91 impl CxxString { implementation 210 impl Display for CxxString { implementation [all …]
|
D | unique_ptr.rs | 4 use crate::string::CxxString; 238 fn unique_ptr_std_string_raw(this: *mut MaybeUninit<*mut c_void>, raw: *mut CxxString); in unique_ptr_std_string_raw() argument 240 fn unique_ptr_std_string_get(this: *const MaybeUninit<*mut c_void>) -> *const CxxString; in unique_ptr_std_string_get() argument 242 fn unique_ptr_std_string_release(this: *mut MaybeUninit<*mut c_void>) -> *mut CxxString; in unique_ptr_std_string_release() argument 247 unsafe impl UniquePtrTarget for CxxString { implementation
|
D | extern_type.rs | 2 use crate::CxxString; 224 CxxString = "std::string"
|
D | lib.rs | 475 pub use crate::string::CxxString; 485 pub type String = CxxString;
|
D | weak_ptr.rs | 2 use crate::string::CxxString; 189 impl_weak_ptr_target!("string", "CxxString", CxxString);
|
D | shared_ptr.rs | 3 use crate::string::CxxString; 283 impl_shared_ptr_target!("string", "CxxString", CxxString);
|
D | cxx_vector.rs | 6 use crate::string::CxxString; 492 impl_vector_element!(opaque, "string", "CxxString", CxxString);
|
/third_party/rust/crates/cxx/book/src/binding/ |
D | cxxstring.md | 4 The Rust binding of std::string is called **[`CxxString`]**. See the link for 7 [`CxxString`]: https://docs.rs/cxx/*/cxx/struct.CxxString.html 11 Rust code can never obtain a CxxString by value. C++'s string requires a move 13 move behavior. Instead in Rust code we will only ever look at a CxxString 14 through a reference or smart pointer, as in &CxxString or Pin\<&mut CxxString\> 15 or UniquePtr\<CxxString\>. 17 In order to construct a CxxString on the stack from Rust, you must use the 51 fn getString(self: &Json) -> &CxxString; 56 fn get<'a>(self: &'a Object, key: &CxxString) -> &'a Json;
|
D | cxxvector.md | 21 This program involves Rust code converting a `CxxVector<CxxString>` (i.e. 29 use cxx::{CxxString, CxxVector}; 34 fn f(vec: &CxxVector<CxxString>); 38 fn f(vec: &CxxVector<CxxString>) {
|
D | slice.md | 107 use cxx::CxxString; 114 fn prettify_json(input: &[u8], output: Pin<&mut CxxString>) -> Result<()>; 118 struct WriteToCxxString<'a>(Pin<&'a mut CxxString>); 130 fn prettify_json(input: &[u8], output: Pin<&mut CxxString>) -> serde_json::Result<()> {
|
/third_party/rust/crates/cxx/tests/ffi/ |
D | lib.rs | 18 use cxx::{type_id, CxxString, CxxVector, ExternType, SharedPtr, UniquePtr}; 109 fn c_return_unique_ptr_string() -> UniquePtr<CxxString>; in c_return_unique_ptr_string() 112 fn c_return_unique_ptr_vector_string() -> UniquePtr<CxxVector<CxxString>>; in c_return_unique_ptr_vector_string() 144 fn c_take_unique_ptr_string(s: UniquePtr<CxxString>); in c_take_unique_ptr_string() argument 147 fn c_take_unique_ptr_vector_string(v: UniquePtr<CxxVector<CxxString>>); in c_take_unique_ptr_vector_string() argument 189 fn c_try_return_unique_ptr_string() -> Result<UniquePtr<CxxString>>; in c_try_return_unique_ptr_string() 236 fn c_return_borrow<'a>(s: &'a CxxString) -> UniquePtr<Borrow<'a>>; in c_return_borrow() 239 fn c_return_borrow(s: &CxxString) -> UniquePtr<Borrow>; in c_return_borrow() 272 fn r_return_unique_ptr_string() -> UniquePtr<CxxString>; in r_return_unique_ptr_string() 292 fn r_take_unique_ptr_string(s: UniquePtr<CxxString>); in r_take_unique_ptr_string() argument [all …]
|
/third_party/rust/crates/cxx/tests/ui/ |
D | mut_return.rs | 10 fn f(t: &Thing) -> Pin<&mut CxxString>; in f() argument 11 unsafe fn g(t: &Thing) -> Pin<&mut CxxString>; in g() argument 12 fn h(t: Box<Mut>) -> Pin<&mut CxxString>; in h() argument 13 fn i<'a>(t: Box<Mut<'a>>) -> Pin<&'a mut CxxString>; in i() argument
|
D | by_value_not_supported.stderr | 16 6 | s: CxxString, 52 18 | fn h(s: CxxString) -> CxxString; 58 18 | fn h(s: CxxString) -> CxxString;
|
D | by_value_not_supported.rs | 6 s: CxxString, 18 fn h(s: CxxString) -> CxxString; in h() argument
|
D | pin_mut_opaque.stderr | 7 error: mutable reference to C++ type requires a pin -- use Pin<&mut CxxString> 10 8 | fn s(s: &mut CxxString);
|
D | pin_mut_opaque.rs | 8 fn s(s: &mut CxxString); in s() argument
|
D | mut_return.stderr | 4 10 | fn f(t: &Thing) -> Pin<&mut CxxString>;
|
/third_party/rust/crates/cxx/tests/ |
D | unique_ptr.rs | 1 use cxx::{CxxString, UniquePtr}; 6 let unique_ptr = UniquePtr::<CxxString>::null(); in test_deref_null() 7 let _: &CxxString = &unique_ptr; in test_deref_null()
|
D | cxx_string.rs | 1 use cxx::{let_cxx_string, CxxString}; 9 async fn g(_: &CxxString) {} in test_async_cxx_string() argument
|
/third_party/rust/crates/cxx/syntax/ |
D | atom.rs | 21 CxxString, enumerator 47 "CxxString" => Some(CxxString), in from_str() 78 CxxString => "CxxString", in as_ref()
|
D | check.rs | 129 Some(CxxString) => {} in check_type_rust_vec() 147 None | Some(CxxString) => return, in check_type_unique_ptr() 167 | Some(F64) | Some(CxxString) => return, in check_type_shared_ptr() 188 | Some(F64) | Some(CxxString) => return, in check_type_weak_ptr() 212 | Some(CxxString) => return, in check_type_cxx_vector() 224 Type::Ident(ident) if ident.rust == CxxString || is_opaque_cxx(cx, &ident.rust) => { in check_type_ref() 641 ident == CxxString || is_opaque_cxx(cx, ident) || cx.types.rust.contains(ident) in is_unsized() 711 } else if Atom::from(&ident.rust) == Some(CxxString) { in describe()
|
D | pod.rs | 13 CxxString | RustString => false, in is_guaranteed_pod()
|
D | tokens.rs | 17 } else if ident.rust == CxxString { in to_tokens()
|
/third_party/rust/crates/cxx/book/src/ |
D | SUMMARY.md | 29 - [CxxString — std::string](binding/cxxstring.md)
|
D | bindings.md | 16 <tr><td style="padding:3px 6px"><b><a href="binding/cxxstring.md">CxxString</a></b></td><td style="…
|