Content
@
0 reply
0 recast
0 reaction
Sigrlami ⚛️❄️
@sigrlami
🦀 Rust Tip (11): The Rust type system allows you to define "phantom types" using "markers", which can be structs with just a name and can encode metadata about the specific type. They are like special tags that you attach to data. Here's an example, a Transaction struct that can be in a "New" or "Pending" state:
3 replies
2 recasts
7 reactions
Anatole
@anatolehard
impressive
0 reply
0 recast
0 reaction