modular-bitfield-impl 0.1.0

Bitfields for structs that allow for modular use of enums.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use proc_macro2::{
    Ident,
    Span,
};

/// Utilities for operating on `Ident` instances.
pub trait IdentExt {
    /// Creates a new Ident from the given `str`.
    fn from_str<T: AsRef<str>>(s: T) -> Ident {
        Ident::new(s.as_ref(), Span::call_site())
    }
}

impl IdentExt for Ident {}