pub struct Scope {
pub name: String,
pub variables: Variables,
pub environment: IndexMap<String, String>,
pub parent: Option<Rc<RefCell<Scope>>>,
pub root: Option<Rc<RefCell<Scope>>>,
}
Fields§
§name: String
§variables: Variables
§environment: IndexMap<String, String>
§parent: Option<Rc<RefCell<Scope>>>
§root: Option<Rc<RefCell<Scope>>>
Implementations§
Source§impl Scope
impl Scope
Sourcepub fn insert_var(
&mut self,
key: VariableKey,
value: VariableValue,
) -> Option<VariableValue>
pub fn insert_var( &mut self, key: VariableKey, value: VariableValue, ) -> Option<VariableValue>
Add variable to scope
pub fn process_binding(&mut self, key: &str, value: &str) -> DevrcResult<()>
Sourcepub fn insert_env(&mut self, key: &str, value: &str) -> Option<String>
pub fn insert_env(&mut self, key: &str, value: &str) -> Option<String>
Add environment variable to scope
pub fn get_var(&self, key: &VariableKey) -> Option<&VariableValue>
pub fn get_env_var(&self, key: &str) -> Option<&String>
pub fn process_raw_vars(&mut self, variables: &RawVariables) -> DevrcResult<()>
pub fn process_raw_env_vars( &mut self, variables: &RawEnvironment<String>, ) -> DevrcResult<()>
pub fn process_rendered_env_vars( &mut self, variables: &Environment<String>, ) -> DevrcResult<()>
pub fn compute_execution_scope(&self) -> DevrcResult<Scope>
Trait Implementations§
impl Eq for Scope
impl StructuralPartialEq for Scope
Auto Trait Implementations§
impl Freeze for Scope
impl !RefUnwindSafe for Scope
impl !Send for Scope
impl !Sync for Scope
impl Unpin for Scope
impl !UnwindSafe for Scope
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.