py21cmfast.wrapper.structs.StructInstanceWrapper ================================================ .. py:class:: py21cmfast.wrapper.structs.StructInstanceWrapper(wrapped, ffi) A wrapper for *instances* of C structs. This is as opposed to :class:`StructWrapper`, which is for the un-instantiated structs. :Parameters: * **wrapped** -- The reference to the C object to wrap (contained in the ``cffi.lib`` object). * **ffi** -- The ``cffi.ffi`` object. .. !! processed by numpydoc !! .. py:method:: __iter__() Iterate over the object like a dict. .. !! processed by numpydoc !! .. py:method:: __repr__() Return a unique representation of the instance. .. !! processed by numpydoc !! .. py:method:: __setattr__(name, value) Set an attribute of the instance, attempting to change it in the C struct as well. .. !! processed by numpydoc !! .. py:method:: filtered_repr(filter_params) Get a fully unique representation of the instance that filters out some parameters. :Parameters: **filter_params** (*list of str*) -- The parameter names which should not appear in the representation. .. !! processed by numpydoc !! .. py:method:: items() Yield (name, value) pairs for each element of the struct. .. !! processed by numpydoc !! .. py:method:: keys() Return a list of names of elements in the struct. .. !! processed by numpydoc !!