pub struct EffectHandler {
pub effect: String,
pub handler_fn: String,
}Expand description
An effect handler that eliminates a specific effect.
Fields§
§effect: StringThe name of the handled effect.
handler_fn: StringA description of the handler function.
Implementations§
Source§impl EffectHandler
impl EffectHandler
Sourcepub fn new(effect: impl Into<String>, handler_fn: impl Into<String>) -> Self
pub fn new(effect: impl Into<String>, handler_fn: impl Into<String>) -> Self
Create a new EffectHandler.
Sourcepub fn deep_handler(&self) -> String
pub fn deep_handler(&self) -> String
A deep handler recursively handles all operations and sub-computations.
Sourcepub fn shallow_handler(&self) -> String
pub fn shallow_handler(&self) -> String
A shallow handler handles only the first operation encountered.
Sourcepub fn effect_elimination(&self) -> String
pub fn effect_elimination(&self) -> String
Handling eliminates the effect from the effect row.
Auto Trait Implementations§
impl Freeze for EffectHandler
impl RefUnwindSafe for EffectHandler
impl Send for EffectHandler
impl Sync for EffectHandler
impl Unpin for EffectHandler
impl UnsafeUnpin for EffectHandler
impl UnwindSafe for EffectHandler
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