1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
use crate::{NotVoid, StaticMaybe};

pub trait MaybeAnd<T, Rhs>: StaticMaybe<T>
where
    T: ?Sized,
    Rhs: StaticMaybe<T> + ?Sized
{
    type Output: StaticMaybe<T> + ?Sized;
}

impl<T> MaybeAnd<T, T> for T
where
    T: NotVoid + ?Sized
{
    type Output = T;
}
impl<T> MaybeAnd<T, ()> for T
where
    T: NotVoid + ?Sized
{
    type Output = ();
}
impl<T> MaybeAnd<T, T> for ()
where
    T: NotVoid + ?Sized
{
    type Output = ();
}
impl<T> MaybeAnd<T, ()> for ()
where
    T: NotVoid + ?Sized
{
    type Output = ();
}