Collection
extension Collection where Element == RESPValue
extension Collection where Element: RESPValueConvertible
-
Maps the elements of the sequence to the type desired.
Declaration
Swift
@inlinable public func map<T>(as t1: T.Type) -> [T?] where T : RESPValueConvertible
Parameters
t1
The type to convert the elements to.
Return Value
An array of the results from the conversions.
-
Maps the first element to the type sepcified, with all remaining elements mapped to the second type.
Declaration
Swift
@inlinable public func map<T1, T2>(firstAs t1: T1.Type, remainingAs t2: T2.Type) -> (T1?, [T2?]) where T1: RESPValueConvertible, T2: RESPValueConvertible
-
Maps the first and second elements to the types specified, with any remaining mapped to the third type.
Declaration
Swift
@inlinable public func map<T1, T2, T3>( firstAs t1: T1.Type, _ t2: T2.Type, remainingAs t3: T3.Type ) -> (T1?, T2?, [T3?]) where T1: RESPValueConvertible, T2: RESPValueConvertible, T3: RESPValueConvertible
-
Maps the first, second, and third elements to the types specified, with any remaining mapped to the fourth type.
Declaration
Swift
@inlinable public func map<T1, T2, T3, T4>( firstAs t1: T1.Type, _ t2: T2.Type, _ t3: T3.Type, remainingAs t4: T4.Type ) -> (T1?, T2?, T3?, [T4?]) where T1: RESPValueConvertible, T2: RESPValueConvertible, T3: RESPValueConvertible, T4: RESPValueConvertible