swift: Initial audit for Sendable

- All public Swift-defined structs except CdsiLookupResponse,
  which wraps LookupResponseEntryList, which can *probably* be made
  Sendable but I didn't spend time on it.

- All public Swift-defined enums except those being used purely as
  namespaces.

- All zkgroup types, since they are immutable and can be serialized
  and deserialized to send them anyway

- ServiceId and its subclasses, an immutable class hierarchy

- ProtocolAddress, PinHash, SenderCertificate and ServerCertificate,
  and all public and private Key types, immutable wrappers around
  immutable Rust objects

More of our wrapper types could be made Sendable as well if there's a
need to. See CODING_GUIDELINES for more info.
This commit is contained in:
Jordan Rose
2024-10-23 13:10:16 -07:00
committed by GitHub
parent ff402df673
commit e2b453fb18
77 changed files with 152 additions and 107 deletions

View File

@@ -6,7 +6,7 @@
import Foundation
import SignalFfi
public enum SizeChoice {
public enum SizeChoice: Sendable {
case bytes(UInt32)
case chunkOf(UInt32)