use crate::primitives::{Cons, ConstStream, GetTail, HashStream};
use crate::primitives::{X0, X1, X2, X3, X4, X5};
use crate::primitives::const_utils::TypeMarker;
use crate::capability::Capability;
pub struct IsClone;
impl Capability for IsClone {
type Stream = Cons<X0, ConstStream<X0>>;
type Identity = TypeMarker<Self>;
type At<D> = <<Self::Stream as GetTail<D>>::Out as HashStream>::Head
where
Self::Stream: GetTail<D>;
}
pub struct IsCopy;
impl Capability for IsCopy {
type Stream = Cons<X1, ConstStream<X0>>;
type Identity = TypeMarker<Self>;
type At<D> = <<Self::Stream as GetTail<D>>::Out as HashStream>::Head
where
Self::Stream: GetTail<D>;
}
pub struct IsDebug;
impl Capability for IsDebug {
type Stream = Cons<X2, ConstStream<X0>>;
type Identity = TypeMarker<Self>;
type At<D> = <<Self::Stream as GetTail<D>>::Out as HashStream>::Head
where
Self::Stream: GetTail<D>;
}
pub struct IsDefault;
impl Capability for IsDefault {
type Stream = Cons<X3, ConstStream<X0>>;
type Identity = TypeMarker<Self>;
type At<D> = <<Self::Stream as GetTail<D>>::Out as HashStream>::Head
where
Self::Stream: GetTail<D>;
}
pub struct IsSend;
impl Capability for IsSend {
type Stream = Cons<X4, ConstStream<X0>>;
type Identity = TypeMarker<Self>;
type At<D> = <<Self::Stream as GetTail<D>>::Out as HashStream>::Head
where
Self::Stream: GetTail<D>;
}
pub struct IsSync;
impl Capability for IsSync {
type Stream = Cons<X5, ConstStream<X0>>;
type Identity = TypeMarker<Self>;
type At<D> = <<Self::Stream as GetTail<D>>::Out as HashStream>::Head
where
Self::Stream: GetTail<D>;
}
pub type EmptyStream = ConstStream<X0>;