Rest.ParamsIter

Fields

Name

Type

Access

Description

params

Rest.Params

r

position

int

r

Methods

init (params)

next ()

Details

class Rest.ParamsIter
init(params)
Parameters:

params (Rest.Params) – a valid Rest.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, &param)) {
  /* do something with name and param */
}
next()
Returns:

False if the end of the Rest.Params has been reached, True otherwise.

name:

a location to store the name, or None

param:

a location to store the Rest.Param, or None

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 False is returned, name and param are not set and the iterator becomes invalid.