pub struct EffectDecl {
pub type_name: &'static str,
pub description: &'static str,
pub constructors: &'static [&'static str],
pub type_defs: &'static [&'static str],
pub helpers: &'static [&'static str],
}Expand description
Static metadata describing a Haskell effect type.
Each effect handler that wants to participate in the MCP templating system
implements DescribeEffect to provide its Haskell-side type declaration.
Fields§
§type_name: &'static strHaskell GADT type name, e.g. "Console".
description: &'static strHuman-readable description of what this effect does.
constructors: &'static [&'static str]Haskell GADT constructor declarations (one per line inside data T a where).
type_defs: &'static [&'static str]Extra Haskell type/function definitions emitted before the GADT.
Use for supporting types (e.g. data Lang = ...) and helper functions.
helpers: &'static [&'static str]Thin curried helper definitions emitted after the type M alias.
Each string is one or more lines of Haskell (signature + definition).
Trait Implementations§
Source§impl Clone for EffectDecl
impl Clone for EffectDecl
Source§fn clone(&self) -> EffectDecl
fn clone(&self) -> EffectDecl
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EffectDecl
Auto Trait Implementations§
impl Freeze for EffectDecl
impl RefUnwindSafe for EffectDecl
impl Send for EffectDecl
impl Sync for EffectDecl
impl Unpin for EffectDecl
impl UnsafeUnpin for EffectDecl
impl UnwindSafe for EffectDecl
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