#![doc(hidden)]
use crate::core::*;
pub trait OperType {
const OPER: OperKind;
type Type: ComponentId;
}
impl<T> OperType for &mut T
where
T: ComponentId,
{
type Type = T;
const OPER: OperKind = OperKind::And;
}
impl<T> OperType for &T
where
T: ComponentId,
{
type Type = T;
const OPER: OperKind = OperKind::And;
}
impl<T> OperType for Option<&T>
where
T: ComponentId,
{
type Type = T;
const OPER: OperKind = OperKind::Optional;
}
impl<T> OperType for Option<&mut T>
where
T: ComponentId,
{
type Type = T;
const OPER: OperKind = OperKind::Optional;
}