pub struct ShallowHandler<A, B> {
pub effect_name: String,
pub val_clause: Box<dyn Fn(A) -> B>,
pub op_clause: Box<dyn Fn(String, String, Box<dyn FnOnce(String) -> Free<A>>) -> B>,
}Expand description
A shallow handler: handles only the first operation encountered.
Fields§
§effect_name: StringThe effect this handler covers.
val_clause: Box<dyn Fn(A) -> B>Return clause.
op_clause: Box<dyn Fn(String, String, Box<dyn FnOnce(String) -> Free<A>>) -> B>Operation clause: (op, arg, raw_continuation) → B.
Implementations§
Auto Trait Implementations§
impl<A, B> Freeze for ShallowHandler<A, B>
impl<A, B> !RefUnwindSafe for ShallowHandler<A, B>
impl<A, B> !Send for ShallowHandler<A, B>
impl<A, B> !Sync for ShallowHandler<A, B>
impl<A, B> Unpin for ShallowHandler<A, B>
impl<A, B> UnsafeUnpin for ShallowHandler<A, B>
impl<A, B> !UnwindSafe for ShallowHandler<A, B>
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