ImplicitlyUnwrappedOptional

enum ImplicitlyUnwrappedOptional<T>

An optional type that allows implicit member access (via compiler magic).

The compiler has special knowledge of the existence of ImplicitlyUnwrappedOptional<T>, but always interacts with it using the library intrinsics below.

Inheritance NilLiteralConvertible, Printable, Reflectable, _ObjectiveCBridgeable View Protocol Hierarchy →
Import import Swift

Cases

Initializers

init()

Construct a nil instance.

Declaration

init()
init(_: T)

Construct a non-nil instance that stores some.

Declaration

init(_ some: T)
init(_: T?)

Construct an instance from an explicitly unwrapped optional (T?).

Declaration

init(_ v: T?)
init(nilLiteral:)

Create an instance initialized with nil.

Declaration

init(nilLiteral: ())

Instance Variables

var description: String

A textual representation of self.

Declaration

var description: String { get }

Instance Methods

func flatMap(_:)

Returns f(self)! iff self and f(self) are not nil.

Declaration

func flatMap<U>(f: @noescape (T) -> U!) -> U!
func getMirror()

Returns a mirror that reflects self.

Declaration

func getMirror() -> MirrorType
func map(_:)

If self == nil, returns nil. Otherwise, returns f(self!).

Declaration

func map<U>(f: @noescape (T) -> U) -> U!