fn analyse_and_expand_or_error(
    args: TokenStream2,
    input: TokenStream2,
) -> Result<TokenStream2> {
    let input = syn::parse::<syn::ItemStruct>(input.into())?;
    let params = syn::parse::<ParamArgs>(args.into())?;
    let mut config = Config::default();
    config.feed_params(params)?;
    let bitfield = BitfieldStruct::try_from((&mut config, input))?;
    Ok(bitfield.expand(&config))
}
/// Analyzes the given token stream for `#[bitfield]` properties and expands code if valid.
///
/// # Errors
///
/// If the given token stream does not yield a valid `#[bitfield]` specifier.
Analyzes the given token stream for `#[bitfield]` properties and expands code if valid.
Analyzes the given token stream for ` # [ bitfield ] ` properties and expands code if valid .
fn analyse_and_expand_or_error(
    args: TokenStream2,
    input: TokenStream2,
) -> Result<TokenStream2> {
    let input = syn::parse::<syn::ItemStruct>(input.into())?;
    let params = syn::parse::<ParamArgs>(args.into())?;
    let mut config = Config::default();
    config.feed_params(params)?;
    let bitfield = BitfieldStruct::try_from((&mut config, input))?;
    Ok(bitfield.expand(&config))
}
fn analyse_and_expand_or_error ( args : TokenStream2 , input : TokenStream2 , ) -> Result < TokenStream2 > { let input = syn :: parse :: < syn :: ItemStruct > ( input . into ( ) ) ? ; let params = syn :: parse :: < ParamArgs > ( args . into ( ) ) ? ; let mut config = Config :: default ( ) ; config . feed_params ( params ) ? ; let bitfield = BitfieldStruct :: try_from ( ( & mut config , input ) ) ? ; Ok ( bitfield . expand ( & config ) ) }
Analyzes the given token stream for `#[bitfield]` properties and expands code if valid.
Analyzes the given token stream for ` # [ bitfield ] ` properties and expands code if valid .
args
TokenStream2
input
TokenStream2
args
TokenStream2
input
TokenStream2
errors
If the given token stream does not yield a valid `#[bitfield]` specifier.
If the given token stream does not yield a valid ` # [ bitfield ] ` specifier .