Protocol Extensions in Swift
1 min readMay 3, 2020
A protocol can defines a set of methods that can be adopted by any class, but we can’t write code inside.On the other hand, extensions gives us the power to write code inside methods, but it can only used for one type.
In Protocol Extensions, we can extend protocols to provide implementations to all conforming types rather than extending a particular type.