Trait syn_helpers::Field

source ·
pub trait Field: HasAttributes {
    fn get_type(&self) -> &Type;
    fn get_pattern_with_config(
        &self,
        type_of_self: TypeOfSelf,
        name_postfix: &'static str
    ) -> TokenStream; fn get_type_that_needs_constraint(&self) -> Option<Type>; fn get_pattern(&self, type_of_self: TypeOfSelf) -> TokenStream { ... } }
Expand description

A Field is declaration of some data under a object

Required Methods§

source

fn get_type(&self) -> &Type

source

fn get_pattern_with_config(
    &self,
    type_of_self: TypeOfSelf,
    name_postfix: &'static str
) -> TokenStream

source

fn get_type_that_needs_constraint(&self) -> Option<Type>

Provided Methods§

source

fn get_pattern(&self, type_of_self: TypeOfSelf) -> TokenStream

Get a pattern for reading this field

Implementors§