Home
last modified time | relevance | path

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

12

/external/rust/cxx/src/
Dcxx_string.rs15 fn string_init(this: &mut MaybeUninit<CxxString>, ptr: *const u8, len: usize); in string_init() argument
17 fn string_destroy(this: &mut MaybeUninit<CxxString>); in string_destroy() argument
19 fn string_data(this: &CxxString) -> *const u8; in string_data()
21 fn string_length(this: &CxxString) -> usize; in string_length()
23 fn string_push(this: Pin<&mut CxxString>, ptr: *const u8, len: usize); in string_push() argument
37 pub struct CxxString { struct
84 impl CxxString { impl
158 impl Display for CxxString { implementation
164 impl Debug for CxxString { implementation
170 impl PartialEq for CxxString { implementation
[all …]
Dunique_ptr.rs4 use crate::string::CxxString;
235 fn unique_ptr_std_string_raw(this: *mut *mut c_void, raw: *mut CxxString); in unique_ptr_std_string_raw() argument
237 fn unique_ptr_std_string_get(this: *const *mut c_void) -> *const CxxString; in unique_ptr_std_string_get() argument
239 fn unique_ptr_std_string_release(this: *mut *mut c_void) -> *mut CxxString; in unique_ptr_std_string_release() argument
244 unsafe impl UniquePtrTarget for CxxString { implementation
Dextern_type.rs2 use crate::CxxString;
217 CxxString = "std::string"
Dlib.rs430 pub use crate::string::CxxString;
440 pub type String = CxxString;
Dweak_ptr.rs2 use crate::string::CxxString;
192 impl_weak_ptr_target!("string", "CxxString", CxxString);
Dshared_ptr.rs3 use crate::string::CxxString;
285 impl_shared_ptr_target!("string", "CxxString", CxxString);
Dcxx_vector.rs6 use crate::string::CxxString;
416 impl_vector_element!("string", "CxxString", CxxString);
/external/rust/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<()> {
/external/rust/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>;
/external/rust/cxx/tests/
Dunique_ptr.rs3 use cxx::{CxxString, UniquePtr};
8 let unique_ptr = UniquePtr::<CxxString>::null(); in test_deref_null()
9 let _: &CxxString = &unique_ptr; in test_deref_null()
Dcxx_string.rs1 use cxx::{let_cxx_string, CxxString};
8 async fn g(_: &CxxString) {} in test_async_cxx_string() argument
/external/rust/cxx/tests/ffi/
Dlib.rs18 use cxx::{CxxString, CxxVector, SharedPtr, UniquePtr};
106 fn c_return_unique_ptr_string() -> UniquePtr<CxxString>; in c_return_unique_ptr_string()
109 fn c_return_unique_ptr_vector_string() -> UniquePtr<CxxVector<CxxString>>; in c_return_unique_ptr_vector_string()
140 fn c_take_unique_ptr_string(s: UniquePtr<CxxString>); in c_take_unique_ptr_string() argument
143 fn c_take_unique_ptr_vector_string(v: UniquePtr<CxxVector<CxxString>>); in c_take_unique_ptr_vector_string() argument
179 fn c_try_return_unique_ptr_string() -> Result<UniquePtr<CxxString>>; in c_try_return_unique_ptr_string()
226 fn c_return_borrow<'a>(s: &'a CxxString) -> UniquePtr<Borrow<'a>>; in c_return_borrow()
229 fn c_return_borrow(s: &CxxString) -> UniquePtr<Borrow>; in c_return_borrow()
258 fn r_return_unique_ptr_string() -> UniquePtr<CxxString>; in r_return_unique_ptr_string()
278 fn r_take_unique_ptr_string(s: UniquePtr<CxxString>); in r_take_unique_ptr_string() argument
[all …]
/external/rust/cxx/syntax/
Datom.rs21 CxxString, enumerator
47 "CxxString" => Some(CxxString), in from_str()
78 CxxString => "CxxString", in as_ref()
Dcheck.rs114 Some(CxxString) => {} in check_type_rust_vec()
132 None | Some(CxxString) => return, in check_type_unique_ptr()
152 | Some(F64) | Some(CxxString) => return, in check_type_shared_ptr()
173 | Some(F64) | Some(CxxString) => return, in check_type_weak_ptr()
197 | Some(CxxString) => return, in check_type_cxx_vector()
209 Type::Ident(ident) if ident.rust == CxxString || is_opaque_cxx(cx, &ident.rust) => { in check_type_ref()
590 ident == CxxString || is_opaque_cxx(cx, ident) || cx.types.rust.contains(ident) in is_unsized()
660 } 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()
/external/rust/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