ngyn_macros 0.2.4

Modular backend framework for web applications
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use syn::Ident;

/// Converts a string into an Ident.
///
/// #### Arguments
///
/// * `string` - The string to convert into an Ident.
///
/// #### Returns
///
/// The Ident representation of the string.
pub fn str_to_ident(string: String) -> Ident {
    Ident::new(&string, proc_macro::Span::call_site().into())
}