pub struct LensScopeTransfer<L, In, State>where
L: Lens<State, In>,{ /* private fields */ }
Expand description
A ScopeTransfer
that uses a Lens to synchronise between a large internal
state and a small input.
Implementations§
§impl<L, In, State> LensScopeTransfer<L, In, State>where
L: Lens<State, In>,
impl<L, In, State> LensScopeTransfer<L, In, State>where L: Lens<State, In>,
pub fn new(lens: L) -> LensScopeTransfer<L, In, State>
pub fn new(lens: L) -> LensScopeTransfer<L, In, State>
Create a ScopeTransfer
from a Lens onto a portion of the Scope
’s state.
Trait Implementations§
§impl<L, In, State> ScopeTransfer for LensScopeTransfer<L, In, State>where
L: Lens<State, In>,
In: Data,
State: Data,
impl<L, In, State> ScopeTransfer for LensScopeTransfer<L, In, State>where L: Lens<State, In>, In: Data, State: Data,
§fn read_input(&self, state: &mut State, data: &In)
fn read_input(&self, state: &mut State, data: &In)
Replace the input we have within our State with a new one from outside
§fn write_back_input(&self, state: &State, data: &mut In)
fn write_back_input(&self, state: &State, data: &mut In)
Take the modifications we have made and write them back
to our input.
Auto Trait Implementations§
impl<L, In, State> RefUnwindSafe for LensScopeTransfer<L, In, State>where In: RefUnwindSafe, L: RefUnwindSafe, State: RefUnwindSafe,
impl<L, In, State> Send for LensScopeTransfer<L, In, State>where In: Send, L: Send, State: Send,
impl<L, In, State> Sync for LensScopeTransfer<L, In, State>where In: Sync, L: Sync, State: Sync,
impl<L, In, State> Unpin for LensScopeTransfer<L, In, State>where In: Unpin, L: Unpin, State: Unpin,
impl<L, In, State> UnwindSafe for LensScopeTransfer<L, In, State>where In: UnwindSafe, L: UnwindSafe, State: UnwindSafe,
Blanket Implementations§
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.