public final class RealmProperty<Value> : RLMSwiftValueStorage where Value : RealmPropertyType
extension RealmProperty: Equatable where Value: Equatable
extension RealmProperty: Codable where Value: Codable
A RealmProperty
instance represents an polymorphic value for supported types.
To change the underlying value stored by a RealmProperty
instance, mutate the instance’s value
property.
Note
An
RealmProperty
should not be declared as
@objc dynamic
on a Realm Object. Use
let
instead.
Used for getting / setting the underlying value.
class MyObject: Object { let myAnyValue = RealmProperty<AnyRealmValue>() } // Setting myObject.myAnyValue.value = .string("hello") // Getting if case let .string(s) = myObject.myAnyValue.value { print(s) // Prints 'Hello' }
Swift
public var value: Value { get set }
Value
: Equatable
Swift
public static func == (lhs: RealmProperty<Value>, rhs: RealmProperty<Value>) -> Bool
Value
: Codable
Swift
public convenience init(from decoder: Decoder) throws
Swift
public func encode(to encoder: Encoder) throws
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