X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=ts%2Fstructs%2FResult_boolLightningErrorZ.mts;h=0a83c94ae0ce29c471dcd74bb7c69f444dd23e81;hb=eec046b940202cb1375e3473d055f06e64e2c9f5;hp=a34980641ee03ddc42a9ad17589c8075b5bccb7e;hpb=bf08029c1ad5244b59902eada723b634dcade62d;p=ldk-java diff --git a/ts/structs/Result_boolLightningErrorZ.mts b/ts/structs/Result_boolLightningErrorZ.mts index a3498064..0a83c94a 100644 --- a/ts/structs/Result_boolLightningErrorZ.mts +++ b/ts/structs/Result_boolLightningErrorZ.mts @@ -279,7 +279,6 @@ import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScor import CommonBase from './CommonBase.mjs'; import * as bindings from '../bindings.mjs' -import * as InternalUtils from '../InternalUtils.mjs' @@ -295,18 +294,27 @@ export class Result_boolLightningErrorZ extends CommonBase { return new Result_boolLightningErrorZ_Err(null, ptr); } } + /** + * Creates a new CResult_boolLightningErrorZ in the success state. + */ public static constructor_ok(o: boolean): Result_boolLightningErrorZ { const ret: number = bindings.CResult_boolLightningErrorZ_ok(o); const ret_hu_conv: Result_boolLightningErrorZ = Result_boolLightningErrorZ.constr_from_ptr(ret); return ret_hu_conv; } + /** + * Creates a new CResult_boolLightningErrorZ in the error state. + */ public static constructor_err(e: LightningError): Result_boolLightningErrorZ { const ret: number = bindings.CResult_boolLightningErrorZ_err(e == null ? 0 : CommonBase.get_ptr_of(e) & ~1); const ret_hu_conv: Result_boolLightningErrorZ = Result_boolLightningErrorZ.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_boolLightningErrorZ_is_ok(this.ptr); return ret; @@ -317,6 +325,10 @@ export class Result_boolLightningErrorZ extends CommonBase { return ret; } + /** + * Creates a new CResult_boolLightningErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ public clone(): Result_boolLightningErrorZ { const ret: number = bindings.CResult_boolLightningErrorZ_clone(this.ptr); const ret_hu_conv: Result_boolLightningErrorZ = Result_boolLightningErrorZ.constr_from_ptr(ret);