Struct bo::stat::State [−][src]
Implementations
impl<'state, S: 'state + Clone + Copy, A: 'state> State<'state, S, A>
[src]
pub fn new<F>(f: F) -> State<'state, S, A> where
F: Fn(S) -> (S, A) + 'state,
[src]
F: Fn(S) -> (S, A) + 'state,
pub fn run(&self, s: S) -> (S, A)
[src]
pub fn map<B: 'state, G>(self, f: G) -> State<'state, S, B> where
G: Fn(A) -> B + 'state,
[src]
G: Fn(A) -> B + 'state,
pub 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,
pub fn get(self) -> State<'state, S, S>
[src]
pub fn gets<F>(self, f: F) -> State<'state, S, A> where
F: Fn(S) -> A + 'state,
[src]
F: Fn(S) -> A + 'state,
pub fn put(self, s: S) -> State<'state, S, ()>
[src]
pub fn modify<F>(self, f: F) -> State<'state, S, ()> where
F: Fn(S) -> S + 'state,
[src]
F: Fn(S) -> S + 'state,
Auto Trait Implementations
impl<'state, S, A> !RefUnwindSafe for State<'state, S, A>
impl<'state, S, A> !Send for State<'state, S, A>
impl<'state, S, A> !Sync for State<'state, S, A>
impl<'state, S, A> Unpin for State<'state, S, A> where
A: Unpin,
S: Unpin,
A: Unpin,
S: Unpin,
impl<'state, S, A> !UnwindSafe for State<'state, S, A>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,