return new Result_ScoringParametersDecodeErrorZ_Err(null, ptr);
}
}
+ /**
+ * Creates a new CResult_ScoringParametersDecodeErrorZ in the success state.
+ */
public static constructor_ok(o_base_penalty_msat_arg: bigint, o_failure_penalty_msat_arg: bigint, o_overuse_penalty_start_1024th_arg: number, o_overuse_penalty_msat_per_1024th_arg: bigint, o_failure_penalty_half_life_arg: bigint): Result_ScoringParametersDecodeErrorZ {
const ret: number = bindings.CResult_ScoringParametersDecodeErrorZ_ok(bindings.ScoringParameters_new(o_base_penalty_msat_arg, o_failure_penalty_msat_arg, o_overuse_penalty_start_1024th_arg, o_overuse_penalty_msat_per_1024th_arg, o_failure_penalty_half_life_arg));
const ret_hu_conv: Result_ScoringParametersDecodeErrorZ = Result_ScoringParametersDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
+ /**
+ * Creates a new CResult_ScoringParametersDecodeErrorZ in the error state.
+ */
public static constructor_err(e: DecodeError): Result_ScoringParametersDecodeErrorZ {
const ret: number = bindings.CResult_ScoringParametersDecodeErrorZ_err(e == null ? 0 : CommonBase.get_ptr_of(e) & ~1);
const ret_hu_conv: Result_ScoringParametersDecodeErrorZ = Result_ScoringParametersDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
+ /**
+ * Checks if the given object is currently in the success state
+ */
public is_ok(): boolean {
const ret: boolean = bindings.CResult_ScoringParametersDecodeErrorZ_is_ok(this.ptr);
return ret;