linux/rust
Wedson Almeida Filho ba20915bae rust: types: add Either type
Introduce the new `types` module of the `kernel` crate with
`Either` as its first type.

`Either<L, R>` is a sum type that always holds either a value
of type `L` (`Left` variant) or `R` (`Right` variant).

For instance:

    struct Executor {
        queue: Either<BoxedQueue, &'static Queue>,
    }

Signed-off-by: Wedson Almeida Filho <wedsonaf@gmail.com>
Reviewed-by: Wei Liu <wei.liu@kernel.org>
[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 rust: add bindings crate 2022-09-28 08:58:00 +02:00
kernel rust: types: add Either type 2022-12-04 01:59:16 +01:00
macros rust: macros: take string literals in module! 2022-12-04 01:59:15 +01:00
.gitignore Kbuild: add Rust support 2022-09-28 09:02:20 +02:00
bindgen_parameters Kbuild: add Rust support 2022-09-28 09:02:20 +02:00
build_error.rs rust: add build_error crate 2022-12-04 01:59:16 +01:00
compiler_builtins.rs rust: add compiler_builtins crate 2022-09-28 08:58:00 +02:00
exports.c rust: add build_error crate 2022-12-04 01:59:16 +01:00
helpers.c
Makefile rust: add build_error crate 2022-12-04 01:59:16 +01:00