You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: form_field.rs
    path of file: ./repos/Rocket/core/codegen/src/derive
    
    the code of the file until where you have to start completion: use std::collections::HashSet;

use devise::{*, ext::{TypeExt, SpanDiagnosticExt}};

use syn::{visit_mut::VisitMut, visit::Visit};
use proc_macro2::{TokenStream, TokenTree, Span};
use quote::{ToTokens, TokenStreamExt};

use crate::syn_ext::IdentExt;
use crate::name::Name;

#[derive(Debug)]
pub enum FieldName {
    Cased(Name),
    Uncased(Name),
}

#[derive(FromMeta)]
pub struct FieldAttr {
    pub name: Option<FieldName>,
    pub validate: Option<SpanWrapped<syn::Expr>>,
    pub default: Option<syn::Expr>,
    pub default_with: Option<syn::Expr>,
}

impl FieldAttr {
    const NAME: &'static str = "field";
}

pub(crate) trait FieldExt {
    fn ident(&self) -> Option<&syn::Ident>;
    fn member(&self) -> syn::Member;
    fn context_ident(&self) -> syn::Ident;
    fn field_name
    
pub fn validators<'v>(field: Field<'v>) -> Result<impl Iterator<Item = syn::Expr> + 'v> {
    Ok(FieldAttr::from_attrs(FieldAttr::NAME, &field.attrs)?
        .into_iter()
        .chain(FieldAttr::from_attrs(FieldAttr::NAME, field.parent.attrs())?)
        .filter_map(|a| a.validate)
        .map(move |mut expr| {
            let mut record = RecordMemberAccesses::default();
            record.accesses.insert((field.context_ident(), true));
            record.visit_expr(&expr);

            let mut v = ValidationMutator { field, visited: false };
            v.visit_expr_mut(&mut expr);

            let span = expr.key_span.unwrap_or(field.ty.span());
            let matchers = record.accesses.iter().map(|(member, _)| member);
            let values = record.accesses.iter()
                .map(|(member, is_ref)| {
                    if *is_ref { quote_spanned!(span => &#member) }
                    else { quote_spanned!(span => #member) }
                });

            let matchers = quote_spanned!(span => (#(Some(#matchers)),*));
            let values = quote_spanned!(span => (#(#values),*));
            let name_opt = field.name_buf_opt().unwrap();

            define_spanned_export!(span => _form);
            let expr: syn::Expr = syn::parse_quote_spanned!(span => {
                #[allow(unused_parens)]
                let __result: #_form::Result<'_, ()> = match #values {
                    #matchers => #expr,
                    _ => Ok(()),
                };

                let __e_name = #name_opt;
                __result.map_err(|__e| match __e_name {
                    Some(__name) => __e.with_name(__name),
                    None => __e
                })
            });

            expr
        }))
}