pub struct STM<E, A> { /* private fields */ }Expand description
STM Effect
Implementations§
Source§impl<E, A> STM<E, A>where
E: 'static,
A: 'static,
impl<E, A> STM<E, A>where
E: 'static,
A: 'static,
pub fn succeed(a: A) -> STM<E, A>
pub fn fail(e: E) -> STM<E, A>
pub fn retry() -> STM<E, A>
pub fn map<B>(self, f: impl Fn(A) -> B + Send + Sync + 'static) -> STM<E, B>
pub fn flat_map<B>( self, f: impl Fn(A) -> STM<E, B> + Send + Sync + 'static, ) -> STM<E, B>
pub fn map_error<E2>(
self,
f: impl Fn(E) -> E2 + Send + Sync + 'static,
) -> STM<E2, A>where
E2: 'static,
Trait Implementations§
Auto Trait Implementations§
impl<E, A> Freeze for STM<E, A>
impl<E, A> !RefUnwindSafe for STM<E, A>
impl<E, A> Send for STM<E, A>
impl<E, A> Sync for STM<E, A>
impl<E, A> Unpin for STM<E, A>
impl<E, A> !UnwindSafe for STM<E, A>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more