pub struct Function { /* private fields */ }Implementations§
Source§impl Function
impl Function
Sourcepub fn new(parent_scope: Weak<dyn Scope>, function: FunctionDef) -> Rc<Self>
pub fn new(parent_scope: Weak<dyn Scope>, function: FunctionDef) -> Rc<Self>
Creates a function from its parsed definition.
pub fn name(&self) -> &str
pub fn return_type(&self) -> Option<&[String]>
pub fn args(&self) -> &[(Vec<String>, String)]
pub fn statements(&self) -> &[Statement]
Trait Implementations§
Source§impl Scope for Function
impl Scope for Function
fn core(&self) -> Rc<dyn Core>
fn scope(&self) -> Option<Rc<dyn Scope>>
fn get_fields(&self) -> Vec<Rc<Field>>
fn get_field(&self, name: &str) -> Option<Rc<Field>>
fn get_function( &self, name: &str, types: &[Rc<dyn Type>], ) -> Option<Rc<Function>>
fn get_type(&self, name: &str) -> Option<Rc<dyn Type>>
fn get_predicate(&self, name: &str) -> Option<Rc<Predicate>>
fn as_class(self: Rc<Self>) -> Option<Rc<dyn Class>>
Auto Trait Implementations§
impl Freeze for Function
impl !RefUnwindSafe for Function
impl !Send for Function
impl !Sync for Function
impl Unpin for Function
impl UnsafeUnpin for Function
impl !UnwindSafe for Function
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