pub enum TypeParam<const N: usize> {}Expand description
Marker type specifying one of multiple type parameters to map over
The const generic N is the zero-based index of the type parameter, not
counting lifetime parameters, but counting const generics.
For example, for a type Foo<'a, S, T>,
TypeParam<0>refers toSandTypeParam<1>refers toT
and for a type Foo<'a, const N: usize, S, const M: usize, T>,
TypeParam<1>refers toSandTypeParam<3>refers toT
Trait Implementations§
Source§impl<K, A, B> FuncMap<A, B, TypeParam<1>> for BTreeMap<K, A>where
K: Ord,
impl<K, A, B> FuncMap<A, B, TypeParam<1>> for BTreeMap<K, A>where
K: Ord,
Source§fn func_map<F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
fn func_map<F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
Applies the closure
f to self in a functorial waySource§fn func_map_over<Q, F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
Q: FuncMarker<P>,
fn func_map_over<Q, F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
Q: FuncMarker<P>,
Applies the closure
f to self in a functorial way, allowing explicit
specification of the marker type P Read moreSource§impl<K, A, B, S> FuncMap<A, B, TypeParam<1>> for HashMap<K, A, S>
impl<K, A, B, S> FuncMap<A, B, TypeParam<1>> for HashMap<K, A, S>
Source§fn func_map<F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
fn func_map<F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
Applies the closure
f to self in a functorial waySource§fn func_map_over<Q, F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
Q: FuncMarker<P>,
fn func_map_over<Q, F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
Q: FuncMarker<P>,
Applies the closure
f to self in a functorial way, allowing explicit
specification of the marker type P Read moreSource§impl<K, A, B> FuncMap<A, B, TypeParam<1>> for IntoIter<K, A>where
K: Ord,
impl<K, A, B> FuncMap<A, B, TypeParam<1>> for IntoIter<K, A>where
K: Ord,
Source§fn func_map<F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
fn func_map<F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
Applies the closure
f to self in a functorial waySource§fn func_map_over<Q, F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
Q: FuncMarker<P>,
fn func_map_over<Q, F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
Q: FuncMarker<P>,
Applies the closure
f to self in a functorial way, allowing explicit
specification of the marker type P Read moreSource§impl<K, A, B> FuncMap<A, B, TypeParam<1>> for IntoIter<K, A>
impl<K, A, B> FuncMap<A, B, TypeParam<1>> for IntoIter<K, A>
Source§fn func_map<F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
fn func_map<F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
Applies the closure
f to self in a functorial waySource§fn func_map_over<Q, F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
Q: FuncMarker<P>,
fn func_map_over<Q, F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
Q: FuncMarker<P>,
Applies the closure
f to self in a functorial way, allowing explicit
specification of the marker type P Read moreSource§impl<T, A, B> FuncMap<A, B, TypeParam<1>> for Result<T, A>
impl<T, A, B> FuncMap<A, B, TypeParam<1>> for Result<T, A>
Source§fn func_map<F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
fn func_map<F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
Applies the closure
f to self in a functorial waySource§fn func_map_over<Q, F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
Q: FuncMarker<P>,
fn func_map_over<Q, F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
Q: FuncMarker<P>,
Applies the closure
f to self in a functorial way, allowing explicit
specification of the marker type P Read moreSource§impl<B, T, U> FuncMap<T, U, TypeParam<1>> for ControlFlow<B, T>
impl<B, T, U> FuncMap<T, U, TypeParam<1>> for ControlFlow<B, T>
Source§type Output = ControlFlow<B, U>
type Output = ControlFlow<B, U>
The output type of the functorial mapping Read more
Source§fn func_map<F>(self, f: F) -> Self::Outputwhere
F: FnMut(T) -> U,
fn func_map<F>(self, f: F) -> Self::Outputwhere
F: FnMut(T) -> U,
Applies the closure
f to self in a functorial waySource§fn func_map_over<Q, F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
Q: FuncMarker<P>,
fn func_map_over<Q, F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
Q: FuncMarker<P>,
Applies the closure
f to self in a functorial way, allowing explicit
specification of the marker type P Read moreSource§impl<const N: usize> Ord for TypeParam<N>
impl<const N: usize> Ord for TypeParam<N>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<const N: usize> PartialOrd for TypeParam<N>
impl<const N: usize> PartialOrd for TypeParam<N>
Source§impl<K, A, B> TryFuncMap<A, B, TypeParam<1>> for BTreeMap<K, A>where
K: Ord,
impl<K, A, B> TryFuncMap<A, B, TypeParam<1>> for BTreeMap<K, A>where
K: Ord,
Source§impl<K, A, B, S> TryFuncMap<A, B, TypeParam<1>> for HashMap<K, A, S>
impl<K, A, B, S> TryFuncMap<A, B, TypeParam<1>> for HashMap<K, A, S>
Source§impl<K, A, B> TryFuncMap<A, B, TypeParam<1>> for IntoIter<K, A>where
K: Ord,
impl<K, A, B> TryFuncMap<A, B, TypeParam<1>> for IntoIter<K, A>where
K: Ord,
Source§impl<K, A, B> TryFuncMap<A, B, TypeParam<1>> for IntoIter<K, A>
impl<K, A, B> TryFuncMap<A, B, TypeParam<1>> for IntoIter<K, A>
Source§impl<T, A, B> TryFuncMap<A, B, TypeParam<1>> for Result<T, A>
impl<T, A, B> TryFuncMap<A, B, TypeParam<1>> for Result<T, A>
Source§impl<B, T, U> TryFuncMap<T, U, TypeParam<1>> for ControlFlow<B, T>
impl<B, T, U> TryFuncMap<T, U, TypeParam<1>> for ControlFlow<B, T>
Source§type Output = ControlFlow<B, U>
type Output = ControlFlow<B, U>
The output type of the functorial mapping Read more
Source§fn try_func_map<E, F>(self, f: F) -> Result<Self::Output, E>
fn try_func_map<E, F>(self, f: F) -> Result<Self::Output, E>
impl<const N: usize> Copy for TypeParam<N>
impl<const N: usize> Eq for TypeParam<N>
impl<const N: usize> FuncMarker<TypeParam<N>> for TypeParam<N>
impl<const N: usize> StructuralPartialEq for TypeParam<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for TypeParam<N>
impl<const N: usize> RefUnwindSafe for TypeParam<N>
impl<const N: usize> Send for TypeParam<N>
impl<const N: usize> Sync for TypeParam<N>
impl<const N: usize> Unpin for TypeParam<N>
impl<const N: usize> UnwindSafe for TypeParam<N>
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