+ #[allow(unused)]
+ pub(crate) fn into_native(self) -> nativeMonitorEvent {
+ match self {
+ MonitorEvent::HTLCEvent (mut a, ) => {
+ nativeMonitorEvent::HTLCEvent (
+ *unsafe { Box::from_raw(a.take_inner()) },
+ )
+ },
+ MonitorEvent::CommitmentTxBroadcasted (mut a, ) => {
+ nativeMonitorEvent::CommitmentTxBroadcasted (
+ *unsafe { Box::from_raw(a.take_inner()) },
+ )
+ },
+ }
+ }
+ #[allow(unused)]
+ pub(crate) fn from_native(native: &nativeMonitorEvent) -> Self {
+ match native {
+ nativeMonitorEvent::HTLCEvent (ref a, ) => {
+ let mut a_nonref = (*a).clone();
+ MonitorEvent::HTLCEvent (
+ crate::chain::channelmonitor::HTLCUpdate { inner: Box::into_raw(Box::new(a_nonref)), is_owned: true },
+ )
+ },
+ nativeMonitorEvent::CommitmentTxBroadcasted (ref a, ) => {
+ let mut a_nonref = (*a).clone();
+ MonitorEvent::CommitmentTxBroadcasted (
+ crate::chain::transaction::OutPoint { inner: Box::into_raw(Box::new(a_nonref)), is_owned: true },
+ )
+ },
+ }
+ }
+ #[allow(unused)]
+ pub(crate) fn native_into(native: nativeMonitorEvent) -> Self {
+ match native {
+ nativeMonitorEvent::HTLCEvent (mut a, ) => {
+ MonitorEvent::HTLCEvent (
+ crate::chain::channelmonitor::HTLCUpdate { inner: Box::into_raw(Box::new(a)), is_owned: true },
+ )
+ },
+ nativeMonitorEvent::CommitmentTxBroadcasted (mut a, ) => {
+ MonitorEvent::CommitmentTxBroadcasted (
+ crate::chain::transaction::OutPoint { inner: Box::into_raw(Box::new(a)), is_owned: true },
+ )
+ },