Added directfs
Added a very rudimentary file I/O system suitable for experimenting with the language further. A better one will be designed when we have sensible error management.
This commit is contained in:
@@ -23,9 +23,11 @@ pub struct Environment<'a> {
|
||||
}
|
||||
impl<'a> Environment<'a> {
|
||||
/// Initialize a new environment
|
||||
#[must_use]
|
||||
pub fn new(i: &'a Interner) -> Self { Self { i, systems: Vec::new() } }
|
||||
|
||||
/// Register a new system in the environment
|
||||
#[must_use]
|
||||
pub fn add_system<'b: 'a>(mut self, is: impl IntoSystem<'b> + 'b) -> Self {
|
||||
self.systems.push(Box::new(is).into_system(self.i));
|
||||
self
|
||||
|
||||
Reference in New Issue
Block a user