pub(crate) fn extract_attributes(
attrs: &[Attribute],
) -> Result<(Option<U256>, Option<U256>)>Expand description
Extracts #[slot(N)], #[base_slot(N)] attributes from a field’s attributes.
This function iterates through the attributes a single time to find all relevant values. It returns a tuple containing:
- The slot number (if present)
- The base_slot number (if present)
§Errors
Returns an error if:
- Both
#[slot]and#[base_slot]are present on the same field - Duplicate attributes of the same type are found