Expand description
Common argument extraction helpers for stdlib module functions.
These reduce boilerplate in module implementations by centralising argument-count validation and typed argument extraction with uniform error messages.
Traits§
- String
Result Ext - Extension trait that adds
.with_context()toResult<T, String>.
Functions§
- check_
arg_ count - Validate that
argshas exactlyexpectedelements. - contextualize
- Format a contextualized error string.
- extract_
bool_ arg - Extract a bool argument at
indexfromargs. - extract_
float_ arg - Extract an f64 argument at
indexfromargs. - extract_
number_ arg - Extract a numeric (i64) argument at
indexfromargs. - extract_
string_ arg - Extract a string argument at
indexfromargs.