pub struct FunctionRegistry {
pub evaluated: RefCell<HashSet<u32>>,
pub pending: RefCell<HashSet<u32>>,
pub count: Cell<usize>,
pub failed: Cell<usize>,
pub custom_property: Cell<bool>,
pub site: Cell<u32>,
pub definitions: JsMap<Vec<FunctionDefinition>>,
/* private fields */
}Expand description
evaluates the custom function calls (FunctionRegistry)
Fields§
§evaluated: RefCell<HashSet<u32>>the function definitions that have been evaluated
pending: RefCell<HashSet<u32>>the function definitions referenced by the calls that have not been evaluated: they are kept
count: Cell<usize>number of evaluated calls
failed: Cell<usize>number of calls that are not evaluated
custom_property: Cell<bool>the calls are located in a custom property declaration
site: Cell<u32>location of the calls: the declaration or the @apply rule that contains them
definitions: JsMap<Vec<FunctionDefinition>>function definitions by name, in document order
Implementations§
Source§impl FunctionRegistry
impl FunctionRegistry
pub fn new( definitions: JsMap<Vec<FunctionDefinition>>, options: &ParserOptions, ) -> Rc<Self>
Sourcepub fn call(
&self,
arena: &AstArena,
token: u32,
caller: &Rc<dyn VariableScope>,
descendant: bool,
) -> Substituted
pub fn call( &self, arena: &AstArena, token: u32, caller: &Rc<dyn VariableScope>, descendant: bool, ) -> Substituted
result of a custom function call: the result that replaces the call, Unchanged when the call is not evaluated
Auto Trait Implementations§
impl !Freeze for FunctionRegistry
impl !RefUnwindSafe for FunctionRegistry
impl !Send for FunctionRegistry
impl !Sync for FunctionRegistry
impl !UnwindSafe for FunctionRegistry
impl Forget for FunctionRegistry
impl Move for FunctionRegistry
impl Unpin for FunctionRegistry
impl UnsafeUnpin for FunctionRegistry
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