Struct rustz::stat::State
[−]
[src]
pub struct State<'state, S, A> { /* fields omitted */ }
Methods
impl<'state, S: 'state + Clone + Copy, A: 'state> State<'state, S, A>
[src]
fn new<F>(f: F) -> State<'state, S, A> where
F: Fn(S) -> (S, A) + 'state,
[src]
F: Fn(S) -> (S, A) + 'state,
fn run(&self, s: S) -> (S, A)
[src]
fn map<B: 'state, G>(self, f: G) -> State<'state, S, B> where
G: Fn(A) -> B + 'state,
[src]
G: Fn(A) -> B + 'state,
fn flat_map<B: 'state, G>(self, f: G) -> State<'state, S, B> where
G: Fn(A) -> State<'state, S, B> + 'state,
[src]
G: Fn(A) -> State<'state, S, B> + 'state,
fn get(self) -> State<'state, S, S>
[src]
fn gets<F>(self, f: F) -> State<'state, S, A> where
F: Fn(S) -> A + 'state,
[src]
F: Fn(S) -> A + 'state,
fn put(self, s: S) -> State<'state, S, ()>
[src]
fn modify<F>(self, f: F) -> State<'state, S, ()> where
F: Fn(S) -> S + 'state,
[src]
F: Fn(S) -> S + 'state,