Rest.ParamsIter¶
Fields¶
Name |
Type |
Access |
Description |
|---|---|---|---|
params |
r |
||
position |
r |
Methods¶
|
|
|
Details¶
- class Rest.ParamsIter¶
- init(params)¶
- Parameters:
params (
Rest.Params) – a validRest.Params
Initialize a parameter iterator over params. Modifying params after calling this function invalidates the returned iterator.
RestParamsIter iter; const char *name; RestParam *param; rest_params_iter_init (&iter, params); while (rest_params_iter_next (&iter, &name, ¶m)) { /* do something with name and param */ }
- next()¶
- Returns:
Falseif the end of theRest.Paramshas been reached,Trueotherwise.- name:
a location to store the name, or
None- param:
a location to store the
Rest.Param, orNone
- Return type:
(
bool, name:str, param:Rest.Param)
Advances self and retrieves the name and/or parameter that are now pointed at as a result of this advancement. If
Falseis returned, name and param are not set and the iterator becomes invalid.