pub struct HandlerType {
pub input_type: String,
pub output_type: String,
pub effect_row: String,
}Expand description
The type of a handler: maps input type with effect row to output type.
Fields§
§input_type: StringThe input computation type.
output_type: StringThe output computation type.
effect_row: StringThe effect row being handled.
Implementations§
Source§impl HandlerType
impl HandlerType
Sourcepub fn new(
input_type: impl Into<String>,
output_type: impl Into<String>,
effect_row: impl Into<String>,
) -> Self
pub fn new( input_type: impl Into<String>, output_type: impl Into<String>, effect_row: impl Into<String>, ) -> Self
Create a new HandlerType.
Sourcepub fn handles_effect(&self, effect: &str) -> bool
pub fn handles_effect(&self, effect: &str) -> bool
Check whether this handler type handles the given effect.
Sourcepub fn continuation_type(&self) -> String
pub fn continuation_type(&self) -> String
The continuation type within the handler.
Auto Trait Implementations§
impl Freeze for HandlerType
impl RefUnwindSafe for HandlerType
impl Send for HandlerType
impl Sync for HandlerType
impl Unpin for HandlerType
impl UnsafeUnpin for HandlerType
impl UnwindSafe for HandlerType
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