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.