I would like to know howOption, Option<&T> (i.e., Option.as_ref() from above code snippet) and Option<Box>are stored in memory to get a better understanding of the List code.
It depends. To recap, Option means it can be some type or nothing (aka None, as Rust calls it). So you need a value that means None. How it does this is technically an implementation detail, although it can be important.
Depending on how this is optimized, this might mean Option<T> is represent as, for example, (bool, T). Then to check if the Option is Some value or None, the bool is checked first.
In the case of Option<&T> there's an optimization because references in Rust can never be null. So instead of using a bool it can just test for the zero value to decide between Some or None.
In short, Option<&T> is represented the same as &T in memory except that Option<&T> can be null and &T can't.