We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to expose the function summarize to C++ via CXX ?
pub trait Summary { fn summarize(&self) -> String; } pub struct NewsArticle { pub headline: String, pub location: String, pub author: String, pub content: String, } impl Summary for NewsArticle { fn summarize(&self) -> String { format!("{}, by {} ({})", self.headline, self.author, self.location) } }
The text was updated successfully, but these errors were encountered:
https://github.com/dtolnay/cxx/pull/672/files
This can probably help you. It's not the most graceful way, but it works.
Sorry, something went wrong.
No branches or pull requests
How to expose the function summarize to C++ via CXX ?
The text was updated successfully, but these errors were encountered: