+ /**
+ * Utility method to constructs a new UnknownVersion-variant DecodeError
+ */
+ public static constructor_unknown_version(): DecodeError {
+ const ret: bigint = bindings.DecodeError_unknown_version();
+ const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
+ CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new UnknownRequiredFeature-variant DecodeError
+ */
+ public static constructor_unknown_required_feature(): DecodeError {
+ const ret: bigint = bindings.DecodeError_unknown_required_feature();
+ const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
+ CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new InvalidValue-variant DecodeError
+ */
+ public static constructor_invalid_value(): DecodeError {
+ const ret: bigint = bindings.DecodeError_invalid_value();
+ const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
+ CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new ShortRead-variant DecodeError
+ */
+ public static constructor_short_read(): DecodeError {
+ const ret: bigint = bindings.DecodeError_short_read();
+ const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
+ CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new BadLengthDescriptor-variant DecodeError
+ */
+ public static constructor_bad_length_descriptor(): DecodeError {
+ const ret: bigint = bindings.DecodeError_bad_length_descriptor();
+ const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
+ CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new Io-variant DecodeError
+ */
+ public static constructor_io(a: IOError): DecodeError {
+ const ret: bigint = bindings.DecodeError_io(a);
+ const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
+ CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new UnsupportedCompression-variant DecodeError
+ */
+ public static constructor_unsupported_compression(): DecodeError {
+ const ret: bigint = bindings.DecodeError_unsupported_compression();
+ const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
+ CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if two DecodeErrors contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+ public eq(b: DecodeError): boolean {
+ const ret: boolean = bindings.DecodeError_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ return ret;
+ }
+
+}
+/** A DecodeError of type UnknownVersion */
+export class DecodeError_UnknownVersion extends DecodeError {
+ /* @internal */
+ public constructor(ptr: bigint) {
+ super(null, ptr);
+ }
+}
+/** A DecodeError of type UnknownRequiredFeature */
+export class DecodeError_UnknownRequiredFeature extends DecodeError {
+ /* @internal */
+ public constructor(ptr: bigint) {
+ super(null, ptr);
+ }
+}
+/** A DecodeError of type InvalidValue */
+export class DecodeError_InvalidValue extends DecodeError {
+ /* @internal */
+ public constructor(ptr: bigint) {
+ super(null, ptr);
+ }
+}
+/** A DecodeError of type ShortRead */
+export class DecodeError_ShortRead extends DecodeError {
+ /* @internal */
+ public constructor(ptr: bigint) {
+ super(null, ptr);
+ }
+}
+/** A DecodeError of type BadLengthDescriptor */
+export class DecodeError_BadLengthDescriptor extends DecodeError {
+ /* @internal */
+ public constructor(ptr: bigint) {
+ super(null, ptr);
+ }
+}
+/** A DecodeError of type Io */
+export class DecodeError_Io extends DecodeError {
+ public io: IOError;
+ /* @internal */
+ public constructor(ptr: bigint) {
+ super(null, ptr);
+ this.io = bindings.LDKDecodeError_Io_get_io(ptr);
+ }
+}
+/** A DecodeError of type UnsupportedCompression */
+export class DecodeError_UnsupportedCompression extends DecodeError {
+ /* @internal */
+ public constructor(ptr: bigint) {
+ super(null, ptr);
+ }