runtimepy.primitives.types.bool
index
/home/vkottler/src/vkottler/workspace/runtimepy/runtimepy/primitives/types/bool.py

A module implementing a type interface for booleans.

 
Classes
       
runtimepy.primitives.types.base.PrimitiveType(typing.Generic)
BooleanType

 
class BooleanType(runtimepy.primitives.types.base.PrimitiveType)
    BooleanType() -> None
 
A simple type interface for booleans.
 
 
Method resolution order:
BooleanType
runtimepy.primitives.types.base.PrimitiveType
typing.Generic
builtins.object

Methods defined here:
__init__(self) -> None
Initialize this type.

Data and other attributes defined here:
__annotations__ = {}
__orig_bases__ = (runtimepy.primitives.types.base.PrimitiveType[ctypes.c_bool],)
__parameters__ = ()
c_type = <class 'ctypes.c_bool'>
name = 'bool'

Methods inherited from runtimepy.primitives.types.base.PrimitiveType:
__eq__(self, other) -> bool
Determine if two types are equal.
__hash__(self) -> int
Get a hash for this type.
__str__(self) -> str
Get this type as a string.
decode(self, data: bytes, byte_order: runtimepy.primitives.byte_order.ByteOrder = <ByteOrder.NETWORK: 4>) -> Union[bool, int, float]
Decode primitive based on this type.
encode(self, value: Union[bool, int, float], byte_order: runtimepy.primitives.byte_order.ByteOrder = <ByteOrder.NETWORK: 4>) -> bytes
Encode a primitive value.
read(self, stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = <ByteOrder.NETWORK: 4>) -> Union[bool, int, float]
Read a primitive from a stream based on this type.
write(self, value: Union[bool, int, float], stream: <class 'BinaryIO'>, byte_order: runtimepy.primitives.byte_order.ByteOrder = <ByteOrder.NETWORK: 4>) -> int
Write a primitive to a stream based on this type.

Class methods inherited from runtimepy.primitives.types.base.PrimitiveType:
instance() -> ~T from builtins.type
Get an instance of this primitive type.

Data descriptors inherited from runtimepy.primitives.types.base.PrimitiveType:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

Class methods inherited from typing.Generic:
__class_getitem__(...) from builtins.type
Parameterizes a generic class.
 
At least, parameterizing a generic class is the *main* thing this
method does. For example, for some generic class `Foo`, this is called
when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
 
However, note that this method is also called when defining generic
classes in the first place with `class Foo[T]: ...`.
__init_subclass__(...) from builtins.type
Function to initialize subclasses.

 
Data
        Bool = <runtimepy.primitives.types.bool.BooleanType object>