fn struct_fields(&self, cx: &ExtCtxt) -> Vec<ast::StructField> {
        let mut fields: Vec<ast::StructField> = vec!();
        for (atom, opts) in self.doc.parser().descs.iter() {
            let name = ArgvMap::key_to_struct_field(atom.to_string().as_slice());
            let ty = match self.types.get(atom) {
                None => self.pat_type(cx, atom, opts),
                Some(ty) => ty.clone(),
            };
            fields.push(self.mk_struct_field(name.as_slice(), ty));
        }
        fields
    }
/// Returns a list of fields for the struct definition.
/// Handles type annotations.
Returns a list of fields for the struct definition.
Handles type annotations.
Returns a list of fields for the struct definition . Handles type annotations .
fn struct_fields(&self, cx: &ExtCtxt) -> Vec<ast::StructField> {
        let mut fields: Vec<ast::StructField> = vec!();
        for (atom, opts) in self.doc.parser().descs.iter() {
            let name = ArgvMap::key_to_struct_field(atom.to_string().as_slice());
            let ty = match self.types.get(atom) {
                None => self.pat_type(cx, atom, opts),
                Some(ty) => ty.clone(),
            };
            fields.push(self.mk_struct_field(name.as_slice(), ty));
        }
        fields
    }
fn struct_fields ( & self , cx : & ExtCtxt ) -> Vec < ast :: StructField > { let mut fields : Vec < ast :: StructField > = vec ! ( ) ; for ( atom , opts ) in self . doc . parser ( ) . descs . iter ( ) { let name = ArgvMap :: key_to_struct_field ( atom . to_string ( ) . as_slice ( ) ) ; let ty = match self . types . get ( atom ) { None => self . pat_type ( cx , atom , opts ) , Some ( ty ) => ty . clone ( ) , } ; fields . push ( self . mk_struct_field ( name . as_slice ( ) , ty ) ) ; } fields }
Returns a list of fields for the struct definition.
Returns a list of fields for the struct definition .
&self
cx
&ExtCtxt
&self
cx
&ExtCtxt