@frozen
public struct LinkingObjects<Element> : RealmCollectionImpl where Element : RLMObjectBase, Element : RealmCollectionValue
extension LinkingObjects: RealmSubscribable
extension LinkingObjects: LinkingObjectsProtocol
LinkingObjects
is an auto-updating container type. It represents zero or more objects that are linked to its owning model object through a property relationship.
LinkingObjects
can be queried with the same predicates as List<Element>
and Results<Element>
.
LinkingObjects
always reflects the current state of the Realm on the current thread, including during write transactions on the current thread. The one exception to this is when using for...in
enumeration, which will always enumerate over the linking objects that were present when the enumeration is begun, even if some of them are deleted or modified to no longer link to the target object during the enumeration.
LinkingObjects
can only be used as a property on Object
models.
Creates an instance of a LinkingObjects
. This initializer should only be called when declaring a property on a Realm model.
Swift
public init(fromType _: Element.Type, property propertyName: String)
Parameters type
The type of the object owning the property the linking objects should refer to.
propertyName
The property name of the property the linking objects should refer to.
A human-readable description of the objects represented by the linking objects.
DeclarationSwift
public var description: String { get }
Returns the object at the given index
.
Swift
public subscript(index: Int) -> Element { get }
Swift
public static func == (lhs: LinkingObjects<Element>, rhs: LinkingObjects<Element>) -> Bool
A publisher that emits Void each time the collection changes.
Despite the name, this actually emits after the collection has changed.
DeclarationSwift
public var objectWillChange: RealmPublishers.WillChange<LinkingObjects> { get }
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4