Lines Matching +full:rust +full:- +full:src
1 {{#title rust::Str — Rust ♡ C++}}
2 # rust::Str
7 // rust/cxx.h
12 # namespace rust {
20 // Throws std::invalid_argument if not utf-8.
54 # } // namespace rust
59 **Be aware that rust::Str behaves like &str i.e. it is a borrow!** C++
62 Just to reiterate: &str is rust::Str. Do not try to write &str as `const
63 rust::Str &`. A language-level C++ reference is not able to capture the fat
74 ```rust,noplayground
75 // src/main.rs
79 extern "Rust" {
94 ffi::c("hello from Rust");
102 #include "example/src/main.rs.h"
103 #include "rust/cxx.h"
105 void c(rust::Str greeting);
109 // src/greeting.cc
114 void c(rust::Str greeting) {