X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-c-bindings%2Fsrc%2Flightning%2Fln%2Ftypes.rs;h=7d07ff03c3f3628745b3a87208a4015cba08e330;hb=636543d86915837013c3eb1e0a9ea96114ef73fc;hp=145eaa7879a11023cce013e5ef56e534f9c41e7e;hpb=d5bd2d5366d797aa990799f78cc987b0be73de71;p=ldk-c-bindings diff --git a/lightning-c-bindings/src/lightning/ln/types.rs b/lightning-c-bindings/src/lightning/ln/types.rs index 145eaa7..7d07ff0 100644 --- a/lightning-c-bindings/src/lightning/ln/types.rs +++ b/lightning-c-bindings/src/lightning/ln/types.rs @@ -217,3 +217,8 @@ pub extern "C" fn ChannelId_read(ser: crate::c_types::u8slice) -> crate::c_types let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::lightning::ln::types::ChannelId { inner: ObjOps::heap_alloc(o), is_owned: true } }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::lightning::ln::msgs::DecodeError::native_into(e) }).into() }; local_res } +#[no_mangle] +/// Get the string representation of a ChannelId object +pub extern "C" fn ChannelId_to_str(o: &crate::lightning::ln::types::ChannelId) -> Str { + alloc::format!("{}", o.get_native_ref()).into() +}