Struct refraction::terminal::ToUnit
[−]
[src]
pub struct ToUnit<S> { /* fields omitted */ }
A Lens
to "extract" ()
from anything.
Methods
impl<S> ToUnit<S>
[src]
fn mk() -> Self
Trait Implementations
impl<S> Debug for ToUnit<S>
[src]
impl<S> Clone for ToUnit<S>
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<S> Copy for ToUnit<S>
[src]
impl<S> Default for ToUnit<S>
[src]
impl<S> Lenticuloid for ToUnit<S>
[src]
type InitialSource = S
type InitialTarget = ()
type FinalSource = S
type FinalTarget = ()
type AtInitial = ToUnit<S>
fn at_initial(&self) -> Self::AtInitial
type AtFinal = ToUnit<S>
fn at_final(&self) -> Self::AtFinal
impl<S> PartialLens for ToUnit<S>
[src]
fn try_get(&self, _v: S) -> Result<(), S>
fn try_get_inject(&self, v: S) -> Result<((), Injector<(), S>), S>
This signature is somewhat hacky; it awaits resolution of the FnBox
issue for better design. Notably, the injection function returned by this method will (if law-abiding) only return Some
exactly once; every time afterwards, it will return None
. Read more
fn set(&self, v: S, _x: ()) -> S
fn exchange(&self, v: S, _x: ()) -> (Option<()>, S)
fn modify<F: FnOnce(()) -> ()>(&self, v: S, f: F) -> S
fn modify_with<F, X>(&self, v: S, f: F) -> (S, Option<X>) where
F: FnOnce(()) -> ((), X),
F: FnOnce(()) -> ((), X),