RealmOptional
@available(*, deprecated, renamed: "RealmProperty", message: "RealmOptional<T> has been deprecated, use RealmProperty<T?> instead.")
public final class RealmOptional<Value> : RLMSwiftValueStorage where Value : RealmOptionalType
extension RealmOptional: SchemaDiscoverable, _RealmSchemaDiscoverable where Value: _RealmSchemaDiscoverable
extension RealmOptional: Equatable where Value: Equatable
extension RealmOptional: Codable where Value: Codable, Value: _RealmSchemaDiscoverable
A RealmOptional instance represents an optional value for types that can’t be
directly declared as @objc in Swift, such as Int, Float, Double, and Bool.
To change the underlying value stored by a RealmOptional instance, mutate the instance’s value property.
-
The value the optional represents.
Declaration
Swift
public var value: Value? { get set } -
Creates a
RealmOptionalinstance encapsulating the given default value.Declaration
Swift
public init(_ value: Value? = nil)Parameters
valueThe value to store in the optional, or
nilif not specified.
-
Undocumented
Declaration
Swift
public static var _rlmType: PropertyType { get } -
Undocumented
Declaration
Swift
public static var _rlmOptional: Bool { get } -
Undocumented
Declaration
Swift
public static var _rlmRequireObjc: Bool { get } -
Undocumented
Declaration
Swift
public static func _rlmPopulateProperty(_ prop: RLMProperty)
-
Declaration
Swift
public static func == (lhs: RealmOptional<Value>, rhs: RealmOptional<Value>) -> Bool
-
Declaration
Swift
public convenience init(from decoder: Decoder) throws -
Declaration
Swift
public func encode(to encoder: Encoder) throws
View on GitHub
Install in Dash