pub struct _Ok;
Expand description
Prism for Result::Ok
.
Trait Implementations§
source§impl<T, E> AffineFold<Result<T, E>> for _Ok
impl<T, E> AffineFold<Result<T, E>> for _Ok
source§impl<'a, T, E> AffineFoldMut<'a, Result<T, E>> for _Okwhere
T: 'a,
impl<'a, T, E> AffineFoldMut<'a, Result<T, E>> for _Okwhere
T: 'a,
source§impl<'a, T, E> AffineFoldRef<'a, Result<T, E>> for _Okwhere
T: 'a,
impl<'a, T, E> AffineFoldRef<'a, Result<T, E>> for _Okwhere
T: 'a,
source§impl<T, E> AffineTraversal<Result<T, E>> for _Ok
impl<T, E> AffineTraversal<Result<T, E>> for _Ok
source§impl OpticsFallible for _Ok
impl OpticsFallible for _Ok
source§fn success_witness(&self) -> _Ok
fn success_witness(&self) -> _Ok
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 _Ok
impl Ord for _Ok
source§impl PartialOrd for _Ok
impl PartialOrd for _Ok
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, E> Traversal<Result<T, E>> for _Ok
impl<T, E> Traversal<Result<T, E>> for _Ok
impl Copy for _Ok
impl Eq for _Ok
impl<T, E> Prism<Result<T, E>> for _Ok
impl StructuralPartialEq for _Ok
Auto Trait Implementations§
impl Freeze for _Ok
impl RefUnwindSafe for _Ok
impl Send for _Ok
impl Sync for _Ok
impl Unpin for _Ok
impl UnwindSafe for _Ok
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