ObjectSnapshot

@dynamicMemberLookup
public struct ObjectSnapshot<O> : ObjectRepresentation, Hashable where O : DynamicObject
extension ObjectSnapshot: CustomDebugStringConvertible, CoreStoreDebugStringConvertible

The ObjectSnapshot is a full copy of a DynamicObject‘s properties at a given point in time. This is useful especially when keeping thread-safe state values, in ViewModels for example. Since this is a value type, any changes in this struct does not affect the actual object.

AnyObjectRepresentation

ObjectRepresentation

Equatable

  • Declaration

    Swift

    public static func == (lhs: `Self`, rhs: `Self`) -> Bool

Hashable

  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)

CustomDebugStringConvertible

  • Declaration

    Swift

    public var debugDescription: String { get }

Available where O: NSManagedObject

Available where O: CoreStoreObject