pub trait IntoState: Sized {
    type State: 'static;

    // Required methods
    fn init(self) -> Self::State;
    fn update(self, state: &mut Self::State) -> Then;
}
Expand description

Trait used to create stateful components, see stateful for details.

Required Associated Types§

source

type State: 'static

Required Methods§

source

fn init(self) -> Self::State

source

fn update(self, state: &mut Self::State) -> Then

Implementations on Foreign Types§

source§

impl IntoState for u32

§

type State = <u32 as Diff>::Memo

source§

fn init(self) -> Self::State

source§

fn update(self, state: &mut Self::State) -> Then

source§

impl IntoState for u8

§

type State = <u8 as Diff>::Memo

source§

fn init(self) -> Self::State

source§

fn update(self, state: &mut Self::State) -> Then

source§

impl IntoState for u64

§

type State = <u64 as Diff>::Memo

source§

fn init(self) -> Self::State

source§

fn update(self, state: &mut Self::State) -> Then

source§

impl IntoState for u16

§

type State = <u16 as Diff>::Memo

source§

fn init(self) -> Self::State

source§

fn update(self, state: &mut Self::State) -> Then

source§

impl IntoState for i32

§

type State = <i32 as Diff>::Memo

source§

fn init(self) -> Self::State

source§

fn update(self, state: &mut Self::State) -> Then

source§

impl IntoState for &String

§

type State = <&String as Diff>::Memo

source§

fn init(self) -> Self::State

source§

fn update(self, state: &mut Self::State) -> Then

source§

impl IntoState for i8

§

type State = <i8 as Diff>::Memo

source§

fn init(self) -> Self::State

source§

fn update(self, state: &mut Self::State) -> Then

source§

impl IntoState for usize

§

type State = <usize as Diff>::Memo

source§

fn init(self) -> Self::State

source§

fn update(self, state: &mut Self::State) -> Then

source§

impl IntoState for &str

§

type State = <&str as Diff>::Memo

source§

fn init(self) -> Self::State

source§

fn update(self, state: &mut Self::State) -> Then

source§

impl IntoState for i16

§

type State = <i16 as Diff>::Memo

source§

fn init(self) -> Self::State

source§

fn update(self, state: &mut Self::State) -> Then

source§

impl IntoState for i128

§

type State = <i128 as Diff>::Memo

source§

fn init(self) -> Self::State

source§

fn update(self, state: &mut Self::State) -> Then

source§

impl IntoState for bool

§

type State = <bool as Diff>::Memo

source§

fn init(self) -> Self::State

source§

fn update(self, state: &mut Self::State) -> Then

source§

impl IntoState for isize

§

type State = <isize as Diff>::Memo

source§

fn init(self) -> Self::State

source§

fn update(self, state: &mut Self::State) -> Then

source§

impl IntoState for i64

§

type State = <i64 as Diff>::Memo

source§

fn init(self) -> Self::State

source§

fn update(self, state: &mut Self::State) -> Then

source§

impl IntoState for u128

§

type State = <u128 as Diff>::Memo

source§

fn init(self) -> Self::State

source§

fn update(self, state: &mut Self::State) -> Then

source§

impl IntoState for f32

§

type State = <f32 as Diff>::Memo

source§

fn init(self) -> Self::State

source§

fn update(self, state: &mut Self::State) -> Then

source§

impl IntoState for f64

§

type State = <f64 as Diff>::Memo

source§

fn init(self) -> Self::State

source§

fn update(self, state: &mut Self::State) -> Then

Implementors§

source§

impl<F, S> IntoState for Fwhere S: 'static, F: FnOnce() -> S,

§

type State = S