#[allow(unused)]
/// Used only if an object of this type is returned as a trait impl by a method
pub(crate) extern "C" fn InvoiceRequest_clone_void(this_ptr: *const c_void) -> *mut c_void {
- Box::into_raw(Box::new(unsafe { (*(this_ptr as *mut nativeInvoiceRequest)).clone() })) as *mut c_void
+ Box::into_raw(Box::new(unsafe { (*(this_ptr as *const nativeInvoiceRequest)).clone() })) as *mut c_void
}
#[no_mangle]
/// Creates a copy of the InvoiceRequest
pub extern "C" fn InvoiceRequest_clone(orig: &InvoiceRequest) -> InvoiceRequest {
orig.clone()
}
+/// Get a string which allows debug introspection of a InvoiceRequest object
+pub extern "C" fn InvoiceRequest_debug_str_void(o: *const c_void) -> Str {
+ alloc::format!("{:?}", unsafe { o as *const crate::lightning::offers::invoice_request::InvoiceRequest }).into()}
use lightning::offers::invoice_request::VerifiedInvoiceRequest as nativeVerifiedInvoiceRequestImport;
pub(crate) type nativeVerifiedInvoiceRequest = nativeVerifiedInvoiceRequestImport;
#[allow(unused)]
/// Used only if an object of this type is returned as a trait impl by a method
pub(crate) extern "C" fn VerifiedInvoiceRequest_clone_void(this_ptr: *const c_void) -> *mut c_void {
- Box::into_raw(Box::new(unsafe { (*(this_ptr as *mut nativeVerifiedInvoiceRequest)).clone() })) as *mut c_void
+ Box::into_raw(Box::new(unsafe { (*(this_ptr as *const nativeVerifiedInvoiceRequest)).clone() })) as *mut c_void
}
#[no_mangle]
/// Creates a copy of the VerifiedInvoiceRequest
pub extern "C" fn VerifiedInvoiceRequest_clone(orig: &VerifiedInvoiceRequest) -> VerifiedInvoiceRequest {
orig.clone()
}
+/// Get a string which allows debug introspection of a VerifiedInvoiceRequest object
+pub extern "C" fn VerifiedInvoiceRequest_debug_str_void(o: *const c_void) -> Str {
+ alloc::format!("{:?}", unsafe { o as *const crate::lightning::offers::invoice_request::VerifiedInvoiceRequest }).into()}
/// The chains that may be used when paying a requested invoice (e.g., bitcoin mainnet).
/// Payments must be denominated in units of the minimal lightning-payable unit (e.g., msats)
/// for the selected chain.
#[no_mangle]
pub extern "C" fn UnsignedInvoiceRequest_chains(this_arg: &crate::lightning::offers::invoice_request::UnsignedInvoiceRequest) -> crate::c_types::derived::CVec_ThirtyTwoBytesZ {
let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.chains();
- let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { crate::c_types::ThirtyTwoBytes { data: item.to_bytes() } }); };
+ let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { crate::c_types::ThirtyTwoBytes { data: *item.as_ref() } }); };
local_ret.into()
}
#[no_mangle]
pub extern "C" fn UnsignedInvoiceRequest_chain(this_arg: &crate::lightning::offers::invoice_request::UnsignedInvoiceRequest) -> crate::c_types::ThirtyTwoBytes {
let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.chain();
- crate::c_types::ThirtyTwoBytes { data: ret.to_bytes() }
+ crate::c_types::ThirtyTwoBytes { data: *ret.as_ref() }
}
/// The amount to pay in msats (i.e., the minimum lightning-payable unit for [`chain`]), which
#[no_mangle]
pub extern "C" fn InvoiceRequest_chains(this_arg: &crate::lightning::offers::invoice_request::InvoiceRequest) -> crate::c_types::derived::CVec_ThirtyTwoBytesZ {
let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.chains();
- let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { crate::c_types::ThirtyTwoBytes { data: item.to_bytes() } }); };
+ let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { crate::c_types::ThirtyTwoBytes { data: *item.as_ref() } }); };
local_ret.into()
}
#[no_mangle]
pub extern "C" fn InvoiceRequest_chain(this_arg: &crate::lightning::offers::invoice_request::InvoiceRequest) -> crate::c_types::ThirtyTwoBytes {
let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.chain();
- crate::c_types::ThirtyTwoBytes { data: ret.to_bytes() }
+ crate::c_types::ThirtyTwoBytes { data: *ret.as_ref() }
}
/// The amount to pay in msats (i.e., the minimum lightning-payable unit for [`chain`]), which
#[no_mangle]
pub extern "C" fn VerifiedInvoiceRequest_chains(this_arg: &crate::lightning::offers::invoice_request::VerifiedInvoiceRequest) -> crate::c_types::derived::CVec_ThirtyTwoBytesZ {
let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.chains();
- let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { crate::c_types::ThirtyTwoBytes { data: item.to_bytes() } }); };
+ let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { crate::c_types::ThirtyTwoBytes { data: *item.as_ref() } }); };
local_ret.into()
}
#[no_mangle]
pub extern "C" fn VerifiedInvoiceRequest_chain(this_arg: &crate::lightning::offers::invoice_request::VerifiedInvoiceRequest) -> crate::c_types::ThirtyTwoBytes {
let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.chain();
- crate::c_types::ThirtyTwoBytes { data: ret.to_bytes() }
+ crate::c_types::ThirtyTwoBytes { data: *ret.as_ref() }
}
/// The amount to pay in msats (i.e., the minimum lightning-payable unit for [`chain`]), which
pub extern "C" fn UnsignedInvoiceRequest_write(obj: &crate::lightning::offers::invoice_request::UnsignedInvoiceRequest) -> crate::c_types::derived::CVec_u8Z {
crate::c_types::serialize_obj(unsafe { &*obj }.get_native_ref())
}
-#[no_mangle]
+#[allow(unused)]
pub(crate) extern "C" fn UnsignedInvoiceRequest_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeUnsignedInvoiceRequest) })
}
pub extern "C" fn InvoiceRequest_write(obj: &crate::lightning::offers::invoice_request::InvoiceRequest) -> crate::c_types::derived::CVec_u8Z {
crate::c_types::serialize_obj(unsafe { &*obj }.get_native_ref())
}
-#[no_mangle]
+#[allow(unused)]
pub(crate) extern "C" fn InvoiceRequest_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeInvoiceRequest) })
}