mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-19 21:20:17 +00:00
rearrange configuration to be closer to where it's consumed
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
use crate::config::{ActionDeclaration, EntryDeclaration};
|
||||
use crate::actions::ActionDeclaration;
|
||||
use std::collections::{BTreeMap, BTreeSet};
|
||||
use std::rc::Rc;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct RootContext {
|
||||
actions: BTreeMap<String, ActionDeclaration>,
|
||||
entries: BTreeMap<String, (Rc<Context>, EntryDeclaration)>,
|
||||
}
|
||||
|
||||
impl RootContext {
|
||||
@@ -20,14 +19,6 @@ impl RootContext {
|
||||
pub fn actions_mut(&mut self) -> &mut BTreeMap<String, ActionDeclaration> {
|
||||
&mut self.actions
|
||||
}
|
||||
|
||||
pub fn entries(&self) -> &BTreeMap<String, (Rc<Context>, EntryDeclaration)> {
|
||||
&self.entries
|
||||
}
|
||||
|
||||
pub fn entries_mut(&mut self) -> &mut BTreeMap<String, (Rc<Context>, EntryDeclaration)> {
|
||||
&mut self.entries
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Context {
|
||||
|
||||
Reference in New Issue
Block a user