Struct genco::csharp::Method
[−]
[src]
pub struct Method<'el> { pub modifiers: Vec<Modifier>, pub arguments: Vec<Argument<'el>>, pub body: Tokens<'el, Csharp<'el>>, pub returns: Csharp<'el>, pub parameters: Tokens<'el, Csharp<'el>>, pub comments: Vec<Cons<'el>>, // some fields omitted }
Model for Csharp Methods.
Fields
modifiers: Vec<Modifier>
Method modifiers.
arguments: Vec<Argument<'el>>
Arguments for the constructor.
body: Tokens<'el, Csharp<'el>>
Body of the constructor.
returns: Csharp<'el>
Return type.
parameters: Tokens<'el, Csharp<'el>>
Generic parameters.
comments: Vec<Cons<'el>>
Comments associated with this method.
Methods
impl<'el> Method<'el>
[src]
pub fn new<N>(name: N) -> Method<'el> where
N: Into<Cons<'el>>,
[src]
N: Into<Cons<'el>>,
Build a new empty constructor.
pub fn attribute<T>(&mut self, attribute: T) where
T: IntoTokens<'el, Csharp<'el>>,
[src]
T: IntoTokens<'el, Csharp<'el>>,
Push a attribute.
pub fn name(&self) -> Cons<'el>
[src]
Name of method.
Trait Implementations
impl<'el> Debug for Method<'el>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'el> Clone for Method<'el>
[src]
fn clone(&self) -> Method<'el>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'el> From<Method<'el>> for Tokens<'el, Csharp<'el>>
[src]
impl<'el> IntoTokens<'el, Csharp<'el>> for Method<'el>
[src]
fn into_tokens(self) -> Tokens<'el, Csharp<'el>>
[src]
Convert the type into tokens.