Module wasm_bindgen_backend::util[][src]

Common utility function for manipulating syn types and handling parsed values

Structs

ShortHash

Small utility used when generating symbol names.

Functions

ident_ty

Create a path type with a single segment from a given Identifier

leading_colon_path_ty

Create a global path type from the given segments. For example an iterator yielding the idents [foo, bar, baz] will result in the path type ::foo::bar::baz.

raw_ident

Create an Ident without checking to see if it conflicts with a Rust keyword.

rust_ident

Create an Ident, possibly mangling it if it conflicts with a Rust keyword.

simple_path_ty

Create a path type from the given segments. For example an iterator yielding the idents [foo, bar, baz] will result in the path type foo::bar::baz.

wrap_import_function

Convert an ImportFunction into the more generic Import type, wrapping the provided function