@tgsnake/skema
    Preparing search index...

    Class BoolTrue

    Represents the boolean value true as a subclass of BoolFalse.

    This class provides serialization and deserialization logic for the true boolean value, using a specific 32-bit identifier. It is typically used in contexts where boolean values need to be encoded or decoded in a binary format.

    • The static ID uniquely identifies the BoolTrue type in serialized form.
    • The static value is always true.
    • The write method serializes the identifier to a 4-byte buffer.
    • The read method asynchronously returns the boolean value true.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _slots: string[]

    Internal array of slot names for the object.

    className: string

    Name of the class.

    classType: string

    Type of the class.

    cls: any = ...

    Reference to the constructor of the current class (late static binding).

    constructorId: number

    Unique identifier for the constructor.

    subclassOfId: number

    Identifier for the parent class (if any).

    ID: number = 0x997275b5
    value: boolean = true

    Methods

    • Reads data from the provided BytesIO instance and processes it using the associated class's read method.

      Parameters

      • data: BytesIO

        The BytesIO instance containing the data to be read.

      • ...args: any[]

        Additional arguments to be passed to the class's read method.

      Returns Promise<any>

      A promise that resolves with the result of the read operation.

    • Serializes the provided arguments using the associated class's write method.

      Parameters

      • ...args: any[]

        The arguments to be serialized.

      Returns Buffer

      The resulting Buffer after serialization.

    • Asynchronously reads a boolean value from the provided BytesIO stream.

      Parameters

      • _data: BytesIO

        The BytesIO instance to read data from.

      • ..._arg: any[]

        Additional arguments (unused).

      Returns Promise<boolean>

      A promise that resolves to a boolean value.