/// If a field's type is option, we will parse the inner type of the field
If a field's type is option, we will parse the inner type of the field
If a field ' s type is option we will parse the inner type of the field
fn parse_option(field_type: &syn::Type) -> Option<syn::Type> {
        match field_type {
            syn::Type::Path(ref ty_path) if ty_path.path.segments[0].ident == "Option" => {
                match ty_path.path.segments[0].arguments {
                    syn::PathArguments::AngleBracketed(ref angle_args) => {
                        match angle_args.args[0] {
                            syn::GenericArgument::Type(ref ty) => Some(ty.clone()),
                            _ => None,
                        }
                    }
                    _ => None,
                }
            }
            _ => None,
        }
    }
fn parse_option ( field_type : & syn :: Type ) -> Option < syn :: Type > { match field_type { syn :: Type :: Path ( ref ty_path ) if ty_path . path . segments [ 0 ] . ident == " " => { match ty_path . path . segments [ 0 ] . arguments { syn :: PathArguments :: AngleBracketed ( ref angle_args ) => { match angle_args . args [ 0 ] { syn :: GenericArgument :: Type ( ref ty ) => Some ( ty . clone ( ) ) , _ => None , } } _ => None , } } _ => None , } }
If a field's type is option, we will parse the inner type of the field
If a field ' s type is option we will parse the inner type of the field
field_type
&syn::Type