pub trait Module<'a, 'b>: Sized {
type Machine: Machine<'a>;
// Required methods
fn module(&self, name: &str) -> Result<Self, MachineError>;
fn get(
&self,
name: &str
) -> Result<<Self::Machine as Machine<'a>>::Datum<'b, 'static>, MachineError>;
fn set<'c>(
&self,
name: &str,
datum: <Self::Machine as Machine<'a>>::Datum<'b, 'c>
) -> Result<(), MachineError>;
}
Expand description
Module of Machine
where values can be read and set (access with HasModules::module
)
Required Associated Types§
Required Methods§
sourcefn module(&self, name: &str) -> Result<Self, MachineError>
fn module(&self, name: &str) -> Result<Self, MachineError>
Open a sub-module (create if non-existent)