Trait rs_std_ext::tuple::TupleRemoveExact

source ·
pub trait TupleRemoveExact<const POS: usize> {
    type Output;

    // Required method
    fn remove(self) -> Self::Output;
}
Expand description

Remove a value from a tuple.

This is internally used behind the TupleRemove trait for convenience.

However, if something goes wrong with the trait solver, this trait can also be used explicitly.

§Example

use rs_std_ext::tuple::TupleRemoveExact;

let x = (10u8, 'a', -5i32);
let y = <(u8, char, i32) as TupleRemoveExact<1>>::remove(x);

assert_eq!(y, (10u8, -5i32));

Required Associated Types§

Required Methods§

source

fn remove(self) -> Self::Output

Implementations on Foreign Types§

§

impl<A> TupleRemoveExact<0> for (A,)

§

type Output = ()

§

fn remove(self) -> Self::Output

§

impl<A, B> TupleRemoveExact<0> for (A, B)

§

type Output = (B,)

§

fn remove(self) -> Self::Output

§

impl<A, B> TupleRemoveExact<1> for (A, B)

§

type Output = (A,)

§

fn remove(self) -> Self::Output

§

impl<A, B, C> TupleRemoveExact<0> for (A, B, C)

§

type Output = (B, C)

§

fn remove(self) -> Self::Output

§

impl<A, B, C> TupleRemoveExact<1> for (A, B, C)

§

type Output = (A, C)

§

fn remove(self) -> Self::Output

§

impl<A, B, C> TupleRemoveExact<2> for (A, B, C)

§

type Output = (A, B)

§

fn remove(self) -> Self::Output

§

impl<A, B, C, D> TupleRemoveExact<0> for (A, B, C, D)

§

type Output = (B, C, D)

§

fn remove(self) -> Self::Output

§

impl<A, B, C, D> TupleRemoveExact<1> for (A, B, C, D)

§

type Output = (A, C, D)

§

fn remove(self) -> Self::Output

§

impl<A, B, C, D> TupleRemoveExact<2> for (A, B, C, D)

§

type Output = (A, B, D)

§

fn remove(self) -> Self::Output

§

impl<A, B, C, D> TupleRemoveExact<3> for (A, B, C, D)

§

type Output = (A, B, C)

§

fn remove(self) -> Self::Output

§

impl<A, B, C, D, E> TupleRemoveExact<0> for (A, B, C, D, E)

§

type Output = (B, C, D, E)

§

fn remove(self) -> Self::Output

§

impl<A, B, C, D, E> TupleRemoveExact<1> for (A, B, C, D, E)

§

type Output = (A, C, D, E)

§

fn remove(self) -> Self::Output

§

impl<A, B, C, D, E> TupleRemoveExact<2> for (A, B, C, D, E)

§

type Output = (A, B, D, E)

§

fn remove(self) -> Self::Output

§

impl<A, B, C, D, E> TupleRemoveExact<3> for (A, B, C, D, E)

§

type Output = (A, B, C, E)

§

fn remove(self) -> Self::Output

§

impl<A, B, C, D, E> TupleRemoveExact<4> for (A, B, C, D, E)

§

type Output = (A, B, C, D)

§

fn remove(self) -> Self::Output

Implementors§