Trait GetValue

Source
pub trait GetValue<T> {
    // Required method
    fn try_get(&self) -> Option<&T>;
}
Expand description

Helper trait to extract values from enums.

Required Methods§

Source

fn try_get(&self) -> Option<&T>

If the enum is T, then return the value. Otherwise, return None.

Implementors§

Source§

impl<Int> GetValue<bool> for Value<Int>

Source§

impl<Int, const DIM: usize> GetValue<ShapedArray<HashSet<Int>, DIM>> for ValueArray<Int, DIM>

Source§

impl<Int, const DIM: usize> GetValue<ShapedArray<Int, DIM>> for ValueArray<Int, DIM>

Source§

impl<Int: Integer> GetValue<HashSet<Int>> for Value<Int>

Source§

impl<Int: Integer> GetValue<Int> for Value<Int>

Source§

impl<Int: Integer, const DIM: usize> GetValue<ShapedArray<bool, DIM>> for ValueArray<Int, DIM>