aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/opaque.rs
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/src/opaque.rs')
-rw-r--r--openssl/src/opaque.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/openssl/src/opaque.rs b/openssl/src/opaque.rs
new file mode 100644
index 00000000..9545471c
--- /dev/null
+++ b/openssl/src/opaque.rs
@@ -0,0 +1,6 @@
+use std::cell::UnsafeCell;
+
+/// This is intended to be used as the inner type for types designed to be pointed to by references
+/// converted from raw C pointers. It has an `UnsafeCell` internally to inform the compiler about
+/// aliasability and doesn't implement `Copy`, so it can't be dereferenced.
+pub struct Opaque(UnsafeCell<()>);