Trait TupleRemove

Source
pub trait TupleRemove {
    // Provided method
    fn remove<const POS: usize>(self) -> Self::Output
       where Self: TupleRemoveExact<POS> + Sized { ... }
}
Expand description

Remove a value from a tuple.

Unlike TupleRemoveExact, this trait moves the const POS to a method, so it can be used with the help of type derivation without explicitly declaring the underlying trait.

§Example

use rs_std_ext::tuple::TupleRemove;

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

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

Provided Methods§

Source

fn remove<const POS: usize>(self) -> Self::Output
where Self: TupleRemoveExact<POS> + Sized,

Implementations on Foreign Types§

§

impl<A> TupleRemove for (A,)

§

impl<A, B> TupleRemove for (A, B)

§

impl<A, B, C> TupleRemove for (A, B, C)

§

impl<A, B, C, D> TupleRemove for (A, B, C, D)

§

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

§

impl<A, B, C, D, E, F> TupleRemove for (A, B, C, D, E, F)

§

impl<A, B, C, D, E, F, G> TupleRemove for (A, B, C, D, E, F, G)

§

impl<A, B, C, D, E, F, G, H> TupleRemove for (A, B, C, D, E, F, G, H)

§

impl<A, B, C, D, E, F, G, H, I> TupleRemove for (A, B, C, D, E, F, G, H, I)

§

impl<A, B, C, D, E, F, G, H, I, J> TupleRemove for (A, B, C, D, E, F, G, H, I, J)

Implementors§