impl Drop for DecodeError {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeDecodeError>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for DecodeError {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeDecodeError>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for Init {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeInit>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for Init {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeInit>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for ErrorMessage {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeErrorMessage>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for ErrorMessage {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeErrorMessage>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for Ping {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativePing>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for Ping {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativePing>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for Pong {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativePong>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for Pong {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativePong>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for OpenChannel {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeOpenChannel>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for OpenChannel {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeOpenChannel>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for AcceptChannel {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeAcceptChannel>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for AcceptChannel {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeAcceptChannel>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for FundingCreated {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeFundingCreated>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for FundingCreated {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeFundingCreated>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for FundingSigned {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeFundingSigned>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for FundingSigned {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeFundingSigned>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for FundingLocked {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeFundingLocked>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for FundingLocked {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeFundingLocked>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for Shutdown {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeShutdown>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for Shutdown {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeShutdown>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for ClosingSigned {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeClosingSigned>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for ClosingSigned {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeClosingSigned>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for UpdateAddHTLC {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeUpdateAddHTLC>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for UpdateAddHTLC {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeUpdateAddHTLC>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for UpdateFulfillHTLC {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeUpdateFulfillHTLC>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for UpdateFulfillHTLC {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeUpdateFulfillHTLC>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for UpdateFailHTLC {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeUpdateFailHTLC>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for UpdateFailHTLC {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeUpdateFailHTLC>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for UpdateFailMalformedHTLC {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeUpdateFailMalformedHTLC>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for UpdateFailMalformedHTLC {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeUpdateFailMalformedHTLC>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for CommitmentSigned {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeCommitmentSigned>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for CommitmentSigned {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeCommitmentSigned>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for RevokeAndACK {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeRevokeAndACK>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for RevokeAndACK {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeRevokeAndACK>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for UpdateFee {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeUpdateFee>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for UpdateFee {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeUpdateFee>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for DataLossProtect {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeDataLossProtect>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for DataLossProtect {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeDataLossProtect>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for ChannelReestablish {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeChannelReestablish>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for ChannelReestablish {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeChannelReestablish>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for AnnouncementSignatures {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeAnnouncementSignatures>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for AnnouncementSignatures {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeAnnouncementSignatures>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for UnsignedNodeAnnouncement {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeUnsignedNodeAnnouncement>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for UnsignedNodeAnnouncement {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeUnsignedNodeAnnouncement>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for NodeAnnouncement {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeNodeAnnouncement>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for NodeAnnouncement {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeNodeAnnouncement>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for UnsignedChannelAnnouncement {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeUnsignedChannelAnnouncement>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for UnsignedChannelAnnouncement {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeUnsignedChannelAnnouncement>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for ChannelAnnouncement {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeChannelAnnouncement>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for ChannelAnnouncement {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeChannelAnnouncement>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for UnsignedChannelUpdate {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeUnsignedChannelUpdate>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for UnsignedChannelUpdate {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeUnsignedChannelUpdate>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for ChannelUpdate {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeChannelUpdate>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for ChannelUpdate {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeChannelUpdate>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for QueryChannelRange {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeQueryChannelRange>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for QueryChannelRange {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeQueryChannelRange>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for ReplyChannelRange {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeReplyChannelRange>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for ReplyChannelRange {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeReplyChannelRange>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for QueryShortChannelIds {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeQueryShortChannelIds>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for QueryShortChannelIds {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeQueryShortChannelIds>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for ReplyShortChannelIdsEnd {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeReplyShortChannelIdsEnd>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for ReplyShortChannelIdsEnd {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeReplyShortChannelIdsEnd>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for GossipTimestampFilter {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeGossipTimestampFilter>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for GossipTimestampFilter {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeGossipTimestampFilter>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for LightningError {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeLightningError>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for LightningError {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeLightningError>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}
impl Drop for CommitmentUpdate {
fn drop(&mut self) {
- if self.is_owned && !self.inner.is_null() {
+ if self.is_owned && !<*mut nativeCommitmentUpdate>::is_null(self.inner) {
let _ = unsafe { Box::from_raw(self.inner) };
}
}
impl Clone for CommitmentUpdate {
fn clone(&self) -> Self {
Self {
- inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ inner: if <*mut nativeCommitmentUpdate>::is_null(self.inner) { std::ptr::null_mut() } else {
Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
is_owned: true,
}