Trait objc2_foundation::NSCopying
source · pub unsafe trait NSCopying {
// Provided methods
fn copy(&self) -> Retained<Self::Immutable>
where Self: Sized + Message + CounterpartOrSelf { ... }
unsafe fn copyWithZone(
&self,
zone: *mut NSZone
) -> Retained<Self::Immutable>
where Self: Sized + Message + CounterpartOrSelf { ... }
}
Available on crate feature
NSObject
only.Expand description
A protocol to provide functional copies of objects.
This is similar to Rust’s Clone
trait, along with sharing a few
similarities to the std::borrow::ToOwned
trait with regards to the
output type.
See Apple’s documentation for details.
Provided Methods§
sourcefn copy(&self) -> Retained<Self::Immutable>
fn copy(&self) -> Retained<Self::Immutable>
Returns a new instance that’s a copy of the receiver.
The output type is the immutable counterpart of the object, which is
usually Self
, but e.g. NSMutableString
returns NSString
.
Trait Implementations§
source§impl ProtocolType for dyn NSCopying
impl ProtocolType for dyn NSCopying
impl<T> ImplementedBy<T> for dyn NSCopying
Implementations on Foreign Types§
impl<T> NSCopying for ProtocolObject<T>
Implementors§
impl NSCopying for NSAffineTransform
Available on crate feature
NSAffineTransform
only.impl NSCopying for NSAppleEventDescriptor
Available on crate feature
NSAppleEventDescriptor
only.impl NSCopying for NSAppleScript
Available on crate feature
NSAppleScript
only.impl NSCopying for NSAttributedString
Available on crate feature
NSAttributedString
only.impl NSCopying for NSAttributedStringMarkdownParsingOptions
Available on crate feature
NSAttributedString
only.impl NSCopying for NSAttributedStringMarkdownSourcePosition
Available on crate feature
NSAttributedString
only.impl NSCopying for NSByteCountFormatter
Available on crate features
NSFormatter
and NSByteCountFormatter
only.impl NSCopying for NSCachedURLResponse
Available on crate feature
NSURLCache
only.impl NSCopying for NSCalendar
Available on crate feature
NSCalendar
only.impl NSCopying for NSCalendarDate
Available on crate features
NSDate
and NSCalendarDate
only.impl NSCopying for NSCharacterSet
Available on crate feature
NSCharacterSet
only.impl NSCopying for NSComparisonPredicate
Available on crate features
NSPredicate
and NSComparisonPredicate
only.impl NSCopying for NSCompoundPredicate
Available on crate features
NSPredicate
and NSCompoundPredicate
only.impl NSCopying for NSData
Available on crate feature
NSData
only.impl NSCopying for NSDataDetector
Available on crate feature
NSRegularExpression
only.impl NSCopying for NSDate
Available on crate feature
NSDate
only.impl NSCopying for NSDateComponents
Available on crate feature
NSCalendar
only.impl NSCopying for NSDateComponentsFormatter
Available on crate features
NSFormatter
and NSDateComponentsFormatter
only.impl NSCopying for NSDateFormatter
Available on crate features
NSFormatter
and NSDateFormatter
only.impl NSCopying for NSDateInterval
Available on crate feature
NSDateInterval
only.impl NSCopying for NSDateIntervalFormatter
Available on crate features
NSFormatter
and NSDateIntervalFormatter
only.impl NSCopying for NSDecimalNumber
Available on crate features
NSValue
and NSDecimalNumber
only.impl NSCopying for NSDimension
Available on crate feature
NSUnit
only.impl NSCopying for NSEnergyFormatter
Available on crate features
NSFormatter
and NSEnergyFormatter
only.impl NSCopying for NSError
Available on crate feature
NSError
only.impl NSCopying for NSException
Available on crate feature
NSException
only.impl NSCopying for NSExpression
Available on crate feature
NSExpression
only.impl NSCopying for NSExtensionItem
Available on crate feature
NSExtensionItem
only.impl NSCopying for NSFileSecurity
Available on crate feature
NSURL
only.impl NSCopying for NSFormatter
Available on crate feature
NSFormatter
only.impl NSCopying for NSHTTPURLResponse
Available on crate feature
NSURLResponse
only.impl NSCopying for NSISO8601DateFormatter
Available on crate features
NSFormatter
and NSISO8601DateFormatter
only.impl NSCopying for NSIndexPath
Available on crate feature
NSIndexPath
only.impl NSCopying for NSIndexSet
Available on crate feature
NSIndexSet
only.impl NSCopying for NSInflectionRule
Available on crate feature
NSInflectionRule
only.impl NSCopying for NSInflectionRuleExplicit
Available on crate feature
NSInflectionRule
only.impl NSCopying for NSItemProvider
Available on crate feature
NSItemProvider
only.impl NSCopying for NSLengthFormatter
Available on crate features
NSFormatter
and NSLengthFormatter
only.impl NSCopying for NSListFormatter
Available on crate features
NSFormatter
and NSListFormatter
only.impl NSCopying for NSLocale
Available on crate feature
NSLocale
only.impl NSCopying for NSMachPort
Available on crate feature
NSPort
only.impl NSCopying for NSMassFormatter
Available on crate features
NSFormatter
and NSMassFormatter
only.impl NSCopying for NSMeasurementFormatter
Available on crate features
NSFormatter
and NSMeasurementFormatter
only.impl NSCopying for NSMessagePort
Available on crate feature
NSPort
only.impl NSCopying for NSMorphology
Available on crate feature
NSMorphology
only.impl NSCopying for NSMorphologyCustomPronoun
Available on crate feature
NSMorphology
only.impl NSCopying for NSMorphologyPronoun
Available on crate feature
NSMorphology
only.impl NSCopying for NSMutableAttributedString
Available on crate feature
NSAttributedString
only.impl NSCopying for NSMutableCharacterSet
Available on crate feature
NSCharacterSet
only.impl NSCopying for NSMutableData
Available on crate feature
NSData
only.impl NSCopying for NSMutableIndexSet
Available on crate feature
NSIndexSet
only.impl NSCopying for NSMutableString
Available on crate feature
NSString
only.impl NSCopying for NSMutableURLRequest
Available on crate feature
NSURLRequest
only.impl NSCopying for NSNotification
Available on crate feature
NSNotification
only.impl NSCopying for NSNull
Available on crate feature
NSNull
only.impl NSCopying for NSNumber
Available on crate feature
NSValue
only.impl NSCopying for NSNumberFormatter
Available on crate features
NSFormatter
and NSNumberFormatter
only.impl NSCopying for NSOrthography
Available on crate feature
NSOrthography
only.impl NSCopying for NSPersonNameComponents
Available on crate feature
NSPersonNameComponents
only.impl NSCopying for NSPersonNameComponentsFormatter
Available on crate features
NSFormatter
and NSPersonNameComponentsFormatter
only.impl NSCopying for NSPointerArray
Available on crate feature
NSPointerArray
only.impl NSCopying for NSPointerFunctions
Available on crate feature
NSPointerFunctions
only.impl NSCopying for NSPort
Available on crate feature
NSPort
only.impl NSCopying for NSPredicate
Available on crate feature
NSPredicate
only.impl NSCopying for NSPresentationIntent
Available on crate feature
NSAttributedString
only.impl NSCopying for NSRegularExpression
Available on crate feature
NSRegularExpression
only.impl NSCopying for NSRelativeDateTimeFormatter
Available on crate features
NSFormatter
and NSRelativeDateTimeFormatter
only.impl NSCopying for NSScanner
Available on crate feature
NSScanner
only.impl NSCopying for NSSocketPort
Available on crate feature
NSPort
only.impl NSCopying for NSSortDescriptor
Available on crate feature
NSSortDescriptor
only.impl NSCopying for NSString
Available on crate feature
NSString
only.impl NSCopying for NSTermOfAddress
Available on crate feature
NSTermOfAddress
only.impl NSCopying for NSTextCheckingResult
Available on crate feature
NSTextCheckingResult
only.impl NSCopying for NSTimeZone
Available on crate feature
NSTimeZone
only.impl NSCopying for NSURL
Available on crate feature
NSURL
only.impl NSCopying for NSURLComponents
Available on crate feature
NSURL
only.impl NSCopying for NSURLCredential
Available on crate feature
NSURLCredential
only.impl NSCopying for NSURLProtectionSpace
Available on crate feature
NSURLProtectionSpace
only.impl NSCopying for NSURLQueryItem
Available on crate feature
NSURL
only.impl NSCopying for NSURLRequest
Available on crate feature
NSURLRequest
only.impl NSCopying for NSURLResponse
Available on crate feature
NSURLResponse
only.impl NSCopying for NSURLSessionConfiguration
Available on crate feature
NSURLSession
only.impl NSCopying for NSURLSessionDataTask
Available on crate feature
NSURLSession
only.impl NSCopying for NSURLSessionDownloadTask
Available on crate feature
NSURLSession
only.impl NSCopying for NSURLSessionStreamTask
Available on crate feature
NSURLSession
only.impl NSCopying for NSURLSessionTask
Available on crate feature
NSURLSession
only.impl NSCopying for NSURLSessionUploadTask
Available on crate feature
NSURLSession
only.impl NSCopying for NSURLSessionWebSocketTask
Available on crate feature
NSURLSession
only.impl NSCopying for NSUUID
Available on crate feature
NSUUID
only.impl NSCopying for NSUnit
Available on crate feature
NSUnit
only.impl NSCopying for NSUnitAcceleration
Available on crate feature
NSUnit
only.impl NSCopying for NSUnitAngle
Available on crate feature
NSUnit
only.impl NSCopying for NSUnitArea
Available on crate feature
NSUnit
only.impl NSCopying for NSUnitConcentrationMass
Available on crate feature
NSUnit
only.impl NSCopying for NSUnitDispersion
Available on crate feature
NSUnit
only.impl NSCopying for NSUnitDuration
Available on crate feature
NSUnit
only.impl NSCopying for NSUnitElectricCharge
Available on crate feature
NSUnit
only.impl NSCopying for NSUnitElectricCurrent
Available on crate feature
NSUnit
only.impl NSCopying for NSUnitElectricPotentialDifference
Available on crate feature
NSUnit
only.impl NSCopying for NSUnitElectricResistance
Available on crate feature
NSUnit
only.impl NSCopying for NSUnitEnergy
Available on crate feature
NSUnit
only.impl NSCopying for NSUnitFrequency
Available on crate feature
NSUnit
only.impl NSCopying for NSUnitFuelEfficiency
Available on crate feature
NSUnit
only.impl NSCopying for NSUnitIlluminance
Available on crate feature
NSUnit
only.impl NSCopying for NSUnitInformationStorage
Available on crate feature
NSUnit
only.impl NSCopying for NSUnitLength
Available on crate feature
NSUnit
only.impl NSCopying for NSUnitMass
Available on crate feature
NSUnit
only.impl NSCopying for NSUnitPower
Available on crate feature
NSUnit
only.impl NSCopying for NSUnitPressure
Available on crate feature
NSUnit
only.impl NSCopying for NSUnitSpeed
Available on crate feature
NSUnit
only.impl NSCopying for NSUnitTemperature
Available on crate feature
NSUnit
only.impl NSCopying for NSUnitVolume
Available on crate feature
NSUnit
only.impl NSCopying for NSUserNotification
Available on crate feature
NSUserNotification
only.impl NSCopying for NSUserNotificationAction
Available on crate feature
NSUserNotification
only.impl NSCopying for NSValue
Available on crate feature
NSValue
only.impl NSCopying for NSXMLDTD
Available on crate features
NSXMLNode
and NSXMLDTD
only.impl NSCopying for NSXMLDTDNode
Available on crate features
NSXMLNode
and NSXMLDTDNode
only.impl NSCopying for NSXMLDocument
Available on crate features
NSXMLNode
and NSXMLDocument
only.impl NSCopying for NSXMLElement
Available on crate features
NSXMLNode
and NSXMLElement
only.impl NSCopying for NSXMLNode
Available on crate feature
NSXMLNode
only.impl<KeyType: ?Sized + IsIdCloneable, ObjectType: ?Sized + IsIdCloneable> NSCopying for NSDictionary<KeyType, ObjectType>
Available on crate feature
NSDictionary
only.impl<KeyType: ?Sized + IsIdCloneable, ObjectType: ?Sized + IsIdCloneable> NSCopying for NSMapTable<KeyType, ObjectType>
Available on crate feature
NSMapTable
only.impl<KeyType: ?Sized + IsIdCloneable, ObjectType: ?Sized + IsIdCloneable> NSCopying for NSMutableDictionary<KeyType, ObjectType>
Available on crate feature
NSDictionary
only.impl<ObjectType: ?Sized + IsIdCloneable> NSCopying for NSArray<ObjectType>
Available on crate feature
NSArray
only.impl<ObjectType: ?Sized + IsIdCloneable> NSCopying for NSCountedSet<ObjectType>
Available on crate feature
NSSet
only.impl<ObjectType: ?Sized + IsIdCloneable> NSCopying for NSHashTable<ObjectType>
Available on crate feature
NSHashTable
only.impl<ObjectType: ?Sized + IsIdCloneable> NSCopying for NSMutableArray<ObjectType>
Available on crate feature
NSArray
only.impl<ObjectType: ?Sized + IsIdCloneable> NSCopying for NSMutableOrderedSet<ObjectType>
Available on crate feature
NSOrderedSet
only.impl<ObjectType: ?Sized + IsIdCloneable> NSCopying for NSMutableSet<ObjectType>
Available on crate feature
NSSet
only.impl<ObjectType: ?Sized + IsIdCloneable> NSCopying for NSOrderedSet<ObjectType>
Available on crate feature
NSOrderedSet
only.impl<ObjectType: ?Sized + IsIdCloneable> NSCopying for NSSet<ObjectType>
Available on crate feature
NSSet
only.impl<UnitType: ?Sized + IsIdCloneable> NSCopying for NSMeasurement<UnitType>
Available on crate feature
NSMeasurement
only.