Struct dmntk_feel::FeelScope
source · pub struct FeelScope { /* private fields */ }
Expand description
The FEEL
scope.
Implementations§
source§impl FeelScope
impl FeelScope
sourcepub fn contexts(&self) -> Vec<FeelContext>
pub fn contexts(&self) -> Vec<FeelContext>
Temporary - remove
sourcepub fn push(&self, ctx: FeelContext)
pub fn push(&self, ctx: FeelContext)
Pushes a context on the top of the scope stack.
sourcepub fn append(&self, other: FeelScope)
pub fn append(&self, other: FeelScope)
Appends the content of another scope at the end of this scope.
sourcepub fn pop(&self) -> Option<FeelContext>
pub fn pop(&self) -> Option<FeelContext>
Takes and returns a context from the top of the stack.
sourcepub fn peek(&self) -> Option<FeelContext>
pub fn peek(&self) -> Option<FeelContext>
Peeks a context from the top of the stack. If the stack is empty, the default context is returned.
sourcepub fn get_value(&self, name: &Name) -> Option<Value>
pub fn get_value(&self, name: &Name) -> Option<Value>
Returns a value of an entry with specified name. Entries are searched from the last to the first context, (from top to bottom of the stack).
sourcepub fn search(&self, names: &[Name]) -> Option<Value>
pub fn search(&self, names: &[Name]) -> Option<Value>
Searches for a value under so called qualified
name build from
multiple names passed as an argument.
sourcepub fn search_entry(&self, qname: &QualifiedName) -> Option<Value>
pub fn search_entry(&self, qname: &QualifiedName) -> Option<Value>
Searches for a value of an entry pointed by specified qualified name.
sourcepub fn set_value(&self, name: &Name, value: Value)
pub fn set_value(&self, name: &Name, value: Value)
Sets a specified value for entry name in FeelContext placed on the top of the scope stack.
sourcepub fn set_name(&self, name: Name)
pub fn set_name(&self, name: Name)
Sets a null value for entry name in FeelContext placed on the top of the scope stack.
Trait Implementations§
source§impl Default for FeelScope
impl Default for FeelScope
source§fn default() -> Self
fn default() -> Self
Creates a default FeelScope containing single default FeelContext.
source§impl From<FeelContext> for FeelScope
impl From<FeelContext> for FeelScope
source§fn from(ctx: FeelContext) -> Self
fn from(ctx: FeelContext) -> Self
Creates a FeelScope from FeelContext.