From 67ca0569d827c0f14312d9ce0976da3e17ee32d9 Mon Sep 17 00:00:00 2001 From: Isaac Clayton Date: Wed, 20 Apr 2022 08:07:54 +0200 Subject: [PATCH] working on effect core --- src/core/effect_core.rs | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/core/effect_core.rs b/src/core/effect_core.rs index 7752bc4..9f47fac 100644 --- a/src/core/effect_core.rs +++ b/src/core/effect_core.rs @@ -1,7 +1,24 @@ -pub enum EffectCore { +pub enum Core { Fatal, - WriteStdOut(String), - WriteStdErr(String), - ReadStdIn(String), + WriteOut(String), + WriteErr(String), + ReadIn(String), ToString(Data), } + +pub trait Effect { + fn from_data(data: Data) -> Result; +} + +pub struct EffectSet { + effects: HashMap, +} + +pub fn main() { + effect_set! { + enum E { + "std.Core" => Core, + "std.http.IO" => Http, + } + }; +}