Add documentation of cxx::kind module

This commit is contained in:
David Tolnay 2020-10-03 18:11:52 -07:00
parent 38f5ad69da
commit 1bd502d893
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -94,6 +94,8 @@
/// # fn main() {}
/// ```
///
/// <br><br>
///
/// ## Opaque and Trivial types
///
/// Some C++ types are safe to hold and pass around in Rust, by value.
@ -135,6 +137,13 @@ pub unsafe trait ExternType {
type Kind;
}
/// Marker types identifying Rust's knowledge about an extern C++ type.
///
/// These markers are used in the `Kind` associated type in impls of the
/// [`ExternType`] trait. Refer to the discussion of [Opaque and Trivial
/// types][trait] for an overview of their purpose.
///
/// [trait]: ExternType#opaque-and-trivial-types
pub mod kind {
/// An opaque type which can't be passed or held by value within Rust.
/// For example, a C++ type with a destructor, or a non-trivial move