Optional in Swift means the possibility of absence of a value for variable or constant. Optionals are required in many cases in real world programming. Declaring optionals is very simple. You just need to write the type with a trailing question mark
In this post we will be seeing Custom Types As Raw Value for Enum in Swift. So for your custom type (Class/Struct) to be used as raw value of enums you will need to conform to Equatable and one of the above mentioned protocols.
You use implicitly unwrapped optional only in places where the value of the variable is present before it is first accessed. If you try to access the the value of implicitly unwrapped optional, and the value is nil, you will a runtime exception.