Option
public struct Option<T> : Equatable where T : OptionDescriptive
An option struct that carries the OptionDescriptive
-
Returns an option that displays the optional value of an
OptionDescriptive
type.Declaration
Swift
public static var optional: Option<T> { get }
-
Returns an initialized option with an instance of an
OptionDescriptive
type.Declaration
Swift
public init(_ value: T)
-
Conformance to
OptionDescriptive
.Declaration
Swift
public var title: String { get }
-
The
OptionDescriptive
value of the option. Returnsnil
when it’s theoptional
placeholder.Declaration
Swift
public let value: T?
-
Returns true when two options’ values are equal.
Declaration
Swift
public static func == (lhs: Option<T>, rhs: Option<T>) -> Bool