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.
53 # } // namespace rust
58 **Be aware that rust::Str behaves like &str i.e. it is a borrow!** C++
61 Just to reiterate: &str is rust::Str. Do not try to write &str as `const
62 rust::Str &`. A language-level C++ reference is not able to capture the fat
73 ```rust,noplayground
74 // src/main.rs
78 extern "Rust" {
93 ffi::c("hello from Rust");
101 #include "example/src/main.rs.h"
102 #include "rust/cxx.h"
104 void c(rust::Str greeting);
108 // src/greeting.cc
113 void c(rust::Str greeting) {