RawRepresentableGenerator
public struct RawRepresentableGenerator<RawValue, Representable> : IteratorProtocol where RawValue == Representable.RawValue, Representable : RawRepresentable
Creates a generator for the specified RawValue type.
-
Provides a baseRawValue and a function to get a new RawValue.
Declaration
Swift
public init(startingAt baseValue: Representable, valueSuccessor: @escaping (Representable) -> Representable?) -
Returns the new representable value.
Note
The first value, is always the element associated with the baseRawValue provided at init.Declaration
Swift
public mutating func next() -> Representable?
RawRepresentableGenerator Structure Reference