pub struct Identity;
Expand description
Identity optics.
Trait Implementations§
source§impl<T> AffineFold<T> for Identity
impl<T> AffineFold<T> for Identity
source§impl<'a, T> AffineFoldMut<'a, T> for Identitywhere
T: 'a,
impl<'a, T> AffineFoldMut<'a, T> for Identitywhere
T: 'a,
source§impl<'a, T> AffineFoldRef<'a, T> for Identitywhere
T: 'a,
impl<'a, T> AffineFoldRef<'a, T> for Identitywhere
T: 'a,
source§impl<T> AffineTraversal<T> for Identity
impl<T> AffineTraversal<T> for Identity
source§impl OpticsFallible for Identity
impl OpticsFallible for Identity
§type Error = Infallible
type Error = Infallible
Error type for this optics.
source§fn success_witness(&self) -> Identity
fn success_witness(&self) -> Identity
Get a lightweight witness for success.
source§fn map_fallible<S, F, E, G>(self, f: F, g: G) -> MapFallible<Self, F, G>
fn map_fallible<S, F, E, G>(self, f: F, g: G) -> MapFallible<Self, F, G>
Map the
Success
and Error
type for this fallible optics.source§fn map_success<S, F>(self, f: F) -> MapSuccess<Self, F>
fn map_success<S, F>(self, f: F) -> MapSuccess<Self, F>
Map the
Success
type for this fallible optics.source§fn map_error<E, G>(self, g: G) -> MapError<Self, G>
fn map_error<E, G>(self, g: G) -> MapError<Self, G>
Map the
Error
type for this fallible optics.source§fn assert_infallible(self) -> MapFallibleTo<Self, Self::Success, Infallible>
fn assert_infallible(self) -> MapFallibleTo<Self, Self::Success, Infallible>
Assert that this optics should never fail (in practice).
The resulting optics panics on error.
source§fn to_str_err(self) -> MapFallibleTo<Self, Self::Success, String>
fn to_str_err(self) -> MapFallibleTo<Self, Self::Success, String>
Map the
Error
type to Box<str>
.source§impl Ord for Identity
impl Ord for Identity
source§impl PartialEq for Identity
impl PartialEq for Identity
source§impl PartialOrd for Identity
impl PartialOrd for Identity
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<T> Traversal<T> for Identity
impl<T> Traversal<T> for Identity
impl Copy for Identity
impl Eq for Identity
impl<T> Iso<T> for Identity
impl<T> Lens<T> for Identity
impl<T> Prism<T> for Identity
impl StructuralPartialEq for Identity
Auto Trait Implementations§
impl Freeze for Identity
impl RefUnwindSafe for Identity
impl Send for Identity
impl Sync for Identity
impl Unpin for Identity
impl UnwindSafe for Identity
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