summaryrefslogtreecommitdiff
path: root/rust/kernel/types.rs
blob: 3b0c44769708cbddf42c6f80835a5e66cce1ad86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// SPDX-License-Identifier: GPL-2.0

//! Kernel types.

/// A sum type that always holds either a value of type `L` or `R`.
pub enum Either<L, R> {
    /// Constructs an instance of [`Either`] containing a value of type `L`.
    Left(L),

    /// Constructs an instance of [`Either`] containing a value of type `R`.
    Right(R),
}