diff --git a/rust/kernel/types.rs b/rust/kernel/types.rs index 9e7ca066355cd5..e2f3ab11cfda22 100644 --- a/rust/kernel/types.rs +++ b/rust/kernel/types.rs @@ -461,6 +461,15 @@ impl Drop for ARef { } /// A sum type that always holds either a value of type `L` or `R`. +/// +/// # Examples +/// +/// ``` +/// use kernel::types::Either; +/// +/// let left_value: Either = Either::Left(7); +/// let right_value: Either = Either::Right("right value"); +/// ``` pub enum Either { /// Constructs an instance of [`Either`] containing a value of type `L`. Left(L),