[][src]Struct genco::java::Field

pub struct Field<'el> {
    pub annotations: Tokens<'el, Java<'el>>,
    pub modifiers: Vec<Modifier>,
    pub comments: Vec<Cons<'el>>,
    // some fields omitted
}

Model for Java Fields.

Fields

annotations: Tokens<'el, Java<'el>>

Annotations of field.

modifiers: Vec<Modifier>

Modifiers of field.

comments: Vec<Cons<'el>>

Comments associated with this field.

Implementations

impl<'el> Field<'el>[src]

pub fn new<T, N>(ty: T, name: N) -> Field<'el> where
    T: Into<Java<'el>>,
    N: Into<Cons<'el>>, 
[src]

Create a new field.

pub fn annotation<A>(&mut self, annotation: A) where
    A: IntoTokens<'el, Java<'el>>, 
[src]

Push an annotation.

pub fn initializer<I>(&mut self, initializer: I) where
    I: IntoTokens<'el, Java<'el>>, 
[src]

Set initializer for field.

pub fn var(&self) -> Cons<'el>[src]

The variable of the field.

pub fn ty(&self) -> Java<'el>[src]

The type of the field.

Trait Implementations

impl<'el> Clone for Field<'el>[src]

impl<'el> Debug for Field<'el>[src]

impl<'el> From<Field<'el>> for Tokens<'el, Java<'el>>[src]

impl<'el> From<Field<'el>> for Element<'el, Java<'el>>[src]

impl<'el> IntoTokens<'el, Java<'el>> for Field<'el>[src]

Auto Trait Implementations

impl<'el> !RefUnwindSafe for Field<'el>

impl<'el> !Send for Field<'el>

impl<'el> !Sync for Field<'el>

impl<'el> Unpin for Field<'el>

impl<'el> !UnwindSafe for Field<'el>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.