Pezkuwi API
    Preparing search index...

    Class Result<O, E>

    Result

    A Result maps to the Rust Result type, that can either wrap a success or error value

    Type Parameters

    • O extends Codec
    • E extends Codec

    Hierarchy (View Summary)

    Implements

    • IResult<O, E>
    Index
    • Type Parameters

      • O extends Codec
      • E extends Codec

      Parameters

      • registry: Registry
      • Ok: string | CodecClass<O, any[]>
      • Err: string | CodecClass<E, any[]>
      • Optionalvalue: unknown

      Returns Result<O, E>

    createdAtHash?: IU8a

    The block at which this value was retrieved/created (set to non-empty when retrieved from storage)

    initialU8aLength?: number

    The length of the initial encoded value (Only available when the value was constructed from a Uint8Array input)

    isStorageFallback?: boolean

    (internal usage) Indicates that the value was created via a fallback. This is used when with data specified in the metadata when the storage entry is empty.

    With metadata fallback values (available as defaults on most storage entries) any empty storage item should erturn the default. (This is the same as the implementation on the Bizinikiwi runtime)

    registry: Registry

    The registry associated with this object

    • get defIndexes(): number[]

      Returns number[]

      The available keys for this enum

    • get encodedLength(): number

      Returns number

      The length of the value when encoded as a Uint8Array

    • get isBasic(): boolean

      Returns boolean

      true if this is a basic enum (no values)

    • Parameters

      • Optionalother: unknown

      Returns boolean

      Compares the value of the input to see if there is a match

    • Parameters

      • OptionalisExtended: boolean
      • OptionaldisableAscii: boolean

      Returns AnyJson

      Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information

    • Parameters

      • OptionaldisableAscii: boolean

      Returns AnyJson

      Converts the value in a best-fit primitive form

    • Parameters

      • OptionalisBare: boolean

        true when the value has none of the type-specific prefixes (internal)

      Returns Uint8Array

      Encodes the value as a Uint8Array as per the SCALE specifications

    • Type Parameters

      • O extends Codec
      • E extends Codec

      Parameters

      • Types: { Err: string | CodecClass<E, any[]>; Ok: string | CodecClass<O, any[]> }

      Returns CodecClass<Result<O, E>>