| 234 | |
| 235 | |
| 236 | class EnumEmpty(enum.IntEnum, metaclass=fbe.DefaultEnumMeta): |
| 237 | unknown = ~0 |
| 238 | |
| 239 | __slots__ = () |
| 240 | |
| 241 | def __format__(self, format_spec): |
| 242 | return self.__str__() |
| 243 | |
| 244 | def __str__(self): |
| 245 | return "<empty>" |
| 246 | |
| 247 | @classmethod |
| 248 | def _missing_(cls, value): |
| 249 | return EnumEmpty.unknown |
| 250 | |
| 251 | @staticmethod |
| 252 | def __from_json__(value): |
| 253 | if value is None: |
| 254 | return None |
| 255 | return EnumEmpty(value) |
| 256 | |
| 257 | |
| 258 | # Fast Binary Encoding EnumEmpty field model |
no outgoing calls