Trait std::either::AsEither

pub trait AsEither<L, R> {
    fn as_either<'a>(&'a self) -> Either<&'a L, &'a R>;
}

A generic trait for converting a value to a Either

Required Methods

fn as_either<'a>(&'a self) -> Either<&'a L, &'a R>

Convert to the either type

Implementors