Expand description
Utility functions for the contract macro implementation.
Functionsยง
- extract_
attributes ๐ - Extracts
#[slot(N)],#[base_slot(N)]attributes from a fieldโs attributes. - extract_
mapping_ ๐types - Extracts the type parameters from Mapping<K, V>.
- extract_
storable_ ๐array_ sizes - Extracts array sizes from the
#[storable_arrays(...)]attribute. - parse_
slot_ ๐value - Parses a slot value from a literal.
- to_
camel_ ๐case - Converts a string from snake_case to camelCase.
- to_
snake_ ๐case - Converts a string from CamelCase or snake_case to snake_case. Preserves SCREAMING_SNAKE_CASE, as those are assumed to be constant/immutable names.
Type Aliasesยง
- Extracted
Attributes ๐ - Return type for
extract_attributes: (slot, base_slot)