pub struct Method {
pub visibility: Option<Visibility>,
pub name: String,
pub params: String,
pub return_type: Option<String>,
pub is_static: bool,
pub is_abstract: bool,
}Expand description
A method member inside a class body.
+method(args) ReturnType$* decomposes as:
- visibility =
Public - name =
"method" - params =
"args" - return_type =
Some("ReturnType") - is_static =
false - is_abstract =
false
Fields§
§visibility: Option<Visibility>Visibility modifier.
name: StringMethod name.
params: StringRaw parameter list (content between parentheses), may be empty.
return_type: Option<String>Declared return type, if present.
is_static: booltrue when the $ suffix marks this method as static.
is_abstract: booltrue when the * suffix marks this method as abstract.
Trait Implementations§
impl Eq for Method
impl StructuralPartialEq for Method
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