mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-19 13:50:16 +00:00
16 lines
388 B
Rust
16 lines
388 B
Rust
|
|
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");
|
||
|
|
}
|
||
|
|
}
|