linux-stable/rust
Wedson Almeida Filho b9ecf9b9ac rust: types: add `Opaque` type
Add the `Opaque` type, which is meant to be used with FFI objects
that are never interpreted by Rust code, e.g.:

    struct Waiter {
        completion: Opaque<bindings::completion>,
        next: *mut Waiter,
    }

It has the advantage that the objects don't have to be
zero-initialised before calling their init functions, making
the code performance closer to C.

Signed-off-by: Wedson Almeida Filho <wedsonaf@gmail.com>
[Reworded, adapted for upstream and applied latest changes]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-12-04 01:59:16 +01:00
..
alloc rust: alloc: add `Vec::try_with_capacity{,_in}()` constructors 2022-12-04 01:59:15 +01:00
bindings
kernel rust: types: add `Opaque` type 2022-12-04 01:59:16 +01:00
macros
.gitignore
Makefile rust: add `build_error` crate 2022-12-04 01:59:16 +01:00
bindgen_parameters
build_error.rs rust: add `build_error` crate 2022-12-04 01:59:16 +01:00
compiler_builtins.rs
exports.c rust: add `build_error` crate 2022-12-04 01:59:16 +01:00
helpers.c