getargs-derive-macros 0.1.0

Internal implementation detail of getargs-derive. Not meant for direct use; depend on getargs-derive instead.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use super::RawContainer;
use crate::model::attr::set_once;
use crate::model::field::parse_bool;
use syn::meta::ParseNestedMeta;

pub(super) fn allow_negative_numbers(
    meta: &ParseNestedMeta,
    raw: &mut RawContainer,
) -> syn::Result<()> {
    let (value, _) = parse_bool(meta, "allow_negative_numbers")?;
    set_once(&mut raw.allow_negative_numbers, value, meta)
}