File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -314,7 +314,8 @@ where
314
314
/// `CxxVector<T>` in generic code.
315
315
///
316
316
/// This trait has no publicly callable or implementable methods. Implementing
317
- /// it outside of the CXX codebase is not supported.
317
+ /// it outside of the CXX codebase requires using [explicit shim trait impls],
318
+ /// adding the line `impl CxxVector<MyType> {}` in the same `cxx::bridge` that defines `MyType`.
318
319
///
319
320
/// # Example
320
321
///
@@ -338,6 +339,8 @@ where
338
339
///
339
340
/// Writing the same generic function without a `VectorElement` trait bound
340
341
/// would not compile.
342
+ ///
343
+ /// [explicit shim trait impls]: https://cxx.rs/extern-c++.html#explicit-shim-trait-impls
341
344
pub unsafe trait VectorElement : Sized {
342
345
#[ doc( hidden) ]
343
346
fn __typename ( f : & mut fmt:: Formatter ) -> fmt:: Result ;
You can’t perform that action at this time.
0 commit comments