Protocols
The following protocols are available globally.
-
Objects of types which conform to
ThreadConfined
can be managed by a Realm, which will make them bound to a thread-specificRealm
instance. Managed objects must be explicitly exported and imported to be passed between threads.Managed instances of objects conforming to this protocol can be converted to a thread-safe reference for transport between threads by passing to the
ThreadSafeReference(to:)
constructor.Note that only types defined by Realm can meaningfully conform to this protocol, and defining new classes which attempt to conform to it will not make them work with
See moreThreadSafeReference
.Declaration
Swift
public protocol ThreadConfined
-
A protocol describing types that can parameterize a
RealmOptional
.Declaration
Swift
public protocol RealmOptionalType
-
A homogenous collection of
See moreObject
s which can be retrieved, filtered, sorted, and operated upon.Declaration
Swift
public protocol RealmCollection: RandomAccessCollection, LazyCollectionProtocol, CustomStringConvertible, ThreadConfined
-
Types of properties which can be used with the minimum and maximum value APIs.
See
min(ofProperty:)
,max(ofProperty:)
Declaration
Swift
public protocol MinMaxType
-
Types of properties which can be used with the sum and average value APIs.
See
sum(ofProperty:)
,average(ofProperty:)
Declaration
Swift
public protocol AddableType