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: opt.rs
    path of file: ./repos/fluvio/crates/fluvio-smartmodule-derive/src/generator
    
    the code of the file until where you have to start completion: use proc_macro::TokenStream;
use syn::{Data, DeriveInput, Ident};
use quote::quote;

pub fn impl_smart_opt(input: DeriveInput) -> syn::Result<TokenStream> {
    let name = &input.ident;

    // parse out all the field names in the struct as `Ident`s
    let fields = match input.data {
        Data::Struct(st) => st.fields,
        _ => {
            return Err(syn::Error::new_spanned(
                input.ident,
                "SmartOpt derive macro only can be used on structs.",
            ))
        }
    };

    let idents: Ve
    
fn ty_inner_type<'a>(ty: &'a syn::Type, wrapper: &'static str) -> Option<&'a syn::Type> {
    if let syn::Type::Path(ref p) = ty {
        if p.path.segments.len() == 1 && p.path.segments[0].ident == wrapper {
            if let syn::PathArguments::AngleBracketed(ref inner_ty) = p.path.segments[0].arguments {
                if inner_ty.args.len() == 1 {
                    let inner_ty = inner_ty.args.first().unwrap();
                    if let syn::GenericArgument::Type(ref t) = inner_ty {
                        return Some(t);
                    }
                }
            }
        }
    }
    None
}