Home
last modified time | relevance | path

Searched refs:CxxString (Results 1 – 25 of 27) sorted by relevance

12

/third_party/rust/crates/cxx/src/
Dcxx_string.rs18 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 …]
Dunique_ptr.rs4 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
Dextern_type.rs2 use crate::CxxString;
224 CxxString = "std::string"
Dlib.rs475 pub use crate::string::CxxString;
485 pub type String = CxxString;
Dweak_ptr.rs2 use crate::string::CxxString;
189 impl_weak_ptr_target!("string", "CxxString", CxxString);
Dshared_ptr.rs3 use crate::string::CxxString;
283 impl_shared_ptr_target!("string", "CxxString", CxxString);
Dcxx_vector.rs6 use crate::string::CxxString;
492 impl_vector_element!(opaque, "string", "CxxString", CxxString);
/third_party/rust/crates/cxx/book/src/binding/
Dcxxstring.md4 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;
Dcxxvector.md21 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>) {
Dslice.md107 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/
Dlib.rs18 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/
Dmut_return.rs10 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
Dby_value_not_supported.stderr16 6 | s: CxxString,
52 18 | fn h(s: CxxString) -> CxxString;
58 18 | fn h(s: CxxString) -> CxxString;
Dby_value_not_supported.rs6 s: CxxString,
18 fn h(s: CxxString) -> CxxString; in h() argument
Dpin_mut_opaque.stderr7 error: mutable reference to C++ type requires a pin -- use Pin<&mut CxxString>
10 8 | fn s(s: &mut CxxString);
Dpin_mut_opaque.rs8 fn s(s: &mut CxxString); in s() argument
Dmut_return.stderr4 10 | fn f(t: &Thing) -> Pin<&mut CxxString>;
/third_party/rust/crates/cxx/tests/
Dunique_ptr.rs1 use cxx::{CxxString, UniquePtr};
6 let unique_ptr = UniquePtr::<CxxString>::null(); in test_deref_null()
7 let _: &CxxString = &unique_ptr; in test_deref_null()
Dcxx_string.rs1 use cxx::{let_cxx_string, CxxString};
9 async fn g(_: &CxxString) {} in test_async_cxx_string() argument
/third_party/rust/crates/cxx/syntax/
Datom.rs21 CxxString, enumerator
47 "CxxString" => Some(CxxString), in from_str()
78 CxxString => "CxxString", in as_ref()
Dcheck.rs129 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()
Dpod.rs13 CxxString | RustString => false, in is_guaranteed_pod()
Dtokens.rs17 } else if ident.rust == CxxString { in to_tokens()
/third_party/rust/crates/cxx/book/src/
DSUMMARY.md29 - [CxxString &mdash; std::string](binding/cxxstring.md)
Dbindings.md16 <tr><td style="padding:3px 6px"><b><a href="binding/cxxstring.md">CxxString</a></b></td><td style="…

12