pub struct Constructor<'el> {
pub modifiers: Vec<Modifier>,
pub arguments: Vec<Argument<'el>>,
pub body: Tokens<'el, Csharp<'el>>,
pub base: Option<Tokens<'el, Csharp<'el>>>,
/* private fields */
}Expand description
Model for Csharp Constructors.
Fields§
§modifiers: Vec<Modifier>Constructor modifiers.
arguments: Vec<Argument<'el>>Arguments for the constructor.
body: Tokens<'el, Csharp<'el>>Body of the constructor.
base: Option<Tokens<'el, Csharp<'el>>>Base call
Implementations§
Source§impl<'el> Constructor<'el>
impl<'el> Constructor<'el>
Sourcepub fn new() -> Constructor<'el>
pub fn new() -> Constructor<'el>
Build a new empty constructor.
Sourcepub fn attribute<T>(&mut self, attribute: T)where
T: IntoTokens<'el, Csharp<'el>>,
pub fn attribute<T>(&mut self, attribute: T)where
T: IntoTokens<'el, Csharp<'el>>,
Push a attribute.
Trait Implementations§
Source§impl<'el> Clone for Constructor<'el>
impl<'el> Clone for Constructor<'el>
Source§fn clone(&self) -> Constructor<'el>
fn clone(&self) -> Constructor<'el>
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 moreAuto Trait Implementations§
impl<'el> Freeze for Constructor<'el>
impl<'el> RefUnwindSafe for Constructor<'el>
impl<'el> !Send for Constructor<'el>
impl<'el> !Sync for Constructor<'el>
impl<'el> Unpin for Constructor<'el>
impl<'el> UnwindSafe for Constructor<'el>
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