• Wedson Almeida Filho's avatar
    rust: types: add `Opaque` type · b9ecf9b9
    Wedson Almeida Filho authored
    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: default avatarWedson Almeida Filho <wedsonaf@gmail.com>
    [Reworded, adapted for upstream and applied latest changes]
    Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
    b9ecf9b9
types.rs 988 Bytes