Home
last modified time | relevance | path

Searched refs:ExternType (Results 1 – 24 of 24) sorted by relevance

/external/rust/cxx/src/
Dextern_type.rs100 pub unsafe trait ExternType { interface
182 pub fn verify_extern_type<T: ExternType<Id = Id>, Id>() {} in verify_extern_type()
185 pub fn verify_extern_kind<T: ExternType<Kind = Kind>, Kind: self::Kind>() {} in verify_extern_kind()
190 unsafe impl ExternType for $ty { impl
Dcxx_vector.rs4 use crate::extern_type::ExternType;
107 T: ExternType<Kind = Trivial>, in as_slice()
129 T: ExternType<Kind = Trivial>, in as_mut_slice()
Dshared_ptr.rs5 use crate::ExternType;
41 T: ExternType<Kind = Trivial>, in new()
Dunique_ptr.rs5 use crate::ExternType;
41 T: ExternType<Kind = Trivial>, in new()
Dlib.rs428 pub use crate::extern_type::{kind, ExternType};
/external/rust/cxx/tests/ui/
Ddeny_missing_docs.rs70 use cxx::{type_id, ExternType};
75 unsafe impl ExternType for UndocumentedTypeAlias {
80 unsafe impl ExternType for DocumentedTypeAlias {
Dvec_opaque.stderr7 error: needs a cxx::ExternType impl in order to be used as a vector element in Vec<Job>
13 error[E0271]: type mismatch resolving `<handle::Job as ExternType>::Kind == Trivial`
21 | pub fn verify_extern_kind<T: ExternType<Kind = Kind>, Kind: self::Kind>() {}
Dwrong_type_id.stderr1 error[E0271]: type mismatch resolving `<StringPiece as ExternType>::Id == (f, o, l, l, y, (), B, y,…
9 | pub fn verify_extern_type<T: ExternType<Id = Id>, Id>() {}
Dunique_ptr_to_opaque.rs6 unsafe impl cxx::ExternType for C {
Dunique_ptr_to_opaque.stderr1 error[E0271]: type mismatch resolving `<outside::C as ExternType>::Kind == Trivial`
Dpin_mut_opaque.stderr19 error: needs a cxx::ExternType impl in order to be used as a non-pinned mutable reference in signat…
Dby_value_not_supported.stderr19 error: needs a cxx::ExternType impl in order to be used as a field of `S`, argument of `f` or retur…
/external/rust/cxx/syntax/
Dderive.rs17 ExternType, enumerator
32 "ExternType" => Trait::ExternType, in from()
58 Trait::ExternType => "ExternType", in as_ref()
Dmod.rs53 CxxType(ExternType),
55 RustType(ExternType),
77 pub struct ExternType { struct
Dcheck.rs5 error, ident, trivial, Api, Array, Enum, ExternFn, ExternType, Impl, Lang, NamedType, Ptr,
311 if derive.what == Trait::ExternType { in check_api_struct()
343 if derive.what == Trait::Default || derive.what == Trait::ExternType { in check_api_enum()
350 fn check_api_type(cx: &mut Check, ety: &ExternType) { in check_api_type() argument
354 if derive.what == Trait::ExternType && ety.lang == Lang::Rust { in check_api_type()
Dtypes.rs10 toposort, Api, Atom, Enum, ExternType, Impl, Lifetimes, Pair, Struct, Type, TypeAlias,
22 pub untrusted: UnorderedMap<&'a Ident, &'a ExternType>,
Dtokens.rs3 Array, Atom, Derive, Enum, ExternFn, ExternType, Impl, Lifetimes, NamedType, Ptr, Receiver,
168 impl ToTokens for ExternType { implementation
Dparse.rs7 attrs, error, Api, Array, Derive, Doc, Enum, ExternFn, ExternType, ForeignName, Impl, Include,
470 })(ExternType { in parse_extern_type()
877 }(ExternType { in parse_extern_type_bounded()
/external/rust/cxx/book/src/
Dextern-c++.md180 `crate::existing::MyType`'s implementation of [`ExternType`], which is a trait
184 [`ExternType`]: https://docs.rs/cxx/*/cxx/trait.ExternType.html
186 `ExternType` serves the following two related use cases.
225 Handwritten `ExternType` impls make it possible to plug in a data structure
228 By writing the unsafe `ExternType` impl, the programmer asserts that the C++
235 use cxx::{type_id, ExternType};
237 unsafe impl ExternType for folly_sys::StringPiece {
258 The `ExternType::Id` associated type encodes a type-level representation of the
262 The `ExternType::Kind` associated type will always be either
274 If you believe your C++ type reflected by the ExternType impl is indeed fine to
[all …]
/external/rust/cxx/tests/ffi/
Dlib.rs219 #[derive(ExternType)]
329 use cxx::{type_id, CxxString, ExternType};
344 use cxx::{type_id, CxxString, ExternType};
352 unsafe impl ExternType for F {
363 unsafe impl ExternType for G {
368 unsafe impl ExternType for D {
373 unsafe impl ExternType for E {
/external/rust/cxx/gen/src/
Dnested.rs56 use crate::syntax::{Api, Doc, ExternType, ForeignName, Lang, Lifetimes, Pair};
130 Api::CxxType(ExternType { in make_api()
Dwrite.rs12 derive, mangle, Api, Enum, ExternFn, ExternType, Pair, Signature, Struct, Trait, Type,
319 fn write_opaque_type<'a>(out: &mut OutFile<'a>, ety: &'a ExternType, methods: &[&ExternFn]) { in write_opaque_type() argument
598 fn write_opaque_type_layout_decls<'a>(out: &mut OutFile<'a>, ety: &'a ExternType) { in write_opaque_type_layout_decls() argument
611 fn write_opaque_type_layout<'a>(out: &mut OutFile<'a>, ety: &'a ExternType) { in write_opaque_type_layout() argument
/external/rust/cxx/macro/src/
Dexpand.rs9 self, check, mangle, Api, Doc, Enum, ExternFn, ExternType, Impl, Lifetimes, Pair, Signature,
172 unsafe impl #generics ::cxx::ExternType for #ident #generics { in expand_struct()
333 unsafe impl ::cxx::ExternType for #ident { in expand_enum()
343 fn expand_cxx_type(ety: &ExternType) -> TokenStream { in expand_cxx_type()
374 unsafe impl #generics ::cxx::ExternType for #ident #generics { in expand_cxx_type()
382 fn expand_cxx_type_assert_pinned(ety: &ExternType) -> TokenStream { in expand_cxx_type_assert_pinned()
746 fn expand_rust_type_import(ety: &ExternType) -> TokenStream { in expand_rust_type_import()
755 fn expand_rust_type_impl(ety: &ExternType) -> TokenStream { in expand_rust_type_impl()
767 if derive.what == Trait::ExternType { in expand_rust_type_impl()
771 unsafe impl #generics ::cxx::ExternType for #ident #generics { in expand_rust_type_impl()
[all …]
Dderive.rs19 Trait::ExternType => unreachable!(), in expand_struct()
61 Trait::ExternType => unreachable!(), in expand_enum()