Struct prop_check_rs::state::State
source · [−]pub struct State<S, A> { /* private fields */ }Implementations
sourceimpl<S, A> State<S, A>where
S: 'static,
A: Clone + 'static,
impl<S, A> State<S, A>where
S: 'static,
A: Clone + 'static,
pub fn unit(a: A) -> State<S, A>
pub fn new<T, B, F>(f: F) -> State<T, B>where
F: Fn(T) -> (B, T) + 'static,
pub fn pure<B>(b: B) -> State<S, B>where
B: Clone + 'static,
pub fn run(self, s: S) -> (A, S)
pub fn map<B, F>(self, f: F) -> State<S, B>where
F: Fn(A) -> B + 'static,
B: Clone + 'static,
pub fn and_then<B>(self, sb: State<S, B>) -> State<S, (A, B)>where
A: Clone,
B: Clone + 'static,
pub fn flat_map<B, F>(self, f: F) -> State<S, B>where
F: Fn(A) -> State<S, B> + 'static,
B: Clone + 'static,
pub fn modify<T, F>(f: F) -> State<T, ()>where
F: Fn(T) -> T + 'static,
T: Clone + 'static,
pub fn get<T>() -> State<T, T>where
T: Clone,
pub fn set<T>(t: T) -> State<T, ()>where
T: Clone + 'static,
pub fn sequence(sas: Vec<State<S, A>>) -> State<S, Vec<A>>
Trait Implementations
Auto Trait Implementations
impl<S, A> !RefUnwindSafe for State<S, A>
impl<S, A> !Send for State<S, A>
impl<S, A> !Sync for State<S, A>
impl<S, A> Unpin for State<S, A>
impl<S, A> !UnwindSafe for State<S, A>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more