Attributes
Field & function attributes.
You've already seen some Stof attributes:
Create your own or re-purpose attributes as you'd like
#[meta({"meaning": "everything"})]
field: 42
#[main]
#[purpose("testing general attributes")]
fn main() {
const my_attributes = this.attributes(); // "this" is the current fn (shorthand)
pln(my_attributes.get("purpose"));
const field_attributes = self.attributes("field"); // "self" is current doc obj
const meta = field_attributes.get("meta");
pln(meta.get("meaning"));
}Last updated