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;
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