X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=blobdiff_plain;f=ts%2Fstructs%2FResult_CVec_CVec_u8ZZNoneZ.mts;h=e9614460812aa3dfdf89d5f115ede2e25c5bc716;hp=5596dfe38718e6644e181d09d9ef91420e0d2f5f;hb=c629a01650402c8e2f9b9db8ced9ed63ce687727;hpb=d1d0121c000b713c10fd0bedd249eb8dda2e4db7 diff --git a/ts/structs/Result_CVec_CVec_u8ZZNoneZ.mts b/ts/structs/Result_CVec_CVec_u8ZZNoneZ.mts index 5596dfe3..e9614460 100644 --- a/ts/structs/Result_CVec_CVec_u8ZZNoneZ.mts +++ b/ts/structs/Result_CVec_CVec_u8ZZNoneZ.mts @@ -294,18 +294,27 @@ export class Result_CVec_CVec_u8ZZNoneZ extends CommonBase { return new Result_CVec_CVec_u8ZZNoneZ_Err(null, ptr); } } + /** + * Creates a new CResult_CVec_CVec_u8ZZNoneZ in the success state. + */ public static constructor_ok(o: Uint8Array[]): Result_CVec_CVec_u8ZZNoneZ { const ret: number = bindings.CResult_CVec_CVec_u8ZZNoneZ_ok(bindings.encodeUint32Array(o != null ? o.map(o_conv_12 => bindings.encodeUint8Array(o_conv_12)) : null)); const ret_hu_conv: Result_CVec_CVec_u8ZZNoneZ = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret); return ret_hu_conv; } + /** + * Creates a new CResult_CVec_CVec_u8ZZNoneZ in the error state. + */ public static constructor_err(): Result_CVec_CVec_u8ZZNoneZ { const ret: number = bindings.CResult_CVec_CVec_u8ZZNoneZ_err(); const ret_hu_conv: Result_CVec_CVec_u8ZZNoneZ = Result_CVec_CVec_u8ZZNoneZ.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_CVec_CVec_u8ZZNoneZ_is_ok(this.ptr); return ret; @@ -316,6 +325,10 @@ export class Result_CVec_CVec_u8ZZNoneZ extends CommonBase { return ret; } + /** + * Creates a new CResult_CVec_CVec_u8ZZNoneZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ public clone(): Result_CVec_CVec_u8ZZNoneZ { const ret: number = bindings.CResult_CVec_CVec_u8ZZNoneZ_clone(this.ptr); const ret_hu_conv: Result_CVec_CVec_u8ZZNoneZ = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret); @@ -337,6 +350,7 @@ export class Result_CVec_CVec_u8ZZNoneZ_OK extends Result_CVec_CVec_u8ZZNoneZ { const res_conv_12_conv: Uint8Array = bindings.decodeUint8Array(res_conv_12); res_conv_12_arr[m] = res_conv_12_conv; } + bindings.freeWasmMemory(res) this.res = res_conv_12_arr; } }