[][src]Trait druid::widget::ScopeTransfer

pub trait ScopeTransfer {
    type In: Data;
    type State: Data;
    pub fn read_input(&self, state: &mut Self::State, inner: &Self::In);
pub fn write_back_input(&self, state: &Self::State, inner: &mut Self::In); }

A ScopeTransfer knows how to synchronise input data with its counterpart within a Scope.

It is separate from the policy mainly to allow easy use of lenses to do synchronisation, with a custom ScopePolicy.

Associated Types

type In: Data[src]

The type of data that comes in from the surrounding application or scope.

type State: Data[src]

The type of data that the Scope will maintain internally.

Loading content...

Required methods

pub fn read_input(&self, state: &mut Self::State, inner: &Self::In)[src]

Replace the input we have within our State with a new one from outside

pub fn write_back_input(&self, state: &Self::State, inner: &mut Self::In)[src]

Take the modifications we have made and write them back to our input.

Loading content...

Implementors

impl<L: Lens<State, In>, In: Data, State: Data> ScopeTransfer for LensScopeTransfer<L, In, State>[src]

type In = In

type State = State

Loading content...