Struct ryan::environment::Environment
source · pub struct Environment {
pub current_module: Option<Rc<str>>,
/* private fields */
}
Expand description
The environment on which a Ryan program operates.
Fields§
§current_module: Option<Rc<str>>
The name of the current model. It can be None
if no module is set. This happens
when, e.g., executing Ryan from a supplied string without any extra configuration.
Implementations§
source§impl Environment
impl Environment
sourcepub fn new(module: Option<&str>) -> Environment
pub fn new(module: Option<&str>) -> Environment
Creates a new environment with the default settings (default importer and default built_ins) with an optional current module name.
sourcepub fn builder() -> EnvironmentBuilder
pub fn builder() -> EnvironmentBuilder
Creates an environment builder. Use this to tweak Ryan.
Trait Implementations§
source§impl Clone for Environment
impl Clone for Environment
source§fn clone(&self) -> Environment
fn clone(&self) -> Environment
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for Environment
impl !Send for Environment
impl !Sync for Environment
impl Unpin for Environment
impl !UnwindSafe for Environment
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more