# Const Either Some types to allow deciding at compile time if an option contains a value or which variant from the either type is active. This might be useful when you have some const generic type that should decide whether to use one datastructure or another, or no datastructure at all. ## Syntax ```rust let _definetly_none = ConstOption::::new(); let definetly_some = ConstOption::::new("hello, world".to_string()); // When there is definitely some value, the deref trait can be used. println!("{}", &*definitely_some); // Obtain the string inside. let contained_string = definitely_some.into_inner(); struct Container { data: ConstEither, HashSet, UNIQUE>, } impl Container { fn insert(&mut self, val: T) { /* ... */ } } impl Container { fn insert(&mut self, val: T) -> Result<(), T> { /* ... */ } } ``` ## Drawbacks Because of the current state of rust, the type `ConstEither` **will have the size and alignment of the largest** from `L` and `R`.