pub struct HCons<H, T>(/* private fields */);Expand description
A cons cell for heterogeneous lists. HCons<H, T> prepends head H to tail T.
§Examples
use reflect_nat::{HNil, HCons, Z, S};
use reify_reflect_core::{Reflect, RuntimeValue};
// A list containing [1, 0] at the type level
type MyList = HCons<S<Z>, HCons<Z, HNil>>;
assert_eq!(
MyList::reflect(),
vec![RuntimeValue::Nat(1), RuntimeValue::Nat(0)]
);Trait Implementations§
Auto Trait Implementations§
impl<H, T> Freeze for HCons<H, T>
impl<H, T> RefUnwindSafe for HCons<H, T>where
H: RefUnwindSafe,
T: RefUnwindSafe,
impl<H, T> Send for HCons<H, T>
impl<H, T> Sync for HCons<H, T>
impl<H, T> Unpin for HCons<H, T>
impl<H, T> UnsafeUnpin for HCons<H, T>
impl<H, T> UnwindSafe for HCons<H, T>where
H: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more