codemelted.js Module
    Preparing search index...

    Class CResult<T>

    Provides a result where either the value or the error can be signaled for later usage. A better construct then throwing exceptions and is adapted from Rust programming concepts.

    The data type that will be held by the value().

    Type Parameters

    • T

      The data type that will be held by the value().

    Index
    • Constructor for the class.

      Type Parameters

      • T

        The data type that will be held by the value().

      Parameters

      • params: { error?: any; value?: T | null } = {}

        The named parameters for the object.

        • Optionalerror?: any

          The error associated with the result.

        • Optionalvalue?: T | null

          The value associated with the result.

      Returns CResult<T>

    • Holds any error message associated with a failed transaction request.

      Returns string | Error | null

    • Signals whether an error was captured or not.

      Returns boolean

    • Signals the transaction completed with no errors.

      Returns boolean

    • Hold the value of the given result or nothing if the CResult is being used to signal there was no error.

      Returns T | null