#![allow(unused_imports)] use alloc::borrow::ToOwned; use objc2::rc::Retained; use objc2::Message; use crate::{NSCopying, NSMutableCopying}; #[cfg(feature = "NSArray")] impl ToOwned for crate::NSArray { type Owned = Retained; fn to_owned(&self) -> Self::Owned { self.copy() } } #[cfg(feature = "NSArray")] impl ToOwned for crate::NSMutableArray { type Owned = Retained; fn to_owned(&self) -> Self::Owned { self.mutableCopy() } } #[cfg(feature = "NSData")] impl ToOwned for crate::NSData { type Owned = Retained; fn to_owned(&self) -> Self::Owned { self.copy() } } #[cfg(feature = "NSData")] impl ToOwned for crate::NSMutableData { type Owned = Retained; fn to_owned(&self) -> Self::Owned { self.mutableCopy() } } #[cfg(feature = "NSException")] impl ToOwned for crate::NSException { type Owned = Retained; fn to_owned(&self) -> Self::Owned { self.copy() } } #[cfg(feature = "NSSet")] impl ToOwned for crate::NSSet { type Owned = Retained; fn to_owned(&self) -> Self::Owned { self.copy() } } #[cfg(feature = "NSSet")] impl ToOwned for crate::NSMutableSet { type Owned = Retained; fn to_owned(&self) -> Self::Owned { self.mutableCopy() } } #[cfg(feature = "NSString")] impl ToOwned for crate::NSString { type Owned = Retained; fn to_owned(&self) -> Self::Owned { self.copy() } } #[cfg(feature = "NSString")] impl ToOwned for crate::NSMutableString { type Owned = Retained; fn to_owned(&self) -> Self::Owned { self.mutableCopy() } } #[cfg(feature = "NSAttributedString")] impl ToOwned for crate::NSAttributedString { type Owned = Retained; fn to_owned(&self) -> Self::Owned { self.copy() } } #[cfg(feature = "NSAttributedString")] impl ToOwned for crate::NSMutableAttributedString { type Owned = Retained; fn to_owned(&self) -> Self::Owned { self.mutableCopy() } } #[cfg(feature = "NSUUID")] impl ToOwned for crate::NSUUID { type Owned = Retained; fn to_owned(&self) -> Self::Owned { self.copy() } } #[cfg(feature = "NSValue")] impl ToOwned for crate::NSValue { type Owned = Retained; fn to_owned(&self) -> Self::Owned { self.copy() } } #[cfg(feature = "NSValue")] impl ToOwned for crate::NSNumber { type Owned = Retained; fn to_owned(&self) -> Self::Owned { self.copy() } }