pub struct CSharpMethod {
pub name: String,
pub return_type: CSharpType,
pub params: Vec<(String, CSharpType)>,
pub body: Vec<CSharpStmt>,
pub visibility: CSharpVisibility,
pub is_static: bool,
pub is_async: bool,
pub is_override: bool,
pub is_virtual: bool,
pub is_abstract: bool,
pub type_params: Vec<String>,
pub expr_body: Option<CSharpExpr>,
}Expand description
A C# method (member function).
Fields§
§name: StringMethod name
return_type: CSharpTypeReturn type
params: Vec<(String, CSharpType)>Parameters: (name, type)
body: Vec<CSharpStmt>Method body statements
visibility: CSharpVisibilityAccess modifier
is_static: boolstatic modifier
is_async: boolasync modifier
is_override: booloverride modifier
is_virtual: boolvirtual modifier
is_abstract: boolabstract modifier (body must be empty)
type_params: Vec<String>Generic type parameters: <T, U>
expr_body: Option<CSharpExpr>Expression body (for => expr methods)
Implementations§
Trait Implementations§
Source§impl Clone for CSharpMethod
impl Clone for CSharpMethod
Source§fn clone(&self) -> CSharpMethod
fn clone(&self) -> CSharpMethod
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CSharpMethod
impl Debug for CSharpMethod
Source§impl PartialEq for CSharpMethod
impl PartialEq for CSharpMethod
impl StructuralPartialEq for CSharpMethod
Auto Trait Implementations§
impl Freeze for CSharpMethod
impl RefUnwindSafe for CSharpMethod
impl Send for CSharpMethod
impl Sync for CSharpMethod
impl Unpin for CSharpMethod
impl UnsafeUnpin for CSharpMethod
impl UnwindSafe for CSharpMethod
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