def slot(self, slot_index, marshal=None, unmarshal=None, build=None, cast=None, compress=False):
def decorate(o):<EOL><INDENT>assert isinstance(o, PersistentMap)<EOL>name = o.__class__.__name__<EOL>assert slot_index not in self._index_to_slot<EOL>assert name not in self._name_to_slot<EOL>o._zlmdb_slot = slot_index<EOL>o._zlmdb_marshal = marshal<EOL>o._zlmdb_unmarshal = unmarshal<EOL>o._zlmdb_build = build<EOL>o._zlmdb_cast = cast<EOL>o._zlmdb_compress = compress<EOL>_slot = Slot(slot_index, name, o)<EOL>self._index_to_slot[slot_index] = _slot<EOL>self._name_to_slot[name] = _slot<EOL>return o<EOL><DEDENT>return decorate<EOL>
Decorator for use on classes derived from zlmdb.PersistentMap. The decorator define slots
in a LMDB database schema based on persistent maps, and slot configuration.

:param slot_index:
:param marshal:
:param unmarshal:
:param build:
:param cast:
:param compress:
:return: