[][src]Struct syn_str::custom_types::Field

pub struct Field<'a> {
    pub vis: &'a str,
    pub align: usize,
    pub name: &'a str,
    pub f_type: &'a str,
}

A struct field;with an alignment,a visibiliy,an optional name and a type.

In nameless ones,represented as the empty string,this is displayed with only the type as might be in the syntax of tuple structs.

Fields

vis: &'a stralign: usizename: &'a strf_type: &'a str

Methods

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

pub fn new(a: &'a str) -> Result<Self, &'static str>[src]

Construct a new Field struct from stringified rust syntax,giving them an alignment for ordering purporses.

Trait Implementations

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

impl<'a> Display for Field<'a>[src]

impl<'a> DisplayField<Field<'a>> for Struct<'a>[src]

impl<'a> DisplayField<Field<'a>> for AnonymousStruct<'a>[src]

impl<'a> Eq for Field<'a>[src]

impl<'a> Ord for Field<'a>[src]

impl<'a> PartialEq<Field<'a>> for Field<'a>[src]

impl<'a> PartialOrd<Field<'a>> for Field<'a>[src]

Auto Trait Implementations

impl<'a> Send for Field<'a>

impl<'a> Sync for Field<'a>

impl<'a> Unpin for Field<'a>

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> ToString for T where
    T: Display + ?Sized
[src]

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.