Lines Matching +full:rust +full:- +full:src
1 {{#title rust::Box<T> — Rust ♡ C++}}
2 # rust::Box\<T\>
7 // rust/cxx.h
11 # namespace rust {
29 const T *operator->() const noexcept;
31 T *operator->() noexcept;
46 # } // namespace rust
55 If T is an opaque Rust type, the Rust type is required to be [Sized] i.e. size
57 sized opaque Rust types.
59 [Sized]: https://doc.rust-lang.org/std/marker/trait.Sized.html
63 This program uses a Box to pass ownership of some opaque piece of Rust state
64 over to C++ and then back to a Rust callback, which is a useful pattern for
67 ```rust,noplayground
68 // src/main.rs
74 extern "Rust" {
104 #include "example/src/main.rs.h"
105 #include "rust/cxx.h"
107 void f(rust::Fn<void(rust::Box<File>, rust::Str, rust::Str)> callback,
108 rust::Box<File> out);
116 void f(rust::Fn<void(rust::Box<File>, rust::Str, rust::Str)> callback,
117 rust::Box<File> out) {