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 duplicate 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 Freeze for Environment
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