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: from_attributes.rs
    path of file: ./repos/darling/core/src/options
    
    the code of the file until where you have to start completion: use quote::ToTokens;

use crate::{ast::Data, codegen::FromAttributesImpl, Error, Result};

use super::{OuterFrom, ParseAttribute, ParseData};

/// Receiver for derived `FromAttributes` impls.
pub struct FromAttributesOptions {
    // Note: FromAttributes has no behaviors beyond those common
    // to all the `OuterFrom` traits.
    pub base: OuterFrom,
}

impl FromAttribu
    
    pub fn new(di: &syn::DeriveInput) -> Result<Self> {
        let opts = (Self {
            base: OuterFrom::start(di)?,
        })
        .parse_attributes(&di.attrs)?
        .parse_body(&di.data)?;

        if !opts.is_newtype() && opts.base.attr_names.is_empty() {
            Err(Error::custom(
                "FromAttributes without attributes collects nothing",
            ))
        } else {
            Ok(opts)
        }
    }