X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-c-bindings;a=blobdiff_plain;f=lightning-c-bindings%2Fsrc%2Fc_types%2Fderived.rs;h=2afa5c256eaf42b5432fa4bbf54cf98afbd85d92;hp=cdc062788f781e244ef31941429e66830679f361;hb=b187ebbabe60d2ef884c5eadce93fef52674923d;hpb=e615fc13f105fc8a943c615af1bcc20da96412c1 diff --git a/lightning-c-bindings/src/c_types/derived.rs b/lightning-c-bindings/src/c_types/derived.rs index cdc0627..2afa5c2 100644 --- a/lightning-c-bindings/src/c_types/derived.rs +++ b/lightning-c-bindings/src/c_types/derived.rs @@ -8397,6 +8397,23 @@ impl From Self { + if self.result_ok { + Self { result_ok: true, contents: CResult_NetworkGraphDecodeErrorZPtr { + result: Box::into_raw(Box::new(::clone(unsafe { &*self.contents.result }))) + } } + } else { + Self { result_ok: false, contents: CResult_NetworkGraphDecodeErrorZPtr { + err: Box::into_raw(Box::new(::clone(unsafe { &*self.contents.err }))) + } } + } + } +} +#[no_mangle] +/// Creates a new CResult_NetworkGraphDecodeErrorZ which has the same data as `orig` +/// but with all dynamically-allocated buffers duplicated in new buffers. +pub extern "C" fn CResult_NetworkGraphDecodeErrorZ_clone(orig: &CResult_NetworkGraphDecodeErrorZ) -> CResult_NetworkGraphDecodeErrorZ { Clone::clone(&orig) } #[repr(C)] /// The contents of CResult_NetAddressu8Z pub union CResult_NetAddressu8ZPtr {