Crate near_syn[][src]

Provides function to deal with Rust syntax.

Modules

ts

Functions to transpile Rust to TypeScript.

Macros

Args

Defines the Args to be used in binaries.

Functions

derives

Returns true if any of the attributes under item derive from macro_name. Returns false otherwise.

has_attr

Returns true if attrs contain attr_name. Returns false otherwise.

is_mut

Returns true if method is declared as mut.

is_payable

Returns whether the given method is marked as payable.

is_public

Returns true if the method is explicitly marked as pub. Returns false otherwise.

join_path

Joins segments of path by ::.

parse_rust

Returns the Rust syntax tree for the given file_name path. Panics if the file cannot be open or the file has syntax errors.

write_docs

Writes Rust doc comments to file. Each line of doc is prefixed with prefix.