Backed out 5 changesets (bug 1890092, bug 1888683) for causing build bustages & crash...
[gecko.git] / toolkit / components / uniffi-js / UniFFIPointerType.h
blob7236e50cb79cdd03078efd873270b2acb638aa13
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_UniFFIPointerType_h
8 #define mozilla_UniFFIPointerType_h
10 #include "nsISupports.h"
11 #include "nsWrapperCache.h"
12 #include "nsLiteralString.h"
13 #include "UniFFIRust.h"
15 namespace mozilla::uniffi {
17 /**
18 * UniFFIPointerType represents of UniFFI allocated pointers.
19 * Each UniFFIPointer will have a UniFFIPointerType, which will be a statically
20 * allocated type per object exposed by the UniFFI interface
21 **/
22 struct UniFFIPointerType {
23 nsLiteralCString typeName;
24 // The Rust destructor for the pointer, this gives back ownership to Rust
25 void (*destructor)(void*, RustCallStatus*);
27 } // namespace mozilla::uniffi
29 #endif /* mozilla_UniFFIPointerType_h */