mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-19 15:40:16 +00:00
initial actions, entries, generators mechanism!
This commit is contained in:
15
src/actions.rs
Normal file
15
src/actions.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
use crate::config::ActionDeclaration;
|
||||
use crate::context::Context;
|
||||
use std::rc::Rc;
|
||||
|
||||
pub mod chainload;
|
||||
|
||||
pub fn execute(context: Rc<Context>, action: &ActionDeclaration) {
|
||||
let context = context.finalize().freeze();
|
||||
|
||||
if let Some(chainload) = &action.chainload {
|
||||
chainload::chainload(context, chainload);
|
||||
} else {
|
||||
panic!("unknown action configuration");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user