pub trait InteractionController: Copy {
    type Input;
    type State: Default;

    // Required methods
    fn fill_area_width(&self, state: &Self::State, max: u32) -> u32;
    fn update(
        &mut self,
        state: &mut Self::State,
        action: Self::Input
    ) -> Option<InteractionType>;

    // Provided method
    fn reset(&self, _state: &mut Self::State) { ... }
}

Required Associated Types§

Required Methods§

source

fn fill_area_width(&self, state: &Self::State, max: u32) -> u32

source

fn update( &mut self, state: &mut Self::State, action: Self::Input ) -> Option<InteractionType>

Provided Methods§

source

fn reset(&self, _state: &mut Self::State)

Implementors§