use crate::{Either, Presentable};
pub trait PresentableExt {
fn left_presentable<B>(self) -> Either<Self, B>
where
B: Presentable,
Self: Sized;
fn right_presentable<A>(self) -> Either<A, Self>
where
A: Presentable,
Self: Sized;
}
impl<T> PresentableExt for T
where
T: Presentable,
{
fn left_presentable<B>(self) -> Either<Self, B>
where
B: Presentable,
Self: Sized,
{
Either::Left(self)
}
fn right_presentable<A>(self) -> Either<A, Self>
where
A: Presentable,
Self: Sized,
{
Either::Right(self)
}
}