nu-utils 0.112.1

Nushell utility functions
Documentation
use std::ops::Deref;

pub enum MultiLife<'out, 'local, T>
where
    'out: 'local,
    T: ?Sized,
{
    Out(&'out T),
    Local(&'local T),
}

impl<'out, 'local, T> Deref for MultiLife<'out, 'local, T>
where
    'out: 'local,
    T: ?Sized,
{
    type Target = T;

    fn deref(&self) -> &Self::Target {
        match *self {
            MultiLife::Out(x) => x,
            MultiLife::Local(x) => x,
        }
    }
}