X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=blobdiff_plain;f=ts%2Fstructs%2FOption_u16Z.mts;h=5cf9c73ddd8bbf49fd3059070115d480521fd098;hp=d4e45335d6a81d9520c22948252d84284385f1a5;hb=c629a01650402c8e2f9b9db8ced9ed63ce687727;hpb=d1d0121c000b713c10fd0bedd249eb8dda2e4db7 diff --git a/ts/structs/Option_u16Z.mts b/ts/structs/Option_u16Z.mts index d4e45335..5cf9c73d 100644 --- a/ts/structs/Option_u16Z.mts +++ b/ts/structs/Option_u16Z.mts @@ -280,6 +280,9 @@ import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScor import CommonBase from './CommonBase.mjs'; import * as bindings from '../bindings.mjs' +/** + * An enum which can either contain a u16 or not + */ export class Option_u16Z extends CommonBase { protected constructor(_dummy: object, ptr: number) { super(ptr, bindings.COption_u16Z_free); } /* @internal */ @@ -293,6 +296,9 @@ export class Option_u16Z extends CommonBase { } } + /** + * Constructs a new COption_u16Z containing a u16 + */ public static constructor_some(o: number): Option_u16Z { const ret: number = bindings.COption_u16Z_some(o); const ret_hu_conv: Option_u16Z = Option_u16Z.constr_from_ptr(ret); @@ -300,6 +306,9 @@ export class Option_u16Z extends CommonBase { return ret_hu_conv; } + /** + * Constructs a new COption_u16Z containing nothing + */ public static constructor_none(): Option_u16Z { const ret: number = bindings.COption_u16Z_none(); const ret_hu_conv: Option_u16Z = Option_u16Z.constr_from_ptr(ret); @@ -312,6 +321,10 @@ export class Option_u16Z extends CommonBase { return ret; } + /** + * Creates a new COption_u16Z which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ public clone(): Option_u16Z { const ret: number = bindings.COption_u16Z_clone(this.ptr); const ret_hu_conv: Option_u16Z = Option_u16Z.constr_from_ptr(ret); @@ -320,6 +333,7 @@ export class Option_u16Z extends CommonBase { } } +/** A Option_u16Z of type Some */ export class Option_u16Z_Some extends Option_u16Z { public some: number; /* @internal */ @@ -328,6 +342,7 @@ export class Option_u16Z_Some extends Option_u16Z { this.some = bindings.LDKCOption_u16Z_Some_get_some(ptr); } } +/** A Option_u16Z of type None */ export class Option_u16Z_None extends Option_u16Z { /* @internal */ public constructor(ptr: number) {