import type { Codec, CodecClass, IResult, Registry } from '../types/index.js'; import { Enum } from './Enum.js'; /** * @name Result * @description * A Result maps to the Rust Result type, that can either wrap a success or error value */ export declare class Result extends Enum implements IResult { constructor(registry: Registry, Ok: CodecClass | string, Err: CodecClass | string, value?: unknown); static with(Types: { Ok: CodecClass | string; Err: CodecClass | string; }): CodecClass>; /** * @description Returns the wrapper Err value (if isErr) */ get asErr(): E; /** * @description Returns the wrapper Ok value (if isOk) */ get asOk(): O; /** * @description Checks if the Result has no value */ get isEmpty(): boolean; /** * @description Checks if the Result wraps an Err value */ get isErr(): boolean; /** * @description Checks if the Result wraps an Ok value */ get isOk(): boolean; /** * @description Returns the base runtime type name for this instance */ toRawType(): string; }