pub struct Succ<N>(/* private fields */);Expand description
Type-level successor.
Represents the natural number N + 1 where N is another Unsigned.
§Examples
Zero= 0Succ<Zero>= 1Succ<Succ<Zero>>= 2
Trait Implementations§
Source§impl<T: AsDerefMut<N, Target: DerefMut> + ?Sized, N: Unsigned> AsDerefMut<Succ<N>> for T
impl<T: AsDerefMut<N, Target: DerefMut> + ?Sized, N: Unsigned> AsDerefMut<Succ<N>> for T
Source§fn as_deref_mut(&mut self) -> &mut Self::Target
fn as_deref_mut(&mut self) -> &mut Self::Target
Mutably dereferences self
N times.impl<N: Unsigned> Unsigned for Succ<N>
Auto Trait Implementations§
impl<N> Freeze for Succ<N>
impl<N> RefUnwindSafe for Succ<N>where
N: RefUnwindSafe,
impl<N> Send for Succ<N>where
N: Send,
impl<N> Sync for Succ<N>where
N: Sync,
impl<N> Unpin for Succ<N>where
N: Unpin,
impl<N> UnsafeUnpin for Succ<N>
impl<N> UnwindSafe for Succ<N>where
N: UnwindSafe,
Blanket Implementations§
Source§impl<T, N> AsDerefCoinductive<Succ<N>> for T
impl<T, N> AsDerefCoinductive<Succ<N>> for T
Source§type Target = <<T as Deref>::Target as AsDerefCoinductive<N>>::Target
type Target = <<T as Deref>::Target as AsDerefCoinductive<N>>::Target
The target type after
N dereferences.Source§fn as_deref_coinductive(&self) -> &<T as AsDerefCoinductive<Succ<N>>>::Target
fn as_deref_coinductive(&self) -> &<T as AsDerefCoinductive<Succ<N>>>::Target
Dereferences self
N times.Source§impl<T> AsDerefCoinductive<Zero> for Twhere
T: ?Sized,
impl<T> AsDerefCoinductive<Zero> for Twhere
T: ?Sized,
Source§impl<T> AsDerefMut<Zero> for Twhere
T: ?Sized,
impl<T> AsDerefMut<Zero> for Twhere
T: ?Sized,
Source§fn as_deref_mut(&mut self) -> &mut T
fn as_deref_mut(&mut self) -> &mut T
Mutably dereferences self
N times.Source§impl<T, N> AsDerefMutCoinductive<Succ<N>> for T
impl<T, N> AsDerefMutCoinductive<Succ<N>> for T
Source§fn as_deref_mut_coinductive(
&mut self,
) -> &mut <T as AsDerefCoinductive<Succ<N>>>::Target
fn as_deref_mut_coinductive( &mut self, ) -> &mut <T as AsDerefCoinductive<Succ<N>>>::Target
Mutably dereferences self
N times.Source§impl<T> AsDerefMutCoinductive<Zero> for Twhere
T: ?Sized,
impl<T> AsDerefMutCoinductive<Zero> for Twhere
T: ?Sized,
Source§fn as_deref_mut_coinductive(&mut self) -> &mut T
fn as_deref_mut_coinductive(&mut self) -> &mut T
Mutably dereferences self
N times.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