Struct synfx_dsp_jit::ASTFun
source · [−]pub struct ASTFun { /* private fields */ }
Expand description
Top level structure that holds an AST.
It holds the names of the local variables. For now you can’t specify your own parameter names or change the number of parameters. The crate::DSPFunction is fixed currently to 8 input parameters with two output signals and one return value (a third signal so to say).
Implementations
sourceimpl ASTFun
impl ASTFun
pub fn new(ast: Box<ASTNode>) -> Self
pub fn param_count(&self) -> usize
pub fn param_is_ref(&self, idx: usize) -> bool
pub fn param_name(&self, idx: usize) -> Option<&str>
pub fn name_is_local_var(&self, name: &str) -> bool
pub fn local_variables(&self) -> &Vec<String>
pub fn retrieve_local_variable_names(&mut self) -> &Vec<String>
pub fn ast_ref(&self) -> &ASTNode
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ASTFun
impl Send for ASTFun
impl Sync for ASTFun
impl Unpin for ASTFun
impl UnwindSafe for ASTFun
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more