Lines Matching refs:CxxString

18     fn string_init(this: &mut MaybeUninit<CxxString>, ptr: *const u8, len: usize);
20 fn string_destroy(this: &mut MaybeUninit<CxxString>);
22 fn string_data(this: &CxxString) -> *const u8;
24 fn string_length(this: &CxxString) -> usize;
26 fn string_clear(this: Pin<&mut CxxString>);
28 fn string_reserve_total(this: Pin<&mut CxxString>, new_cap: usize);
30 fn string_push(this: Pin<&mut CxxString>, ptr: *const u8, len: usize);
38 /// macro, in Rust code we can never obtain a `CxxString` by value. C++'s string
41 /// look at a CxxString through a reference or smart pointer, as in `&CxxString`
42 /// or `UniquePtr<CxxString>`.
44 pub struct CxxString {
65 /// The macro expands to something resembling `let $var: Pin<&mut CxxString> =
66 /// /*???*/;`. The resulting [`Pin`] can be deref'd to `&CxxString` as needed.
71 /// use cxx::{let_cxx_string, CxxString};
73 /// fn f(s: &CxxString) {/* ... */}
91 impl CxxString {
92 /// `CxxString` is not constructible via `new`. Instead, use the
181 /// code it always refers to additional capacity. This API on `CxxString`
195 .expect("CxxString capacity overflow");
210 impl Display for CxxString {
216 impl Debug for CxxString {
222 impl PartialEq for CxxString {
228 impl PartialEq<CxxString> for str {
229 fn eq(&self, other: &CxxString) -> bool {
234 impl PartialEq<str> for CxxString {
240 impl Eq for CxxString {}
242 impl PartialOrd for CxxString {
248 impl Ord for CxxString {
254 impl Hash for CxxString {
260 impl fmt::Write for Pin<&mut CxxString> {
268 impl std::io::Write for Pin<&mut CxxString> {
295 pub unsafe fn init(&mut self, value: impl AsRef<[u8]>) -> Pin<&mut CxxString> {
298 let this = &mut *self.space.as_mut_ptr().cast::<MaybeUninit<CxxString>>();
308 let this = &mut *self.space.as_mut_ptr().cast::<MaybeUninit<CxxString>>();