code: def rules(self):
          
          rule = lib.EnvGetNextDefrule(self._env, ffi.NULL)
  
          while rule != ffi.NULL:
              yield Rule(self._env, rule)
  
              rule = lib.EnvGetNextDefrule(self._env, rule)
docs: Iterate over the defined Rules.