Skip to main content

Succ

Struct Succ 

Source
pub struct Succ<N>(/* private fields */);
Expand description

Type-level successor.

Represents the natural number N + 1 where N is another Unsigned.

§Examples

Trait Implementations§

Source§

impl<T: AsDeref<N, Target: Deref> + ?Sized, N: Unsigned> AsDeref<Succ<N>> for T

Source§

type Target = <<T as AsDeref<N>>::Target as Deref>::Target

The target type after N dereferences.
Source§

fn as_deref(&self) -> &Self::Target

Dereferences self N times.
Source§

impl<T: AsDerefMut<N, Target: DerefMut> + ?Sized, N: Unsigned> AsDerefMut<Succ<N>> for T

Source§

fn as_deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences self N times.
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsDeref<Zero> for T
where T: ?Sized,

Source§

type Target = T

The target type after N dereferences.
Source§

fn as_deref(&self) -> &T

Dereferences self N times.
Source§

impl<T, N> AsDerefCoinductive<Succ<N>> for T
where T: Deref + ?Sized, <T as Deref>::Target: AsDerefCoinductive<N>, N: Unsigned,

Source§

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

Dereferences self N times.
Source§

impl<T> AsDerefCoinductive<Zero> for T
where T: ?Sized,

Source§

type Target = T

The target type after N dereferences.
Source§

fn as_deref_coinductive(&self) -> &T

Dereferences self N times.
Source§

impl<T> AsDerefMut<Zero> for T
where T: ?Sized,

Source§

fn as_deref_mut(&mut self) -> &mut T

Mutably dereferences self N times.
Source§

impl<T, N> AsDerefMutCoinductive<Succ<N>> for T

Source§

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 T
where T: ?Sized,

Source§

fn as_deref_mut_coinductive(&mut self) -> &mut T

Mutably dereferences self N times.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.