pub struct Method { /* private fields */ }Expand description
Executable method declaration with argument and return-type checking.
Implementations§
Source§impl Method
impl Method
Sourcepub fn new(
core: Weak<dyn Core>,
scope: Option<Weak<dyn Scope>>,
method: MethodDef,
) -> Rc<Self>
pub fn new( core: Weak<dyn Core>, scope: Option<Weak<dyn Scope>>, method: MethodDef, ) -> Rc<Self>
Creates a method 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 Method
impl Scope for Method
fn core(self: Rc<Self>) -> Rc<dyn Core>
fn scope(&self) -> Option<Rc<dyn Scope>>
fn get_field(&self, name: &str) -> Option<Rc<Field>>
fn get_method(&self, name: &str, classes: &[Rc<dyn Type>]) -> Option<Rc<Method>>
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 Method
impl !RefUnwindSafe for Method
impl !Send for Method
impl !Sync for Method
impl Unpin for Method
impl UnsafeUnpin for Method
impl !UnwindSafe for Method
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