XCode 16.3 日本語化計画:New Human Interface Guideline
値を暗黙的または明示的にコピーできる型。
protocol Copyable
このプロトコルに準拠するということは、型の値がコピー可能であることを意味します。このプロトコルには必須のメソッドやプロパティはありません。通常、Copyable への準拠を明示的に記述する必要はありません。以下の箇所では暗黙的に Copyable への準拠が含まれています。
クラスまたはアクターは、コピー不可能な格納プロパティを含むことができますが、それ自体はコピー可能です。クラスとアクターは、参照を保持および解放することによってコピーされます。
ジェネリック (汎用) 型パラメータを含む宣言では、各ジェネリック型パラメータの要件リストに暗黙的に Copyable が含まれます。コピー可能な型のメタタイプとタプルも、ボックス化されたプロトコル型と同様に暗黙的にコピー可能です。例えば、以下の宣言のペアはすべて同等です。
struct MyStructure { } struct MyStructere: Copyable { } protocol MyProtocol { } protocol MyProtocol: Copyable { } protocol AnotherProtocol { associatedtype MyType associatedtype MyType: Copyable } func genericFunction<T>(t: T) { } func genericFunction<T>(t: T) where T: Copyable { } let x: any MyProtocol let x: any MyProtocol & Copyable
Copyable への暗黙的な準拠を抑制するには、~Copyable と記述して下さい。例えば、上記の例ではコピー可能な型のみが MyProtocol に準拠しますが、以下の例ではコピー可能な型とコピー不可能な型の両方が NoRequirements に準拠します。
Copyable プロトコルの拡張は許可されません。
Anchor
Element が Copyable かつ Escapable に準拠している場合に準拠します。
Element が Copyable かつ Escapable に準拠している場合に準拠します。
Element が Copyable かつ Escapable に準拠している場合に準拠します。
Element が Copyable かつ Escapable に準拠している場合に準拠します。
AnyRegexOutput
Element が Copyable かつ Escapable に準拠している場合に準拠します。
Element が Copyable かつ Escapable に準拠している場合に準拠します。
ArraySlice
Element が Copyable かつ Escapable に準拠している場合に準拠します。
AsyncCompactMapSequence
Base が AsyncSequence に準拠し, ElementOfResult が Copyable に準拠し, ElementOfResult が Escapable に準拠している場合に準拠します。
AsyncDropFirstSequence
Base が AsyncSequence に準拠している場合に準拠します。
AsyncDropWhileSequence
Base が AsyncSequence に準拠している場合に準拠します。
AsyncFilterSequence
Base が AsyncSequence に準拠している場合に準拠します。
AsyncFlatMapSequence
Base が AsyncSequence に準拠し、SegmentOfResult が AsyncSequence に準拠している場合に準拠します。
AsyncMapSequence
Base が AsyncSequence に準拠し, Transformed が Copyable に準拠し, Transformed が Escapable に準拠している場合に準拠します。
AsyncPrefixSequence
Base が AsyncSequence に準拠している場合に準拠します。
AsyncPrefixWhileSequence
Base が AsyncSequence に準拠している場合に準拠します。
AsyncStream
Element が Copyable と Escapable に準拠している場合に準拠します。
AsyncStream.Continuation
Element が Copyable と Escapable に準拠している場合に準拠します。
AsyncStream.Continuation.Termination
Element が Copyable と Escapable に準拠している場合に準拠します。
AsyncThrowingCompactMapSequence
Base が AsyncSequence に準拠し, ElementOfResult が Copyable に準拠し, ElementOfResult が Escapable に準拠している場合に準拠します。
AsyncThrowingDropWhileSequence
Base が AsyncSequence に準拠している場合準拠します。
AsyncThrowingFilterSequence
Base が AsyncSequence に準拠している場合準拠します。
AsyncThrowingFlatMapSequence
Base が AsyncSequence に準拠し SegmentOfResult が AsyncSequence に準拠している場合準拠します。
AsyncThrowingMapSequence
Base が AsyncSequence に準拠し, Transformed が Copyable に準拠し, Transformed が Escapable に準拠している場合準拠します。
AsyncThrowingPrefixWhileSequence
Base が AsyncSequence に準拠している場合準拠します。
AsyncThrowingStream
Element が Copyable に準拠し, Element が Escapable に準拠し, Failure が Error に準拠している場合準拠します。
AsyncThrowingStream.Continuation
Element が Copyable に準拠し, Element が Escapable に準拠し, Failure が Error に準拠している場合準拠します。
AtomicLoadOrdering
AtomicStoreOrdering
AtomicUpdateOrdering
AutoreleasingUnsafeMutablePointerPointee が Copyable と Escapable に準拠している場合準拠します。
CVaListPointer
Capture
Output が Copyable と Escapable に準拠している場合準拠します。
CharacterClass
ChoiceOf
Output が Copyable と Escapable に準拠している場合準拠します。
ClosedRange
Bound が Comparable に準拠している場合準拠します。
ClosedRange.Index
Bound が Strideable に準拠し Bound.Stride が SignedInteger に準拠している場合準拠します。
CollectionDifference
ChangeElement が Copyable と Escapable に準拠している場合準拠します。
CollectionDifference.Change
ChangeElement が Equatable に準拠している場合準拠します。
CollectionDifference.Index
ChangeElement が Copyable と Escapable に準拠している場合準拠します。
CollectionOfOne
Element が Copyable と Escapable に準拠している場合準拠します。
CollectionOfOne.Iterator
Element が Copyable と Escapable に準拠している場合準拠します。
ContiguousArray
Element が Encodable に準拠している場合準拠します。
ContinuousClock
ContinuousClock.Instant
DecodingErrorDefaultIndices
Elements が Collection に準拠している場合準拠します。
Key が Encodable に準拠し, Key が Hashable に準拠し, Value が Encodable に準拠している場合準拠します。
Key が Hashable に準拠し, Value が Copyable に準拠し, Value が Escapable に準拠している場合準拠します。
Key が Hashable に準拠し, Value が Copyable に準拠し, Value が Escapable に準拠している場合準拠します。
Key が Hashable に準拠し, Value が Copyable に準拠し, Value が Escapable に準拠している場合準拠します。
Key が Hashable に準拠し, Value が Copyable に準拠し, Value が Escapable に準拠している場合準拠します。
DiscardingTaskGroup
DiscontiguousSlice
Base が Collection に準拠し Base.Element が Equatable に準拠している場合準拠します。
DiscontiguousSlice.Index
Base が Collection に準拠している場合準拠します。
DispatchMainExecutor
DropFirstSequence
Base が Sequence に準拠している場合準拠します。
DropWhileSequence
Base が Sequence に準拠している場合準拠します。
DropWhileSequence.Iterator
Base が Sequence に準拠している場合準拠します。
Duration
Duration.TimeFormatStyle
Duration.TimeFormatStyle.Attributed
Duration.UnitsFormatStyle
Duration.UnitsFormatStyle.Attributed
EmptyCollection
Element が Copyable と Escapable に準拠している場合準拠します。
EmptyCollection.Iterator
Element が Copyable と Escapable に準拠している場合準拠します。
Base が Sequence に準拠している場合準拠します。
EnumeratedSequence.Index
Base が Collection に準拠している場合準拠します。
EnumeratedSequence.Iterator
Base が Sequence に準拠している場合準拠します。
ExecuteDistributedTargetError.ErrorCode
ExecutorJob.Kind
FlattenSequence
Base が Sequence に準拠し Base.Element が Sequenceに準拠している場合準拠します。
FlattenSequence.Index
Base が Collection に準拠し Base.Element が Collection に準拠している場合準拠します。
FlattenSequence.Iterator
Base が Sequence に準拠し Base.Element が Sequenceに準拠している場合準拠します。
Float16
IndexingIterator
Elements が Collection に準拠している場合準拠します。
InlineArray
Element が Copyable と Escapable に準拠している場合準拠します。
Int.Words
Int128
Int16.Words
Int32.Words
Int64.Words
Int8.Words
IteratorSequence
Base が IteratorProtocol に準拠している場合準拠します。
JobPriority
JoinedSequence
Base が Sequence に準拠し Base.Element が Sequence に準拠している場合準拠します。
JoinedSequence.Iterator
Base が Sequence に準拠し Base.Element が Sequence に準拠している場合準拠します。
Key が Copyable に準拠し, Key が Escapable に準拠し, Value が Copyable に準拠し, Value が Escapable に準拠している場合準拠します。
LazyDropWhileSequence
Base が Sequence に準拠している場合準拠します。
LazyDropWhileSequence.Iterator
Base が Sequence に準拠している場合準拠します。
LazyFilterSequence
Base が Sequence に準拠している場合準拠します。
LazyFilterSequence.Iterator
Base が Sequence に準拠している場合準拠します。
LazyMapSequence
Base が Sequence に準拠し, Element が Copyable に準拠し, Element が Escapable に準拠している場合準拠します。
LazyMapSequence.Iterator
Base が Sequence に準拠し, Element が Copyable に準拠し, Element が Escapable に準拠している場合準拠します。
LazyPrefixWhileSequence
Base が Sequence に準拠している場合準拠します。
LazyPrefixWhileSequence.Index
Base が Collection に準拠している場合準拠します。
LazyPrefixWhileSequence.Iterator
Base が Sequence に準拠している場合準拠します。
LazySequence
Base が Collection に準拠している場合準拠します。
Local
Outpu が Copyable と Escapable に準拠している場合準拠します。
Lookahead
Outpu が Copyable と Escapable に準拠している場合準拠します。
ManagedBufferPointer
Header が Copyable に準拠し, Header が Escapable に準拠し, Element が Escapable に準拠している場合準拠します。
NegativeLookahead
Output が Copyable と Escapable に準拠している場合準拠します。
ObjectIdentifier
ObservationRegistrar
OneOrMore
Output が Copyable と Escapable に準拠している場合準拠します。
Optional
Wrapped が Encodable に準拠している場合準拠します。
Optional.Publisher
Wrapped が Equatable に準拠している場合準拠します。
Optionally
Output が Copyable と Escapable に準拠している場合準拠します。
Bound が Comparable に準拠している場合準拠します。
Bound が Comparable に準拠している場合準拠します。
Bound が Comparable に準拠している場合準拠します。
PrefixSequence
Base が Sequence に準拠している場合準拠します。
PrefixSequence.Iterator
Base が Sequence に準拠している場合準拠します。
Bound が Strideable に準拠し Bound.Stride が SignedInteger に準拠している場合準拠します。
RangeSet
Bound が Comparable に準拠している場合準拠します。
RangeSet.Ranges
Bound が Comparable に準拠している場合準拠します。
Repeat
Output が Copyable と Escapable に準拠している場合準拠します。
Repeated
Element が Copyable と Escapable に準拠している場合準拠します。
Result
Success が Copyable に準拠し Failure が Error に準拠している場合準拠します。
Result.Publisher
Success が Equatable に準拠し, Failure が Equatable に準拠し, Failure が Error に準拠している場合準拠します。
ReversedCollection
Base が BidirectionalCollection と LazySequenceProtocol に準拠している場合準拠します。
ReversedCollection.Index
Base が BidirectionalCollection に準拠している場合準拠します。
ReversedCollection.Iterator
Base が BidirectionalCollection に準拠している場合準拠します。
SIMD16
Scalar が SIMDScalar に準拠している場合準拠します。
SIMD2
Scalar が SIMDScalar に準拠している場合準拠します。
SIMD3
Scalar が SIMDScalar に準拠している場合準拠します。
SIMD32
Scalar が SIMDScalar に準拠している場合準拠します。
SIMD4
Scalar が SIMDScalar に準拠している場合準拠します。
SIMD64
Scalar が SIMDScalar に準拠している場合準拠します。
SIMD8
Scalar が SIMDScalar に準拠している場合準拠します。
Element が Encodable と Hashable に準拠している場合準拠します。
Element が Hashable に準拠している場合準拠します。
Element が Hashable に準拠している場合準拠します。
Base が Collection と LazySequenceProtocol に準拠している場合準拠します。
StaticBigInt
StrideThrough
Element が Strideable に準拠している場合準拠します。
StrideThroughIterator
Element が Strideable に準拠している場合準拠します。
StrideTo
Element が Strideable に準拠している場合準拠します。
StrideToIterator
Element が Strideable に準拠している場合準拠します。
String.IntentInputOptions.CapitalizationType
String.IntentInputOptions.KeyboardType
String.UTF16View
String.UTF8View
Substring.UTF16View
Substring.UTF8View
Substring.UnicodeScalarView
SuspendingClock
SuspendingClock.Instant
Task
Success が Copyable に準拠し, Success が Escapable に準拠し, Success が Sendable に準拠し, Failure が Error に準拠している場合準拠します。
TaskGroup
ChildTaskResult が Copyable,Escapable,および Sendable に準拠している場合準拠します。
TaskPriority
ThrowingDiscardingTaskGroup
Failure が Error に準拠している場合準拠します。
ThrowingTaskGroup
ChildTaskResult が Copyable に準拠し, ChildTaskResult が Escapable に準拠し, ChildTaskResult が Sendable に準拠し, Failure が Error に準拠している場合準拠します。
TryCapture
Output が Copyable と Escapable に準拠している場合準拠します。
UInt.Words
UInt128
UInt128.Words
UInt16.Words
UInt32.Words
UInt64.Words
UInt8.Words
UTF8Span.UnicodeScalarIterator
Unicode.ASCII
Unicode.ASCII.Parser
Unicode.GeneralCategory
Unicode.NumericType
Unicode.Scalar.UTF8View
Unicode.UTF16
Unicode.UTF16.ForwardParser
Unicode.UTF16.ReverseParser
Unicode.UTF32
Unicode.UTF32.Parser
Unicode.UTF8
Unicode.UTF8.ForwardParser
Unicode.UTF8.ReverseParser
Unicode.UTF8.ValidationError
Unicode.UTF8.ValidationError.Kind
UnicodeDecodingResult
Instance が Copyable と Escapable に準拠している場合準拠します。
UnownedJob
UnownedSerialExecutor
UnownedTaskExecutor
Element が Escapable に準拠している場合準拠します。
Element が Copyable と Escapable に準拠している場合準拠します。
UnsafeContinuation
T が Copyable に準拠し, T が Escapable に準拠し, E が Error に準拠している場合準拠します。
UnsafeCurrentTask
Element が Escapable に準拠している場合準拠します。
Pointee が Escapable に準拠している場合準拠します。
UnsafeMutableRawBufferPointer
Pointee が Escapable に準拠している場合準拠します。
UnsafeRawBufferPointer
UnsafeRawBufferPointer.Iterator
WordPair
ZeroOrMore
Output が Copyable と Escapable に準拠している場合準拠します。
Zip2Sequence
Sequence1 が Sequence に準拠し Sequence2 が Sequence に準拠している場合準拠します。
Zip2Sequence.Iterator
Sequence1 が Sequence に準拠し Sequence2 が Sequence に準拠している場合準拠します。