pub struct S<N>(pub PhantomData<N>);Expand description
Type-level successor. S<N> represents N + 1.
§Examples
use reflect_nat::{Z, S};
use reify_reflect_core::{Reflect, RuntimeValue};
type One = S<Z>;
type Two = S<S<Z>>;
assert_eq!(One::reflect(), RuntimeValue::Nat(1));
assert_eq!(Two::reflect(), RuntimeValue::Nat(2));Tuple Fields§
§0: PhantomData<N>Trait Implementations§
impl<N> Copy for S<N>where
N: Copy,
Auto Trait Implementations§
impl<N> Freeze for S<N>
impl<N> RefUnwindSafe for S<N>where
N: RefUnwindSafe,
impl<N> Send for S<N>where
N: Send,
impl<N> Sync for S<N>where
N: Sync,
impl<N> Unpin for S<N>where
N: Unpin,
impl<N> UnsafeUnpin for S<N>
impl<N> UnwindSafe for S<N>where
N: 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