Trait lens_rs::traits::PrismRef [−][src]
A trait representing the optics behaves as the first-class pattern.
A Prism
can access the substructure may exist.
let mut x: (_, Result<_, ()>) = (1, Ok((2, 3))); *optics!(_1.Ok._1).pm_mut(&mut x)? *= 2; assert_eq!(optics!(_1.Ok._1).pm(x)?, 6);
Required methods
Loading content...Implementors
impl<'t, T: ?Sized, Pm> PrismRef<&'t T> for _ref<Pm> where
Pm: PrismRef<<&'t T as Deref>::Target>,
[src]
Pm: PrismRef<<&'t T as Deref>::Target>,
impl<'t, T: ?Sized, Pm> PrismRef<&'t mut T> for _mut<Pm> where
Pm: PrismRef<<&'t mut T as Deref>::Target>,
[src]
Pm: PrismRef<<&'t mut T as Deref>::Target>,
impl<K, Q: ?Sized, V, Tr> PrismRef<BTreeMap<K, V>> for _ix<&Q, Tr> where
K: Borrow<Q> + Ord,
Q: Ord,
Tr: PrismRef<V>,
[src]
K: Borrow<Q> + Ord,
Q: Ord,
Tr: PrismRef<V>,
impl<K, Q: ?Sized, V, Tr> PrismRef<HashMap<K, V, RandomState>> for _ix<&Q, Tr> where
K: Eq + Hash + Borrow<Q>,
Q: Eq + Hash,
Tr: PrismRef<V>,
[src]
K: Eq + Hash + Borrow<Q>,
Q: Eq + Hash,
Tr: PrismRef<V>,
impl<Pm> PrismRef<str> for _ix<Range<usize>, Pm> where
Pm: PrismRef<str>,
[src]
Pm: PrismRef<str>,
impl<Pm> PrismRef<str> for _ix<RangeFrom<usize>, Pm> where
Pm: PrismRef<str>,
[src]
Pm: PrismRef<str>,
impl<Pm> PrismRef<str> for _ix<RangeFull, Pm> where
Pm: PrismRef<str>,
[src]
Pm: PrismRef<str>,
impl<Pm> PrismRef<str> for _ix<RangeTo<usize>, Pm> where
Pm: PrismRef<str>,
[src]
Pm: PrismRef<str>,
impl<Pm> PrismRef<String> for _ix<Range<usize>, Pm> where
Pm: PrismRef<str>,
[src]
Pm: PrismRef<str>,
impl<Pm> PrismRef<String> for _ix<RangeFrom<usize>, Pm> where
Pm: PrismRef<str>,
[src]
Pm: PrismRef<str>,
impl<Pm> PrismRef<String> for _ix<RangeFull, Pm> where
Pm: PrismRef<str>,
[src]
Pm: PrismRef<str>,
impl<Pm> PrismRef<String> for _ix<RangeTo<usize>, Pm> where
Pm: PrismRef<str>,
[src]
Pm: PrismRef<str>,
impl<Pm, A> PrismRef<(A,)> for _0<Pm> where
Pm: PrismRef<A>,
[src]
Pm: PrismRef<A>,
impl<Pm, A> PrismRef<(A,)> for _both<Pm> where
Pm: PrismRef<A>,
[src]
Pm: PrismRef<A>,
impl<Pm, A, B> PrismRef<(A, B)> for _0<Pm> where
Pm: PrismRef<A>,
[src]
Pm: PrismRef<A>,
impl<Pm, A, B> PrismRef<(A, B)> for _1<Pm> where
Pm: PrismRef<B>,
[src]
Pm: PrismRef<B>,
impl<Pm, A, B, C> PrismRef<(A, B, C)> for _0<Pm> where
Pm: PrismRef<A>,
[src]
Pm: PrismRef<A>,
impl<Pm, A, B, C> PrismRef<(A, B, C)> for _1<Pm> where
Pm: PrismRef<B>,
[src]
Pm: PrismRef<B>,
impl<Pm, A, B, C> PrismRef<(A, B, C)> for _2<Pm> where
Pm: PrismRef<C>,
[src]
Pm: PrismRef<C>,
impl<Pm, A, B, C, D> PrismRef<(A, B, C, D)> for _0<Pm> where
Pm: PrismRef<A>,
[src]
Pm: PrismRef<A>,
impl<Pm, A, B, C, D> PrismRef<(A, B, C, D)> for _1<Pm> where
Pm: PrismRef<B>,
[src]
Pm: PrismRef<B>,
impl<Pm, A, B, C, D> PrismRef<(A, B, C, D)> for _2<Pm> where
Pm: PrismRef<C>,
[src]
Pm: PrismRef<C>,
impl<Pm, A, B, C, D> PrismRef<(A, B, C, D)> for _3<Pm> where
Pm: PrismRef<D>,
[src]
Pm: PrismRef<D>,
impl<Pm, A, B, C, D, E> PrismRef<(A, B, C, D, E)> for _0<Pm> where
Pm: PrismRef<A>,
[src]
Pm: PrismRef<A>,
impl<Pm, A, B, C, D, E> PrismRef<(A, B, C, D, E)> for _1<Pm> where
Pm: PrismRef<B>,
[src]
Pm: PrismRef<B>,
impl<Pm, A, B, C, D, E> PrismRef<(A, B, C, D, E)> for _2<Pm> where
Pm: PrismRef<C>,
[src]
Pm: PrismRef<C>,
impl<Pm, A, B, C, D, E> PrismRef<(A, B, C, D, E)> for _3<Pm> where
Pm: PrismRef<D>,
[src]
Pm: PrismRef<D>,
impl<Pm, A, B, C, D, E> PrismRef<(A, B, C, D, E)> for _4<Pm> where
Pm: PrismRef<E>,
[src]
Pm: PrismRef<E>,
impl<Pm, A, B, C, D, E, F> PrismRef<(A, B, C, D, E, F)> for _0<Pm> where
Pm: PrismRef<A>,
[src]
Pm: PrismRef<A>,
impl<Pm, A, B, C, D, E, F> PrismRef<(A, B, C, D, E, F)> for _1<Pm> where
Pm: PrismRef<B>,
[src]
Pm: PrismRef<B>,
impl<Pm, A, B, C, D, E, F> PrismRef<(A, B, C, D, E, F)> for _2<Pm> where
Pm: PrismRef<C>,
[src]
Pm: PrismRef<C>,
impl<Pm, A, B, C, D, E, F> PrismRef<(A, B, C, D, E, F)> for _3<Pm> where
Pm: PrismRef<D>,
[src]
Pm: PrismRef<D>,
impl<Pm, A, B, C, D, E, F> PrismRef<(A, B, C, D, E, F)> for _4<Pm> where
Pm: PrismRef<E>,
[src]
Pm: PrismRef<E>,
impl<Pm, A, B, C, D, E, F> PrismRef<(A, B, C, D, E, F)> for _5<Pm> where
Pm: PrismRef<F>,
[src]
Pm: PrismRef<F>,
impl<Pm, A, B, C, D, E, F, G> PrismRef<(A, B, C, D, E, F, G)> for _0<Pm> where
Pm: PrismRef<A>,
[src]
Pm: PrismRef<A>,
impl<Pm, A, B, C, D, E, F, G> PrismRef<(A, B, C, D, E, F, G)> for _1<Pm> where
Pm: PrismRef<B>,
[src]
Pm: PrismRef<B>,
impl<Pm, A, B, C, D, E, F, G> PrismRef<(A, B, C, D, E, F, G)> for _2<Pm> where
Pm: PrismRef<C>,
[src]
Pm: PrismRef<C>,
impl<Pm, A, B, C, D, E, F, G> PrismRef<(A, B, C, D, E, F, G)> for _3<Pm> where
Pm: PrismRef<D>,
[src]
Pm: PrismRef<D>,
impl<Pm, A, B, C, D, E, F, G> PrismRef<(A, B, C, D, E, F, G)> for _4<Pm> where
Pm: PrismRef<E>,
[src]
Pm: PrismRef<E>,
impl<Pm, A, B, C, D, E, F, G> PrismRef<(A, B, C, D, E, F, G)> for _5<Pm> where
Pm: PrismRef<F>,
[src]
Pm: PrismRef<F>,
impl<Pm, A, B, C, D, E, F, G> PrismRef<(A, B, C, D, E, F, G)> for _6<Pm> where
Pm: PrismRef<G>,
[src]
Pm: PrismRef<G>,
impl<Pm, T> PrismRef<Option<T>> for Some<Pm> where
Pm: PrismRef<T>,
[src]
Pm: PrismRef<T>,
impl<Pm, T, E> PrismRef<Result<T, E>> for Err<Pm> where
Pm: PrismRef<E>,
[src]
Pm: PrismRef<E>,
impl<Pm, T, E> PrismRef<Result<T, E>> for Ok<Pm> where
Pm: PrismRef<T>,
[src]
Pm: PrismRef<T>,
impl<T> PrismRef<T> for __
[src]
impl<T, Pm> PrismRef<[T]> for _ix<usize, Pm> where
Pm: PrismRef<T>,
[src]
Pm: PrismRef<T>,
impl<T, Pm> PrismRef<[T]> for _ix<Range<usize>, Pm> where
Pm: PrismRef<[T]>,
[src]
Pm: PrismRef<[T]>,
impl<T, Pm> PrismRef<[T]> for _ix<RangeFrom<usize>, Pm> where
Pm: PrismRef<[T]>,
[src]
Pm: PrismRef<[T]>,
impl<T, Pm> PrismRef<[T]> for _ix<RangeFull, Pm> where
Pm: PrismRef<[T]>,
[src]
Pm: PrismRef<[T]>,
impl<T, Pm> PrismRef<[T]> for _ix<RangeTo<usize>, Pm> where
Pm: PrismRef<[T]>,
[src]
Pm: PrismRef<[T]>,
impl<T, Pm> PrismRef<VecDeque<T>> for _ix<usize, Pm> where
Pm: PrismRef<T>,
[src]
Pm: PrismRef<T>,
impl<T, Pm> PrismRef<Vec<T, Global>> for _ix<usize, Pm> where
Pm: PrismRef<T>,
[src]
Pm: PrismRef<T>,
impl<T, Pm> PrismRef<Vec<T, Global>> for _ix<Range<usize>, Pm> where
Pm: PrismRef<[T]>,
[src]
Pm: PrismRef<[T]>,
impl<T, Pm> PrismRef<Vec<T, Global>> for _ix<RangeFrom<usize>, Pm> where
Pm: PrismRef<[T]>,
[src]
Pm: PrismRef<[T]>,
impl<T, Pm> PrismRef<Vec<T, Global>> for _ix<RangeFull, Pm> where
Pm: PrismRef<[T]>,
[src]
Pm: PrismRef<[T]>,
impl<T, Pm> PrismRef<Vec<T, Global>> for _ix<RangeTo<usize>, Pm> where
Pm: PrismRef<[T]>,
[src]
Pm: PrismRef<[T]>,
impl<T, Pm, const N: usize> PrismRef<[T; N]> for _ix<usize, Pm> where
Pm: PrismRef<T>,
[src]
Pm: PrismRef<T>,
impl<T, Pm, const N: usize> PrismRef<[T; N]> for _ix<Range<usize>, Pm> where
Pm: PrismRef<[T]>,
[src]
Pm: PrismRef<[T]>,
impl<T, Pm, const N: usize> PrismRef<[T; N]> for _ix<RangeFrom<usize>, Pm> where
Pm: PrismRef<[T]>,
[src]
Pm: PrismRef<[T]>,
impl<T, Pm, const N: usize> PrismRef<[T; N]> for _ix<RangeFull, Pm> where
Pm: PrismRef<[T]>,
[src]
Pm: PrismRef<[T]>,
impl<T, Pm, const N: usize> PrismRef<[T; N]> for _ix<RangeTo<usize>, Pm> where
Pm: PrismRef<[T]>,
[src]
Pm: PrismRef<[T]>,
impl<T: ?Sized, Pm> PrismRef<Box<T, Global>> for _box<Pm> where
Pm: PrismRef<<Box<T> as Deref>::Target>,
[src]
Pm: PrismRef<<Box<T> as Deref>::Target>,
impl<T: ?Sized, Pm> PrismRef<Rc<T>> for _arc<Pm> where
Pm: PrismRef<<Rc<T> as Deref>::Target>,
[src]
Pm: PrismRef<<Rc<T> as Deref>::Target>,
impl<T: ?Sized, Pm> PrismRef<Rc<T>> for _rc<Pm> where
Pm: PrismRef<<Rc<T> as Deref>::Target>,
[src]
Pm: PrismRef<<Rc<T> as Deref>::Target>,