Skip to main content

create_string_var_declarator

Function create_string_var_declarator 

Source
pub fn create_string_var_declarator(ident: Ident, value: &str) -> VarDeclarator
Expand description

Creates a VarDeclarator initialized to a string.

§Arguments

  • ident - The identifier for the variable name
  • value - The string value

§Example

let decl = create_string_var_declarator(my_ident, "value");