|
|
@ -891,13 +891,13 @@ To do this in Rust, let’s create our own opaque types:
|
|
|
|
```rust
|
|
|
|
```rust
|
|
|
|
#[repr(C)]
|
|
|
|
#[repr(C)]
|
|
|
|
pub struct Foo {
|
|
|
|
pub struct Foo {
|
|
|
|
_data: [u8; 0],
|
|
|
|
_data: (),
|
|
|
|
_marker:
|
|
|
|
_marker:
|
|
|
|
core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
|
|
|
core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#[repr(C)]
|
|
|
|
#[repr(C)]
|
|
|
|
pub struct Bar {
|
|
|
|
pub struct Bar {
|
|
|
|
_data: [u8; 0],
|
|
|
|
_data: (),
|
|
|
|
_marker:
|
|
|
|
_marker:
|
|
|
|
core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
|
|
|
core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
|
|
|
}
|
|
|
|
}
|
|
|
|