pub struct IndexedLensPrime<'a, PointerBrand, I, S, A>where
PointerBrand: ToDynCloneFn,
I: 'a,
S: 'a,
A: 'a,{ /* private fields */ }Expand description
A monomorphic indexed lens.
§Type Parameters
'a: The lifetime of the values.PointerBrand: The reference-counted pointer type.I: The index type.S: The type of the structure.A: The type of the focus.
Implementations§
Source§impl<'a, PointerBrand, I: 'a, S: 'a, A: 'a> IndexedLensPrime<'a, PointerBrand, I, S, A>where
PointerBrand: ToDynCloneFn,
§Type Parameters
'a: The lifetime of the values.
PointerBrand: The reference-counted pointer type.
I: The index type.
S: The type of the structure.
A: The type of the focus.
impl<'a, PointerBrand, I: 'a, S: 'a, A: 'a> IndexedLensPrime<'a, PointerBrand, I, S, A>where
PointerBrand: ToDynCloneFn,
§Type Parameters
'a: The lifetime of the values.PointerBrand: The reference-counted pointer type.I: The index type.S: The type of the structure.A: The type of the focus.
Sourcepub fn new(
to: impl 'a + Fn(S) -> ((I, A), <FnBrand<PointerBrand> as CloneFn>::Of<'a, A, S>),
) -> Self
pub fn new( to: impl 'a + Fn(S) -> ((I, A), <FnBrand<PointerBrand> as CloneFn>::Of<'a, A, S>), ) -> Self
Create a new monomorphic indexed lens.
§Type Signature
forall PointerBrand I S A. ToDynCloneFn PointerBrand => (S -> ((I, A), Fn PointerBrand A S)) -> IndexedLensPrime PointerBrand I S A
§Parameters
to: The getter/setter pair function.
§Returns
A new IndexedLensPrime instance.
§Examples
use fp_library::{
brands::{
FnBrand,
RcBrand,
},
classes::*,
types::optics::IndexedLensPrime,
};
let l: IndexedLensPrime<RcBrand, usize, i32, i32> =
IndexedLensPrime::new(|x| ((0, x), <FnBrand<RcBrand> as LiftFn>::new(|s| s)));
assert_eq!(l.iview(42), (0, 42));Sourcepub fn from_iview_set(
iview: impl 'a + Fn(S) -> (I, A),
set: impl 'a + Fn((S, A)) -> S,
) -> Selfwhere
S: Clone,
pub fn from_iview_set(
iview: impl 'a + Fn(S) -> (I, A),
set: impl 'a + Fn((S, A)) -> S,
) -> Selfwhere
S: Clone,
Create a new monomorphic indexed lens from an indexed getter and setter.
§Type Signature
forall PointerBrand I S A. ToDynCloneFn PointerBrand => (S -> (I, A), (S, A) -> S) -> IndexedLensPrime PointerBrand I S A
§Parameters
iview: The indexed getter function.set: The setter function.
§Returns
A new IndexedLensPrime instance.
§Examples
use fp_library::{
brands::RcBrand,
types::optics::IndexedLensPrime,
};
let l: IndexedLensPrime<RcBrand, usize, i32, i32> =
IndexedLensPrime::from_iview_set(|x| (0, x), |(_, y)| y);
assert_eq!(l.iview(10), (0, 10));Sourcepub fn iview(&self, s: S) -> (I, A)
pub fn iview(&self, s: S) -> (I, A)
View the focus and its index.
§Type Signature
forall PointerBrand I S A. ToDynCloneFn PointerBrand => (&IndexedLensPrime PointerBrand I S A, S) -> (I, A)
§Parameters
&self: The indexed lens instance.s: The structure to view.
§Returns
The focus value and its index.
§Examples
use fp_library::{
brands::RcBrand,
types::optics::IndexedLensPrime,
};
let l: IndexedLensPrime<RcBrand, usize, i32, i32> =
IndexedLensPrime::from_iview_set(|x| (0, x), |(_, y)| y);
assert_eq!(l.iview(42), (0, 42));Sourcepub fn set(&self, s: S, a: A) -> S
pub fn set(&self, s: S, a: A) -> S
Set the focus.
§Type Signature
forall PointerBrand I S A. ToDynCloneFn PointerBrand => (&IndexedLensPrime PointerBrand I S A, S, A) -> S
§Parameters
&self: The indexed lens instance.s: The structure to update.a: The new focus value.
§Returns
The updated structure.
§Examples
use fp_library::{
brands::RcBrand,
types::optics::IndexedLensPrime,
};
let l: IndexedLensPrime<RcBrand, usize, i32, i32> =
IndexedLensPrime::from_iview_set(|x| (0, x), |(_, y)| y);
assert_eq!(l.set(10, 20), 20);Sourcepub fn over(&self, s: S, f: impl Fn(I, A) -> A) -> S
pub fn over(&self, s: S, f: impl Fn(I, A) -> A) -> S
Update the focus using an indexed function.
§Type Signature
forall PointerBrand I S A. ToDynCloneFn PointerBrand => (&IndexedLensPrime PointerBrand I S A, S, (I, A) -> A) -> S
§Parameters
&self: The indexed lens instance.s: The structure to update.f: The function to apply to the focus.
§Returns
The updated structure.
§Examples
use fp_library::{
brands::RcBrand,
types::optics::IndexedLensPrime,
};
let l: IndexedLensPrime<RcBrand, usize, i32, i32> =
IndexedLensPrime::from_iview_set(|x| (10, x), |(_, y)| y);
assert_eq!(l.over(10, |i, x| x + (i as i32)), 20);Trait Implementations§
Source§impl<'a, PointerBrand, I, S, A> Clone for IndexedLensPrime<'a, PointerBrand, I, S, A>where
PointerBrand: ToDynCloneFn,
I: 'a,
S: 'a,
A: 'a,
§Type Parameters
'a: The lifetime of the values.
PointerBrand: The reference-counted pointer type.
I: The index type.
S: The type of the structure.
A: The type of the focus.
impl<'a, PointerBrand, I, S, A> Clone for IndexedLensPrime<'a, PointerBrand, I, S, A>where
PointerBrand: ToDynCloneFn,
I: 'a,
S: 'a,
A: 'a,
§Type Parameters
'a: The lifetime of the values.PointerBrand: The reference-counted pointer type.I: The index type.S: The type of the structure.A: The type of the focus.
Source§fn clone(&self) -> Self
fn clone(&self) -> Self
§Type Signature
forall PointerBrand I S A. ToDynCloneFn PointerBrand => &IndexedLensPrime PointerBrand I S A -> IndexedLensPrime PointerBrand I S A
§Returns
A new IndexedLensPrime instance that is a copy of the original.
§Examples
use fp_library::{
brands::RcBrand,
types::optics::IndexedLensPrime,
};
let l: IndexedLensPrime<RcBrand, usize, i32, i32> =
IndexedLensPrime::from_iview_set(|x| (0, x), |(_, y)| y);
let cloned = l.clone();
assert_eq!(cloned.iview(42), (0, 42));1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a, PointerBrand, I: 'a, S: 'a, A: 'a> IndexedFoldOptic<'a, I, S, A> for IndexedLensPrime<'a, PointerBrand, I, S, A>where
PointerBrand: ToDynCloneFn,
§Type Parameters
'a: The lifetime of the values.
PointerBrand: The reference-counted pointer type.
I: The index type.
S: The type of the structure.
A: The type of the focus.
impl<'a, PointerBrand, I: 'a, S: 'a, A: 'a> IndexedFoldOptic<'a, I, S, A> for IndexedLensPrime<'a, PointerBrand, I, S, A>where
PointerBrand: ToDynCloneFn,
§Type Parameters
'a: The lifetime of the values.PointerBrand: The reference-counted pointer type.I: The index type.S: The type of the structure.A: The type of the focus.
Source§fn evaluate<R: 'a + Monoid + 'static, Q: ToDynCloneFn + 'static>(
&self,
pab: Indexed<'a, ForgetBrand<Q, R>, I, A, A>,
) -> <ForgetBrand<Q, R> as Kind_266801a817966495>::Of<'a, S, S>
fn evaluate<R: 'a + Monoid + 'static, Q: ToDynCloneFn + 'static>( &self, pab: Indexed<'a, ForgetBrand<Q, R>, I, A, A>, ) -> <ForgetBrand<Q, R> as Kind_266801a817966495>::Of<'a, S, S>
§Type Signature
forall PointerBrand I S A R Q. (Monoid R, ToDynCloneFn Q, ToDynCloneFn PointerBrand) => (&IndexedLensPrime PointerBrand I S A, Indexed (Forget Q R) I A A) -> Forget Q R S S
§Type Parameters
R: The monoid type.Q: The reference-counted pointer type.
§Parameters
&self: The indexed lens instance.pab: The indexed profunctor value to transform.
§Returns
The transformed profunctor value.
§Examples
use fp_library::{
brands::{
optics::*,
*,
},
classes::optics::*,
types::optics::*,
};
let l: IndexedLensPrime<RcBrand, usize, i32, i32> =
IndexedLensPrime::from_iview_set(|x| (0, x), |(_, y)| y);
let f = Forget::<RcBrand, String, (usize, i32), i32>::new(|(i, x)| format!("[{}]={}", i, x));
let pab = Indexed::new(f);
let result = IndexedFoldOptic::evaluate::<String, RcBrand>(&l, pab);
assert_eq!(result.run(42), "[0]=42");Source§impl<'a, PointerBrand, I: 'a, S: 'a, A: 'a> IndexedGetterOptic<'a, I, S, A> for IndexedLensPrime<'a, PointerBrand, I, S, A>where
PointerBrand: ToDynCloneFn,
§Type Parameters
'a: The lifetime of the values.
PointerBrand: The reference-counted pointer type.
I: The index type.
S: The type of the structure.
A: The type of the focus.
impl<'a, PointerBrand, I: 'a, S: 'a, A: 'a> IndexedGetterOptic<'a, I, S, A> for IndexedLensPrime<'a, PointerBrand, I, S, A>where
PointerBrand: ToDynCloneFn,
§Type Parameters
'a: The lifetime of the values.PointerBrand: The reference-counted pointer type.I: The index type.S: The type of the structure.A: The type of the focus.
Source§fn evaluate<R: 'a + 'static, Q: ToDynCloneFn + 'static>(
&self,
pab: Indexed<'a, ForgetBrand<Q, R>, I, A, A>,
) -> <ForgetBrand<Q, R> as Kind_266801a817966495>::Of<'a, S, S>
fn evaluate<R: 'a + 'static, Q: ToDynCloneFn + 'static>( &self, pab: Indexed<'a, ForgetBrand<Q, R>, I, A, A>, ) -> <ForgetBrand<Q, R> as Kind_266801a817966495>::Of<'a, S, S>
§Type Signature
forall PointerBrand I S A R Q. (ToDynCloneFn Q, ToDynCloneFn PointerBrand) => (&IndexedLensPrime PointerBrand I S A, Indexed (Forget Q R) I A A) -> Forget Q R S S
§Type Parameters
R: The result type.Q: The reference-counted pointer type.
§Parameters
&self: The indexed lens instance.pab: The indexed profunctor value to transform.
§Returns
The transformed profunctor value.
§Examples
use fp_library::{
brands::{
optics::*,
*,
},
classes::optics::*,
types::optics::*,
};
let l: IndexedLensPrime<RcBrand, usize, i32, i32> =
IndexedLensPrime::from_iview_set(|x| (0, x), |(_, y)| y);
let f = Forget::<RcBrand, i32, (usize, i32), i32>::new(|(i, x)| x + (i as i32));
let pab = Indexed::new(f);
let result = IndexedGetterOptic::evaluate::<i32, RcBrand>(&l, pab);
assert_eq!(result.run(42), 42);Source§impl<'a, PointerBrand, I: 'a, S: 'a, A: 'a> IndexedLensOptic<'a, I, S, S, A, A> for IndexedLensPrime<'a, PointerBrand, I, S, A>where
PointerBrand: ToDynCloneFn,
§Type Parameters
'a: The lifetime of the values.
PointerBrand: The reference-counted pointer type.
I: The index type.
S: The type of the structure.
A: The type of the focus.
impl<'a, PointerBrand, I: 'a, S: 'a, A: 'a> IndexedLensOptic<'a, I, S, S, A, A> for IndexedLensPrime<'a, PointerBrand, I, S, A>where
PointerBrand: ToDynCloneFn,
§Type Parameters
'a: The lifetime of the values.PointerBrand: The reference-counted pointer type.I: The index type.S: The type of the structure.A: The type of the focus.
Source§fn evaluate<Q: Strong>(
&self,
pab: Indexed<'a, Q, I, A, A>,
) -> <Q as Kind_266801a817966495>::Of<'a, S, S>
fn evaluate<Q: Strong>( &self, pab: Indexed<'a, Q, I, A, A>, ) -> <Q as Kind_266801a817966495>::Of<'a, S, S>
§Type Signature
forall PointerBrand I S A Q. (Strong Q, ToDynCloneFn PointerBrand) => (&IndexedLensPrime PointerBrand I S A, Indexed Q I A A) -> Q S S
§Type Parameters
Q: The profunctor type.
§Parameters
&self: The indexed lens instance.pab: The indexed profunctor value to transform.
§Returns
The transformed profunctor value.
§Examples
use fp_library::{
brands::{
optics::*,
*,
},
classes::optics::*,
types::optics::*,
};
let l: IndexedLensPrime<RcBrand, usize, i32, i32> =
IndexedLensPrime::from_iview_set(|x| (0, x), |(_, y)| y);
let f = std::rc::Rc::new(|(i, x): (usize, i32)| x + (i as i32))
as std::rc::Rc<dyn Fn((usize, i32)) -> i32>;
let pab = Indexed::<RcFnBrand, _, _, _>::new(f);
let result: std::rc::Rc<dyn Fn(i32) -> i32> = IndexedLensOptic::evaluate::<RcFnBrand>(&l, pab);
assert_eq!(result(42), 42);Source§impl<'a, P: Strong, I: 'a, S: 'a, A: 'a, PointerBrand> IndexedOpticAdapter<'a, P, I, S, S, A, A> for IndexedLensPrime<'a, PointerBrand, I, S, A>where
PointerBrand: ToDynCloneFn,
§Type Parameters
'a: The lifetime of the values.
P: The profunctor type.
I: The index type.
S: The source type of the structure.
A: The source type of the focus.
PointerBrand: The optic type.
impl<'a, P: Strong, I: 'a, S: 'a, A: 'a, PointerBrand> IndexedOpticAdapter<'a, P, I, S, S, A, A> for IndexedLensPrime<'a, PointerBrand, I, S, A>where
PointerBrand: ToDynCloneFn,
§Type Parameters
'a: The lifetime of the values.P: The profunctor type.I: The index type.S: The source type of the structure.A: The source type of the focus.PointerBrand: The optic type.
Source§fn evaluate_indexed(
&self,
pab: Indexed<'a, P, I, A, A>,
) -> <P as Kind_266801a817966495>::Of<'a, S, S>
fn evaluate_indexed( &self, pab: Indexed<'a, P, I, A, A>, ) -> <P as Kind_266801a817966495>::Of<'a, S, S>
§Type Signature
forall P I S A PointerBrand. (Strong P, ToDynCloneFn PointerBrand) => (&IndexedLensPrime P I S A PointerBrand, Indexed P I A A) -> P S S
§Parameters
&self: The indexed lens instance.pab: The indexed profunctor value.
§Returns
The transformed profunctor value.
§Examples
use fp_library::{
brands::{
RcBrand,
RcFnBrand,
optics::*,
},
functions::*,
types::optics::*,
};
let l: IndexedLensPrime<RcBrand, usize, (i32, String), i32> =
IndexedLensPrime::from_iview_set(|(x, _)| (0, x), |((_, s), x)| (x, s));
let result = optics_indexed_view::<RcBrand, _, _, _>(&l, (42, "hi".to_string()));
assert_eq!(result, (0, 42));Source§impl<'a, P: Strong, I: 'a, S: 'a, A: 'a, PointerBrand> IndexedOpticAdapterDiscardsFocus<'a, P, I, S, S, A, A> for IndexedLensPrime<'a, PointerBrand, I, S, A>where
PointerBrand: ToDynCloneFn,
§Type Parameters
'a: The lifetime of the values.
P: The profunctor type.
I: The index type.
S: The source type of the structure.
A: The source type of the focus.
PointerBrand: The optic type.
impl<'a, P: Strong, I: 'a, S: 'a, A: 'a, PointerBrand> IndexedOpticAdapterDiscardsFocus<'a, P, I, S, S, A, A> for IndexedLensPrime<'a, PointerBrand, I, S, A>where
PointerBrand: ToDynCloneFn,
§Type Parameters
'a: The lifetime of the values.P: The profunctor type.I: The index type.S: The source type of the structure.A: The source type of the focus.PointerBrand: The optic type.
Source§fn evaluate_indexed_discards_focus(
&self,
pab: Indexed<'a, P, I, A, A>,
) -> <P as Kind_266801a817966495>::Of<'a, S, S>
fn evaluate_indexed_discards_focus( &self, pab: Indexed<'a, P, I, A, A>, ) -> <P as Kind_266801a817966495>::Of<'a, S, S>
§Type Signature
forall P I S A PointerBrand. (Strong P, ToDynCloneFn PointerBrand) => (&IndexedLensPrime P I S A PointerBrand, Indexed P I A A) -> P S S
§Parameters
&self: The indexed lens instance.pab: The indexed profunctor value.
§Returns
The transformed profunctor value.
§Examples
use fp_library::{
brands::{
RcBrand,
RcFnBrand,
optics::*,
},
functions::*,
types::optics::*,
};
let l: IndexedLensPrime<RcBrand, usize, (i32, String), i32> =
IndexedLensPrime::from_iview_set(|(x, _)| (10, x), |((_, s), x)| (x, s));
let result = optics_indexed_fold_map::<RcBrand, _, _, _, String>(
&l,
|i, _| format!("{}", i),
(42, "hi".to_string()),
);
assert_eq!(result, "10");Source§impl<'a, Q, I: 'a, S: 'a, A: 'a, PointerBrand> IndexedSetterOptic<'a, Q, I, S, S, A, A> for IndexedLensPrime<'a, PointerBrand, I, S, A>where
PointerBrand: ToDynCloneFn,
Q: ToDynCloneFn,
§Type Parameters
'a: The lifetime of the values.
Q: The reference-counted pointer type for the setter brand.
I: The index type.
S: The type of the structure.
A: The type of the focus.
PointerBrand: The reference-counted pointer type for the lens.
impl<'a, Q, I: 'a, S: 'a, A: 'a, PointerBrand> IndexedSetterOptic<'a, Q, I, S, S, A, A> for IndexedLensPrime<'a, PointerBrand, I, S, A>where
PointerBrand: ToDynCloneFn,
Q: ToDynCloneFn,
§Type Parameters
'a: The lifetime of the values.Q: The reference-counted pointer type for the setter brand.I: The index type.S: The type of the structure.A: The type of the focus.PointerBrand: The reference-counted pointer type for the lens.
Source§fn evaluate(
&self,
pab: Indexed<'a, FnBrand<Q>, I, A, A>,
) -> <FnBrand<Q> as Kind_266801a817966495>::Of<'a, S, S>
fn evaluate( &self, pab: Indexed<'a, FnBrand<Q>, I, A, A>, ) -> <FnBrand<Q> as Kind_266801a817966495>::Of<'a, S, S>
§Type Signature
forall Q I S A PointerBrand. (ToDynCloneFn PointerBrand, ToDynCloneFn Q) => (&IndexedLensPrime Q I S A PointerBrand, Indexed (Fn Q) I A A) -> Fn Q S S
§Parameters
&self: The indexed lens instance.pab: The indexed profunctor value to transform.
§Returns
The transformed profunctor value.
§Examples
use fp_library::{
brands::{
optics::*,
*,
},
classes::optics::*,
types::optics::*,
};
let l: IndexedLensPrime<RcBrand, usize, i32, i32> =
IndexedLensPrime::from_iview_set(|x| (0, x), |(_, y)| y);
let f = std::rc::Rc::new(|(i, x): (usize, i32)| x + (i as i32))
as std::rc::Rc<dyn Fn((usize, i32)) -> i32>;
let pab = Indexed::<RcFnBrand, _, _, _>::new(f);
let result: std::rc::Rc<dyn Fn(i32) -> i32> = IndexedSetterOptic::evaluate(&l, pab);
assert_eq!(result(42), 42);Source§impl<'a, PointerBrand, I: 'a, S: 'a, A: 'a> IndexedTraversalOptic<'a, I, S, S, A, A> for IndexedLensPrime<'a, PointerBrand, I, S, A>where
PointerBrand: ToDynCloneFn,
§Type Parameters
'a: The lifetime of the values.
PointerBrand: The reference-counted pointer type.
I: The index type.
S: The type of the structure.
A: The type of the focus.
impl<'a, PointerBrand, I: 'a, S: 'a, A: 'a> IndexedTraversalOptic<'a, I, S, S, A, A> for IndexedLensPrime<'a, PointerBrand, I, S, A>where
PointerBrand: ToDynCloneFn,
§Type Parameters
'a: The lifetime of the values.PointerBrand: The reference-counted pointer type.I: The index type.S: The type of the structure.A: The type of the focus.
Source§fn evaluate<Q: Wander>(
&self,
pab: Indexed<'a, Q, I, A, A>,
) -> <Q as Kind_266801a817966495>::Of<'a, S, S>
fn evaluate<Q: Wander>( &self, pab: Indexed<'a, Q, I, A, A>, ) -> <Q as Kind_266801a817966495>::Of<'a, S, S>
§Type Signature
forall PointerBrand I S A Q. (Wander Q, ToDynCloneFn PointerBrand) => (&IndexedLensPrime PointerBrand I S A, Indexed Q I A A) -> Q S S
§Type Parameters
Q: The profunctor type.
§Parameters
&self: The indexed lens instance.pab: The indexed profunctor value to transform.
§Returns
The transformed profunctor value.
§Examples
use fp_library::{
brands::{
optics::*,
*,
},
classes::optics::*,
types::optics::*,
};
let l: IndexedLensPrime<RcBrand, usize, i32, i32> =
IndexedLensPrime::from_iview_set(|x| (0, x), |(_, y)| y);
let f = std::rc::Rc::new(|(i, x): (usize, i32)| x + (i as i32))
as std::rc::Rc<dyn Fn((usize, i32)) -> i32>;
let pab = Indexed::<RcFnBrand, _, _, _>::new(f);
let result: std::rc::Rc<dyn Fn(i32) -> i32> =
IndexedTraversalOptic::evaluate::<RcFnBrand>(&l, pab);
assert_eq!(result(42), 42);Auto Trait Implementations§
impl<'a, PointerBrand, I, S, A> Freeze for IndexedLensPrime<'a, PointerBrand, I, S, A>where
<PointerBrand as RefCountedPointer>::Of<'a, dyn Fn(S) -> ((I, A), <PointerBrand as RefCountedPointer>::Of<'a, dyn Fn(A) -> S + 'a>) + 'a>: Freeze,
impl<'a, PointerBrand, I, S, A> RefUnwindSafe for IndexedLensPrime<'a, PointerBrand, I, S, A>where
<PointerBrand as RefCountedPointer>::Of<'a, dyn Fn(S) -> ((I, A), <PointerBrand as RefCountedPointer>::Of<'a, dyn Fn(A) -> S + 'a>) + 'a>: RefUnwindSafe,
impl<'a, PointerBrand, I, S, A> Send for IndexedLensPrime<'a, PointerBrand, I, S, A>where
<PointerBrand as RefCountedPointer>::Of<'a, dyn Fn(S) -> ((I, A), <PointerBrand as RefCountedPointer>::Of<'a, dyn Fn(A) -> S + 'a>) + 'a>: Send,
impl<'a, PointerBrand, I, S, A> Sync for IndexedLensPrime<'a, PointerBrand, I, S, A>where
<PointerBrand as RefCountedPointer>::Of<'a, dyn Fn(S) -> ((I, A), <PointerBrand as RefCountedPointer>::Of<'a, dyn Fn(A) -> S + 'a>) + 'a>: Sync,
impl<'a, PointerBrand, I, S, A> Unpin for IndexedLensPrime<'a, PointerBrand, I, S, A>where
<PointerBrand as RefCountedPointer>::Of<'a, dyn Fn(S) -> ((I, A), <PointerBrand as RefCountedPointer>::Of<'a, dyn Fn(A) -> S + 'a>) + 'a>: Unpin,
impl<'a, PointerBrand, I, S, A> UnsafeUnpin for IndexedLensPrime<'a, PointerBrand, I, S, A>where
<PointerBrand as RefCountedPointer>::Of<'a, dyn Fn(S) -> ((I, A), <PointerBrand as RefCountedPointer>::Of<'a, dyn Fn(A) -> S + 'a>) + 'a>: UnsafeUnpin,
impl<'a, PointerBrand, I, S, A> UnwindSafe for IndexedLensPrime<'a, PointerBrand, I, S, A>where
<PointerBrand as RefCountedPointer>::Of<'a, dyn Fn(S) -> ((I, A), <PointerBrand as RefCountedPointer>::Of<'a, dyn Fn(A) -> S + 'a>) + 'a>: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more