#move #off-chain #tags #standard #type #instance #object

af-move-type

Standard for representing Move types (MoveType) off-chain and their type tags

12 releases

Uses new Rust 2024

new 0.9.0 Mar 20, 2025
0.8.7 Mar 8, 2025
0.8.4 Feb 22, 2025
0.8.2 Jan 29, 2025
0.7.3 Jan 14, 2025

#792 in Magic Beans

Download history 306/week @ 2025-01-10 295/week @ 2025-01-17 316/week @ 2025-01-24 475/week @ 2025-01-31 156/week @ 2025-02-07 155/week @ 2025-02-14 360/week @ 2025-02-21 361/week @ 2025-02-28 434/week @ 2025-03-07 162/week @ 2025-03-14

1,321 downloads per month
Used in 12 crates (10 directly)

Apache-2.0

155KB
3.5K SLoC

Defines the core standard for representing Move types off-chain and their type tags.

The core items are MoveType and MoveTypeTag. These are useful trait bounds to use when dealing with generic off-chain Move type representations. They are implemented for the primitive types that correspond to Move's primitives (integers/bool). Also included is MoveVec, corresponding to vector and defining a pretty Display.

For Move structs (objects), MoveStruct should be used as it has an associated MoveStructTag. The MoveStruct derive macro is exported for automatically creating a MoveStructTag implementation from normal Rust struct declarations.

A specific instance of a Move type is represented by MoveInstance.


lib.rs:

Defines the core standard for representing Move types off-chain and their type tags.

The core items are MoveType and MoveTypeTag. These are useful trait bounds to use when dealing with generic off-chain Move type representations. They are implemented for the primitive types that correspond to Move's primitives (integers/bool). Also included is MoveVec, corresponding to vector and defining a pretty Display.

For Move structs (objects), MoveStruct should be used as it has an associated MoveStructTag. The MoveStruct derive macro is exported for automatically creating a MoveStructTag implementation from normal Rust struct declarations.

A specific instance of a Move type is represented by MoveInstance.

Dependencies

~13MB
~248K SLoC