[][src]Module screeps::macros

This file groups all macros used throughout the library. Since interop with javascript often gets unwieldy, macros are used extensively to follow DRY principles.

The documentation tries to give a good enough picture of how the macros should be used, but are in no way a formal description. For a better understanding of the macro_rule! arcane yet simple syntax, have a look at Macros, A Methodical Introduction

Macros

js

Embeds JavaScript code into your Rust program.

js_deserializable

A macro which makes it possible to convert an instance of a given type implementing Serde's Deserialize into a Value using TryInto.

js_serializable

A macro which makes it possible to pass an instance of a given type implementing Serde's Serialize into the js! macro.